Skip to content

liquefaction

Zhu et al. (2015) and Hazus liquefaction; Vs30 from slope.

quakecascade.liquefaction

Liquefaction screening: Zhu et al. (2015) and Hazus 6.1 Section 4.2.2.1.

Two independent models:

  • Zhu et al. (2015) - a logistic regression on shaking, topography (CTI) and shear-wave velocity. It runs from layers a user actually has (a DEM, a PGA field, a Vs30 field) and gives a probability at a point. zhu2015 is the array entry point; zhu2015_probability the scalar one that also returns every intermediate term.
  • Hazus 6.1 Section 4.2.2.1 - a susceptibility-category model. It needs a map unit layer classified into the six Hazus categories, and gives a probability and an expected settlement for that unit (hazus_probability).

Every number below is transcribed from a named table in a named document and the table number is in the comment. Nothing here is calibrated outside the data sets the models were fitted on; the Hazus tables are US judgments and Zhu et al. (2015) is a global model fitted on ~1 km inputs.

The arithmetic is ported unchanged from the PlanX engine/liquefaction.py (same author). The USGS gfail implementation of Zhu et al. (CC0) was read as a cross-check on the coefficients; no code from it is reproduced.

ZHU module-attribute

ZHU = ...

Coefficients of the global geospatial model of Zhu, Daley, Baise, Thompson, Wald & Knudsen (2015), Earthquake Spectra 31(3), 1813-1837, Table 3. Read from the USGS gfail implementation models/zhu_2015.py (CC0), which carries these six numbers, the same percent-g division and the same clips, and checked against the independent reproduction of Geyin, Baird & Maurer (2020), Earthquake Spectra 36(3), 1386-1411, Table 3 (model GGM1). PGA * Mw^2.56 / 10^2.24 is the magnitude-weighted PGA of Youd et al. (2001), whose magnitude scaling factor 10^2.24 / Mw^2.56 (Equation 24) appears here as a divisor.

The Vs30 coefficient is printed 0.4784 in the literature and is 4.784 in gfail. With 0.4784 the intercept dominates and the logistic returns a probability of essentially 1 at every site, so 4.784 is used here.

ZHU_CTI_CLIP module-attribute

ZHU_CTI_CLIP = (0.0, 15.0)

Calibration clips (gfail zhu_2015.py). The source clips CTI to (0, 15) and PGA to (0, 270) on a ShakeMap %g layer, i.e. 2.7 g. PGA here is in g, so the clip reads 2.7 and the /100 of the published term is absent from zhu_logit.

ZHU_PGA_CLIP_G module-attribute

ZHU_PGA_CLIP_G = (0.0, 2.7)

Calibration clips (gfail zhu_2015.py). The source clips CTI to (0, 15) and PGA to (0, 270) on a ShakeMap %g layer, i.e. 2.7 g. PGA here is in g, so the clip reads 2.7 and the /100 of the published term is absent from zhu_logit.

ZHU_MIN_PGA_G module-attribute

ZHU_MIN_PGA_G = 0.02

Screening limits of the USGS Ground Failure implementation (gfail zhu_2015.ini: minpga = 2 %g, vs30max = 620 m/s), outside which gfail reports no probability. Here the value is kept and read outside_envelope.

ZHU_MAX_VS30 module-attribute

ZHU_MAX_VS30 = 620.0

Screening limits of the USGS Ground Failure implementation (gfail zhu_2015.ini: minpga = 2 %g, vs30max = 620 m/s), outside which gfail reports no probability. Here the value is kept and read outside_envelope.

ZHU_COVERAGE_FACTOR module-attribute

ZHU_COVERAGE_FACTOR = 0.81

Zhu, Baise & Thompson (2017), BSSA 107(3), 1365-1385: the 2015 model over-predicts the area affected by about 19 %; 0.81 is the published coverage correction (gfail calculate_coverage). It applies to the areal reading, never to the site probability.

ZHU_INPUT_RESOLUTION_M module-attribute

ZHU_INPUT_RESOLUTION_M = 1000.0

Input scale of the Zhu model: "~1 km", CTI from HYDRO1k (USGS Ground Failure product background page).

ZHU_RESOLUTION_TOLERANCE module-attribute

ZHU_RESOLUTION_TOLERANCE = 2.0

How far from that scale a DEM may be before a warning is raised: a factor of two either way. A package policy, not a published tolerance.

zhu_probability module-attribute

zhu_probability = zhu2015_probability

PlanX name of zhu2015_probability.

LIQUEFACTION_COLUMNS module-attribute

LIQUEFACTION_COLUMNS = ...

