From b166664a86a136898257024aa5bb39d9449f57de Mon Sep 17 00:00:00 2001 From: "Soroosh.Mani" Date: Wed, 9 Oct 2024 16:08:39 -0500 Subject: [PATCH] Manually add vegetation core param --- stormworkflow/prep/setup_ensemble.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stormworkflow/prep/setup_ensemble.py b/stormworkflow/prep/setup_ensemble.py index fe7d889..4fa4ac1 100644 --- a/stormworkflow/prep/setup_ensemble.py +++ b/stormworkflow/prep/setup_ensemble.py @@ -117,6 +117,13 @@ def _fix_hotstart_issue(ensemble_dir): nm_list['opt']['drampwind'] = 0.0 nm_list.write(pth / 'param.nml', force=True) +def _fix_veg_parameter_issue(ensemble_dir): + # See https://github.com/schism-dev/pyschism/issues/126 + param_nmls = ensemble_dir.glob('**/param.nml') + for pth in param_nmls: + nm_list = f90nml.read(pth) + nm_list['core']['nbins_veg_vert'] = 2 + nm_list.write(pth, force=True) def main(args): @@ -277,6 +284,7 @@ def main(args): ) _fix_hotstart_issue(workdir) + _fix_veg_parameter_issue(workdir) # For newer SCHISM version if with_hydrology: _fix_nwm_issues(workdir, hires_reg) if use_wwm: