<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class="">the question is very simple, and I believe to already have the answer but still, is worth trying.</div><div class="">When managing large files in NCL I always have to create new tricks in the debugging phase in order to avoid long waiting times. Today I was trying to read a dataset with 401x401x150 points (approx 48 GB):</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; data = addfile("./complete_remap.nc", "r")</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp;&nbsp;</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; p &nbsp; &nbsp;= data-&gt;pres &nbsp; &nbsp;; pressure &nbsp; &nbsp; [Pa]</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; t &nbsp; &nbsp;= data-&gt;temp &nbsp; &nbsp;; temperature &nbsp;[K]</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; qv &nbsp; = data-&gt;qv &nbsp; &nbsp;; qv [ kg/kg]</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; z &nbsp; &nbsp;= data-&gt;z_mc &nbsp; &nbsp;; geopotential [m]</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp;&nbsp;</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; print("FILEs READ in "+get_cpu_time()+"s")</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><br class=""></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; rh=relhum(t, qv, p)</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; td=dewtemp_trh(t, rh)</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp;&nbsp;</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; print("COMPUTATION "+get_cpu_time()+"s”)</font></div><div class=""><br class=""></div><div class="">and getting the following printout.</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" style="font-size: 11px;" class="">(0)<span class="Apple-tab-span" style="white-space:pre">        </span>FILEs READ in 47.4748s</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">(0)<span class="Apple-tab-span" style="white-space:pre">        </span>COMPUTATION 499.424s</font></div></div><div class=""><br class=""></div><div class="">Is there any way to speed up the process? I tried to use as few definition as possible and only pre-included functions.&nbsp;</div><div class="">Why is the computation part taking so long? Maybe it’s something that depends on the system RAM?&nbsp;</div><div class="">In the meantime the best workaround that I could think of consisted in subsetting a region in the previous data and testing the code only on that file.</div><div class=""><br class=""></div><div class="">Cheers</div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista.org" class="">http://guidocioni.altervista.org</a>&nbsp;</div>

</div>

<br class=""></div></body></html>