<div dir="ltr">Hi,<div><br></div><div>I am trying to access multiple variables from a file and need to average over time for each variables.</div><div><br></div><div>I am running the following codes:</div><div><br></div><div><div> fn = "ERA_Plev.nc" ; define filename</div><div> in = addfile(fn,"r") ; open netcdf file</div><div> printVarSummary(in)</div><div><br></div><div>T=in->t ; temperature</div><div>U=in->u ; U wind</div><div>V=in->v ; V wind</div><div><br></div><div>printVarSummary(T)</div><div>printVarSummary(U)</div><div>printVarSummary(V)</div><div><br></div><div>;T1 = dim_avg_n(T,0)</div><div>;T@units = "K"</div><div><span style="white-space:pre"> </span></div><div>end</div></div><div><br></div><div>Summary of the file is like below;<br></div><div><br></div><div><div>Variable: in</div><div>Type: file</div><div>File path: ERA_Plev.nc</div><div>Number of global attributes: 2</div><div>Number of dimensions: 4</div><div>Number of variables: 18</div><div>fatal:NclMalloc Failed:[errno=12]</div><div>Segmentation fault (core dumped)</div></div><div><br></div><div>When I am calling only Temperature using the codes below;</div><div><br></div><div><div>fn = "ERA_Plev.nc" ; define filename</div><div>in = addfile(fn,"r") ; open netcdf file</div><div> printVarSummary(in)</div><div><br></div><div>T=in->t ; temperature</div><div>;U=in->u ; U wind</div><div>;V=in->v ; V wind</div><div><br></div><div>printVarSummary(T)</div><div>;printVarSummary(U)</div><div>;printVarSummary(V)</div><div><br></div><div>;T1 = dim_avg_n(T,0)</div><div>;T@units = "K"</div><div><span style="white-space:pre"> </span></div><div>end</div></div><div> </div><div>It shows</div><div><br></div><div><div>Variable: T</div><div>Type: short</div><div>Total Size: 1042566000 bytes</div><div> 521283000 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes: [time | 120] x [level | 25] x [latitude | 721] x [longitude | 241]</div><div>Coordinates:</div><div> time: [994176..994890]</div><div> level: [50..125]</div><div> latitude: [90..-90]</div><div> longitude: [60..120]</div><div>Number Of Attributes: 7</div><div> scale_factor : 0.00218919045579553</div><div> add_offset : 252.4797479951041</div><div> _FillValue : -32767</div><div> missing_value : -32767</div><div> units : K</div><div> long_name : Temperature</div><div> standard_name : air_temperature</div></div><div><br></div><div><br></div><div>I have to call several other variables from this file (14 GB) and I need to average over time such that 'Dimensions' of each variables will be like below;</div><div><br></div><div>[time | 1]*
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">[level | 25] x [latitude | 721] x [longitude | 241]</span>
</div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div>Which function I have to use in this case?</div><div><br></div><div><br></div><div>When I am trying to call other variables from the file I am getting the error message as;</div><div><br></div><div><div>Variable: in</div><div>Type: file</div><div>File path: ERA_Plev.nc</div><div>Number of global attributes: 2</div><div>Number of dimensions: 4</div><div>Number of variables: 18</div><div>fatal:NclMalloc Failed:[errno=12]</div><div>Segmentation fault (core dumped)</div></div><div><br></div><div>Please kindly inform me how to resolve this issue.</div><div><br></div><div><br></div><div>Thank you,</div><div>Soma</div><div><br></div><div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div></div></div>