Skip to content

Commit

Permalink
flowveldepth to pickle for testing (#503)
Browse files Browse the repository at this point in the history
* check statement

* remove

* save test

* allow testing result to be printed from output.py

* clear whitespace commit

Co-authored-by: awlostowski-noaa <[email protected]>
  • Loading branch information
awlostowski-noaa and awlostowski-noaa authored Dec 3, 2021
1 parent 2f13a68 commit c74cf3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/nwm_routing/src/nwm_routing/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def nwm_output_generator(
csv_output_folder = None
rsrto = output_parameters.get("hydro_rst_output", None)
chrto = output_parameters.get("chrtout_output", None)
test = output_parameters.get("test_output", None)

if csv_output:
csv_output_folder = output_parameters["csv_output"].get(
Expand All @@ -80,7 +81,7 @@ def nwm_output_generator(
csv_output_segments = csv_output.get("csv_output_segments", None)


if csv_output_folder or rsrto or chrto:
if csv_output_folder or rsrto or chrto or test:

start = time.time()
qvd_columns = pd.MultiIndex.from_product(
Expand Down Expand Up @@ -110,6 +111,9 @@ def nwm_output_generator(

LOG.debug("Constructing the FVD DataFrame took %s seconds." % (time.time() - start))

if test:
flowveldepth.to_pickle(Path(test))

if rsrto:

LOG.info("- writing restart files")
Expand Down

0 comments on commit c74cf3f

Please sign in to comment.