From 601a29e5316ef41680622b26a51c9f37fa0f493c Mon Sep 17 00:00:00 2001 From: ThibHlln Date: Mon, 12 Nov 2018 15:23:30 +0000 Subject: [PATCH] corrects bug due to compression in obs file forgot to remove the compression for the observed flow file which raises a RuntimeError: NetCDF: Invalid argument in parallel computing --- smartpy/inout.py | 4 ++-- smartpy/version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/smartpy/inout.py b/smartpy/inout.py index c34e14d..a414707 100644 --- a/smartpy/inout.py +++ b/smartpy/inout.py @@ -407,9 +407,9 @@ def write_flow_netcdf_file_from_dict(timeframe, discharge, netcdf_file, report, with Dataset(netcdf_file + '.nc', 'w', format='NETCDF4', parallel=parallel) as my_file: my_file.description = "Discharge file generated with SMARTpy v{}.".format(__version__) my_file.createDimension('DateTime', None) - t = my_file.createVariable("DateTime", np.float64, ('DateTime',), zlib=True) + t = my_file.createVariable("DateTime", np.float64, ('DateTime',)) t.units = 'seconds since 1970-01-01 00:00:00.0' - my_file.createVariable('flow', np.float64, ('DateTime',), zlib=True, complevel=5) + my_file.createVariable('flow', np.float64, ('DateTime',)) my_file.variables['DateTime'][0:len(my_list_datetime[1:])] = \ (np.asarray(my_list_datetime[1:], dtype='datetime64[us]') - np.datetime64('1970-01-01T00:00:00Z')) / \ diff --git a/smartpy/version.py b/smartpy/version.py index e91351c..fb319cf 100644 --- a/smartpy/version.py +++ b/smartpy/version.py @@ -19,4 +19,4 @@ # along with SMARTpy. If not, see . -__version__ = '0.1.4' +__version__ = '0.1.4-1'