Output contract of liquefaction_frame.

SLOPE_VS30_BINS module-attribute

SLOPE_VS30_BINS = ...

Slope-Vs30 bins (vs30_low, vs30_high, slope_low, slope_high) (m/s, m/m) of the USGS global Vs30 map, as coded in grad2vs30.c (github.com/usgs/earthquake-global_vs30, a US Government work, CC0 1.0): active tectonic regions from Allen & Wald (2009), BSSA 99(2A), Table 1, "modified 30 arc sec" column; stable continents from Wald & Allen (2007), BSSA 97(5), the same values as Allen & Wald (2007), USGS OFR 2007-1357, Table 2. Slopes are gradients of a 30 arc-second DEM.

VS30_FROM_SLOPE_LIMITS module-attribute

VS30_FROM_SLOPE_LIMITS = (180.0, 900.0)

Bounds grad2vs30.c puts on the extrapolated end bins (vs30_min, vs30_max), m/s.

TECTONIC_SETTINGS module-attribute

TECTONIC_SETTINGS = ('active', 'stable')

Tectonic settings (grad2vs30.c weights the two by a craton mask; here one is chosen per call). There is no default: at the same slope the two differ by up to a factor of ~2 in Vs30.

HAZUS_PROPORTION module-attribute

HAZUS_PROPORTION = {
    "Very High": 0.25,
    "High": 0.2,
    "Moderate": 0.1,
    "Low": 0.05,
    "Very Low": 0.02,
    "None": 0.0,
}

Hazus 6.1 Earthquake Model Technical Manual (FEMA 2024), Table 4-10, "Proportion of Map Unit Susceptible to Liquefaction".

HAZUS_CONDITIONAL module-attribute

HAZUS_CONDITIONAL = ...

Table 4-11, "Conditional Probability Relationship for Liquefaction Susceptibility Categories", as (slope, intercept) of P[L | PGA=a] = clip(m*a + b, 0, 1). The "None" row is the constant 0. Cross-checked against Figure 4-6 and against Table 4-12 (zero crossings).

HAZUS_PGA_THRESHOLD module-attribute

HAZUS_PGA_THRESHOLD = {
    "Very High": 0.09,
    "High": 0.12,
    "Moderate": 0.15,
    "Low": 0.21,
    "Very Low": 0.26,
}

Table 4-12, "Threshold Ground Acceleration (PGA(t)) Corresponding to Zero Probability of Liquefaction", in g.

HAZUS_SETTLEMENT_IN module-attribute

HAZUS_SETTLEMENT_IN = {
    "Very High": 12.0,
    "High": 6.0,
    "Moderate": 2.0,
    "Low": 1.0,
    "Very Low": 0.0,
    "None": 0.0,
}

Table 4-13, "Ground Settlement Amplitudes for Liquefaction Susceptibility Categories", in inches; the manual notes a factor of 1/2 to 2 uncertainty.

HAZUS_CATEGORIES module-attribute

HAZUS_CATEGORIES = (
    "Very High",
    "High",
    "Moderate",
    "Low",
    "Very Low",
    "None",
)

The six categories in the manual's order, most to least susceptible.

cti

cti(dem, cell_size_m, fill=False, *, convention='hydro1k')

Compound topographic index (wetness index), on the scale Zhu et al. (2015) need.

\[ CTI = \ln\left(\frac{a}{\tan\beta}\right) \]

with a the specific catchment area (upstream area A w^2 per unit contour width w, A the D8 flow accumulation in cells including the cell itself) and tan(beta) the D8 steepest-descent gradient.

convention="hydro1k" (default) reproduces the USGS HYDRO1k layer that the Zhu et al. (2015) liquefaction model was fitted on (USGS gfail zhu_2015.ini reads it): CTI = ln((FA + 1) / tan(slope)) with FA counted in 1-km cells (ISLSCP II HYDRO1k guide, Eq. 1) and tan(slope) = 0.001 where the slope is zero (HYDRO1k README, Sec. 3.2.5). For any cell size this is a in kilometres (A * w / 1000, equal to FA + 1 at 1 km) with tan(beta) floored at HYDRO1K_FLAT_TAN_SLOPE, so no cell is flatter than the calibration data could be. Every cell with data gets a finite index.

convention="metres" is the textbook form (Beven & Kirkby 1979) with a in metres and no floor: +inf on cells without a downslope neighbour, and ln(1000) = 6.91 above the HYDRO1k scale elsewhere. Do not feed it to Zhu et al. (2015): at Zhu's CTI coefficient (0.355) the offset adds 2.45 to the logit.

