Jingmin,
The ESMF regrid example should work in your case, since it looks like you have the 2D lat/lon arrays on your file.
Maybe instead of looking at the actual ESMF examples, you can try one of the ESMF templates.
I assume you want to regrid to a rectilinear grid, so see the "ESMF_WRF_to_rect.ncl" script at:
http://www.ncl.ucar.edu/Applications/Templates/
This particular script reads in XLAT and XLONG from a WRF file, but it looks like they are called "lat" and "lon" in your file, so you will need to change that.
Also, this script uses wrf_user_getvar to read the variable, which you probably don't need.
;---Get variable to regrid, and 2D lat/lon arrays
v = f->v
src_lat = f->lat
src_lon = f->lon
These two lines are what set the output rectilinear grid, which you'll need to modify as desired:
;---Create the destination lat/lon rectilinear grid
dst_lat = fspan( 53.2420, 85.4022,nlat) ;;---Change (likely)
dst_lon = fspan(135.7750,258.1880,nlon) ;;---Change (likely)
--Mary
On Apr 23, 2013, at 2:41 AM, jingmin li wrote:
> Hello,
>
> I have a wrf variable with xy_coordinate as west_east and south_north in
> meter : v(time, pressure, south_north, west_east). I need to convert
> them to the coordinate of lat and lon: v(time, pressure, lat, lon) .
> Would you please give me sugesstions on how should I process? Or are
> there any buildin functions which can do the job? I have checked ESMF
> regrid examples, but it seems that none of them works for this case.
>
> Detail information of wrf data:
> float v(time, pressure, south_north, west_east)
> float lon(south_north, west_east)
> float lat(south_north, west_east)
> coordinates: west_east
> west_east:long_name="x-coordinate in
> Cartesian system"
> west_east:units="m"
> south_north
> south_north:long_name="x-coordinate in
> Cartesian system"
> south_north:units="m"
>
>
>
> Thanks!
> Jingmin
> _______________________________________________
> 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 Tue Apr 23 12:23:57 2013
This archive was generated by hypermail 2.1.8 : Tue Apr 23 2013 - 12:54:13 MDT