<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Noah,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I was able to run your script just fine with NCL versions 6.2.0, 6.2.1 and 6.3.0, and it produced the attached plot. I didn't get any errors.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">What version of NCL are you running?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">ncl -V</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Also, are you getting any other kind of errors? The error from "NhlRemovePrimitive" is very odd, because I don't see anything in your code that is trying to remove any primitives.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 7, 2016 at 4:51 PM, Kerandi, Noah Misati (IMK) <span dir="ltr"><<a href="mailto:noah.kerandi@kit.edu" target="_blank">noah.kerandi@kit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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>##############################<wbr>#####################<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"<br>
;<br>
<br>
begin<br>
a= addfile("<a href="http://file_v3.0a.nc" target="_blank">file_v3.0a.nc</a>","r")<br>
b=addfile("<a href="http://file_v3.0b.nc" target="_blank">file_v3.0b.nc</a>","r")<br>
c=addfile("<a href="http://file_v3.0c.nc" target="_blank">file_v3.0c.nc</a>","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>
<wbr> ;-- 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 <wbr> = "Blue"<br>
res@mpDataBaseVersion <wbr> = "MediumRes"<br>
res@mpDataSetName <wbr> = "Earth..4"<br>
res@mpPerimLineColor <wbr> = "Black"<br>
res@mpUSStateLineColor <wbr> = "Black"<br>
res@mpLimbLineColor <wbr> = "Black"<br>
res@mpNationalLineColor <wbr> = "Black"<br>
res@mpNationalLineThicknessF <wbr> = 2.5<br>
res@mpOutlineBoundarySets <wbr> = "National"<br>
res@mpFillBoundarySets <wbr> ="AllBoundaries"<br>
res@mpOutlineOn <wbr> = True<br>
;res@lbLabelAutoStride <wbr> = 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_<wbr>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_<wbr>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_<wbr>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_<wbr>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_<wbr>ce(wks,E,res)<br>
<br>
;-- panel resources <br>
resP = True<br>
resP@<wbr>gsnPanelYWhiteSpacePercent= 5 ; set a bit of extra white space between panels in the x and y directions<br>
resP@<wbr>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/),<wbr>resP)<br>
<br>
<br>
end <br>
</p>
<p><br>
</p>
<div>
<div><font size="2">
<div>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>
</div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div>