You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `pydsm` command-line tool provides the following subcommands:
55
-
56
54
```
57
55
pydsm --help
58
56
```
59
57
60
58
### DSS file utilities
61
59
62
-
| Command | Description |
63
-
|---------|-------------|
64
-
|[`pydsm extract-dss`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#extract-dss)`<dssfile>`| Extract time series from a DSS file; optionally filter by C-part, apply Godin filter, and resample to daily/monthly values. Output can be pickle (`.gz`/`.zip`/`.bz2`), HDF5 (`.h5`), or DSS. |
65
-
|[`pydsm compare-dss`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#compare-dss)`<dssfile1> <dssfile2>`| Compare two DSS files on matching B/C-part pathnames and write goodness-of-fit metrics (RMSE, Nash-Sutcliffe, percent bias, etc.) to a CSV. |
66
-
|[`pydsm copy-all-dss`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#copy-all-dss)`<from_file> <to_file>`| Copy all paths from one DSS file to another. |
67
-
|[`pydsm csv-to-dss`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#csv-to-dss)`<csv_file> <dss_file>`| Convert a CSV time series file to a DSS file with configurable path parts, units, period type, resampling, and a numeric multiplier. |
68
-
|[`pydsm extend-dss-ts`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#extend-dss-ts)`<dss_filename> <dss_ext_filename>`| Extend time series in a DSS file by a number of days (default 366) by appending a shifted copy at the end. |
69
-
|[`pydsm repeating`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#repeating)`create <datafile>`| Create a repeating annual time series from a CSV template year and write it to a DSS file. |
70
-
|[`pydsm repeating`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#repeating)`extend <datafile>`| Extend an existing repeating time series in a DSS file forward to a given end year. |
60
+
#### `extract-dss`
61
+
62
+
Extract time series from a DSS file, with optional C-part filtering, Godin tidal filter, and resampling.
|[`pydsm pretty-print-input`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#pretty-print-input)`<input_file> [output_file]`| Reformat (pretty-print) a DSM2 `.inp` echo file. Defaults to `<basename>.pretty.inp`. |
77
-
|[`pydsm create-dsm2-input-for-cd`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#create-dsm2-input-for-cd)`<dss_filename> <dsm2_input_filename> <file_field_string>`| Generate a DSM2 `.inp` boundary file for consumptive demand from a DSS file. |
78
-
|[`pydsm chan-orient`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#chan-orient)`<channel_line_geojson_file> <hydro_echo_file>`| Generate a channel orientation file (angles) from a GeoJSON channel geometry and a Hydro echo file. |
237
+
#### `pretty-print-input`
238
+
239
+
Reformat (pretty-print) a DSM2 `.inp` echo file, normalising whitespace and column alignment.
240
+
241
+
```
242
+
pydsm pretty-print-input INPUT_FILE [OUTPUT_FILE]
243
+
```
244
+
245
+
| Argument | Default | Description |
246
+
|---|---|---|
247
+
|`INPUT_FILE`|*(required)*| DSM2 `.inp` echo file to reformat |
Compare two DSM2 studies by their Hydro echo files. Reports structural differences in all input tables and computes RMSE/bias for DSS-backed time-series inputs.
299
+
300
+
```
301
+
pydsm diff ECHO_A ECHO_B [OPTIONS]
302
+
```
303
+
304
+
| Argument / Option | Default | Description |
305
+
|---|---|---|
306
+
|`ECHO_A`, `ECHO_B`|*(required)*| Paths to the two Hydro echo `.inp` files |
307
+
|`-t / --tables`|`BOUNDARY_FLOW BOUNDARY_STAGE OPRULE_TIME_SERIES`| DSS-backed tables to compare for time-series data (repeatable) |
308
+
|`--all-tables`| off | Compare DSS data in all known TS-backed tables |
|[`pydsm slice-hydro`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#slice-hydro)`<infile> <outfile> <stime> <etime>`| Slice a Hydro HDF5 tidefile to a time window (e.g. `1990-01-10` to `1990-03-31`) and write a new tidefile. |
85
-
|[`pydsm update-hydro-tidefile-with-inp`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#update-hydro-tidefile-with-inp)`<hydro_tidefile> <input_file>`| Patch an HDF5 Hydro tidefile's input table from a `.inp` file. |
86
-
|[`pydsm create-gtm-restart`](https://cadwrdeltamodeling.github.io/pydsm/pydsm.cli.html#create-gtm-restart)`<tidefile> <target_time> <outfile>`| Write a GTM/Qual restart file from an HDF5 tidefile at the nearest stored time step to `target_time` (e.g. `05FEB2020 0300`). |
324
+
#### `slice-hydro`
325
+
326
+
Slice a Hydro HDF5 tidefile to a time window and write a new tidefile.
327
+
328
+
```
329
+
pydsm slice-hydro INFILE OUTFILE STIME ETIME
330
+
```
331
+
332
+
| Argument | Description |
333
+
|---|---|
334
+
|`INFILE`| Input Hydro HDF5 tidefile |
335
+
|`OUTFILE`| Output (sliced) Hydro HDF5 tidefile |
336
+
|`STIME`| Start datetime string, e.g. `1990-01-10`|
0 commit comments