Conversation
joewallwork
left a comment
There was a problem hiding this comment.
Nice to have backward compatibility for reading files.
I have a couple of requests:
- Perhaps add a
Loggedwarning when reading files through the legacy option to say that this is being done? Could even include a deprecation warning, if you think that'd be appropriate. - In the
ParaGridIO_Xiosimplementation ofgetModelState, perhaps we should raise an error if groups are found, with a message saying that the legacy format is not supported in the XIOS implementation? (I'm not sure how readable the XIOS errors would be.) I can then do the same forreadForcingTimeStaticin #928.
Also note that some of the other code changes that align the MPI and non-MPI cases will conflict with similar changes in #744.
|
It might be easier to start from scratch.
|
e56494f to
af75f07
Compare
What would be a sensible way of doing this? As far as I can tell, |
Ah, good point. There's already an initial read of the NetCDF file in Lines 673 to 680 in af75f07 |
Read old-style restart files
Fixes #931
Change Description
Adds the necessary code to allow the old-style restart files with netCDF groups to still be read. This involves making the ParaGridIO code generic so that dimensions and variables can be searched for both in the file root and in the
datagroup. All newly written files are in the flat new style.Test Description
The model successfully runs using my old style restart and forcing files.
Documentation Impact
Since no-one else should be generating the old-style files, this does not really need to be documented. Plus, I should eventually replace my old-style restart files over time.