NEMS NMMB topic

All other topics about postprocessing model data (GrADS and other software), about other numerical weather prediction software (including WRF-NMM and WRF-ARW discussion unrelated to UEMS/WRF EMS), and general meteorology talk go in this forum.
oib
Posts: 117
Joined: Mon Jan 31, 2011 3:29 pm

Re: NEMS NMMB topic

Post by oib » Sat Mar 25, 2017 4:08 pm

I think that the fields you are mentioning come from UPP post-processing.
Perhaps radar reflectivity is the only one you can find ready into the direct model history output files.
So this seems to me an UPP trouble not an NNMB problem.

Hovewer I will try to check this, by running with the Thompson MP.
Currently I only run Ferrier-Aligo MP because, although it is less sophisticated, Thompson MP is 20% slower.
Let you know the results next week.

There is an important reason why you want to use the Thompson's scheme?

meteoadriatic
Posts: 1512
Joined: Wed Aug 19, 2009 10:05 am

Re: NEMS NMMB topic

Post by meteoadriatic » Sat Mar 25, 2017 6:19 pm

I discused this with UPP help desk and they were insisting that problem is not within UPP but model itself that does not send required fields to calculate those mentioned parameters (they determined it from logs I sent to them).

Well... Thompson was giving much better results than Ferrier old/new, especially less diurnal overwarming.

oib
Posts: 117
Joined: Mon Jan 31, 2011 3:29 pm

Re: NEMS NMMB topic

Post by oib » Mon Mar 27, 2017 11:26 am

meteoadriatic wrote:
Sat Mar 25, 2017 6:19 pm
I discused this with UPP help desk and they were insisting that problem is not within UPP but model itself that does not send required fields to calculate those mentioned parameters (they determined it from logs I sent to them).
OK Ivan, I confirm that also in our model unipost do not output CAPE when you use Thompson MP.

I think it is an unipost bug and I think it can be easily fixed.

CAPE is calculated by DTC unipost in CALCAPE.f, where you can see that the CAPE calculation involves the water vapor mixing ratio 'qv'. Really it uses the specific humidity, that unipost calculate from 'qv' as it reads 'qv' from the NEMSIO file.

Now it happens that when you use thompson MP, unipost has a bug.

Infact by comparing the unipost logs that come out when processing the NEMSIO binary output files for 'fer_hires' and for 'thompson' MP, I have discovered that the only difference is that the log for the 'thompson' case has the following error:
qv mid layer 1
not found in NEMS file-Assigned missing values
and the error repeats for all the vertical levels 1,2 3, ...

This says that the file INITPOST_NEMS.f (the file where unipost read-in all NEMSIO variables) fails reading the 'qv', mixing ratio of water vapor.

In that file you can see that if it MP is 'thompson', INIPOST_NEMS.f pretend to read-in the var 'qv' (and when done, it converts 'qv' into the specific humidity).
But here it fails, because the NEMS-NMMB do not put the 'QV' variable into the NEMSIO output files.

I think this can be ealisy fixed, because fortunately NEMSIO files (both for 'fer_hires' and 'thompson') contains the specific humidity. It is named 'SPFH' in the NEMSIO file.

So we should try to solve this error modifying the file INITPOST_NEMS.f, by replacing the code:

Code: Select all

! water vapor, will be converted to specific humidity
       varname='qv'
       VcoordName='mid layer'
       do l=1,lm
         ll=l
         call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l          &
           ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName,VcoordName &
           ,l,impf,jmpf,nframe,q(1,jsta_2l,ll))
!$omp parallel do private(i,j)
         do j=jsta_2l,jend_2u
           do i=1,im
             q(i,j,ll) = max(10E-12,q(i,j,ll))
             q(i,j,ll) = q(i,j,ll) / (1.0+q(i,j,ll))
           end do
         end do
        if(debugprint)print*,'sample l ',VarName,' = '   &
          ,ll,q(im/2,(jsta+jend)/2,ll)
        if(debugprint)print*,'max min ',VarName,' = '  &
          ,ll,maxval(q(:,:,ll)),minval(q(:,:,ll))
       end do ! ,j,l) do loop for l
with a code like this:

Code: Select all

       VarName='spfh'
       VcoordName='mid layer'
       do l=1,lm	
!         ll=lm-l+1
        ll=l
        call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
        ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName,VcoordName &
        ,l,impf,jmpf,nframe,q(1,jsta_2l,ll))

         do j=jsta_2l,jend_2u
           do i=1,im
             q(i,j,ll) = spfh(i,j,ll)
           end do
         end do
         
       end do ! do loop for l
Will try this...
meteoadriatic wrote:
Sat Mar 25, 2017 6:19 pm
Well... Thompson was giving much better results than Ferrier old/new, especially less diurnal overwarming.
Really? I compared 'fer_hires' and 'thompson' 24h runs for today 00Z and can't see great differences in precipitation and temperatures.
Differences exist in cloud fractions and consequently in downward sw radiation.
Need further investigation about this.
Perhaps NAMV4.0.0 enhancements have reduced the gap between 'fer_hires' and 'thompson'.

meteoadriatic
Posts: 1512
Joined: Wed Aug 19, 2009 10:05 am

Re: NEMS NMMB topic

Post by meteoadriatic » Mon Mar 27, 2017 6:43 pm

oib wrote:
Mon Mar 27, 2017 11:26 am
meteoadriatic wrote:
Sat Mar 25, 2017 6:19 pm
I discused this with UPP help desk and they were insisting that problem is not within UPP but model itself that does not send required fields to calculate those mentioned parameters (they determined it from logs I sent to them).
OK Ivan, I confirm that also in our model unipost do not output CAPE when you use Thompson MP.

I think it is an unipost bug and I think it can be easily fixed.

CAPE is calculated by DTC unipost in CALCAPE.f, where you can see that the CAPE calculation involves the water vapor mixing ratio 'qv'. Really it uses the specific humidity, that unipost calculate from 'qv' as it reads 'qv' from the NEMSIO file.

Now it happens that when you use thompson MP, unipost has a bug.

Infact by comparing the unipost logs that come out when processing the NEMSIO binary output files for 'fer_hires' and for 'thompson' MP, I have discovered that the only difference is that the log for the 'thompson' case has the following error:
qv mid layer 1
not found in NEMS file-Assigned missing values
and the error repeats for all the vertical levels 1,2 3, ...

This says that the file INITPOST_NEMS.f (the file where unipost read-in all NEMSIO variables) fails reading the 'qv', mixing ratio of water vapor.

In that file you can see that if it MP is 'thompson', INIPOST_NEMS.f pretend to read-in the var 'qv' (and when done, it converts 'qv' into the specific humidity).
But here it fails, because the NEMS-NMMB do not put the 'QV' variable into the NEMSIO output files.
Hello, up to this point I know all... but this:
oib wrote:
Mon Mar 27, 2017 11:26 am
I think this can be ealisy fixed, because fortunately NEMSIO files (both for 'fer_hires' and 'thompson') contains the specific humidity. It is named 'SPFH' in the NEMSIO file.

So we should try to solve this error modifying the file INITPOST_NEMS.f, by replacing the code:

Code: Select all

! water vapor, will be converted to specific humidity
       varname='qv'
       VcoordName='mid layer'
       do l=1,lm
         ll=l
         call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l          &
           ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName,VcoordName &
           ,l,impf,jmpf,nframe,q(1,jsta_2l,ll))
!$omp parallel do private(i,j)
         do j=jsta_2l,jend_2u
           do i=1,im
             q(i,j,ll) = max(10E-12,q(i,j,ll))
             q(i,j,ll) = q(i,j,ll) / (1.0+q(i,j,ll))
           end do
         end do
        if(debugprint)print*,'sample l ',VarName,' = '   &
          ,ll,q(im/2,(jsta+jend)/2,ll)
        if(debugprint)print*,'max min ',VarName,' = '  &
          ,ll,maxval(q(:,:,ll)),minval(q(:,:,ll))
       end do ! ,j,l) do loop for l
with a code like this:

Code: Select all

       VarName='spfh'
       VcoordName='mid layer'
       do l=1,lm	
!         ll=lm-l+1
        ll=l
        call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
        ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName,VcoordName &
        ,l,impf,jmpf,nframe,q(1,jsta_2l,ll))

         do j=jsta_2l,jend_2u
           do i=1,im
             q(i,j,ll) = spfh(i,j,ll)
           end do
         end do
         
       end do ! do loop for l
Will try this...
I never tried something like that. Maybe it will work. Did you get radar reflectivity from Thompson?
oib wrote:
Mon Mar 27, 2017 11:26 am
meteoadriatic wrote:
Sat Mar 25, 2017 6:19 pm
Well... Thompson was giving much better results than Ferrier old/new, especially less diurnal overwarming.
Really? I compared 'fer_hires' and 'thompson' 24h runs for today 00Z and can't see great differences in precipitation and temperatures.
Differences exist in cloud fractions and consequently in downward sw radiation.
Need further investigation about this.
During winter tmp2m was much better than during summer when Ferriers overestimated much more than Thompson runs tmp2m over low land terrain.
oib wrote:
Mon Mar 27, 2017 11:26 am
Perhaps NAMV4.0.0 enhancements have reduced the gap between 'fer_hires' and 'thompson'.
I hope it is. We need to wait summer or rerun few days from last year.

oib
Posts: 117
Joined: Mon Jan 31, 2011 3:29 pm

Re: NEMS NMMB topic

Post by oib » Tue Mar 28, 2017 7:29 am

meteoadriatic wrote:
Mon Mar 27, 2017 6:43 pm
Did you get radar reflectivity from Thompson?
Yes, both in NEMSIO and post-process UPP output files.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests