[ncl-talk] problem with cssgrid_Wrap
黄倩倩
hqhydx at 126.com
Fri Jan 19 08:07:09 MST 2018
Hi,
I have a problem when I try to use cssgrid_Wrap. Could you please help me solve it?
Thank you.
----------Problem:---------------
CSSGRID - error -121, coordinates 121 and M coincide for some M > 121 >= 1 (coordinate numbering starting at 1).
Error number -121 returned from c_cssgridd
fatal:cssgrid: Error number -121.
fatal:["Execute.c":8578]:Execute: Error occurred at or near line 5137 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
fatal:["Execute.c":8578]:Execute: Error occurred at or near line 45 in file 4-ave_10m_plot.ncl
--------ncl script---------
;draw isolines of annual mean air stagnation days
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
fname="/home/hqq/decouple/top10/USsounding/stat_dispersion/annual_mean_w10.txt"
lines = asciiread(fname,-1,"string")
xlat0=stringtofloat(str_get_field(lines(1:),2,","))
xlon0=stringtofloat(str_get_field(lines(1:),3,","))
xnum0=stringtofloat(str_get_field(lines(1:),5,","))
xnum0 at _FillValue=-999.
a = ind(.not.ismissing(xnum0))
xlat = xlat0(a)
xlon=xlon0(a)
xnum=xnum0(a)
delete(a)
ilat=new(60,float)
ilon=new(70,float)
ilat=fspan(24.,50.,60)
ilon=fspan(-125.,-66.,70)
ilon!0 = "lon"
ilon at long_name = "lon"
ilon at units = "degrees_east"
ilat!0 = "lat"
ilat at long_name = "lat"
ilat at units = "degrees_north"
inter_num=cssgrid_Wrap(xlat,xlon,xnum,ilat,ilon)
inter_num!0="lat"
inter_num!1="lon"
inter_num&lat=ilat
inter_num&lon=ilon
----------annual_mean_w10.txt data-------
stn, lat, lon, ele, mean_w10
722010, 24.555000, -81.751999, 1.200000, 4.537894
722011, 28.290001, -81.436996, 25.000000, 3.302681
722012, 28.950001, -81.967003, 27.100000, 2.288134
722014, 28.474001, -82.454002, 23.500000, 2.497054
722015, 24.583000, -81.682999, 1.800000, 4.192316
722016, 24.726000, -81.052002, 2.400000, 3.525501
722017, 28.062000, -81.753998, 44.500000, 3.171314
722020, 25.788000, -80.317001, 8.800000, 3.824239
722021, 28.014000, -82.345001, 6.700000, 1.680814
722022, 26.378000, -80.108002, 4.000000, 4.132401
722024, 25.907000, -80.279999, 3.100000, 3.905527
722025, 26.072001, -80.153999, 3.400000, 4.092026
722026, 25.483000, -80.383003, 1.500000, 3.033066
722029, 25.648001, -80.432999, 3.100000, 3.654286
722060, 30.495001, -81.694000, 7.900000, 2.995290
722061, 39.466999, -106.150002, 3680.199951, 6.043694
722062, 31.476999, -82.861000, 78.300003, 1.999084
722065, 30.233000, -81.667000, 6.100000, 3.490778
722066, 30.400000, -81.417000, 4.900000, 3.516346
722067, 30.219000, -81.875999, 24.700001, 2.496306
722068, 30.336000, -81.514999, 12.500000, 3.205291
722069, 30.400000, -86.472000, 6.700000, 3.017413
722080, 32.898998, -80.041000, 12.200000, 3.542918
722081, 39.417000, -77.383003, 92.400002, 2.066125
722082, 42.245998, -89.582001, 261.799988, 3.683097
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180119/d773855e/attachment.html>
More information about the ncl-talk
mailing list