<div dir="ltr"><div class="gmail_default" style="font-size:small">Barry,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In order to plot data over a map, you have to provide lat/lon information. That&#39;s what the error is telling you.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Your script has a data variable called t2m_ave, and it doesn&#39;t have any lat/lon coordinates associated with it. You did name the two dimensions &quot;lat&quot; and &quot;lon&quot;, but that&#39;s not enough. You additionally need to do this:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">







<p class="gmail-p1"><span class="gmail-s1">    t2m_ave!0=</span><span class="gmail-s2">&quot;lat&quot;<br></span><span class="gmail-s1">    t2m_ave!1=</span><span class="gmail-s2">&quot;lon&quot;<br></span>    t2m_ave&amp;lat = lat_0<br>    t2m_ave&amp;lon = lon_0</p></div><div class="gmail_default" style="font-size:small"><div class="gmail_default">Here&#39;s another way you can get the lat/lon coordinates attached t2m_ave:</div><div class="gmail_default"><br></div></div><div class="gmail_default" style="font-size:small">When you do an arithmetic calculation like this:</div><div class="gmail_default" style="font-size:small">







<p class="gmail-p1"><span class="gmail-s1">    t2m_ave = t2m/n_dirWRF</span></p><p class="gmail-p1">NCL does not copy any metadata from the right-hand variables, except for the _FillValue attribute.</p><p class="gmail-p1">To preserve the metadata, you can do this little trick:</p><p class="gmail-p1">  t2m_ave = t2m                 ; This makes an identical copy of t2m<br>  t2m_ave = t2m/n_dirWRF   </p><p class="gmail-p1">  printVarSumary(t2m_ave)</p><p class="gmail-p1">The printVarSummary will verify whether any metadata got copied.</p><p class="gmail-p1">--Mary</p><p class="gmail-p1"><br></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 29, 2016 at 9:24 AM, Barry Lynn <span dir="ltr">&lt;<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</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">Hi:<div><br></div><div>I have used the helpful suggestions offered through ncl-talk to create</div><div>the attached program that reads multiple GEFS files from multiple GEFS directories (on your disk).</div><div><br></div><div>Of course, any one on the list can use this program, but I would like to upload it again after I solve this problem.</div><div><br></div><div>As part of my calculations for the GEFS mean, I need to create a variable called t2m_ave.  However, when I use it I get get the error below.</div><div><br></div><div>If I use a variable from the GEFS*grb files that I don&#39;t need in place of it, I can make very nice plots of the mean surface temperature. This means that these variables already have grid information attached to them.</div><div><br></div><div>The page: <a href="http://www.ncl.ucar.edu/Document/Graphics/error_msg.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Graphics/error_msg.<wbr>shtml</a></div><div><br></div><div>has a suggestion what to do, but I am not sure what &quot;x&quot; is, and how to use the suggestion.</div><div><br></div><div>The upshot is that I need to attach geographical information to my &quot;average variables,&quot; and I don&#39;t know how to do this.</div><div><br></div><div><div>check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn&#39;t contain one at all.</div><div>(0)<span class="m_2240431233484496555gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>A valid latitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: </div><div>(0)<span class="m_2240431233484496555gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>    &#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;</div><div>(0)<span class="m_2240431233484496555gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn&#39;t contain one at all.</div><div>(0)<span class="m_2240431233484496555gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>A valid longitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: </div><div>(0)<span class="m_2240431233484496555gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>    &#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 eas</div>-- <br><div class="m_2240431233484496555gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:914%20432%203108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></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>