Hi Yanhong,
I see two problems with your script, one likely minor and one major. The
minor problem is that you define Lon and Lat, but pass in lon and lat to
rcm2rgrid and rgrid2rcm. NCL is case-sensitive, so they should either
all be lat (lon) or Lat (Lon). I am guessing that within your script you
did do this correctly, as you would be receiving errors.
The major problem is that you are not passing the regridded array
(Xgrd_U) into rgrid2rcm, but the original array U:
Xgrd_U = rcm2rgrid(lat2d,lon2d,U,lat,lon,0 )
U_back = rgrid2rcm(lat,lon,U,lat2d,lon2d,0 )
I think what you meant to do was this:
Xgrd_U = rcm2rgrid(lat2d,lon2d,U,lat,lon,0 )
U_back = rgrid2rcm(lat,lon,Xgrd_U,lat2d,lon2d,0 )
Thus, plotting U and U_back should yield minor differences.
Good luck,
Adam
On 05/19/2010 06:08 PM, Yanhong Gao wrote:
>
> Dear all,
>
> I did a test interpolate WRF output to regular lon-lat grid using
> rcm2rgrid and interpolate back to the original WRF
> grid using rgrid2rcm. The figure of output seems not the same as the
> original one. Many grids with no data. what¢s
> wrong? The following is my script. Any suggetion will be appreciated.
>
> .....
>
> Lon = fspan (230,290,60)
> Lat = fspan (25,55,30)
> U=f->U(:,:)
> Lat2d =f->lat(:,:)
> Lon2d=f->lon(:,:)
> Xgrd_U = rcm2rgrid(lat2d,lon2d,U,lat,lon,0 )
> U_back = rgrid2rcm(lat,lon,U,lat2d,lon2d,0 )
>
> filout = "output.nc"
> fout = addfile (filout, "c")
> fout->prate = U
> fout->xgrd_UQ =xgrd_U
> fout->temp =U_back
>
>
> Yanhong
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- __________________________________________________ Adam Phillips asphilli@ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 Climate and Global Dynamics Division fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu May 20 10:04:41 2010
This archive was generated by hypermail 2.1.8 : Wed May 26 2010 - 10:39:13 MDT