<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"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></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->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"><<a href="mailto:cym263@yahoo.com" target="_blank">cym263@yahoo.com</a>></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 "plev2" is defined as in the below:<br></div><div><br></div><div> plev2=3.0<br> plev2@axis=(/"Z"/)<br> plev2@positive=(/"Down"/)<br> plev2@units=(/"Pa"/)<br> plev2@standard_name=(/"air_pressure"/)<br> plev2@long_name=(/"pressure"/)<br> plev2!0 = "ncl_scalar"<br></div><div><br></div><div dir="ltr">Then another variable "plev" would be defined, with the same attribute as "plev2", but its value is different.<br></div><div dir="ltr"><br></div><div> plev=50000.0<br> filevardef(write_file,"plev",typeof(plev2),"ncl_scalar")<br> filevarattdef(write_file,"plev", plev2)<br> write_file->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 "plev" 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>