Skip to content

Commit

Permalink
Merge pull request #61 from oceanmodeling/bugfix/hotstart
Browse files Browse the repository at this point in the history
Add hotstart ramp fix
  • Loading branch information
SorooshMani-NOAA authored Aug 9, 2024
2 parents 8e2e622 + 14464d8 commit a3141b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ dependencies = [
"cmocean",
"dask",
"dask-jobqueue",
"ensembleperturbation>=1.1.2",
"ensembleperturbation==1.2.10",
"fiona",
"geoalchemy2",
"geopandas>=0.14",
"geopandas",
"matplotlib",
"mpi4py",
"netCDF4",
Expand All @@ -53,7 +53,7 @@ dependencies = [
"pytz",
"pyyaml",
"shapely>=2",
"stormevents>=2.2.4",
"stormevents==2.2.5",
"rasterio",
"requests",
"rtree",
Expand Down
12 changes: 12 additions & 0 deletions stormworkflow/prep/setup_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ def _fix_nwm_issues(ensemble_dir, hires_shapefile):
_relocate_source_sink(pth, hires_shapefile)


def _fix_hotstart_issue(ensemble_dir):
hotstart_dirs = ensemble_dir.glob('runs/*')
for pth in hotstart_dirs:
nm_list = f90nml.read(pth / 'param.nml')
nm_list['opt']['dramp'] = 0.0
nm_list['opt']['drampbc'] = 0.0
nm_list['opt']['dramp_ss'] = 0.0
nm_list['opt']['drampwind'] = 0.0
nm_list.write(pth / 'param.nml', force=True)


def main(args):

track_path = args.track_file
Expand Down Expand Up @@ -267,6 +278,7 @@ def main(args):
}
)

_fix_hotstart_issue(workdir)
if with_hydrology:
_fix_nwm_issues(workdir, hires_reg)
if use_wwm:
Expand Down

0 comments on commit a3141b8

Please sign in to comment.