Storm Specification Class and Tools¶
Warning
This describes new tools added in Clawpack 5.5
Module defines a class and routines for managing storm best-track type input and testing reconstructed wind and pressure fields. Additionally some support for ensembles of storms from various providers is also included.
The primary class of interest in the module is the Storm class that facilitates dealing with various best-track formats found around the world and the expected GeoClaw storm format that is read into the FORTRAN code. The basic workflow in a setrun.py file would do the following:
Create a Storm object by reading in from a file:
storm = clawpack.geoclaw.surge.storm.Storm("my_storm.txt", file_format='ATCF')
Write out the storm object created into the GeoClaw format:
storm.write("my_geoclaw_storm.txt", file_format="geoclaw")
Specify the path to the GeoClaw formatted storm file, in this case “my_geoclaw_storm.txt”.
- Formats Supported:
GeoClaw (fully)
ATCF (reading only)
HURDAT (reading only)
IBTrACS (reading only)
JMA (reading only)
IMD (planned)
tcvitals (reading only)
Data
- Object model:
Stormis a thin backwards-compatibility wrapper over the meteorological forcing object model introduced by the refactor:StormTrack,ParametricMetForcing, andGriddedMetForcing. Every legacy attribute is exposed as a property delegating to the underlying object.
- class clawpack.geoclaw.surge.storm.Storm(path=None, file_format='ATCF', **kwargs)¶
Storm data object
This object contains a time series of time data that describe a particular storm. This includes the attributes below and the ability to read from multiple sources for data such as the U.S. National Hurricane Center (NHC), the Japanese Meterological Agency (JMA), and the Indian Meteorlogical Department (IMD). This class can then write out in any of these formats, construct the wind and pressure fields using a supported parameterized model, or output the GeoClaw supported storm format used for running storm surge simulations.
Stormis a thin compatibility wrapper: it holds aStormTrack(plus aParametricMetForcingfor the parameterized/track path) and aGriddedMetForcingfor the gridded (data) path, and exposes every legacy attribute as a property delegating to the appropriate underlying object.TODO: Add description of unit handling
- Attributes:
t (list(float) or list(np.datetiem64)) Contains the time at which each entry of the other arrays are at. These are expected to be datetime64 objects. Note that when written some formats require a time_offset to be set.
eye_location (ndarray(:, :)) location of the eye of the storm. Default units are in signed decimal longitude and latitude.
max_wind_speed (ndarray(:)) Maximum wind speed. Default units are meters/second.
max_wind_radius (ndarray(:)) Radius at which the maximum wind speed occurs. Default units are meters.
central_pressure (ndarray(:)) Central pressure of storm. Default units are Pascals.
storm_radius (ndarray(:)) Radius of storm, often defined as the last closed iso-bar of pressure. Default units are meters.
time_offset (np.datetiem64) A date time that as an offset for the simulation time. This will default to the beginning of the first of the year that the first time point is found in.
wind_speeds (ndarray(:, :)) Wind speeds defined in every record, such as 34kt, 50kt, 64kt, etc and their radii. Default units are meters/second and meters.
- Initialization:
Read in existing file at path.
Construct an empty storm and supply the fields needed. Note that these fields must be converted to the appropriate units.
- Input:
path (string) Path to file to be read in if requested.
file_format (string) Format of file at path. Default is “hurdat”
kwargs (dict) Other key-word arguments are passed to the appropriate read routine.
- category(categorization='NHC', cat_names=False)¶
Categorize the storm (delegates to
StormTrack.category()).
- plot(ax, *args, **kwargs)¶
Plot this storm’s track (delegates to
StormTrack.plot()).
- read(path=None, file_format='atcf', **kwargs)¶
Read in storm data from path with format file_format
- Input:
path (string) Path to data file.
file_format (string) Format of the data file. See list of supported formats for a list of valid strings. Defaults to “hurdat”.
kwargs (dict) Keyword dictionary for additional arguments that can be passed down to the appropriate read functions. Please refer to the specific routine for a list of valid options.
- Raises:
ValueError If the file_format requested does not match any of the available supported formats a ValueError is raised.
- read_atcf(path, **kwargs)¶
Read in an ATCF formatted storm file (delegates to
StormTrack.read_atcf()).
- read_data(path, **kwargs)¶
Read in a data-derived (gridded) storm file (delegates to
GriddedMetForcing.read_data()).
- read_geoclaw(path, **kwargs)¶
Read in a GeoClaw formatted storm file (delegates to
ParametricMetForcing.read_geoclaw()).
- read_hurdat(path, **kwargs)¶
Read in a HURDAT formatted storm file (delegates to
StormTrack.read_hurdat()).
- read_ibtracs(path, **kwargs)¶
Read in an IBTrACS formatted storm file (delegates to
StormTrack.read_ibtracs()).
- read_imd(path, **kwargs)¶
Read in an IMD formatted storm file (delegates to
StormTrack.read_imd()).
- read_jma(path, **kwargs)¶
Read in a JMA formatted storm file (delegates to
StormTrack.read_jma()).
- read_tcvitals(path, **kwargs)¶
Read in a TCVITALS formatted storm file (delegates to
StormTrack.read_tcvitals()).
- write(path, file_format='geoclaw', **kwargs)¶
Write out the storm data to path in format file_format
- Input:
path (string) Path to data file.
file_format (string) Format of the data file. See list of supported formats for a list of valid strings. Defaults to “geoclaw”.
kwargs (dict) Keyword dictionary for additional arguments that can be passed down to the appropriate write functions. Please refer to the specific routine for a list of valid options.
- Raises:
ValueError If the file_format requested does not match any of the available supported formats a ValueError is raised.
- write_atcf(path, verbose=False)¶
(Not implemented) Write out a ATCF formatted storm file.
- write_data(path, **kwargs)¶
Write out a data-derived (gridded) storm descriptor (delegates to
GriddedMetForcing.write_data()).
- write_geoclaw(path, **kwargs)¶
Write out a GeoClaw formatted storm file (delegates to
ParametricMetForcing.write_geoclaw()).
- write_hurdat(path, verbose=False)¶
(Not implemented) Write out a HURDAT formatted storm file.
- write_imd(path, verbose=False)¶
(Not implemented) Write out an IMD formatted storm file.
- write_jma(path, verbose=False)¶
(Not implemented) Write out a JMA formatted storm file.
- write_tcvitals(path, verbose=False)¶
(Not implemented) Write out a TCVITALS formatted storm file.
- clawpack.geoclaw.surge.storm.available_formats()¶
Construct a string suitable for listing available storm file formats.
- clawpack.geoclaw.surge.storm.available_models()¶
Construct a string listing the available parameterized-forcing models.
The models are split into those supported by the GeoClaw Fortran code and those implemented in Python (currently none), both clearly labeled.