datetime issue
Hi @jvegas ,
I'm trying to CMORize and make diagnostics of an experiment a0al
but get the following message.
Any help please?
My diag conf file is /home/Earth/fmassonn/EARTHDIAGS/diags_a0al
Thanks,
François
fmassonn@amdahl: ~/EARTHDIAGS >> earthdiags -f diags_a0al
Changing alias SIASIESIV for siasiesiv,glob
Running diags for experiment a0al, startdates ['19580101'], members [0]
Copying mesh files
File mesh_hgr.nc already exists
File mesh_zgr.nc ready
File mask.nc ready
File new_maskglo.nc already exists
File mask_regions.nc is not available for N3.6_O25L75
File mask_regions.3d.nc is not available for N3.6_O25L75
Mesh files ready!
CMORizing startdate 19580101 member fc00. Starting at 19580101
Unpacking oceanic file 1/128
Processing file /scratch/Earth/fmassonn/diags/a0al/CMOR/a0al_1d_19580101_19580131_grid_T.nc
Traceback (most recent call last):
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/bin/earthdiags", line 4, in <module>
__import__('pkg_resources').run_script('earthdiagnostics==3.0.0b18', 'earthdiags')
File "/shared/earth/software/Python/2.7.9-foss-2015a/lib/python2.7/site-packages/pkg_resources/__init__.py", line 719, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/shared/earth/software/Python/2.7.9-foss-2015a/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1504, in run_script
exec(code, namespace, namespace)
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/EGG-INFO/scripts/earthdiags", line 26, in <module>
main()
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/EGG-INFO/scripts/earthdiags", line 21, in main
if not EarthDiags.parse_args():
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/earthdiags.py", line 117, in parse_args
diags.run()
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/earthdiags.py", line 151, in run
self.data_manager.prepare()
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/cmormanager.py", line 297, in prepare
self._cmorize_member(startdate, member)
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/cmormanager.py", line 318, in _cmorize_member
cmorizer.cmorize_ocean()
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/cmorizer.py", line 62, in cmorize_ocean
self._cmorize_ocean_files('MMO')
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/cmorizer.py", line 74, in _cmorize_ocean_files
self._cmorize_nc_files()
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/cmorizer.py", line 80, in _cmorize_nc_files
self._cmorize_nc_file(filename)
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/cmorizer.py", line 240, in _cmorize_nc_file
self._update_time_variables(filename)
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/cmorizer.py", line 463, in _update_time_variables
self._set_leadtime_var(filename)
File "/shared/earth/software/earthdiagnostics/3.0.0b18-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/earthdiagnostics-3.0.0b18-py2.7.egg/earthdiagnostics/cmorizer.py", line 474, in _set_leadtime_var
leadtime = (Utils.get_datetime_from_netcdf(handler) - parse_date(self.startdate))
TypeError: unsupported operand type(s) for -: 'netcdftime._datetime.datetime' and 'datetime.datetime'