[ncl-talk] sub: coordinate unit error

dale zuri dalezuri at gmail.com
Fri Apr 14 19:05:28 MDT 2017


Hi,
Please help me to fix this bug? Here is part of my code and the error I get
x4d  = reshape(precppicktimeAMJJAS,(/183,4,26,76/))
print(x4d(:,:,0,0))
;printVarSummary(precppicktimeAMJJAS)  ;print out structure/basic info of
the data
printVarSummary(x4d)  ;print out structure/basic info of the data

xSumLon = dim_sum_n(x4d,1)
printVarSummary(xSumLon)  ;print out structure/basic info of the data
xSumLon!0="time" ;added by feng
xSumLon!1="lat" ;added by feng
xSumLon!2="lon" ;added by feng
xSumLon&lat = x4d(0,0,:,0)
xSumLon&lon = x4d(0,0,0,:)
xd=xSumLon
;;;;;;;;;Areal average;;;;;;;;;;;;;;;;;;;;;;
printVarSummary(xSumLon)
zAvgLon = dim_avg_n_Wrap(xSumLon,(0))
printVarSummary(zAvgLon)
printMinMax(zAvgLon,0)
print(zAvgLon)
(0)    check_for_y_lat_coord: Warning: Data either does not contain a valid
latitude coordinate array or doesn't contain one at all.
(0)    A valid latitude coordinate array should have a 'units' attribute
equal to one of the following values:
(0)        'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0)    check_for_lon_coord: Warning: Data either does not contain a valid
longitude coordinate array or doesn't contain one at all.
(0)    A valid longitude coordinate array should have a 'units' attribute
equal to one of the following values:
(0)        'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170414/d39c2190/attachment.html 


More information about the ncl-talk mailing list