>
>Hi, Julie,
> It works perfectly well.
> Thank you very much
>SUN
>
---- Thx Julie ... the reply did not go to ncl-talk. Hence this message.In Sun's original script, he created lat and lon variables with acceptable units. However, when he was assigning coordinates to the nf variable, he assigned the coordinate values only ... no units
nf&lat=fspan(-90,90,73) ; values only ... no units
The correct solution was
nf&lat = lat ; assign variable with units attribute =============================== Using functions located in contributed.ncl, the code could be made slightly cleaner:
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" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
begin nlat = 73 mlon = 144
nf=fbindirread("ncepAnosea.dat",4,(/nlat,mlon/),"float") ;========================================== ; Create lon and lat coordinates variables ; use functions in contributed.ncl ;========================================== lat = latGlobeF (nlat, "lat", "latitude", "degrees_north") lon = lonGlobeF (mlon, "lon", "longitude", "degrees_east")
nf!0 ="lat" ; name dimensions nf!1 ="lon" nf&lat = lat ; assign coordinate values and units nf&lon = lon nf@long_name ="Geopotential Height (500mb)" nf@units ="10m" printVarSummary(nf)
;======================= ; draw variable ;======================= wks=gsn_open_wks("x11","example") res = True plot=gsn_csm_contour_map(wks,nf,res)
end
_______________________________________________ ncl-talk mailing list ncl-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Wed Jul 28 2004 - 10:09:43 MDT