tcrm module¶
tcrm
– the main TCRM interface¶
-
checkModules
()¶ Check that compiled extensions are available
- Parameters
moduleList (list) – list of modules to check for
- Returns
-
doDataDownload
(configFile)¶ Check and download the data files listed in the configuration file. Datasets are listed in the Input section of the configuration file, with the option Datasets. There must also be a corresponding section in the configuration file that inlcudes the url, path where the dataset will be stored and the filename that will be stored, e.g.:
[Input] Datasets=IBTRACS [IBTRACS] URL=ftp://eclipse.ncdc.noaa.gov/pub/ibtracs/v03r05/wmo/csv/Allstorms.ibtracs_wmo.v03r05.csv.gz filename=Allstorms.ibtracs_wmo.v03r05.csv path=input
This will attempt to download the gzipped csv file from the given URL and save it to the given filename, in the ‘input’ folder under the current directory. Gzipped files are automatically unzipped.
- Parameters
configFile (str) – Name of configuration file.
- Raises
IOError – If the data cannot be downloaded.
-
doDataPlotting
(configFile)¶ Plot the pre-processed input data. Requires the Data Processing step to have been executed first (
Actions -- DataProcess = True
)- Parameters
configFile (str) – Name of configuration file.
-
doDataProcessing
(configFile)¶ Parse the input data and turn it into the necessary format for the model calibration step, using the
DataProcess
module.- Parameters
configFile (str) – Name of configuration file.
-
doDatabaseUpdate
(configFile)¶ Build a database containing info on the events, locations, return period wind speeds and tracks.
- Parameters
configFile (str) – Name of the configuration file.
-
doEvaluation
(configFile)¶ Do the track model evaluation processing, using
Evaluate
.To perform this stage, it is recommended to generate an event set with several simulated years (e.g. 10, 20, 30 years) in each simulation.
A good setting might be:
[Actions] ExecuteTrackGenerator=True ExecuteEvaluate=True [TrackGenerator] NumSimulations=1000 YearsPerSimulation=50
This will generate 1000 simulations each with 50 years of simulated TC activity.
Evaluate
will then compare pressure distributions, track density, landfall rates and longitude crossing rates for the input dataset and the full 1000 simulations.- Parameters
configFile (str) – Name of the configuration file.
-
doHazard
(configFile)¶ Do the hazard calculations (extreme value distribution fitting) using the
hazard
module.- Parameters
configFile (str) – Name of configuration file.
-
doHazardPlotting
(configFile)¶ Do the hazard plots (hazard maps and curves for all locations within the model domain). Plotting is performed by the
PlotInterface.AutoPlotHazard
module.- Parameters
configFile (str) – Name of configuration file.
-
doOutputDirectoryCreation
(configFile)¶ Create all the necessary output folders.
- Parameters
configFile (str) – Name of configuration file.
- Raises
OSError – If the directory tree cannot be created.
-
doStatistics
(configFile)¶ Calibrate the model with the
StatInterface
module.- Parameters
configFile (str) – Name of configuration file.
-
doTrackGeneration
(configFile)¶ Do the tropical cyclone track generation in
TrackGenerator
.The track generation settings are read from configFile.
- Parameters
configFile (str) – Name of configuration file.
-
doWindfieldCalculations
(configFile)¶ Do the wind field calculations, using
wind
. The wind field settings are read from configFile.- Parameters
configFile (str) – Name of configuration file.
-
main
(configFile='main.ini')¶ Main interface of TCRM that allows control and interaction with the 5 interfaces: DataProcess, StatInterface, TrackGenerator, WindfieldInterface and HazardInterface
- Parameters
configFile (str) – Name of file containing configuration settings for running TCRM
-
startup
()¶ Parse command line arguments, set up logging and attempt to execute the main TCRM functions.
-
timer
(f)¶ A simple timing decorator for the entire process.