oasislmf.computation.generate.losses¶
Classes¶
Prepare the loss generation directory |
|
Runs a single analysis event chunk |
|
Runs the output reports generation on a set of event chunks |
|
Runs the GenerateLosses workflow as a single bash script (Default for the MDK) |
|
"Abstract" Class for all Computation Step (ExposurePreAnalysis, GulCalc, ...) |
|
Generates dummy model and Oasis GUL input files + optionally the IL/FM |
Module Contents¶
- class oasislmf.computation.generate.losses.GenerateLossesDir(**kwargs)[source]¶
Bases:
GenerateLossesBasePrepare the loss generation directory
converts input csv files to ktools binary types
links model data to the static directory to the run locations
Validates and updates the analysis_settings.json
Stores the analysis_settings.json in the output directory
- Returns:
(dict) Updated analysis_settings
- class oasislmf.computation.generate.losses.GenerateLossesPartial(**kwargs)[source]¶
Bases:
GenerateLossesDirRuns a single analysis event chunk
- class oasislmf.computation.generate.losses.GenerateLossesOutput(**kwargs)[source]¶
Bases:
GenerateLossesDirRuns the output reports generation on a set of event chunks
- class oasislmf.computation.generate.losses.GenerateLosses(**kwargs)[source]¶
Bases:
GenerateLossesDirRuns the GenerateLosses workflow as a single bash script (Default for the MDK)
Generates losses using the installed ktools framework given Oasis files, model analysis settings JSON file, model data and model package data.
The command line arguments can be supplied in the configuration file (
oasislmf.jsonby default or specified with the--configflag). Runoasislmf config --helpfor more information.The script creates a time-stamped folder in the model run directory and sets that as the new model run directory, copies the analysis settings JSON file into the run directory and creates the following folder structure
|-- analysis_settings.json |-- fifo |-- input |-- RI_1 |-- output |-- ri_layers.json |-- run_ktools.sh |-- static `-- workDepending on the OS type the model data is symlinked (Linux, Darwin) or copied (Cygwin, Windows) into the
staticsubfolder. The input files are kept in theinputsubfolder and the losses are generated as CSV files in theoutputsubfolder.
- class oasislmf.computation.generate.losses.GenerateLossesDeterministic(**kwargs)[source]¶
Bases:
oasislmf.computation.base.ComputationStep“Abstract” Class for all Computation Step (ExposurePreAnalysis, GulCalc, …) initialise the object with all specified param un step_param and sub- ComputationStep provide a generic interface to get the all those parameter definitions (get_params)
the Run method must be implemented and contain le business execution logic.
- class oasislmf.computation.generate.losses.GenerateLossesDummyModel(**kwargs)[source]¶
Bases:
oasislmf.computation.generate.files.GenerateDummyOasisFilesGenerates dummy model and Oasis GUL input files + optionally the IL/FM input files.