<div dir="ltr"><div>Hi Ehsan,</div><div><br></div><div>That errno=12 is an out of memory error, so I suspect short2flt() is not the issue. Are you working with really large datasets/arrays?  That short array converted to floats will be 6.6GB</div><div><br></div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 12, 2022 at 9:30 AM Ehsan Taghizadeh via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">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><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif">Hi everybody,</div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif">I hope you are doing well.</div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif">I tried to read "2 metre temperature" from ERA5-Land nc file. This nc file include about 10 years, all months (12 months), all days (365 days), and all hours (24 hours) with size about 7 GB. I used following simple lines:</div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif"><br></div><div dir="ltr" style="font-size:16px"><font face="courier new, courier, monaco, monospace, sans-serif">dr = "./"</font></div><div dir="ltr" style="font-size:16px"><font face="courier new, courier, monaco, monospace, sans-serif">fn = "<a href="http://era5land.nc" target="_blank">era5land.nc</a>"</font></div><div dir="ltr" style="font-size:16px"><font face="courier new, courier, monaco, monospace, sans-serif">fin = addfile(dr+fn, "r")</font></div><div dir="ltr" style="font-size:16px"><font face="courier new, courier, monaco, monospace, sans-serif">t2mera = fin->t2m(:,::-1,:)</font></div><div dir="ltr" style="font-size:16px"><font face="courier new, courier, monaco, monospace, sans-serif">printVarSummary(t2mera)</font></div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif"><br></div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif">Output is like following lines:</div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif"><br></div><div dir="ltr" style="font-size:16px"><div><div dir="ltr"><font face="courier new, courier, monaco, monospace, sans-serif">Type: short</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">Dimensions and sizes:   [time | 87648] x [latitude | 151] x [longitude | 251]</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">Coordinates:</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">            time: [955488..1043135]</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">            latitude: [25..40]</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">            longitude: [40..65]</font></div></div><br></div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif">However, if I use short2flt as below:</div><div dir="ltr" style="font-size:16px"><font face="courier new, courier, monaco, monospace, sans-serif">t<span style="color:rgb(0,0,0);font-size:16px">2meras = short2flt(fin->t2m(:,::-1,:))</span></font></div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif"><span><span style="color:rgb(0,0,0);font-family:bookman old style,new york,times,serif;font-size:16px"><br></span></span></div><div dir="ltr">Following error occurred:</div><div dir="ltr" style="font-size:16px;font-family:bookman old style,new york,times,serif"><span><span style="color:rgb(0,0,0);font-family:bookman old style,new york,times,serif;font-size:16px"><br></span></span></div><div dir="ltr" style="font-size:16px"><div><div><font face="courier new, courier, monaco, monospace, sans-serif">fatal:NclMalloc Failed:[errno=12]</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">fatal:Could not coerce values for operation</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">fatal:["Execute.c":8637]:Execute: Error occurred at or near line 2013 in file /usr/local/ncl6.6/lib/ncarg/nclscripts/csm/contributed.ncl</font></div></div><div style="font-family:bookman old style,new york,times,serif"><br></div><div dir="ltr"><span style="font-family:bookman old style,new york,times,serif">Then it mentioned the line with the "</span><font face="courier new, courier, monaco, monospace, sans-serif">short2flt</font>" command.</div><div style="font-family:bookman old style,new york,times,serif" dir="ltr"><br></div><div style="font-family:bookman old style,new york,times,serif" dir="ltr">I'll be thankful if I have any help.<br></div></div><div style="font-size:16px;font-family:bookman old style,new york,times,serif"><br></div><div style="font-size:16px;font-family:bookman old style,new york,times,serif"><div dir="ltr" style="font-family:old times,serif;font-size:16px"><div><div dir="ltr" style="color:rgb(0,0,0);font-family:old times,serif;font-size:16px"><i><font size="2">-----------------------------------------------------------------------------</font></i></div><div dir="ltr" style="color:rgb(0,0,0);font-family:old times,serif;font-size:16px"><i><font size="2">Sincerely,</font></i></div><div dir="ltr" style="color:rgb(0,0,0);font-family:old times,serif;font-size:16px"><i><font size="2">Ehsan Taghizadeh</font></i></div></div><br></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><br>
</blockquote></div>