<div dir="ltr"><div class="gmail_default" style="font-size:small">I looked at your data more closely, and noticed that your A array is ordered lon x lat, and not lat x lon. You need to reorder it before you can plot it, which is what I guess you were trying to do with this code:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style=""><div class="gmail_default" style="font-size:small">A!0="lat"<br></div><div class="gmail_default" style="font-size:small">A!1="lon"</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This doesn't work, because this just renames the dimensions, but it doesn't actually reorder the array.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">To reorder the array, you must do one of the following:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">A_tranpose = A(lat|:,lon|:)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">or:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">A_transpose = transpose(A)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It is not necessary to do all that stuff of renaming dimensions and units.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I have modified your script to use transpose. See the attached script and image.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">For future reference, there's a page that describes plotting data on a map using NCL, and it mentions what to do when your data is ordered lon x lat. See example 8 at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style=""><a href="http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml#ex8">http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml#ex8</a><br></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">It uses the "|" method of reordering, rather than "transpose".</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><div class="gmail_default" style=""><div class="gmail_default" style=""><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 8, 2016 at 5:08 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>Dear Mary,</p>
<p>This is what exactly i got with that code.</p>
<p>But i see the first three figures is as if they do not illustrate any data. Since with ncview i see clear patterns.<br>
</p>
<p>I am using ncl-6.3.0.</p>
<p>Thank you very much.<br>
</p><span class="">
<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>
</span><div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Mary Haley <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>><br>
<b>Sent:</b> Monday, August 8, 2016 4:58 PM<br>
<b>To:</b> Kerandi, Noah Misati (IMK)<br>
<b>Cc:</b> ncl-talk<br>
<b>Subject:</b> Re: [ncl-talk] Plotting_ET gridded data</font>
<div> </div>
</div><div><div class="h5">
<div>
<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/nclscri<wbr>pts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/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_c<wbr>e(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_c<wbr>e(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<wbr>(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_c<wbr>e(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<wbr>(wks,E,res)<br>
<br>
;-- panel resources <br>
resP = True<br>
resP@gsnPanelYWhiteSpacePercen<wbr>t= 5 ; set a bit of extra white space between panels in the x and y directions<br>
resP@gsnPanelXWhiteSpacePercen<wbr>t =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/),res<wbr>P)<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" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>