-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
When concatenating NetCDF trajectories, ncjoin.py
may fail with an error like this,
Traceback (most recent call last):
File "/p/project/hfr21/common/juwels/easybuild/stages/2019a/software/imteksimcs/devel-intel-2019a-Python-3.6.8/bin/ncjoin", line 10, in <module>
sys.exit(main())
File "/p/project/hfr21/common/juwels/easybuild/stages/2019a/software/imteksimcs/devel-intel-2019a-Python-3.6.8/lib/python3.6/site-packages/imteksimcs/cli/NetCDF/ncjoin.py", line 111, in main
test_tol=arguments.test_tol)
File "/p/project/hfr21/common/juwels/easybuild/stages/2019a/software/imteksimcs/devel-intel-2019a-Python-3.6.8/lib/python3.6/site-packages/imteksimcs/NetCDF/ncjoin.py", line 110, in open_trajs
test2, dummy = fix_time(test2)
File "/p/project/hfr21/common/juwels/easybuild/stages/2019a/software/imteksimcs/devel-intel-2019a-Python-3.6.8/lib/python3.6/site-packages/imteksimcs/NetCDF/ncjoin.py", line 63, in fix_time
if len(time) > 1 and abs(dtime-(time[1]-time[0])) > 1e-3:
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
for a call like this
'['ncjoin', '-v', 'time', '-f', 'traj.nc', '-x', '--', 'previous.default.nc', 'default.nc']'
and my suspicion here is that this happens when the second input nc file has only one frame.
Metadata
Metadata
Assignees
Labels
No labels