<div dir="ltr"><div class="gmail_default">Your problem is evident in the u.cross.ncl.error output.</div><div class="gmail_default"><br></div><div class="gmail_default">If you look at the printVarSummary output of uu1, which is the variable you are trying to plot, you will see it does not have any coordinate arrays:</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">Variable: uu1</font></div><div class="gmail_default"><font face="monospace, monospace">Type: float</font></div><div class="gmail_default"><font face="monospace, monospace">Total Size: 118244 bytes</font></div><div class="gmail_default"><font face="monospace, monospace"> 29561 values</font></div><div class="gmail_default"><font face="monospace, monospace">Number of Dimensions: 2</font></div><div class="gmail_default"><font face="monospace, monospace">Dimensions and sizes: [41] x [721]</font></div><div class="gmail_default"><font face="monospace, monospace">Coordinates: </font></div><div class="gmail_default"><font face="monospace, monospace">Number Of Attributes: 1</font></div><div class="gmail_default"><font face="monospace, monospace"> _FillValue : 9.96921e+36</font></div><div class="gmail_default"><div class="gmail_default"><br class="gmail-Apple-interchange-newline">If you look at how "uu1" is created:</div><div class="gmail_default"><br></div><div class="gmail_default"><font face="monospace, monospace"> uu1 = u(it,:,:,ml)</font></div><div class="gmail_default"><br></div><div class="gmail_default">then you need to look at at "u", which also doesn't have coordinate arrays:</div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">Variable: u</font></div><div class="gmail_default"><font face="monospace, monospace">Type: float</font></div><div class="gmail_default"><font face="monospace, monospace">Total Size: 6134025744 bytes</font></div><div class="gmail_default"><font face="monospace, monospace"> 1533506436 values</font></div><div class="gmail_default"><font face="monospace, monospace">Number of Dimensions: 4</font></div><div class="gmail_default"><font face="monospace, monospace">Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>[36] x [41] x [721] x [1441]</font></div><div class="gmail_default"><font face="monospace, monospace">Coordinates: </font></div><div class="gmail_default"><font face="monospace, monospace">Number Of Attributes: 1</font></div><div class="gmail_default"><font face="monospace, monospace"> _FillValue :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>9.96921e+36</font></div><div class="gmail_default"><br></div></div><div class="gmail_default"><p class="gmail-p1">You can finally trace "u" to this line:</p><p class="gmail-p1"><font face="monospace, monospace"> u = doubletofloat(a->u)</font></p><div>When you use conversion routines like "doubletofloat", this strips off all the metadata. You need to add, after the above line:</div><div><br></div><div><font face="monospace, monospace"> copy_VarMeta(a->u,u)</font></div><div><br></div><div>which copies all the metadata from "u" on the file, to the local "u" variable. This will then cause the metadata to be propagated to uu1.</div><div><br></div><div>--Mary</div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 7, 2016 at 10:40 AM, Gurer, Kemal@ARB <span dir="ltr"><<a href="mailto:kemal.gurer@arb.ca.gov" target="_blank">kemal.gurer@arb.ca.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div class="m_4794967723165282863WordSection1">
<p class="MsoNormal">Dear all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am trying to plot several cross sections from “<a href="http://u.nc" target="_blank">u.nc</a>” netcdf file that I created using “u_mpas_to_latlon.ncl” file (attached) using “u.cross.ncl” ncl file that I adapted from narr_6.ncl file. The error output of the ncl file and the ncdump
information of “<a href="http://u.nc" target="_blank">u.nc</a>” file are also attached. I created the u-variable with (time, lev, lat, lon) dimensions, but I am passing the u-variable to the plot routine at constant time steps, so the first dimension of the variable is “lev”. Yet, the gsn_csm.ncl
file complains that “the first dimension of the input data must have a coordinate variable called ‘lev.’”. Could you help me to identify where I am doing wrong? What changes do I need to make in “u.cross.ncl” file and/or in “u_mpas_lat_lon.ncl” file during
the creation of <a href="http://u.nc" target="_blank">u.nc</a> file? <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I appreciate any help. Thank you.<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Kemal.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</font></span></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>