hazimp.templates
¶
HazImp Templates Module
Templates convert a YAML template configuration file to jobs and calcs.
Submodules¶
Package Contents¶
Functions¶
|
Given a list of jobs, add a new job and it's att's to the job. |
|
Build a job list from earthquake configuration. |
|
This function does two things: |
|
This function does two things: |
|
Build a job list from a flood impact configuration file. This template |
|
From a wind configuration list build the job list. |
|
Build a job list from a wind configuration list. |
|
Build a job list from a wind configuration list for netcdf files. |
|
Build a job list from a surge configuration list for netcdf files. |
|
From an untemplated configuration list build the job list. |
Attributes¶
- hazimp.templates.add_job(jobs, new_job, atts=None)¶
Given a list of jobs, add a new job and it’s att’s to the job.
- Parameters:
jobs – A list of jobs.
new_job – The new job, as a string.
atts – The attributes of the new job.
- hazimp.templates._earthquake_v1_reader(config: dict) list ¶
Build a job list from earthquake configuration.
- Parameters:
config – A dict describing the simulation
- Returns:
A list of jobs to process over
- hazimp.templates._flood_fabric_v2_reader(config: dict) list ¶
This function does two things:
* From a flood fabric template v2 configuration dictionary build the job list. * Set up the attributes of the jobs and calc's specifically for a flood study.
- Parameters:
config_list – A list describing the simulation.
- Returns:
A list of jobs to process over.
- hazimp.templates._flood_contents_v2_reader(config: dict) list ¶
This function does two things:
* From a flood contents template v2 configuration dictionary build the job list. * Set up the attributes of the jobs and calc's specifically for a flood study.
- Parameters:
config_list – A list describing the simulation.
- Returns:
A list of jobs to process over.
- hazimp.templates._flood_impact_reader(config: dict) list ¶
Build a job list from a flood impact configuration file. This template assumes floor height is included in the exposure attributes, rather than assuming a fixed floor height for all buildings.
- Parameters:
config – a dict of jobs describing the pipeline
- Returns:
a list of job objects representing the pipeline
- hazimp.templates._wind_v4_reader(config: dict) list ¶
From a wind configuration list build the job list.
- Parameters:
config_list – A list describing the simulation.
- Returns:
A list of jobs to process over.
- hazimp.templates._wind_v5_reader(config: dict) list ¶
Build a job list from a wind configuration list.
- Parameters:
config_list – A list describing the simulation
- Returns:
A list of jobs to process over
- hazimp.templates._wind_nc_reader(config: dict) list ¶
Build a job list from a wind configuration list for netcdf files.
- Parameters:
config_list – A list describing the simulation
- Returns:
A list of jobs to process over
- hazimp.templates._surge_nc_reader(config: dict) list ¶
Build a job list from a surge configuration list for netcdf files.
- Parameters:
config_list – A list describing the simulation
- Returns:
A list of jobs to process over
- hazimp.templates.DEFAULT = default¶
- hazimp.templates.WINDV4 = wind_v4¶
- hazimp.templates.WINDV5 = wind_v5¶
- hazimp.templates.WINDNC = wind_nc¶
- hazimp.templates.EARTHQUAKEV1 = earthquake_v1¶
- hazimp.templates.FLOODFABRICV2 = flood_fabric_v2¶
- hazimp.templates.FLOODCONTENTSV2 = flood_contents_v2¶
- hazimp.templates.FLOODIMPACT = flood_impact¶
- hazimp.templates.SURGENC = surge_nc¶
- hazimp.templates.REP_VAL_NAME = replacement_value_label¶
- hazimp.templates.TEMPLATE = template¶
- hazimp.templates.SAVE = save¶
- hazimp.templates.SAVEAGG = save_agg¶
- hazimp.templates.LOADWINDTCRM = load_wind¶
- hazimp.templates.HAZARDRASTER = hazard_raster¶
- hazimp.templates.CALCSTRUCTLOSS = calc_struct_loss¶
- hazimp.templates.CALCCONTLOSS = calc_cont_loss¶
- hazimp.templates.PERMUTATION = exposure_permutation¶
- hazimp.templates.VULNFILE = vulnerability¶
- hazimp.templates.VULNSET = vulnerability_set¶
- hazimp.templates.VULNMETHOD = vulnerability_method¶
- hazimp.templates.AGGREGATION = aggregation¶
- hazimp.templates.AGGREGATE = aggregate¶
- hazimp.templates.TABULATE = tabulate¶
- hazimp.templates._reader2(config: dict) list ¶
From an untemplated configuration list build the job list.
- Parameters:
config_list – A list describing the simulation.
- Returns:
A list of jobs to process over.
- hazimp.templates.READERS¶