<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=&quot;lat&quot;<br></div><div class="gmail_default" style="font-size:small">A!1=&quot;lon&quot;</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This doesn&#39;t work, because this just renames the dimensions, but it doesn&#39;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&#39;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 &quot;|&quot; method of reordering, rather than &quot;transpose&quot;.</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">&lt;<a href="mailto:noah.kerandi@kit.edu" target="_blank">noah.kerandi@kit.edu</a>&gt;</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 &lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;<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&#39;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 &quot;NhlRemovePrimitive&quot; is very odd, because I don&#39;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">&lt;<a href="mailto:noah.kerandi@kit.edu" target="_blank">noah.kerandi@kit.edu</a>&gt;</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>&quot;warning:_NclIRemovePrimitive: First parameter is a missing value, returning missing values&quot;</p>
<p><br>
</p>
<p>However, subsequently i don&#39;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 &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl&quot;<br>
load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl&quot;<br>
;<br>
 <br>
begin<br>
a= addfile(&quot;<a href="http://file_v3.0a.nc" target="_blank">file_v3.0a.nc</a>&quot;,&quot;r&quot;)<br>
b=addfile(&quot;<a href="http://file_v3.0b.nc" target="_blank">file_v3.0b.nc</a>&quot;,&quot;r&quot;)<br>
c=addfile(&quot;<a href="http://file_v3.0c.nc" target="_blank">file_v3.0c.nc</a>&quot;,&quot;r&quot;)<br>
d=addfile(&quot;WRF1.nc&quot;,&quot;r&quot;)<br>
e=addfile(&quot;HYDRO1.nc&quot;,&quot;r&quot;)<br>
<br>
<br>
A=a-&gt;E(0,:,:)<br>
<br>
A@_FillValue = -999<br>
<br>
A@long_name=&quot;&quot;<br>
A!0=&quot;lat&quot;<br>
A!1=&quot;lon&quot;<br>
A@units    =&quot;&quot;<br>
<br>
A@_FillValue =A@_FillValue <br>
A@_FillValue =-999<br>
lat =a-&gt;lat<br>
lat@long_name = &quot;latitude&quot; ;<br>
<br>
lon = a-&gt;lon<br>
lon@long_name = &quot;longitude&quot; ;<br>
<br>
A&amp;lat@units=&quot;degrees_north&quot;<br>
A&amp;lon@units=&quot;degrees_east&quot;<br>
<br>
<br>
<br>
<br>
printVarSummary(A)<br>
<br>
<br>
<br>
B=b-&gt;E(0,:,:)<br>
<br>
B!0=&quot;lat&quot;<br>
B!1=&quot;lon&quot;<br>
B@units    =&quot;&quot;<br>
B@_FillValue = B@_FillValue <br>
<br>
<br>
B@_FillValue= -999<br>
<br>
lat =b-&gt;lat<br>
lat@long_name = &quot;latitude&quot; ;<br>
lon = b-&gt;lon<br>
lon@long_name = &quot;longitude&quot; ;<br>
<br>
B&amp;lat@units=&quot;degrees_north&quot;<br>
B&amp;lon@units=&quot;degrees_east&quot;<br>
<br>
<br>
<br>
B@long_name=&quot;&quot;<br>
B@units    =&quot;&quot;<br>
<br>
<br>
<br>
C=c-&gt;E(0,:,:)<br>
C@_FillValue = -999<br>
C!0=&quot;lat&quot;<br>
C!1=&quot;lon&quot;<br>
C@units    =&quot;&quot;<br>
C@_FillValue = C@_FillValue<br>
<br>
C@_FillValue= -999<br>
<br>
<br>
lat =c-&gt;lat<br>
lat@long_name = &quot;latitude&quot; ;<br>
<br>
lon = c-&gt;lon<br>
lon@long_name = &quot;longitude&quot; ;<br>
<br>
<br>
<br>
C&amp;lat@units=&quot;degrees_north&quot;<br>
C&amp;lon@units=&quot;degrees_east&quot;<br>
C@long_name=&quot;&quot;<br>
C@units    =&quot;&quot;<br>
<br>
<br>
<br>
<br>
C@long_name=&quot;&quot;<br>
C@units    =&quot;&quot;<br>
<br>
D=d-&gt;ACLHF(0,:,:)<br>
D@long_name=&quot;&quot;<br>
D@units    =&quot;&quot;<br>
<br>
E=e-&gt;ACLHF(0,:,:)<br>
E@long_name=&quot;&quot;<br>
E@units    =&quot;&quot;<br>
<br>
<br>
<br>
; We generate plots, but what kind do we prefer?<br>
     type = &quot;x11&quot;<br>
    ;type = &quot;pdf&quot;<br>
  ;type = &quot;png&quot;<br>
    ;type = &quot;ps&quot;<br>
