<div dir="ltr">A minor correction to my previous reply:  you may need to move the assignment to plev after the call to filevardef.<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 15, 2014 at 10:22 AM, Rick Brownrigg <span dir="ltr">&lt;<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Mark,<br><br>I think you need to write:<br><br></div>     write_file-&gt;plev = 50000.0<br><br></div><div>to make plev a file-variable, as opposed to a local variable.<br><br></div>HTH...<br>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sat, Dec 13, 2014 at 3:59 AM, Mark Chan <span dir="ltr">&lt;<a href="mailto:cym263@yahoo.com" target="_blank">cym263@yahoo.com</a>&gt;</span> wrote:</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div dir="ltr">Dear NCL users,</div><div dir="ltr"><br></div><div dir="ltr">A variable &quot;plev2&quot; is defined as in the below:<br></div><div><br></div><div> plev2=3.0<br> plev2@axis=(/&quot;Z&quot;/)<br> plev2@positive=(/&quot;Down&quot;/)<br> plev2@units=(/&quot;Pa&quot;/)<br> plev2@standard_name=(/&quot;air_pressure&quot;/)<br> plev2@long_name=(/&quot;pressure&quot;/)<br> plev2!0 = &quot;ncl_scalar&quot;<br></div><div><br></div><div dir="ltr">Then another variable &quot;plev&quot; would be defined, with the same attribute as &quot;plev2&quot;, but its value is different.<br></div><div dir="ltr"><br></div><div>      plev=50000.0<br>      filevardef(write_file,&quot;plev&quot;,typeof(plev2),&quot;ncl_scalar&quot;)<br>      filevarattdef(write_file,&quot;plev&quot;, plev2)<br>      write_file-&gt;zg500=ZG500(limTime(0):limTime(1),0,limS_N(0):limS_N(1),  \<br>                           limW_E(0):limW_E(1))</div><div><br></div><div dir="ltr">However, the variable &quot;plev&quot; did not get the value as 50000.0 here.</div><div dir="ltr">I would appreciate your help very much!</div><div dir="ltr"><br></div><div dir="ltr">With my best regards,</div><div dir="ltr"><br></div><div dir="ltr">Mark<br></div><div><br></div></div></div><br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div></div>
</blockquote></div></div>