Hello,
I have a data file as below:
When I ran the plotting sripts, the following errors occured:
I greatly appreciate if anyone can help tell what is wrong with the scripts (see below).
Lifen Jiang
-------------------------------------------------------------------
;************************************************
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
;************************************************
; open file and read in data
;************************************************
in = addfile("med_c0.nc","r")
t = in->med_c0
printVarSummary(t)
t@_FillValue = -32768
t@missing_value = t@_FillValue
t = lonFlip(t) ; reorder
;************************************************
; create plot
;************************************************
wks = gsn_open_wks("pdf" ,"Olson") ;
gsn_define_colormap(wks,"rainbow") ; choose colormap
res = True ; plot mods desired
res@cnFillOn = True ; turn on color fill
res@cnLinesOn = False ; turn of contour lines
res@cnLevelSpacingF = 0.5 ; contour spacing
;---This resource not needed in NCL V6.1.0
res@gsnSpreadColors = True ; use full range of color map
res@lbLabelStride = 4
res@pmTickMarkDisplayMode = "Always"; use NCL default lat/lon labels
res@gsnAddCyclic = False ; data already has cyclic point
; this must also be set for any zoom
; note that the gsn_csm_*map_ce templates automatically set
; res@mpLimitMode="LatLon" for you. If you are plotting a different projection,
; you may have to set this resource.
res@mpMinLatF = -90 ; range to zoom in on
res@mpMaxLatF = 90
res@mpMinLonF = -180
res@mpMaxLonF = 180
plot = gsn_csm_contour_map_ce(wks,t({-90:90},{-180:180}), res)
;************************************************
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Wed Feb 06 2013 - 16:37:00 MST