[Wrf-users] Bug in wrfpostproc 2.2.1 NMM centre lon/lat code
Jaakko Hyvätti
jaakko.hyvatti at iki.fi
Thu Jun 28 07:53:29 MDT 2007
Hi all nested NMM users,
Please ignore my previous patch. Correct solution is far simpler.
The changes made to INITPOST.f in version INITPOST_NMM.f that try to
calculate the projection rotation longitude and latitude from the
projection centre are invalid. To fix the nested domain output GRIB GDS
one needs to revert the changes by 'gopal' to calculations of cenlat and
cenlon in INITPOST_NMM.f. I reverted them to to what they were in
INITPOST.f - get the values directly from CEN_LAT and CEN_LON. Works
great. Patch attached.
On Wed, 27 Jun 2007, Jaakko Hyvätti wrote:
> The best solution would be to carry the centre point from global attributes
> in the netcdf file, CEN_LAT and CEN_LON. I have not yet checked how to do
> that or if it will work. Maybe later. And I do not know how this relates to
> nested domains.
Regards,
Jaakko
-------------- next part --------------
--- INITPOST_NMM.f 2007-02-21 05:07:49.000000000 +0200
+++ /home/wsfmgr/INITPOST_NMM.f 2007-06-28 16:51:10.000000000 +0300
@@ -1742,16 +1742,6 @@
if(me.eq.0)then
latstart=nint(dummy(1,1)*1000.)
latlast=nint(dummy(im,jm)*1000.)
-! temporary patch for nmm wrf for moving nest. gopal's doing
- if(mod(im,2).ne.0) then
- icen=(im+1)/2
- jcen=(jm+1)/2
- cenlat=nint(dummy(icen,jcen)*1000.)
- else
- icen=im/2
- jcen=(jm+1)/2
- cenlat=nint(0.5*(dummy(icen,jcen)+dummy(icen+1,jcen))*1000.)
- end if
end if
write(6,*) 'laststart,latlast B calling bcast= '
+, latstart,latlast
@@ -1763,16 +1753,6 @@
if(me.eq.0)then
lonstart=nint(dummy(1,1)*1000.)
lonlast=nint(dummy(im,jm)*1000.)
-! temporary patch for nmm wrf for moving nest. gopal's doing
- if(mod(im,2).ne.0) then
- icen=(im+1)/2
- jcen=(jm+1)/2
- cenlon=nint(dummy(icen,jcen)*1000.)
- else
- icen=im/2
- jcen=(jm+1)/2
- cenlon=nint(0.5*(dummy(icen,jcen)+dummy(icen+1,jcen))*1000.)
- end if
end if
write(6,*)'lonstart,lonlast B calling bcast= '
+, lonstart,lonlast
@@ -1890,15 +1870,11 @@
write(6,*) 'dyval= ', dyval
call ext_ncd_get_dom_ti_real(DataHandle,'CEN_LAT',tmp
+ ,1,ioutcount,istatus)
-! temporary patch for nmm wrf
-! temporary patch for nmm wrf for moving nest. gopal's doing
-! cenlat=nint(1000.*tmp) !cenlat is now glat(im/2,jm2)
+ cenlat=nint(1000.*tmp)
write(6,*) 'cenlat= ', cenlat
call ext_ncd_get_dom_ti_real(DataHandle,'CEN_LON',tmp
+ ,1,ioutcount,istatus)
-! temporary patch for nmm wrf
-! temporary patch for nmm wrf for moving nest. gopal's doing
-! cenlon=nint(1000.*tmp) !cenlon is now glon(im/2,jm/2)
+ cenlon=nint(1000.*tmp)
write(6,*) 'cenlon= ', cenlon
! JW call ext_ncd_get_dom_ti_real(DataHandle,'TRUELAT1',tmp
! JW + ,1,ioutcount,istatus)
More information about the Wrf-users
mailing list