; type = &quot;ncgm&quot;<br>
  wks = gsn_open_wks(type,&quot;test&quot;)<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&#39;t draw the plot - yet<br>
  res@gsnFrame             =  False           ;-- don&#39;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&#39;t draw labels on contour lines<br>
  res@cnInfoLabelOn        =  False           ;-- don&#39;t draw labels on contour lines<br>
  res@lbLabelBarOn         =  False           ;-- don&#39;t draw a labelbar below<br>
  res@gsnPaperOrientation  = &quot;landscape&quot;<br>
  res@cnLevelSelectionMode = &quot;ManualLevels&quot;   ;-- 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 = &quot;Always&quot;<br>
  res@mpLimitMode       =  &quot;LatLon&quot;<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>  = &quot;Blue&quot;<br>
  res@mpDataBaseVersion         <wbr>  = &quot;MediumRes&quot;<br>
  res@mpDataSetName             <wbr>  = &quot;Earth..4&quot;<br>
  res@mpPerimLineColor          <wbr>  = &quot;Black&quot;<br>
  res@mpUSStateLineColor        <wbr>  = &quot;Black&quot;<br>
  res@mpLimbLineColor           <wbr>  = &quot;Black&quot;<br>
  res@mpNationalLineColor       <wbr>  = &quot;Black&quot;<br>
  res@mpNationalLineThicknessF  <wbr>  = 2.5<br>
  res@mpOutlineBoundarySets     <wbr>  = &quot;National&quot;<br>
  res@mpFillBoundarySets        <wbr>   =&quot;AllBoundaries&quot;<br>
  res@mpOutlineOn               <wbr>   = True<br>
  ;res@lbLabelAutoStride        <wbr>    = True<br>
  res@lbOrientation =   &quot;horizontal&quot;          ; 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           = &quot;CellFill&quot;           ; Cell Mode<br>
       res@cnFillMode           = &quot;RasterFill&quot;         ; Raster Mode<br>
       res@cnLinesOn            =  False       ; Turn off contour lines<br>
       res@cnLineLabelsOn       =  False       ; Turn off contour lines<br>
       res@cnFillPalette        = &quot;precip_11lev&quot;    <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         = &quot;file_v3.0a&quot;    ; main title<br>
  res@txFont  = &quot;times-roman&quot;<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         = &quot;file_v3.0b&quot;    ; main title<br>
 res@txFont               = &quot;times-roman&quot;<br>
 plot(1)=gsn_csm_contour_map_c<wbr>e(wks,B,res)<br>
 <br>
 <br>
 <br>
 res@tiMainString         = &quot;file_v3.0c&quot;    ; main title<br>
 res@txFont               = &quot;times-roman&quot; <br>
plot(2)=gsn_csm_contour_map_ce<wbr>(wks,C,res) <br>
<br>
<br>
<br>
<br>
 res@tiMainString         = &quot;WRF1&quot;    ; main title<br>
  res@txFont              = &quot;times-roman&quot;<br>
 plot(3)=gsn_csm_contour_map_c<wbr>e(wks,D,res)<br>
<br>
<br>
<br>
<br>
 res@tiMainString         = &quot;Hydro1&quot;    ; main title<br>
  res@txFont              = &quot;times-roman&quot;<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  = &quot;Bottom&quot;<br>
  resP@lbTitleString    = &quot;ET (mm/month)&quot;<br>
  resP@lbTitleFontHeightF= .020                ; make title smaller<br>
  resP@lbTitleDirection = &quot;Across&quot;             ; title direction <br>
<br>
 <br>
 <br>
  resP@lbTitleFontHeightF  = .025    <br>
  resP@amJust              = &quot;TopLeft&quot;    ;-- text justification<br>
  resP@gsnMaximize        = True<br>
  resP@gsnPanelBottom     = 0.02<br>
<br>
   resP@lbLabelFontHeightF = 0.015 ;-- label font height<br>
   resP@lbLabelFont = &quot;times-roman&quot; ;-- 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>