Skip to content

Commit

Permalink
Merge pull request #62 from oceanmodeling/feature/rmax_ensemble_option
Browse files Browse the repository at this point in the history
Feature/rmax ensemble option
  • Loading branch information
SorooshMani-NOAA authored Aug 13, 2024
2 parents a3141b8 + e5ad3e2 commit d898f50
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ dependencies = [
"cfgrib",
"cfunits",
"chaospy>=4.2.7",
"coupledmodeldriver>=1.6.6",
"coupledmodeldriver>=1.7.1.post1",
"colored-traceback",
"cmocean",
"dask",
"dask-jobqueue",
"ensembleperturbation==1.2.10",
"ensembleperturbation>=1.3.0", # rmax option
"fiona",
"geoalchemy2",
"geopandas",
Expand All @@ -53,7 +53,7 @@ dependencies = [
"pytz",
"pyyaml",
"shapely>=2",
"stormevents==2.2.5",
"stormevents>=2.3.2", # rmax forecast
"rasterio",
"requests",
"rtree",
Expand Down
8 changes: 2 additions & 6 deletions stormworkflow/prep/setup_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,7 @@ def main(args):
perturbations=args.num_perturbations,
directory=workdir / 'track_files',
storm=workdir / 'track_to_perturb.dat',
variables=[
'cross_track',
'along_track',
'radius_of_maximum_winds', # TODO: add option for persistent
'max_sustained_wind_speed',
],
variables=args.variables,
sample_from_distribution=args.sample_from_distribution,
sample_rule=args.sample_rule,
quadrature=args.quadrature,
Expand Down Expand Up @@ -339,6 +334,7 @@ def parse_arguments():
argument_parser.add_argument('--use-wwm', action='store_true')
argument_parser.add_argument('--with-hydrology', action='store_true')
argument_parser.add_argument('--pahm-model', choices=['gahm', 'symmetric'], default='gahm')
argument_parser.add_argument('--variables', nargs='+', type=str)

argument_parser.add_argument('name', help='name of the storm', type=str)

Expand Down
8 changes: 7 additions & 1 deletion stormworkflow/refs/input.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
input_version: 0.0.1
input_version: 0.0.2

storm: "florence"
year: 2018
Expand All @@ -14,6 +14,12 @@ num_perturb: 2
sample_rule: "korobov"
spinup_exec: "pschism_PAHM_TVD-VL"
hotstart_exec: "pschism_PAHM_TVD-VL"
perturb_vars:
- 'cross_track'
- 'along_track'
# - 'radius_of_maximum_winds'
- 'radius_of_maximum_winds_persistent'
- 'max_sustained_wind_speed'

hpc_solver_nnodes: 3
hpc_solver_ntasks: 108
Expand Down
1 change: 1 addition & 0 deletions stormworkflow/scripts/workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ PREP_KWDS+=" --sample-rule $sample_rule"
PREP_KWDS+=" --date-range-file $run_dir/setup/dates.csv"
PREP_KWDS+=" --nwm-file $L_NWM_DATASET"
PREP_KWDS+=" --tpxo-dir $L_TPXO_DATASET"
PREP_KWDS+=" --variables $perturb_vars"
if [ $use_wwm == 1 ]; then PREP_KWDS+=" --use-wwm"; fi
if [ $hydrology == 1 ]; then PREP_KWDS+=" --with-hydrology"; fi
PREP_KWDS+=" --pahm-model $pahm_model"
Expand Down

0 comments on commit d898f50

Please sign in to comment.