Hi Chris,
WRF output is usually *NOT* on a regular lat-lon grid.
You have to convert both higher and lower resolution grids to a regular
lat-lon grid using rcm2rgrid before the comparison
The function is documented at
http://ncl.ucar.edu/Document/Functions/Built-in/rcm2rgrid.shtml
; An example, assuming your file pointer is called "f"
    times  = wrf_user_list_times(f)  ; get times in the file
    ntimes = dimsizes(times)         ; number of times in the file
    var = wrf_user_getvar(f,vname,ntimes-1)
    lat2d  = f->XLAT(0,:,:)      ; this depends on the kind of variable
    lon2d  = f->XLONG(0,:,:)   ; this depends on the kind of variable
    dimll  = dimsizes(lat2d)                ; get size of dimensions
    nlat   = dimll(0)
    mlon   = dimll(1)
    lat1=(lat2d(0,0))
    lon1=(lon2d(0,0))
    lat2=(lat2d(nlat-1,mlon-1))
    lon2=(lon2d(nlat-1,mlon-1))
    lat = fspan(lat1,lat2,nlat)
    lon = fspan(lon1,lon2,mlon)
    var_r  = rcm2rgrid(lat2d,lon2d,var,lat,lon,0)
-- saji On Wed, Oct 6, 2010 at 4:10 PM, Christopher Steele < christopher.steele@uea.ac.uk> wrote: > Hi, > > I've been attempting to do a comparison of WRF simulations with differing > resolutions. To do this I have interpolated the lower resolution simulation > onto a grid the same size as the higher one using the linint2 command. Then > I simply find the difference between the two. The script itself works but it > produces strange output. There is a band of data running along the SW-NE > diagonal that is close to zero (or at least giving differences that are of a > magnitude that you would perhaps expect), which is sandwiched between > regions of unrealistically large values in the NW and SE corners. These > areas are the polar opposite to one another, ie, the higher resolution run > is unrealistically larger than the low in the NW and the lower is > unrealistically larger than the high resolution in the SE. These patterns > are apparent in the simulations at all times, suggesting that somehow one of > the data sets have been flipped in both the horizontal and vertical > dimensions though I cannot see how this has happened. > > Chances are I've made a glaring mistake somewhere in the script that I > can't see (possibly from staring at it blankly for too long), but has anyone > had experience with interpolating WRF data like this before and could offer > help? > > Sorry if the script appears a little messy! > > cheers > > Chris > > > > _______________________________________________ > ncl-talk mailing list > List instructions, subscriber options, unsubscribe: > http://mailman.ucar.edu/mailman/listinfo/ncl-talk > >
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct  6 01:57:57 2010
This archive was generated by hypermail 2.1.8 : Wed Oct 06 2010 - 09:53:35 MDT