-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
bugSomething isn't workingSomething isn't workingdataset writeRelating to writing datasetsRelating to writing datasets
Description
Dear David and Sadie
cf.write crashes when I attempt to write out fields from MIROC6. I am using the version of cf-python which David gave me, including a bug-fix for MIROC6. Here is an example on Jasmin. The same happens on RACC, using /storage/basic/baobab/jonathan/general/thetao_Omon_MIROC6_abrupt4xCO2_r1i1p1f1_gn_344001-344912.nc
>>> n=cf.read('/badc/cmip6/data/CMIP6/CMIP/MIROC/MIROC6/abrupt-4xCO2/r1i1p1f1/Omon/thetao/gn/latest/thetao_Omon_MIROC6_abrupt-4xCO2_r1i1p1f1_gn_344001-344912.nc',select='ncvar%thetao')
>>> n[0]
<CF Field: sea_water_potential_temperature(time(120), ocean_sigma_z(63), projection_y_coordinate(256), projection_x_coordinate(360)) degC>
>>> cf.write(n[0],'temp.nc')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/users/jonathan/cf-python/cfdm/decorators.py", line 186, in verbose_override_wrapper
return method_with_verbose_kwarg(self, *args, **kwargs)
File "/home/users/jonathan/cf-python/cf/read_write/write.py", line 667, in write
extra_write_vars=extra_write_vars)
File "/home/users/jonathan/cf-python/cfdm/decorators.py", line 186, in verbose_override_wrapper
return method_with_verbose_kwarg(self, *args, **kwargs)
File "/home/users/jonathan/cf-python/cfdm/read_write/netcdf/netcdfwrite.py", line 4470, in write
self._write_field(f)
File "/home/users/jonathan/cf-python/cfdm/read_write/netcdf/netcdfwrite.py", line 3394, in _write_field
self._write_domain_ancillary(f, key, anc)
File "/home/users/jonathan/cf-python/cfdm/read_write/netcdf/netcdfwrite.py", line 2196, in _write_domain_ancillary
self._write_netcdf_variable(ncvar, ncdimensions, anc)
File "/home/users/jonathan/cf-python/cfdm/read_write/netcdf/netcdfwrite.py", line 2537, in _write_netcdf_variable
for ncdim in ncdimensions:
TypeError: 'NoneType' object is not iterable
On Jasmin
>>> cf
<module 'cf' from '/home/users/jonathan/cf-python/cf/__init__.py'>
>>> cf.environment(paths=False)
Platform: Linux-3.10.0-1127.19.1.el7.x86_64-x86_64-with-centos-7.8.2003-Core
HDF5 library: 1.10.4
netcdf library: 4.6.3
udunits2 library: /home/users/ajh/anaconda3/lib/libudunits2.so.0
python: 3.7.7
netCDF4: 1.5.3
cftime: 1.2.1
numpy: 1.16.4
psutil: 5.6.3
scipy: 1.5.2
matplotlib: 3.3.2
ESMF: 7.1.0r
cfdm: 1.8.7.0
cfunits: 3.3.0
cfplot: 3.0.32
cf: 3.7.0
On RACC
>>> cf
<module 'cf' from '/home/users/pg902583/jonathan/cf/__init__.py'>
>>> cf.environment(paths=False)
Platform: Linux-3.10.0-1062.18.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
HDF5 library: 1.10.4
netcdf library: 4.6.3
udunits2 library: libudunits2.so.0
python: 3.7.7
netCDF4: 1.5.3
cftime: 1.2.1
numpy: 1.19.2
psutil: 5.6.3
scipy: 1.4.1
matplotlib: 3.3.2
ESMF: 7.1.0r
cfdm: 1.8.7.0
cfunits: 3.3.0
cfplot: 3.0.32
cf: 3.7.0
Thanks for your help
Jonathan
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdataset writeRelating to writing datasetsRelating to writing datasets