Yang Yang wrote:
> Hello:
> I ran rcm2points by setting lat and lon with 2 or more elements without any problem.
> However, if I set lat and lon with only one element, the ncl script failed with the following error information:
>
> fatal:rcm2points: The input lat/lon grids must have at least 2 elements, and the output lat/lon arrays 1 element
>
> How to solve this problem? Thanks!
> Regards
> Ed
>
The following simple test script works fine.
=================================
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
nt = 0
kl = 20
a =
addfile("/project/cas/shea/WRF/wrfout_d01_2003-07-13_12:00:00.nc","r")
x = a->T(nt,kl,:,:)
lat2d = a->XLAT(nt,:,:) ; min= 16.789 max= 34.542
lon2d = a->XLONG(nt,:,:) ; min=-105.153 max=-82.847
latPts = (/22., 29./)
lonPts = (/-100., -93./)
xNew = rcm2points(lat2d, lon2d, x, latPts, lonPts, 1)
print(xNew)
; Test Ed's ncl-talk question
yPts = (/22./)
xPts = (/-100./)
xTst = rcm2points(lat2d, lon2d, x, yPts, xPts, 1)
print(xTst)
end
==================
Variable: xNew
Dimensions and sizes: [2]
Coordinates:
0) 39.80119
(1) 39.21795
==================
Variable: xTst
Dimensions and sizes: [1]
(0) 39.80119
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 12 2008 - 08:33:13 MDT
This archive was generated by hypermail 2.2.0 : Fri Jun 13 2008 - 16:48:10 MDT