Skip to content

Commit

Permalink
quick bug fixes related to lastobs writing and initial time (#555)
Browse files Browse the repository at this point in the history
Co-authored-by: awlostowski-noaa <adamw@cheyenne1.cheyenne.ucar.edu>
  • Loading branch information
awlostowski-noaa and awlostowski-noaa authored Apr 20, 2022
1 parent 946a512 commit 9bdfac9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/troute-nwm/src/nwm_routing/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,14 @@ def nwm_output_generator(
# Write out LastObs as netcdf.
# This is only needed if 1) streamflow nudging is ON and 2) a lastobs output
# folder is provided by the user.
lastobs_output_folder = None
nudging_true = None
streamflow_da = data_assimilation_parameters.get('streamflow_da', None)
nudging_true = streamflow_da.get('streamflow_nudging', None)
if streamflow_da:
lastobs_output_folder = streamflow_da.get(
"lastobs_output_folder", None
)
nudging_true = streamflow_da.get('streamflow_nudging', None)

if nudging_true and lastobs_output_folder:

Expand Down
1 change: 1 addition & 0 deletions src/troute-nwm/src/nwm_routing/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ def nwm_initial_warmstate_preprocess(
q0, t0 = nhd_io.read_lite_restart(
restart_parameters['lite_channel_restart_file']
)
t0_str = None

# build initial states from user-provided restart parameters
else:
Expand Down

0 comments on commit 9bdfac9

Please sign in to comment.