<div dir="auto">You have to increase the maximum memory (ws maximum size) used by ncl to plot. See here (<a href="https://www.ncl.ucar.edu/Document/Graphics/hlures.shtml">https://www.ncl.ucar.edu/Document/Graphics/hlures.shtml</a>). <div dir="auto"><br></div><div dir="auto">Additionally, depending on the machine, you may need to increase the maximum memory available for ncl at execution time (like ulimit in Linux). </div><div dir="auto">Cheers </div></div><div class="gmail_extra"><br><div class="gmail_quote">Il 23 ago 2017 1:09 PM, "Beáta Szabó-Takács" <<a href="mailto:szabo.b@czechglobe.cz">szabo.b@czechglobe.cz</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="HU" link="#0563C1" vlink="#954F72">
<div class="m_4138251214724357598WordSection1">
<p class="MsoNormal">Dear NCL Users,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I would like to calculate Aridity index base on Hargreaves ETo equation. I use daily maximum and minimum temperature data from 1971 to 2000 and yearly sum precipitation (30 years). The dimension of latitude is (201x464) and the day of year
is (10957) vector for radext_fao56 function. When I run the scipt I get the following error message:<u></u><u></u></p>
<p class="MsoNormal">fatal:NclMalloc Failed:[errno=12]<u></u><u></u></p>
<p class="MsoNormal">fatal:New: could not create new array:[errno=12]<u></u><u></u></p>
<p class="MsoNormal">fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 897 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/crop.ncl<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 162 in file lambert_PET.ncl<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">; Main code.<u></u><u></u></p>
<p class="MsoNormal">;-----------------------------<wbr>------------------------------<wbr>-----------<u></u><u></u></p>
<p class="MsoNormal">begin<u></u><u></u></p>
<p class="MsoNormal">;*****************************<wbr>*******************<u></u><u></u></p>
<p class="MsoNormal">; read in netCDF file<u></u><u></u></p>
<p class="MsoNormal">;*****************************<wbr>*******************<u></u><u></u></p>
<p class="MsoNormal"> a = addfile("E-OBS_tasmax.nc","r")<u></u><u></u></p>
<p class="MsoNormal"> b = addfile("E-OBS_tasmin.nc","r")<u></u><u></u></p>
<p class="MsoNormal"> c = addfile("E-OBS_1971-2000_ys.<wbr>nc","r")<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> tasmax = a->tasmax<u></u><u></u></p>
<p class="MsoNormal"> tasmin = b->tasmin<u></u><u></u></p>
<p class="MsoNormal"> Pr_annual_total = c->pr<u></u><u></u></p>
<p class="MsoNormal"> lon = a->longitude<u></u><u></u></p>
<p class="MsoNormal"> lat = a->latitude<u></u><u></u></p>
<p class="MsoNormal"> time = a->time<u></u><u></u></p>
<p class="MsoNormal"> minlat = 30 ; min lat to mask<u></u><u></u></p>
<p class="MsoNormal"> maxlat = 75 ; max lat to mask<u></u><u></u></p>
<p class="MsoNormal"> minlon = -20 ; min lon to mask<u></u><u></u></p>
<p class="MsoNormal"> maxlon = 40 ; max lon to mask<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> nlat = dimsizes(lat)<u></u><u></u></p>
<p class="MsoNormal"> mlon = dimsizes(lon)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> lat_new=conform_dims( (/nlat,mlon/), lat, 0)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> time2 = calendar_decode2(time,-5)<u></u><u></u></p>
<p class="MsoNormal"> doy = day_of_year(time2(:,0),time2(:<wbr>,1),time2(:,2))<u></u><u></u></p>
<p class="MsoNormal"> print(doy)<u></u><u></u></p>
<p class="MsoNormal"> radext = radext_fao56(doy, lat_new, 0)<u></u><u></u></p>
<p class="MsoNormal"> radext = where(ismissing(radext), 0, radext)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> evtH_0 = refevt_hargreaves_fao56( tmin, tmax, radext, (/0,0,0/) )<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> print(evtH_0)<u></u><u></u></p>
<p class="MsoNormal"> opt = True<u></u><u></u></p>
<p class="MsoNormal"> opt@nval_crit = 12<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> PET_m = calculate_monthly_values (evtH_0, "sum", 0,opt)<u></u><u></u></p>
<p class="MsoNormal"> print(PET_m)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> PET_annual_total = month_to_annual(PET_m, 0)<u></u><u></u></p>
<p class="MsoNormal">; Pr_annual_total = month_to_annual(Pr_m, 0)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> AI = Pr_annual_total/PET_annual_<wbr>total<u></u><u></u></p>
<p class="MsoNormal"> AI2 = dim_avg_n(AI,0)<u></u><u></u></p>
<p class="MsoNormal"> IM = new(dimsizes(AI2),typeof(AI2))<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> IM = where(AI2 .lt. 0.03,1.0,IM)<u></u><u></u></p>
<p class="MsoNormal"> IM = where(AI2 .ge. 0.03 .and. AI2 .lt. 0.2,2.0,IM)<u></u><u></u></p>
<p class="MsoNormal"> IM = where(AI2 .ge. 0.2 .and. AI2 .lt. 0.5,3.0,IM)<u></u><u></u></p>
<p class="MsoNormal"> IM = where(AI2 .ge. 0.5 .and. AI2 .lt. 0.65,4.0,IM)<u></u><u></u></p>
<p class="MsoNormal"> IM = where(AI2 .ge. 0.65,5.0,IM)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The error refer to the radext_fao56 in my script which is attached as well. Could someone suggest a solution?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you for your help in advance!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Best regards,<u></u><u></u></p>
<p class="MsoNormal">Beata<u></u><u></u></p>
</div>
</div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div></div>