gfail.models.zhu_2017_coastal

class gfail.models.zhu_2017_coastal.Zhu2017ModelCoastal(shakefile, config, bounds=None, uncertfile=None, trimfile=None, slopefile=None, saveinputs=False)[source]

Bases: Zhu2017Model

Initialize LogisticModelBase object.

Parameters
  • shakefile (str) – Path to ShakeMap grid.xml file.

  • config (dict) – Dict like object as a result of reading in “logbase” format INI files.

  • bounds (dict) – Fields are ‘xmin’, ‘xmax’, ‘ymin’, ‘ymax’.

  • uncertfile (str) – Path to ShakeMap uncertainty.xml file.

  • trimfile (str) – Path to shapefile to use for masking ocean pixels.

  • slopefile (str) – File containing slope data to be used for slope masking.

  • saveinputs (bool) – Save input layer grids with model output.

Notes: All input data grids are loaded in one at a time, and saved to a temporary folder that is deleted when the object is deleted. The file names loaded are stored in the self.layers dictionary.

COEFFS = {'b0': 12.435, 'b1': 0.301, 'b2': -2.615, 'b3': 0.0005556, 'b4': -0.0287, 'b5': 0.0666, 'b6': -0.0369}
TERMS = {'b1': 'np.log(pgv._data*(1/(1+np.power(2.71828,-2*(MW-6)))))', 'b2': 'np.log(vs30._data)', 'b3': 'precip._data', 'b4': 'np.power(dc._data, 0.5)', 'b5': 'dr._data', 'b6': 'np.power(dc._data, 0.5) * dr._data'}
TERMLAYERS = {'b1': 'pgv', 'b2': 'vs30', 'b3': 'precip', 'b4': 'dc', 'b5': 'dr', 'b6': 'dc, dr'}
calculate_coverage(P)[source]

This method should be implemented by child classes.