:py:mod:`hazimp.templates` ========================== .. py:module:: hazimp.templates .. autoapi-nested-parse:: HazImp Templates Module Templates convert a YAML template configuration file to jobs and calcs. Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 constants/index.rst earthquake/index.rst flood/index.rst surge/index.rst wind/index.rst Package Contents ---------------- Functions ~~~~~~~~~ .. autoapisummary:: hazimp.templates.add_job hazimp.templates._earthquake_v1_reader hazimp.templates._flood_fabric_v2_reader hazimp.templates._flood_contents_v2_reader hazimp.templates._flood_impact_reader hazimp.templates._wind_v4_reader hazimp.templates._wind_v5_reader hazimp.templates._wind_nc_reader hazimp.templates._surge_nc_reader hazimp.templates._reader2 Attributes ~~~~~~~~~~ .. autoapisummary:: hazimp.templates.DEFAULT hazimp.templates.WINDV4 hazimp.templates.WINDV5 hazimp.templates.WINDNC hazimp.templates.EARTHQUAKEV1 hazimp.templates.FLOODFABRICV2 hazimp.templates.FLOODCONTENTSV2 hazimp.templates.FLOODIMPACT hazimp.templates.SURGENC hazimp.templates.REP_VAL_NAME hazimp.templates.TEMPLATE hazimp.templates.SAVE hazimp.templates.SAVEAGG hazimp.templates.LOADWINDTCRM hazimp.templates.HAZARDRASTER hazimp.templates.CALCSTRUCTLOSS hazimp.templates.CALCCONTLOSS hazimp.templates.PERMUTATION hazimp.templates.VULNFILE hazimp.templates.VULNSET hazimp.templates.VULNMETHOD hazimp.templates.AGGREGATION hazimp.templates.AGGREGATE hazimp.templates.TABULATE hazimp.templates.READERS .. py:function:: add_job(jobs, new_job, atts=None) Given a list of jobs, add a new job and it's att's to the job. :param jobs: A list of jobs. :param new_job: The new job, as a string. :param atts: The attributes of the new job. .. py:function:: _earthquake_v1_reader(config: dict) -> list Build a job list from earthquake configuration. :param config: A dict describing the simulation :returns: A list of jobs to process over .. py:function:: _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. :param config_list: A list describing the simulation. :returns: A list of jobs to process over. .. py:function:: _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. :param config_list: A list describing the simulation. :returns: A list of jobs to process over. .. py:function:: _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. :param config: a dict of jobs describing the pipeline :return: a list of job objects representing the pipeline .. py:function:: _wind_v4_reader(config: dict) -> list From a wind configuration list build the job list. :param config_list: A list describing the simulation. :returns: A list of jobs to process over. .. py:function:: _wind_v5_reader(config: dict) -> list Build a job list from a wind configuration list. :param config_list: A list describing the simulation :returns: A list of jobs to process over .. py:function:: _wind_nc_reader(config: dict) -> list Build a job list from a wind configuration list for netcdf files. :param config_list: A list describing the simulation :returns: A list of jobs to process over .. py:function:: _surge_nc_reader(config: dict) -> list Build a job list from a surge configuration list for netcdf files. :param config_list: A list describing the simulation :returns: A list of jobs to process over .. py:data:: DEFAULT :annotation: = default .. py:data:: WINDV4 :annotation: = wind_v4 .. py:data:: WINDV5 :annotation: = wind_v5 .. py:data:: WINDNC :annotation: = wind_nc .. py:data:: EARTHQUAKEV1 :annotation: = earthquake_v1 .. py:data:: FLOODFABRICV2 :annotation: = flood_fabric_v2 .. py:data:: FLOODCONTENTSV2 :annotation: = flood_contents_v2 .. py:data:: FLOODIMPACT :annotation: = flood_impact .. py:data:: SURGENC :annotation: = surge_nc .. py:data:: REP_VAL_NAME :annotation: = replacement_value_label .. py:data:: TEMPLATE :annotation: = template .. py:data:: SAVE :annotation: = save .. py:data:: SAVEAGG :annotation: = save_agg .. py:data:: LOADWINDTCRM :annotation: = load_wind .. py:data:: HAZARDRASTER :annotation: = hazard_raster .. py:data:: CALCSTRUCTLOSS :annotation: = calc_struct_loss .. py:data:: CALCCONTLOSS :annotation: = calc_cont_loss .. py:data:: PERMUTATION :annotation: = exposure_permutation .. py:data:: VULNFILE :annotation: = vulnerability .. py:data:: VULNSET :annotation: = vulnerability_set .. py:data:: VULNMETHOD :annotation: = vulnerability_method .. py:data:: AGGREGATION :annotation: = aggregation .. py:data:: AGGREGATE :annotation: = aggregate .. py:data:: TABULATE :annotation: = tabulate .. py:function:: _reader2(config: dict) -> list From an untemplated configuration list build the job list. :param config_list: A list describing the simulation. :returns: A list of jobs to process over. .. py:data:: READERS