<div dir="ltr"><div><div><div><div>[1] shapefile_mask_data.ncl uses gc_inout which can be slow.<br><br></div>[2] You should create a (say) netCDF file which contains a masked variable.<br></div><div> This should be saved and used in all subsequent applications.<br></div><div> *This need be done only once.*<br></div><div><br></div>[3] Then use this variable (read from netCDF file) and then use NCL's mask function<br></div> on all subsequent applications.<br><br> <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml</a><br><br></div>Reply only to ncl-talk. No personal salutation.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 14, 2014 at 3:03 PM, Tabish Ansari <span dir="ltr"><<a href="mailto:tabishumaransari@gmail.com" target="_blank">tabishumaransari@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 class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e">Hi</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e">I have a script wherein I read-in some data from an ascii file and then mask it on the basis of a shapefile by calling the script "shapefile_mask_data.ncl" within my script. My data has approximately 530x980 data points.</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e">Currently it takes around 2 hrs 10 minutes to finish the job. I have to repeat this process several times. In future I may have to even do this masking within a loop, which will make it impractical due to its inefficiency.</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e">Is there a way to speed up this process?</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e">Thanks in advance!</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#45818e"><br></div><div><div dir="ltr"><font color="#3d85c6" face="trebuchet ms, sans-serif">Tabish U Ansari</font><div><font color="#3d85c6" face="trebuchet ms, sans-serif">MS Research Scholar<br>Environmental & Water Resources Engineering Division</font></div><div><font color="#3d85c6" face="trebuchet ms, sans-serif">Department of Civil Engineering</font></div><div><font color="#3d85c6" face="trebuchet ms, sans-serif">IIT Madras</font></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>