Parameters:

Name Type Description Default
dem (rows, cols) array_like

Elevations in metres; NaN is nodata.

required
cell_size_m float

Cell width in metres. A DEM described in feet raises CTI by ln(3.28084) = 1.19 everywhere.

required
fill bool

Fill depressions (fill_depressions) before routing. Filled pits become flats.

False
convention ('hydro1k', 'metres')

See above.

"hydro1k"

Returns:

Name Type Description
cti ndarray of float

NaN on nodata cells.

gradient ndarray of float

The D8 gradient (m/m) before any floor; NaN on nodata cells.

References

Beven, K. J. & Kirkby, M. J. (1979). A physically based, variable contributing area model of basin hydrology. Hydrological Sciences Bulletin 24(1), 43-69. doi:10.1080/02626667909491834

U.S. Geological Survey. HYDRO1k Elevation Derivative Database, README, Sec. 3.2.3 and 3.2.5; ISLSCP II HYDRO1k Elevation-derived Products, Eq. 1. doi:10.3334/ORNLDAAC/1007

cti_resolution_warning

cti_resolution_warning(pixel_m)

A warning when the DEM cell is far from the ~1 km the Zhu model used.

Parameters:

Name Type Description Default
pixel_m float

DEM cell size in metres.

required

Returns:

Type Description
str or None

None inside a factor of ZHU_RESOLUTION_TOLERANCE of ZHU_INPUT_RESOLUTION_M; otherwise a message naming the scale and the fix. The model still runs outside the tolerance.

logistic

logistic(value)

1 / (1 + e^-x) written as 0.5 * (1 + tanh(x / 2)) so it cannot overflow.

Accepts a scalar (returns float) or an array (returns ndarray). The result is never clipped; it is bounded in [0, 1] already.

clip_cti

clip_cti(value)

Clip CTI to ZHU_CTI_CLIP; return (clipped, was_clipped).

clip_pga_g

clip_pga_g(value)

Clip PGA (g) to ZHU_PGA_CLIP_G; return (clipped, was_clipped).

zhu_logit

zhu_logit(pga_g, magnitude, cti, vs30)

The Zhu et al. (2015) logit, with the magnitude term inside the log.

\[ X = c_0 + c_1 \ln(PGA\,M_w^{2.56} / 10^{2.24}) + c_2\,CTI + c_3 \ln V_{S30} \]

Coefficients from ZHU. Inputs are taken unclipped; zhu2015_probability is the clipped entry point.

Raises:

Type Description
ValueError

If PGA, Vs30 or magnitude is not positive. A zero PGA would return a zero probability, and "no shaking" is not "no liquefaction hazard".

zhu2015_probability

zhu2015_probability(pga_g, magnitude, cti, vs30)

Site probability of liquefaction at one point, with every term that made it.

Parameters:

Name Type Description Default
pga_g float

Peak ground acceleration in g (not %g).

required
magnitude float

Moment magnitude.

required
cti float

Compound topographic index at ~1 km on the HYDRO1k scale (quakecascade.hydro.cti default); +inf is valid and is clipped to 15.

required
vs30 float

Time-averaged shear-wave velocity to 30 m, m/s.

required

Returns:

Type Description
dict

probability, coverage (probability x 0.81, Zhu et al. 2017), logit, the clipped pga_g and cti, the flags pga_clipped and cti_clipped, outside_envelope (PGA clipped, PGA below ZHU_MIN_PGA_G or Vs30 above ZHU_MAX_VS30) and notes (empty when every input was inside the calibration range).

areal_coverage

areal_coverage(probability)

Proportion of area liquefied from a Zhu (2015) probability.

coverage = probability * 0.81 (Zhu, Baise & Thompson 2017; gfail calculate_coverage). NaN stays NaN.

zhu2015

zhu2015(pga_g, magnitude, cti, vs30)

Vectorised Zhu et al. (2015) site probability with a status per element.

Parameters:

Name Type Description Default
pga_g array_like

Peak ground acceleration in g.

required
magnitude float or array_like

Moment magnitude; must be finite and positive everywhere (a scenario parameter, not a data field, so a bad value raises).

required
cti array_like

Compound topographic index on ~1 km cells, on the HYDRO1k scale the model was fitted on (cti with its default convention; see also cti_resolution_warning). +inf is a valid input (clipped to 15); only NaN is missing.

required
vs30 array_like

Vs30 in m/s.

required

Returns:

Name Type Description
probability ndarray of float

NaN where an input is missing.

status ndarray of object

