<div dir="ltr"><div>You will have to experiment  to determine how much data you can process. <br></div><div>The variable is type double</div><div>   <b>double </b>CHLIO(TIME, LAT361_472, LON161_408)</div><div>so it uses twice the memory.</div><div>---------------------------------------------------------</div><div>The memory issue is 'machine dependent'</div><div>You will have to experiment.</div><div><br></div><div>------------------------------------------------------<br></div><div>DEBUG:  To test if your code is correct, use only a few spatial locations. Foe example:<br></div><div><br></div><div><div>ilat1  = 0<br></div><div>ilat2  = 3<br></div><div>ilon1 = 0<br></div><div>ilon2 = 6</div><div><div>CHLIO     = data1->CHLIO(:,ilat1:ilat2,ilon1:ilon2)   ; all times and spatial subset<br></div><div>printVarSummary(CHLIO)</div><div><br></div></div><div>your script</div><div>-------------------------------------------------------</div><div>You could also experiment with converting double to float</div><div><br></div><div><div>CHLIO     = <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/dble2flt.shtml"><b>dble2flt</b></a>( data1->CHLIO(:,ilat1:ilat2,ilon1:ilon2)  ) ; all times and spatial subset<br></div><div>printVarSummary(CHLIO)</div><div>---------------------------------------------------</div><br><div><br></div><div>You will have to experiment with subsetting the subset you have.</div><div><br></div><div><br></div><div><br></div></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 21, 2022 at 8:34 AM saurabh rathore <<a href="mailto:rohitsrb2020@gmail.com">rohitsrb2020@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,0)">Hello Denis</div><div class="gmail_default" style="color:rgb(0,0,0)">G'day</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">The data I am using is already subsetted for the Indian Ocean (40E-100E and 0-28N). Sorry if I am not getting your point. </div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">Cheers, Saurabh</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 21, 2022 at 3:57 PM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Obviously, you have exceeded available memory. <br></div><div><br></div><div>You will have to calculate 'geographical subsets' of the anomalies. Then You must always read all the time steps.<br></div><div><br></div><div>ilat1 = <br></div><div>ilat2 =</div><div>ilon1 = <br></div><div>ilon2 = <br></div><div>CHLIO     = data1->CHLIO(:,ilat1:ilat2,ilon1:1lon2)   ; all times<br></div><div>printVarSummary(CHLIO)</div><div><br></div><div>===</div><div>See Example of function <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/calcDayAnomTLL.shtml" target="_blank"><b>calcDayAnomTLL</b></a></div><div><br></div><div>Also, unless you are using a very old version of NCL, you do not need to explicitly 'load' the libraries. The following can be eliminated:</div><div><br></div><div><div class="gmail_default" style="color:rgb(0,0,0)"><span style="color:rgb(34,34,34)">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</span></div> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 21, 2022 at 5:18 AM saurabh rathore via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,0)">Hello NCL users</div><div class="gmail_default" style="color:rgb(0,0,0)">G'day</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">I am trying to compute the daily anomalies from a high-resolution daily data as shown below from the ncdump. I am just showing the dimension of the variable CHLIO. </div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">dimensions:<br>     LON161_408 = 248 ;<br>    LAT361_472 = 112 ;<br>    TIME = UNLIMITED ; // (8362 currently)<br>        bnds = 2 ;<br>variables:<br>double CHLIO(TIME, LAT361_472, LON161_408) ;<br>          CHLIO:missing_value = -1.e+34 ;<br>               CHLIO:_FillValue = -1.e+34 ;<br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">The ncl code that I am using is below but it gets killed as the memory gets fulled during the opration. </div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div><div class="gmail_default" style="color:rgb(0,0,0)"><span style="color:rgb(34,34,34)">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</span></div> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br><br><br> data1 = addfile("/media/srathore/Binny5/cmes-oras/chl/<a href="http://chlio-1998-2020.nc" target="_blank">chlio-1998-2020.nc</a>","r")<br> print(data1)<br> <br> ;***********************************************************<br> ; Read time and create required yyyyddd                    <br> ;***********************************************************<br>   time    = data1->TIME                      ; time:units = "hours since 1-1-1 00:00:0.0"                               <br>   TIME    = cd_calendar(time, 0)             ; type float <br>   year    = toint( TIME(:,0) )<br>   month   = toint( TIME(:,1) )<br>   day     = toint( TIME(:,2) ) <br>   ddd     = day_of_year(year, month, day) <br>   yyyyddd = year*1000 + ddd                  ; needed for input<br>   print(yyyyddd)<br>   <br>   ;***********************************************************<br>   ; Read data: short2flt                                     <br>   ;*********************************************************** <br>   CHLIO     = data1->CHLIO<br><div class="gmail_default" style="color:rgb(0,0,0)"><span style="color:rgb(34,34,34)">   printVarSummary( chl )</span></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">So how to compute the daily anomalies in this case?</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">Cheers, Saurabh</div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><font size="4" color="#0000ff"><b><br></b></font></div><div><font size="4" color="#0000ff"><b><br></b></font></div><font size="4" face="times new roman, serif" color="#0000ff"><b>REGARDS</b></font><div><font size="4" face="times new roman, serif" color="#0000ff"><b><br></b></font><div><font size="4" face="times new roman, serif" color="#0000ff"><b>Saurabh Rathore</b></font></div><div><font size="4" face="times new roman, serif" color="#0000ff"><b>Research Scholar (PhD.)</b></font></div><div><font size="4" face="times new roman, serif" color="#0000ff"><b>Centre For Oceans, Rivers, Atmosphere & Land Science Technology</b></font></div><div><font size="4" face="times new roman, serif" color="#0000ff"><b>Indian Institute Of Technology, Kharagpur</b></font></div><div><font size="4" face="times new roman, serif" color="#0000ff"><b>contact :- 91- 8345984434</b></font></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><font size="4" color="#0000ff"><b><br></b></font></div><div><font size="4" color="#0000ff"><b><br></b></font></div><font size="4" face="times new roman, serif" color="#0000ff"><b>REGARDS</b></font><div><font size="4" face="times new roman, serif" color="#0000ff"><b><br></b></font><div><font size="4" face="times new roman, serif" color="#0000ff"><b>Saurabh Rathore</b></font></div><div><font size="4" face="times new roman, serif" color="#0000ff"><b>Research Scholar (PhD.)</b></font></div><div><font size="4" face="times new roman, serif" color="#0000ff"><b>Centre For Oceans, Rivers, Atmosphere & Land Science Technology</b></font></div><div><font size="4" face="times new roman, serif" color="#0000ff"><b>Indian Institute Of Technology, Kharagpur</b></font></div><div><font size="4" face="times new roman, serif" color="#0000ff"><b>contact :- 91- 8345984434</b></font></div></div></div></div></div></div>
</blockquote></div>