diff --git a/docs/whats-new.md b/docs/whats-new.md index 5ffb31c..1497309 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -23,6 +23,7 @@ - add hydra statistics for overschrijdingen as preparation for eventual method in [#106](https://github.com/Deltares-research/kenmerkendewaarden/pull/106) - improvements to output csv files in [#109](https://github.com/Deltares-research/kenmerkendewaarden/pull/109) - drop duplicate times in `kw.read_measurements()` in [#116](https://github.com/Deltares-research/kenmerkendewaarden/pull/116) +- use NETCDF4_CLASSIC format to reduce file sizes written by `kw.retrieve_measurements()` in [#119](https://github.com/Deltares-research/kenmerkendewaarden/pull/119) ### Fix - implemented workaround for pandas 2.2.0 with different rounding behaviour in [#69](https://github.com/Deltares-research/kenmerkendewaarden/pull/69) diff --git a/examples/KWK_getcheckdata.py b/examples/KWK_getcheckdata.py index ceb8495..6b9c81f 100644 --- a/examples/KWK_getcheckdata.py +++ b/examples/KWK_getcheckdata.py @@ -18,11 +18,11 @@ retrieve_meas_amount = False plot_meas_amount = False -retrieve_meas = False +retrieve_meas = True derive_stats = False plot_meas = False plot_stations = False -test = False +test = True # TODO: add timezone to start/stop date? (and re-retrieve all data): https://github.com/Deltares-research/kenmerkendewaarden/issues/29 start_date = "1870-01-01" diff --git a/kenmerkendewaarden/data_retrieve.py b/kenmerkendewaarden/data_retrieve.py index a17c26c..369a9c1 100644 --- a/kenmerkendewaarden/data_retrieve.py +++ b/kenmerkendewaarden/data_retrieve.py @@ -318,7 +318,7 @@ def retrieve_measurements( ) # write to netcdf (including metadata) - ds_meas.to_netcdf(file_nc) + ds_meas.to_netcdf(file_nc, format="NETCDF4_CLASSIC") ds_meas.close()