Conversion fails for some TERRA outputs. This is probably due to having 'Depth' variable name starting with upper-case instead of lower-case in CDF files.
The error can be reproduced using simulation 107_scale or 106_scale. The conversion produces the following error:
VersionError: NetCDF file version '0.0' is not supported. Please convert with convert_files.convert
Conversion fails for some TERRA outputs. This is probably due to having 'Depth' variable name starting with upper-case instead of lower-case in CDF files.
The error can be reproduced using simulation 107_scale or 106_scale. The conversion produces the following error:
VersionError: NetCDF file version '0.0' is not supported. Please convert with convert_files.convert
In [7]: convert_files.convert( tmfiles) ...:
IndexError Traceback (most recent call last) Cell In[7], line 1 ----> 1 convert_files.convert( tmfiles)
File /mnt/lustre/a2fs-work3/work/n03/n03/eart0587/pyvenv/lib/python3.9/site-packages/terratools/convert_files.py:47, in convert(files, test) 37 os.chmod( 38 file, 39 stat.S_IWUSR (...) 44 | stat.S_IROTH, 45 ) 46 data = nc4.Dataset(file, mode="a") ---> 47 depths = data["Depths"][:] 48 variables = ( 49 data.variables.copy() 50 ) # Copy so not overwriting dictionary keys in loop 51 for var in variables:
File src/netCDF4/_netCDF4.pyx:2517, in netCDF4._netCDF4.Dataset.getitem()
IndexError: Depths not found in /