[ncl-talk] Unable to read files with addfiles
Giorgio Graffino
g.graffino at tim.it
Tue Jun 20 11:34:52 MDT 2023
Hello NCL people,
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.
mslp_list = systemfunc("ls
/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm011*mslp_commongrid.nc")
mslp_file = addfiles(mslp_list,"r")
ListSetType(mslp_file,"join")
fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #0
fatal:Memory allocation failure:[errno=12]
I can't even use functions like getfiledimsizes or getfileatts, because
I get the following error.
dsizes = getfileatts(mslp_file(0))
fatal:Argument type mismatch on argument (0) of (getfileatts) can not
coerce
Both mslp_file and mslp_list have 10 elements as they should.
printVarSummary(mslp_file)
Variable: mslp_file
Type: list <join | fifo>
Total items: 10
printVarSummary(mslp_list)
Variable: mslp_list
Type: string
Total Size: 80 bytes
10 values
Number of Dimensions: 1
Dimensions and sizes: [10]
Coordinates:
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.
Copyright (C) 1995-2019 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.6.2
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: f
Type: file
filename: MPI-ESM1.1_historical_lkm0110_mslp_commongrid
path: /home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc
file global attributes:
CDI : Climate Data Interface version 1.9.5
(http://mpimet.mpg.de/cdi)
Conventions : CF-1.4
history : Tue Jun 20 17:34:23 2023: ncap2 -O -s time=float(time)
/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc
/home/users/ggraffin/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc
Tue Apr 18 17:40:36 2023: cdo remapbil,CMIP5/CMIP5_grid.txt
/home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_year.nc
/home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_commongrid.nc
Tue Apr 18 17:40:30 2023: ncks -v slp
/storage/basic/baobab/jonathan/thorsten/MPI-ESM1.1_historical_lkm0110_yearmean.nc
/home/users/qx920595/baobab/CMIP5/historical/MPI-ESM1.1/MPI-ESM1.1_historical_lkm0110_mslp_year.nc
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/MPI-ESM1.1_historical_lkm0110_yearmean.nc
source : ECHAM6
institution : Max-Planck-Institute for Meteorology
NCO : netCDF Operators version 5.0.7 (Homepage = http://nco.sf.net,
Code = http://github.com/nco/nco)
CDO : Climate Data Operators version 1.9.5
(http://mpimet.mpg.de/cdo)
dimensions:
time = 156 // unlimited
bnds = 2
lon = 180
lat = 120
variables:
float time ( time )
axis : T
bounds : time_bnds
calendar : proleptic_gregorian
standard_name : time
units : day as %Y%m%d.%f
double time_bnds ( time, bnds )
double lon ( lon )
standard_name : longitude
long_name : longitude
units : degrees_east
axis : X
double lat ( lat )
standard_name : latitude
long_name : latitude
units : degrees_north
axis : Y
float slp ( time, lat, lon )
long_name : mean sea level pressure
units : Pa
code : 151
table : 128
Thanks a lot.
Giorgio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230620/aab8a957/attachment.htm>
More information about the ncl-talk
mailing list