Closed wknoben closed 2 years ago
I think that having a single fixed format on the restart files (write and read) is a good choice (why not netcdf4?). It avoids any potential inconsistency in state files being written and then unusable for starting a different run.
I didn't know if there were any (legacy?) reasons to have the restarts as netcdf3 so it seemed safer not to touch that in this fix and just remove the new code that was causing an issue. If we can test having restarts as netcdf4 through a regular reviewed PR then I'm all for it.
New
deflate_level
setting causes errors when writing restart files that lead to graceful (but unreadable) model failure:Some digging suggests that these are incorrectly handled errors that should read:
Restart files are indeed created with netCDF-3 data models https://github.com/CH-Earth/summa/blob/372c3fbeb3825e3b3d635461a8e552f9f0895aec/build/source/netcdf/modelwrite.f90#L546 whereas regular output files are indeed created with netCDF-4 support https://github.com/CH-Earth/summa/blob/372c3fbeb3825e3b3d635461a8e552f9f0895aec/build/source/netcdf/def_output.f90#L217
indicating that setting the
deflate_level
on netCDF-3 files is not supported. Because this code is are currently live ondevelop
and effectively prevents the use of restart files, I decided to simply remove thedeflate_level
option from restart files for the moment until we can have a deeper look at this (possibly change restart files to netCDF-4?). Brief tests with updated code successfully generate a restart file.