<div dir="ltr"><div>I can not see an obvious issue.</div><div><br></div><div>Given and the "join" option <br></div><div><br></div><div><span style="font-family:Calibri;font-size:12pt"> time = 156 // unlimited</span><br><span style="font-family:Calibri;font-size:12pt"> bnds = 2</span><br><span style="font-family:Calibri;font-size:12pt"> lon = 180</span><br><span style="font-family:Calibri;font-size:12pt"> lat = 120</span></div><div><span style="font-family:Calibri;font-size:12pt"><br></span></div><div><span style="font-family:Calibri;font-size:12pt">and, say, 10 ensembles, the slp variable should be</span></div><div><span style="font-family:Calibri;font-size:12pt"><br></span></div><div><span style="font-family:Calibri;font-size:12pt"> slp(</span>ncl_join , time, lat , lon ) <span style="font-family:Calibri;font-size:12pt"></span><span style="font-family:Calibri;font-size:12pt"> => slp(10,156,120,180) <br></span></div><div><span style="font-family:Calibri;font-size:12pt">================================================<br></span></div><div><span style="font-family:Calibri;font-size:12pt">What do the following 'print' statements show? <br></span></div><div><p><span style="font-family:Calibri;font-size:12pt">mslp_list = systemfunc("ls /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*<a href="http://mslp_commongrid.nc" target="_blank">mslp_commongrid.nc</a>")</span></p><p><span style="font-family:Calibri;font-size:12pt"><span style="font-family:Calibri;font-size:12pt"> print(<span style="font-family:Calibri;font-size:12pt">mslp_list) ; <======== <br></span></span></span></p><p><span style="font-family:Calibri;font-size:12pt">mslp_file = addfiles(mslp_list,"r")</span></p><p><span style="font-family:Calibri;font-size:12pt"><span style="font-family:Calibri;font-size:12pt"><span style="font-family:Calibri;font-size:12pt"> print(<span style="font-family:Calibri;font-size:12pt">mslp_file) ; <========</span></span></span></span></p><p><span style="font-family:Calibri;font-size:12pt">ListSetType(mslp_file,"join")</span></p><span style="font-family:Calibri;font-size:12pt"></span></div><div><span style="font-family:Calibri;font-size:12pt"> <span style="font-family:Calibri;font-size:12pt"></span></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 20, 2023 at 11:37 AM Giorgio Graffino 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"><p><span style="font-family:Calibri;font-size:12pt">Hello NCL people,</span></p><p> </p><p><span style="font-family:Calibri;font-size:12pt">I'm trying to read files from the MPI-ESM1.1 large ensemble with addfiles. I'm always getting the same error, regardless of the sample size, so it shouldn't be an actual memory issue.</span></p><p> </p><p><span style="font-family:Calibri;font-size:12pt">mslp_list = systemfunc("ls /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*<a href="http://mslp_commongrid.nc" target="_blank">mslp_commongrid.nc</a>")</span></p><p><span style="font-family:Calibri;font-size:12pt">mslp_file = addfiles(mslp_list,"r")</span></p><p><span style="font-family:Calibri;font-size:12pt">ListSetType(mslp_file,"join")</span></p><p><span style="font-family:Calibri;font-size:12pt">fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0</span><br><span style="font-family:Calibri;font-size:12pt">fatal:Memory allocation failure:[errno=12]</span></p><p> </p><p><span style="font-family:Calibri;font-size:12pt">I can't even use functions like getfiledimsizes or getfileatts, because I get the following error. </span><br><br><span style="font-family:Calibri;font-size:12pt">dsizes = getfileatts(mslp_file(0)) </span><br><span style="font-family:Calibri;font-size:12pt">fatal:Argument type mismatch on argument (0) of (getfileatts) can not coerce </span></p><p> </p><p><span style="font-family:Calibri;font-size:12pt">Both mslp_file and mslp_list have 10 elements as they should.</span></p><p> </p><p><span style="font-family:Calibri;font-size:12pt">printVarSummary(mslp_file) </span></p><p><span style="font-family:Calibri;font-size:12pt">Variable: mslp_file</span><br><span style="font-family:Calibri;font-size:12pt">Type: list <join | fifo></span><br><span style="font-family:Calibri;font-size:12pt">Total items: 10</span></p><p><span style="font-family:Calibri;font-size:12pt">printVarSummary(mslp_list)</span></p><p><span style="font-family:Calibri;font-size:12pt">Variable: mslp_list</span><br><span style="font-family:Calibri;font-size:12pt">Type: string</span><br><span style="font-family:Calibri;font-size:12pt">Total Size: 80 bytes</span><br><span style="font-family:Calibri;font-size:12pt"> 10 values</span><br><span style="font-family:Calibri;font-size:12pt">Number of Dimensions: 1</span><br><span style="font-family:Calibri;font-size:12pt">Dimensions and sizes: [10]</span><br><span style="font-family:Calibri;font-size:12pt">Coordinates: </span><br> </p><p><span style="font-family:Calibri;font-size:12pt">I'm sure it's a file-dependent issue, because addfiles works fine on subset of files from other sources. I'm asking for suggestions about things I can try so I can understand what's going on. Here is the file dump of one of the files.</span></p><p> </p><p><span style="font-family:Calibri;font-size:12pt">Copyright (C) 1995-2019 - All Rights Reserved</span><br><span style="font-family:Calibri;font-size:12pt">University Corporation for Atmospheric Research</span><br><span style="font-family:Calibri;font-size:12pt">NCAR Command Language Version 6.6.2</span><br><span style="font-family:Calibri;font-size:12pt">The use of this software is governed by a License Agreement.</span><br><span style="font-family:Calibri;font-size:12pt">See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.</span></p><p><span style="font-family:Calibri;font-size:12pt">Variable: f</span><br><span style="font-family:Calibri;font-size:12pt">Type: file</span><br><span style="font-family:Calibri;font-size:12pt">filename: MPI-ESM1.1_historical_lkm0110_mslp_commongrid</span><br><span style="font-family:Calibri;font-size:12pt">path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/<a href="http://MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc" target="_blank">MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc</a></span><br><span style="font-family:Calibri;font-size:12pt"> file global attributes:</span><br><span style="font-family:Calibri;font-size:12pt"> CDI : Climate Data Interface version 1.9.5 (<a href="http://mpimet.mpg.de/cdi" target="_blank">http://mpimet.mpg.de/cdi</a>)</span><br><span style="font-family:Calibri;font-size:12pt"> Conventions : CF-1.4</span><br><span style="font-family:Calibri;font-size:12pt"> history : Tue Jun 20 17:34:23 2023: ncap2 -O -s time=float(time) /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/<a href="http://MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc" target="_blank">MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc</a> /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/<a href="http://MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc" target="_blank">MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc</a></span><br><span style="font-family:Calibri;font-size:12pt">Tue Apr 18 17:40:36 2023: cdo remapbil,CMIP5/CMIP5_grid.txt /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/<a href="http://MPI-ESM1.1_historical_lkm0110_mslp_year.nc" target="_blank">MPI-ESM1.1_historical_lkm0110_mslp_year.nc</a> /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/<a href="http://MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc" target="_blank">MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc</a></span><br><span style="font-family:Calibri;font-size:12pt">Tue Apr 18 17:40:30 2023: ncks -v slp /storage/basic/baobab/jonathan/thorsten/<a href="http://MPI-ESM1.1_historical_lkm0110_yearmean.nc" target="_blank">MPI-ESM1.1_historical_lkm0110_yearmean.nc</a> /home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/<a href="http://MPI-ESM1.1_historical_lkm0110_mslp_year.nc" target="_blank">MPI-ESM1.1_historical_lkm0110_mslp_year.nc</a></span><br><span style="font-family:Calibri;font-size:12pt">Sat Sep 24 17:07:31 2016: cdo -f nc -t echam6 yearmean /scratch/m/m300057/historical_ensemble/lkm0110_BOT /scratch/m/m300057/historical_ensemble/<a href="http://MPI-ESM1.1_historical_lkm0110_yearmean.nc" target="_blank">MPI-ESM1.1_historical_lkm0110_yearmean.nc</a></span><br><span style="font-family:Calibri;font-size:12pt"> source : ECHAM6</span><br><span style="font-family:Calibri;font-size:12pt"> institution : Max-Planck-Institute for Meteorology</span><br><span style="font-family:Calibri;font-size:12pt"> NCO : netCDF Operators version 5.0.7 (Homepage = <a href="http://nco.sf.net" target="_blank">http://nco.sf.net</a>, Code = <a href="http://github.com/nco/nco" target="_blank">http://github.com/nco/nco</a>)</span><br><span style="font-family:Calibri;font-size:12pt"> CDO : Climate Data Operators version 1.9.5 (<a href="http://mpimet.mpg.de/cdo" target="_blank">http://mpimet.mpg.de/cdo</a>)</span><br><span style="font-family:Calibri;font-size:12pt"> dimensions:</span><br><span style="font-family:Calibri;font-size:12pt"> time = 156 // unlimited</span><br><span style="font-family:Calibri;font-size:12pt"> bnds = 2</span><br><span style="font-family:Calibri;font-size:12pt"> lon = 180</span><br><span style="font-family:Calibri;font-size:12pt"> lat = 120</span><br><span style="font-family:Calibri;font-size:12pt"> variables:</span><br><span style="font-family:Calibri;font-size:12pt"> float time ( time )</span><br><span style="font-family:Calibri;font-size:12pt"> axis : T</span><br><span style="font-family:Calibri;font-size:12pt"> bounds : time_bnds</span><br><span style="font-family:Calibri;font-size:12pt"> calendar : proleptic_gregorian</span><br><span style="font-family:Calibri;font-size:12pt"> standard_name : time</span><br><span style="font-family:Calibri;font-size:12pt"> units : day as %Y%m%d.%f</span></p><p><span style="font-family:Calibri;font-size:12pt"> double time_bnds ( time, bnds )</span></p><p><span style="font-family:Calibri;font-size:12pt"> double lon ( lon )</span><br><span style="font-family:Calibri;font-size:12pt"> standard_name : longitude</span><br><span style="font-family:Calibri;font-size:12pt"> long_name : longitude</span><br><span style="font-family:Calibri;font-size:12pt"> units : degrees_east</span><br><span style="font-family:Calibri;font-size:12pt"> axis : X</span></p><p><span style="font-family:Calibri;font-size:12pt"> double lat ( lat )</span><br><span style="font-family:Calibri;font-size:12pt"> standard_name : latitude</span><br><span style="font-family:Calibri;font-size:12pt"> long_name : latitude</span><br><span style="font-family:Calibri;font-size:12pt"> units : degrees_north</span><br><span style="font-family:Calibri;font-size:12pt"> axis : Y</span></p><p><span style="font-family:Calibri;font-size:12pt"> float slp ( time, lat, lon )</span><br><span style="font-family:Calibri;font-size:12pt"> long_name : mean sea level pressure</span><br><span style="font-family:Calibri;font-size:12pt"> units : Pa</span><br><span style="font-family:Calibri;font-size:12pt"> code : 151</span><br><span style="font-family:Calibri;font-size:12pt"> table : 128</span></p><p> </p><p><span style="font-family:Calibri;font-size:12pt">Thanks a lot.</span></p><p> </p><p><span style="font-family:Calibri;font-size:12pt">Giorgio</span></p>_______________________________________________<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>