<div dir="ltr"><div class="gmail_default" style="font-size:small">Ana,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Whenever you get error messages regarding a variable, we always recommend &quot;looking at your data&quot; by using routines like printVarSummary, printMinMax, or just print.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The error message is telling you what the problem is:<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">A valid latitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: </font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">&#39;degrees_north&#39; &#39;degrees-north&#39; &#39;degree_north&#39; &#39;degrees north&#39; &#39;degrees_N&#39; &#39;Degrees_north&#39; &#39;degree_N&#39; &#39;degreeN&#39; &#39;degreesN&#39; &#39;deg north&#39;</font></div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">so it would be helpful to do a printVarSummary on both lat2 and lon2 to see if they contain any &quot;units&quot;:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">  printVarSummary(lat2)</div><div class="gmail_default" style="font-size:small"><div class="gmail_default">  printVarSummary(lon2)</div><div><br></div></div><div class="gmail_default" style="font-size:small">My guess is that your &quot;lon2&quot; and &quot;lat2&quot; variables either don&#39;t have units attributes at all, or they are wrong. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Try adding this code right after you read lat2 and lon2 off the file:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">lat2@units = &quot;degrees_north&quot;</div><div class="gmail_default" style="font-size:small">lon2@units = &quot;degrees_east&quot;</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Also, it appears the leftmost two dimensions of z1 are dimensioned lon x lat, and NCL needs them to be lat x lon in order to correctly plot them.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You will need to reorder the data when you call gsn_csm_contour_map. First, you need to name the other two dimensions, which I&#39;m assuming level and time dimensions:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">z1!2 = &quot;lev&quot;</div><div class="gmail_default" style="font-size:small">z2!3 = &quot;time&quot;</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Now you can reorder with:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div style="font-size:12.8px">plot= gsn_csm_contour_map(wks,z1(lat|:,lon|:<wbr>,lev|25,time|0),res)</div><div><br></div></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_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 18, 2017 at 5:19 PM, Anahita Amiri Farahani <span dir="ltr">&lt;<a href="mailto:aamir003@ucr.edu" target="_blank">aamir003@ucr.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">Hello all,<div><br></div><div>I tried to plot a simple map but I got warnings. Here is my code and warnings:</div><div><br></div><div><div><br></div><div>;*********** From Observation **********</div><div><br></div><div>ana=addfile(&quot;NOaerosol_allsky_<wbr>3DQ.nc&quot;,&quot;r&quot;)</div><div>lat2=ana-&gt;lat</div><div>lon2=ana-&gt;lon</div><div>lev2=ana-&gt;lev/10</div><div>Absp3D=ana-&gt;Absp3D ; Atmospheric heating (K/sec)</div><div>Absp=ana-&gt;Absp     ; Solar radiation absorption in the atmosphere (W/m^2)</div><div>Sfc=ana-&gt;Sfc       ; Surface net flux (W/m^2)</div><div><br></div><div>delete(ana)</div><div><br></div><div>;********* T&#39;s data *************</div><div>;z1 = asciiread(&quot;Absp.dat&quot;,(/12,128,<wbr>64,26/),&quot;float&quot;)</div><div>z1 = asciiread(&quot;Absp.dat&quot;,(/128,64,<wbr>26,12/),&quot;float&quot;)</div><div><br></div><div>z1!1=&quot;lat&quot;</div><div>z1!0=&quot;lon&quot;</div><div>;Coordinate</div><div>z1&amp;lat=lat2</div><div>z1&amp;lon=lon2</div><div><br></div><div><br></div><div>wks = gsn_open_wks(&quot;eps&quot;,&quot;T_<wbr>Atmospheric_heating_26&quot;)</div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;</div><div>  res                     = True               ; plot mods desired</div><div>  res@cnFillOn            = True              ; turn on color   </div><div>  res@gsnSpreadColors     = True               ; use full color map</div><div>  res@cnLinesOn           = False              ; no contour lines</div><div>  res@cnLineLabelsOn      = False              ; no line labels</div><div><br></div><div>  res@mpMaxLatF =  87.8638                         ; specify the plot domain</div><div>  res@mpMinLatF = -87.8638                         ;                         </div><div>  res@mpMinLonF = 0                          ;</div><div>  res@mpMaxLonF = 357.1875     </div><div> </div><div>  res@gsnAddCyclic        = False </div><div><br></div><div>  res@cnLevelSelectionMode =  &quot;AutomaticLevels&quot;   ; AutomaticLevels</div><div><br></div><div><br></div><div>  ;res@cnLevelSelectionMode =  &quot;ManualLevels&quot;   ; AutomaticLevels</div><div>  ;res@cnMinLevelValF       = -15.              ; min level</div><div>  ;res@cnMaxLevelValF       =  15.               ; max level</div><div>  ;res@cnLevelSpacingF      =  1.               ; interval</div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;</div><div>res@tiMainString        = &quot;Atmospheric Heating in Jan at 26th level&quot;</div><div><br></div><div>plot= gsn_csm_contour_map(wks,z1(:,:<wbr>,25,0),res)</div><div>delete(wks)</div><div><br></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>







<p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1">0)     check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn&#39;t contain one at all.</span></p>
<p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1">(0)     A valid latitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: </span></p>
<p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1">(0)         &#39;degrees_north&#39; &#39;degrees-north&#39; &#39;degree_north&#39; &#39;degrees north&#39; &#39;degrees_N&#39; &#39;Degrees_north&#39; &#39;degree_N&#39; &#39;degreeN&#39; &#39;degreesN&#39; &#39;deg north&#39;</span></p>
<p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1">(0)     check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn&#39;t contain one at all.</span></p>
<p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1">(0)     A valid longitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: </span></p>
<p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1">(0)         &#39;degrees_east&#39; &#39;degrees-east&#39; &#39;degree_east&#39; &#39;degrees east&#39; &#39;degrees_E&#39; &#39;Degrees_east&#39; &#39;degree_E&#39; &#39;degreeE&#39; &#39;degreesE&#39; &#39;deg east&#39;</span></p>
<p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1">(0)     gsn_csm_map_ce: Warning: you set mpMaxLonF to a value &gt; 180, but</span></p>
<p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1">(0)                     didn&#39;t set mpCenterLonF. Setting mpCenterLonF to 178.594</span></p><p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1"><br></span></p><p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1"><br></span></p><p class="m_1246101706110765046gmail-p1"><span class="m_1246101706110765046gmail-s1"><br></span></p><p class="m_1246101706110765046gmail-p1">Thanks,</p><p class="m_1246101706110765046gmail-p1">Ana</p></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>