<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p>I am trying to plot some gridded dataset (attached file_*) and model outputs.</p>
<p>The model outputs get plotted. However nothing is plotted for the other three (gridded datasets) files.</p>
<p>I had seen the error below in one of my trials.<br>
</p>
<p><br>
</p>
<p>"warning:_NclIRemovePrimitive: First parameter is a missing value, returning missing values"</p>
<p><br>
</p>
<p>However, subsequently i don't see any error though my data is not plotted.</p>
<p>If you have any idea or suggestion please share with me.</p>
<p>The basic script is pasted below and also attached.</p>
<p>Thank you very much.<br>
</p>
<p>###################################################<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
;<br>
<br>
begin<br>
a= addfile("file_v3.0a.nc","r")<br>
b=addfile("file_v3.0b.nc","r")<br>
c=addfile("file_v3.0c.nc","r")<br>
d=addfile("WRF1.nc","r")<br>
e=addfile("HYDRO1.nc","r")<br>
<br>
<br>
A=a->E(0,:,:)<br>
<br>
A@_FillValue = -999<br>
<br>
A@long_name=""<br>
A!0="lat"<br>
A!1="lon"<br>
A@units =""<br>
<br>
A@_FillValue =A@_FillValue <br>
A@_FillValue =-999<br>
lat =a->lat<br>
lat@long_name = "latitude" ;<br>
<br>
lon = a->lon<br>
lon@long_name = "longitude" ;<br>
<br>
A&lat@units="degrees_north"<br>
A&lon@units="degrees_east"<br>
<br>
<br>
<br>
<br>
printVarSummary(A)<br>
<br>
<br>
<br>
B=b->E(0,:,:)<br>
<br>
B!0="lat"<br>
B!1="lon"<br>
B@units =""<br>
B@_FillValue = B@_FillValue <br>
<br>
<br>
B@_FillValue= -999<br>
<br>
lat =b->lat<br>
lat@long_name = "latitude" ;<br>
lon = b->lon<br>
lon@long_name = "longitude" ;<br>
<br>
B&lat@units="degrees_north"<br>
B&lon@units="degrees_east"<br>
<br>
<br>
<br>
B@long_name=""<br>
B@units =""<br>
<br>
<br>
<br>
C=c->E(0,:,:)<br>
C@_FillValue = -999<br>
C!0="lat"<br>
C!1="lon"<br>
C@units =""<br>
C@_FillValue = C@_FillValue<br>
<br>
C@_FillValue= -999<br>
<br>
<br>
lat =c->lat<br>
lat@long_name = "latitude" ;<br>
<br>
lon = c->lon<br>
lon@long_name = "longitude" ;<br>
<br>
<br>
<br>
C&lat@units="degrees_north"<br>
C&lon@units="degrees_east"<br>
C@long_name=""<br>
C@units =""<br>
<br>
<br>
<br>
<br>
C@long_name=""<br>
C@units =""<br>
<br>
D=d->ACLHF(0,:,:)<br>
D@long_name=""<br>
D@units =""<br>
<br>
E=e->ACLHF(0,:,:)<br>
E@long_name=""<br>
E@units =""<br>
<br>
<br>
<br>
; We generate plots, but what kind do we prefer?<br>
type = "x11"<br>
;type = "pdf"<br>
;type = "png"<br>
;type = "ps"<br>
; type = "ncgm"<br>
wks = gsn_open_wks(type,"test")<br>
plot = new(5,graphic)<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
;-- plot resource settings<br>
<br>
res = True<br>
res@cnFillOn = True ;-- enable color filled contours<br>
<br>
res@gsnDraw = False ;-- don't draw the plot - yet<br>
res@gsnFrame = False ;-- don't advance the frame<br>
res@gsnMaximize = True ; maximize the plot space on page - this will apply to each individual plot<br>
res@cnLineLabelsOn = False ;-- don't draw labels on contour lines<br>
res@cnInfoLabelOn = False ;-- don't draw labels on contour lines<br>
res@lbLabelBarOn = False ;-- don't draw a labelbar below<br>
res@gsnPaperOrientation = "landscape"<br>
res@cnLevelSelectionMode = "ManualLevels" ;-- set manual contour levels, so that all
<br>
;-- plots have the same labelbar colors/values<br>
res@cnMinLevelValF = 20 ;-- contour level minimum<br>
res@cnMaxLevelValF = 200 ;-- contour level maximum<br>
res@cnLevelSpacingF = 20 ;-- contour level interval<br>
<br>
<br>
res = True<br>
<br>
res@pmTickMarkDisplayMode = "Always"<br>
res@mpLimitMode = "LatLon"<br>
res@mpMinLatF = -3.061569 ;min(lat2d)<br>
res@mpMaxLatF = 2.22883 ;max(lat2d)<br>
res@mpMinLonF = 34.56185 ;min(lon2d)<br>
res@mpMaxLonF = 39.91379 ;max(lon2d)<br>
res@mpCenterLonF = (res@mpMinLonF + res@mpMaxLonF) / 2.<br>
res@mpGeophysicalLineColor = "Blue"<br>
res@mpDataBaseVersion = "MediumRes"<br>
res@mpDataSetName = "Earth..4"<br>
res@mpPerimLineColor = "Black"<br>
res@mpUSStateLineColor = "Black"<br>
res@mpLimbLineColor = "Black"<br>
res@mpNationalLineColor = "Black"<br>
res@mpNationalLineThicknessF = 2.5<br>
res@mpOutlineBoundarySets = "National"<br>
res@mpFillBoundarySets ="AllBoundaries"<br>
res@mpOutlineOn = True<br>
;res@lbLabelAutoStride = True<br>
res@lbOrientation = "horizontal" ; vertical label bar <br>
<br>
; Set the size of the individual title and axis fonts<br>
res@tiXAxisFontHeightF = 0.035<br>
res@tiYAxisFontHeightF = 0.035<br>
<br>
;Set to False if plotting regional data or setting sfXArray/sfYArray<br>
res@gsnAddCyclic = False<br>
<br>
<br>
<br>
;---Uncomment if you want to change the contour levels<br>
<br>
res@cnLinesOn = False ; turn of contour lines<br>
res@cnFillMode = "CellFill" ; Cell Mode<br>
res@cnFillMode = "RasterFill" ; Raster Mode<br>
res@cnLinesOn = False ; Turn off contour lines<br>
res@cnLineLabelsOn = False ; Turn off contour lines<br>
res@cnFillPalette = "precip_11lev" <br>
<br>
<br>
<br>
<br>
<br>
res@tmXBLabelFontHeightF = 0.035 ; boost the axis value labels even more<br>
res@tmYLLabelFontHeightF = 0.035<br>
<br>
;res@tmYRLabelFontHeightF = 0.030<br>
<br>
<br>
res@tiMainString = "file_v3.0a" ; main title<br>
res@txFont = "times-roman"<br>
res@tiMainOffsetYF = -0.008<br>
res@tiMainFontHeightF = 0.035<br>
plot(0)=gsn_csm_contour_map_ce(wks,A,res)<br>
<br>
<br>
<br>
<br>
<br>
res@tiMainString = "file_v3.0b" ; main title<br>
res@txFont = "times-roman"<br>
plot(1)=gsn_csm_contour_map_ce(wks,B,res)<br>
<br>
<br>
<br>
res@tiMainString = "file_v3.0c" ; main title<br>
res@txFont = "times-roman" <br>
plot(2)=gsn_csm_contour_map_ce(wks,C,res) <br>
<br>
<br>
<br>
<br>
res@tiMainString = "WRF1" ; main title<br>
res@txFont = "times-roman"<br>
plot(3)=gsn_csm_contour_map_ce(wks,D,res)<br>
<br>
<br>
<br>
<br>
res@tiMainString = "Hydro1" ; main title<br>
res@txFont = "times-roman"<br>
plot(4)=gsn_csm_contour_map_ce(wks,E,res)<br>
<br>
;-- panel resources <br>
resP = True<br>
resP@gsnPanelYWhiteSpacePercent= 5 ; set a bit of extra white space between panels in the x and y directions<br>
resP@gsnPanelXWhiteSpacePercent =5<br>
<br>
<br>
;resP@gsnPanelBottom = 0.1 ;-- panel bottom position (y-value)<br>
;resP@gsnPanelTop = 0.40 <br>
resP@gsnPanelLabelBar = True ;-- draw a common labelbar<br>
resP@lbTitleOn = True<br>
resP@lbLabelAutoStride = True<br>
resP@lbTitlePosition = "Bottom"<br>
resP@lbTitleString = "ET (mm/month)"<br>
resP@lbTitleFontHeightF= .020 ; make title smaller<br>
resP@lbTitleDirection = "Across" ; title direction <br>
<br>
<br>
<br>
resP@lbTitleFontHeightF = .025 <br>
resP@amJust = "TopLeft" ;-- text justification<br>
resP@gsnMaximize = True<br>
resP@gsnPanelBottom = 0.02<br>
<br>
resP@lbLabelFontHeightF = 0.015 ;-- label font height<br>
resP@lbLabelFont = "times-roman" ;-- label font<br>
<br>
<br>
resP@lbTitleOffsetF = -0.1 ; move the labelbar title downwards<br>
<br>
gsn_panel(wks,plot,(/2,3/),resP)<br>
<br>
<br>
end <br>
</p>
<p><br>
</p>
<div id="Signature">
<div class="BodyFragment"><font size="2">
<div class="PlainText">Noah M. Kerandi<br>
KIT-Campus Alpin<br>
IMK-IFU: Atmospheric Environmental Research<br>
Kreuzeckbahnstr. 19,<br>
82467 Garmisch-Partenkirchen<br>
Germany</div>
</font></div>
</div>
</body>
</html>