# Re: rcm2rgrid?

From: Mark Snyder <msnyder_at_nyahnyahspammersnyahnyah>
Date: Wed, 15 Mar 2006 12:44:13 -0800

Hi Bob,

One of the frequent problems I run into is that RCM data typically uses
longitude values of -180 to 180, and if you try to interpolate to a lat/lon
grid with longitude values of 0 to 360, you usually end up with _FillValues.
My suggestion is to either convert the RCM data to 0 to 360 longitude
values, or interpolate to a lat/lon grid with -180 to 180 longitude values.

I've attached a script below.

begin

lat2 = latGlobeF(360,"lat","latitude","degrees_north")
lon2 = lonGlobeF(720,"lon","longitude","degrees_east")

lon2 = (/ lon2 - 180./)
lon2&lon = lon2

lat2&lat = lat2

system("rm winds_all_60_00_reg.nc")

lat2d = f->XLAT(0,:,:)
lon2d = f->XLON(0,:,:)
uvar = f->U
vvar = f->V

lat = lat2({27:48})
lon = lon2({-133:-109})

ugrd = rcm2rgrid(lat2d,lon2d,uvar,lat,lon,0)
vgrd = rcm2rgrid(lat2d,lon2d,vvar,lat,lon,0)

ugrd!0 = "time"
ugrd!1 = "level"
ugrd!2 = "lat"
ugrd!3 = "lon"

vgrd!0 = "time"
vgrd!1 = "level"
vgrd!2 = "lat"
vgrd!3 = "lon"

outf->lat = lat
outf->lon = lon

outf->U = ugrd
outf->V = vgrd

end

> Hello
>
> Has anyone successfully used the function rcm2rgrid to regrid regional
> climate model grid to a lat/lon regular grid?
>
> If so, will you please send me a copy of your script?
>
> I'm fairly certain that I'm calling it correctly, using the example on the NCL
> web page as a guide, but I can only get it to return _FillValues.
>
>
> Thanks
>
> Bob

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 15 2006 - 13:44:13 MST

This archive was generated by hypermail 2.2.0 : Wed Mar 29 2006 - 11:52:48 MST