CLI Commands
make_storm_ensemble
usage: make_storm_ensemble [-h]
number-of-perturbations storm-code [start-date]
[end-date] [file-deck] [mode] [record-type]
[directory]
positional arguments:
number-of-perturbations
number of perturbations
storm-code storm name/code
start-date start date
end-date end date
file-deck letter of file deck, one of `a`, `b`
mode either `realtime` / `aid_public` or `historical` /
`archive`
record-type record type (i.e. `BEST`, `OFCL`)
directory output directory
optional arguments:
-h, --help show this help message and exit
- ensembleperturbation.perturbation.atcf.perturb_tracks(perturbations: Union[int, List[float], List[Dict[str, float]]], directory: Optional[os.PathLike] = None, storm: Optional[Union[str, os.PathLike]] = None, variables: Optional[List[ensembleperturbation.perturbation.atcf.VortexPerturbedVariable]] = None, sample_from_distribution: bool = False, sample_rule: str = 'random', quadrature: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, file_deck: Optional[stormevents.nhc.atcf.ATCF_FileDeck] = None, mode: Optional[stormevents.nhc.atcf.ATCF_Mode] = None, record_type: Optional[str] = None, overwrite: bool = False, parallel: bool = True)
write a set of perturbed storm tracks
- Parameters
perturbations – either the number of perturbations to create, or a list of floats meant to represent points on either the standard Gaussian distribution or a bounded uniform distribution
directory – directory to which to write
storm – ATCF storm ID, or file path to an existing fort.22 / ATCF file, from which to perturb
variables – vortex variables to perturb
sample_from_distribution – override given perturbations with random samples from the joint distribution
sample_rule – rule to use for the distribution sampling. Please choose from:
random[default],sobol,halton,``hammersley``,korobov,additive_recursion, orlatin_hypercubequadrature – add perturbations along quadrature
start_date – model start time of ensemble
end_date – model end time of ensemble
file_deck – letter of file deck, one of a, b
mode – either realtime / aid_public or historical / archive
record_type – record type (i.e. BEST, OFCL)
overwrite – overwrite existing files
parallel – generate perturbations concurrently
- Returns
mapping of track names to perturbation JSONs
perturb_tracks
perturb_tracks is an extension of initialize_adcirc from CoupledModelDriver
usage: perturb_tracks [-h] --platform PLATFORM --mesh-directory MESH_DIRECTORY
--modeled-start-time MODELED_START_TIME
--modeled-duration MODELED_DURATION --modeled-timestep
MODELED_TIMESTEP [--nems-interval NEMS_INTERVAL]
[--modulefile MODULEFILE] [--forcings FORCINGS]
[--adcirc-executable ADCIRC_EXECUTABLE]
[--adcprep-executable ADCPREP_EXECUTABLE]
[--aswip-executable ASWIP_EXECUTABLE]
[--adcirc-processors ADCIRC_PROCESSORS]
[--job-duration JOB_DURATION]
[--output-directory OUTPUT_DIRECTORY] [--skip-existing]
[--absolute-paths] [--verbose]
[--perturbations PERTURBATIONS] [--variables VARIABLES]
[--sample SAMPLE] [--sample_rule SAMPLE_RULE]
[--quadrature QUADRATURE]
optional arguments:
-h, --help show this help message and exit
--platform PLATFORM HPC platform for which to configure
--mesh-directory MESH_DIRECTORY
path to input mesh (`fort.13`, `fort.14`)
--modeled-start-time MODELED_START_TIME
start time within the modeled system
--modeled-duration MODELED_DURATION
duration within the modeled system
--modeled-timestep MODELED_TIMESTEP
time interval within the modeled system
--nems-interval NEMS_INTERVAL
main loop interval of NEMS run
--modulefile MODULEFILE
path to modulefile to source before model execution`
--forcings FORCINGS comma-separated list of forcings to configure, from
['tidal', 'atmesh', 'besttrack', 'owi', 'ww3data']
--adcirc-executable ADCIRC_EXECUTABLE
filename of compiled `adcirc` or `NEMS.x`
--adcprep-executable ADCPREP_EXECUTABLE
filename of compiled `adcprep` (mesh decomposition)
--aswip-executable ASWIP_EXECUTABLE
filename of compiled `aswip` (preprocessing of best
track / ATCF file)
--adcirc-processors ADCIRC_PROCESSORS
numbers of processors to assign for ADCIRC
--job-duration JOB_DURATION
wall clock time for job
--output-directory OUTPUT_DIRECTORY
directory to which to write configuration files
(defaults to `.`)
--skip-existing skip existing files
--absolute-paths write paths as absolute in configuration
--verbose show more verbose log messages
--perturbations PERTURBATIONS
--variables VARIABLES
--sample SAMPLE
--sample_rule SAMPLE_RULE
--quadrature QUADRATURE
The extension adds several new arguments: --perturbations, --variables, --quadrature, and --serial
perturb_tracks \
--platform HERA \
--mesh-directory /scratch2/COASTAL/coastal/save/shared/models/meshes/hsofs/250m/v1.0_fixed \
--modeled-start-time "2018-09-11 06:00:00" \
--modeled-duration "07:00:00:00" \
--modeled-timestep "00:00:02" \
--nems-interval "01:00:00" \
--forcings tidal,besttrack \
--tidal-spinup-duration "07:00:00:00" \
--tidal-source TPXO \
--tidal-path /scratch2/COASTAL/coastal/save/shared/models/forcings/tides/h_tpxo9.v1.nc \
--besttrack-nws 8 \
--besttrack-storm-id florence2018 \
--adcirc-executable /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp_PaHM/ALLBIN_INSTALL/NEMS.x \
--adcprep-executable /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp_PaHM/ALLBIN_INSTALL/adcprep \
--perturbations 256 \
--quadrature \
--serial
combine_results
usage: combine_results [-h] [--filenames [FILENAMES ...]] [--bounds BOUNDS]
[--max-depth MAX_DEPTH]
[--elevation-selection ELEVATION_SELECTION]
[--parallel] [--verbose]
[output] [directory]
positional arguments:
output output directory
directory directory containing completed `runs` directory
optional arguments:
-h, --help show this help message and exit
--filenames [FILENAMES ...]
ADCIRC output files to parse
--bounds BOUNDS bounding box in format `(minx,miny,maxx,maxy)`
--max-depth MAX_DEPTH
maximum depth value to filter by
--elevation-selection ELEVATION_SELECTION
filter elevation nodes based on sea level (one of
`wet`, `inundated`, `dry`)
--parallel load concurrently with Dask
--verbose log more verbose messages
- ensembleperturbation.client.combine_results.combine_results(output: os.PathLike, directory: Optional[os.PathLike] = None, filenames: Optional[List[str]] = None, bounds: Optional[Tuple[float, float, float, float]] = None, max_depth: Optional[float] = None, elevation_selection: Optional[ensembleperturbation.parsing.adcirc.ElevationSelection] = None, parallel: bool = False, verbose: bool = False) Dict[str, pandas.core.frame.DataFrame]
plot_results
usage: plot_results [-h] filename
positional arguments:
filename filename (`*.h5`) generated by `combine_results`
optional arguments:
-h, --help show this help message and exit