<div dir="ltr"><div class="gmail_default" style="font-size:small">Nitin,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There's a typo in the "try.ncl" script. You have:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style><div class="gmail_default" style="font-size:small">f1 = addfile(fil1,"r")</div><div class="gmail_default" style="font-size:small">f2 = addfile(fil1,"w")</div><div style="font-size:small"><br></div><div style="font-size:small"><br></div><div style="font-size:small">Note that this is causing the "fil1" file to be opened twice. You want the second "fil1" to be "fil2":</div><div style="font-size:small"><br></div><div style><div style>f1 = addfile(fil1,"r")</div><div style>f2 = addfile(fil2,"w")</div><div style><br></div><div style>The reason for "x" being used twice is that it is possible to use x in a calculation and then replace x with that new calculation. For example, this is perfectly valid:</div><div style><br></div><div style>x = 1</div><div style>x = x+1 ; x is now 2</div><div style><br></div><div style>In the "where" statement in the "try.ncl" script, it is checking where MASK is NOT equal to missing, and in these locations, it is setting x=MASK. At locations where MASK is missing, then x remains unchanged.</div><div style><br></div><div style>--Mary</div></div><div style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 21, 2015 at 4:22 AM, Nitin Patil <span dir="ltr"><<a href="mailto:nitinpatil85@gmail.com" target="_blank">nitinpatil85@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Dear Dennis,<br><br></div>Thanks for your script. I tried that and I am quite new to ncl. It shows variable missing in file but I checked and it is there with same name mentioned in script. Find attached ncl script.<br></div>Also can you tell me how to save the newly created file in netcdf.<br><br></div><div>one query in code: why x is used twice x=?? in line 14 and 15<br><br></div><div>My input files in earlier emails is attached.<br></div><div><br></div><div>Thanks</div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>--</div>Regards,<div>Nitin Patil</div><div><br></div></div></div></div></div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On Mon, Apr 20, 2015 at 7:31 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>make a copy of the global file for 'safety'<br><br></div>untested<br><br> fil1 = "agri_india_T63.nc"<br> fil2 = "global_T63.nc"<br> f1 = addfile(fil1,"r")<br> f2 = addfile(fil1,"w")<br><br> MASK = f1->MASK ; (lat,lon)<br> x = f2->emiss_awb_bc(0,:,:) ; (lat,lon) ... 1st time step<br><br> x = (/ where(.not.ismissing(MASK), MASK, x) /)<br> f2->emiss_awb_bc(0,:,:) = (/ x /)<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Apr 20, 2015 at 4:11 AM, Nitin Patil <span dir="ltr"><<a href="mailto:nitinpatil85@gmail.com" target="_blank">nitinpatil85@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div>Dear NCL users,<br><br></div>I have to netcdf file both are on T63 grid resolution.<br></div><div>file1: agri_india_T63.nc<br></div><div>file2: global_T63.nc<br><br></div>I have to overlay file1 which is over India only on file2. This means the India region from file2 will be replaced by file1 on first time step.<br></div><div><div><div><br></div><div>Anyone has idea ow to do using NCL?<br><br clear="all"></div><div><div><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>--</div>Regards,<div>Nitin Patil</div><div><br></div><div></div></div></div></div></div></div></div></div>
</div></div></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><br></div>
</blockquote></div><br></div></div></div></div>
<br>_______________________________________________<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><br></div></div>