Skip to content

Commit 8e3f548

Browse files
authored
Merge pull request #293 from amoodie/drop_legacy
prepare for legacy output file deprecation with future version 2.2.
2 parents 1695623 + 80c0dde commit 8e3f548

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

pyDeltaRCM/model.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,10 +1329,8 @@ def clobber_netcdf(self, clobber_netcdf: bool) -> None:
13291329
def legacy_netcdf(self) -> bool:
13301330
"""Enable output in legacy netCDF format.
13311331
1332-
.. note:: new in `v2.1.0`.
1333-
13341332
Default behavior, legacy_netcdf: False, is for the model to use the
1335-
new `v2.1.0` output netCDF format. The updated format is configured
1333+
`v2.1.0` output netCDF format. The updated format is configured
13361334
to match the input expected by `xarray`, which eases interaction with
13371335
model outputs. The change in format is from inconsistently named
13381336
dimensions and *coordinate variables*, to homogeneous definitions.
@@ -1341,9 +1339,13 @@ def legacy_netcdf(self) -> bool:
13411339
13421340
.. important::
13431341
1344-
There are no changes to the dimensionality of data such as bed
1345-
elevation or velocity, only the metadata specifying the location of
1346-
the data are changed.
1342+
The behavior of the legacy option, and the new format is expected
1343+
to change in version 2.2.0 With v2.2.0 the default output file
1344+
will comply with the sandsuet data specification, and the
1345+
`legacy_output=True` option will output the current
1346+
configuration. The core data will not change with v2.2, but the
1347+
names and attributes of components of the data output is expected
1348+
to change.
13471349
13481350
+-------------+-------------------+---------------------------------+
13491351
| | default | legacy |
@@ -1364,6 +1366,13 @@ def legacy_netcdf(self) -> bool:
13641366

13651367
@legacy_netcdf.setter
13661368
def legacy_netcdf(self, legacy_netcdf: bool) -> None:
1369+
if legacy_netcdf:
1370+
warnings.warn(
1371+
"The legacy version of the NetCDF output is "
1372+
"expected to change with v2.2. The old `legagcy` "
1373+
"file format will no longer be available, and "
1374+
"will be replaced by the current file format."
1375+
)
13671376
self._legacy_netcdf = legacy_netcdf
13681377

13691378
@property

0 commit comments

Comments
 (0)