"computed" (also when CTI was clipped to [0, 15], which is part of the model's definition); "outside_envelope" when PGA was clipped to the 2.7 g fitting range, or lies below ZHU_MIN_PGA_G, or Vs30 above ZHU_MAX_VS30 (the value is kept, read as an extrapolation); "no_pga" (NaN, infinite, zero or negative PGA), "no_cti" (NaN CTI) or "no_vs30" (NaN, infinite or non-positive Vs30), checked in that order.

Notes

The arithmetic is that of zhu2015_probability, element by element. The coverage correction is not applied; see areal_coverage.

liquefaction_frame

liquefaction_frame(
    pga_g,
    magnitude,
    cti,
    vs30,
    index=None,
    cti_cell_size_m=None,
)

Zhu et al. (2015) per row, as a DataFrame following LIQUEFACTION_COLUMNS.

Parameters:

Name Type Description Default
pga_g

As in zhu2015; array inputs must be one-dimensional after broadcasting.

required
magnitude

As in zhu2015; array inputs must be one-dimensional after broadcasting.

required
cti

As in zhu2015; array inputs must be one-dimensional after broadcasting.

required
vs30

As in zhu2015; array inputs must be one-dimensional after broadcasting.

required
index Index

Index of the output (for example the sites frame's index). When pga_g is a Series and index is None, its index is used.

None
cti_cell_size_m float

DEM cell size the CTI was computed at; when given and far from 1 km, the cti_resolution_warning text is stored in frame.attrs["warnings"].

None

Returns:

Type Description
DataFrame

Columns pga_g_used, cti_used, liq_logit, liq_prob, liq_area_frac, liq_clipped, liq_status.

vs30_from_slope_array

vs30_from_slope_array(slope_m_per_m, setting)

Vs30 (m/s) from topographic slope (m/m) by the USGS global Vs30 method.

The arithmetic of grad2vs30.c: within the bin whose slope range holds s the interpolation is linear in log-log space,

\[ \ln V_{S30} = \ln V_0 + (\ln V_1 - \ln V_0)\, \frac{\ln s - \ln s_0}{\ln s_1 - \ln s_0}, \]

with the bins of SLOPE_VS30_BINS. A slope below the first bin is extrapolated from it and held at 180 m/s; one above the last bin is extrapolated from it and capped at 900 m/s (VS30_FROM_SLOPE_LIMITS).

Parameters:

Name Type Description Default
slope_m_per_m array_like

Topographic gradient, rise over run, of a ~30 arc-second DEM.

required
setting ('active', 'stable')

Tectonic setting; required, no default.

"active"

Returns:

Type Description
(vs30, clamped)

clamped is True where the slope lies outside the bins (the value is an extrapolation, possibly capped). A NaN or negative slope gives NaN with clamped = True: a missing slope stays missing.

vs30_from_slope

vs30_from_slope(slope_m_per_m, setting)

Scalar form of vs30_from_slope_array (same arithmetic).

normalise_category

normalise_category(text)

Match a string to one of HAZUS_CATEGORIES, or return None.

Case, surrounding space and the separators , _ - are ignored; nothing else ("medium", "VH" or "1" are not recoded).

hazus_conditional

hazus_conditional(category, pga_g)

P[Liquefaction | PGA = a] from Hazus 6.1 Table 4-11, clipped to [0, 1].

hazus_magnitude_factor

hazus_magnitude_factor(magnitude)

K_M, Hazus 6.1 Equation 4-10: 0.0027 M^3 - 0.0267 M^2 - 0.2055 M + 2.9188.

Applied as printed: K_M(7.5) = 1.0147, not 1 (Figure 4-7 reads 1.01).

hazus_groundwater_factor

hazus_groundwater_factor(depth_m)

K_W, Hazus 6.1 Equation 4-11: 0.022 d_w + 0.93 with d_w in feet.

depth_m is in metres and converted here (1 ft = 0.3048 m). K_W(5 ft) = 1.04, applied as printed.

hazus_probability

hazus_probability(category, pga_g, magnitude, depth_m)

Hazus 6.1 Equation 4-9 for one map unit.

\[ P = \frac{P[L \mid PGA=a]}{K_M K_W} P_{ml} \]

Parameters:

Name Type Description Default
category str required
pga_g float

PGA in g.

required
magnitude float

Moment magnitude.

required
depth_m float

Groundwater depth in metres.

required

Returns:

Type Description
dict

conditional, k_m, k_w, proportion, probability (clipped to [0, 1]), settlement_in (probability x Table 4-13 amplitude, inches) and pga_threshold (Table 4-12; None for "None").