sea_level_response.selrem.selrem
SLR emulator module.
Functions
|
Compute annual SELREM SLR results and return them as an xarray.Dataset. |
|
Compute the global sea-level response from a VMB dataset. |
|
Run the SELREM emulator for a set of point loads. |
- compute_annual_slr(ds: Dataset, scale_factor: float = 1.0, output_units: str = 'mm') Dataset
Compute annual SELREM SLR results and return them as an xarray.Dataset.
- Parameters:
ds (xr.Dataset) – Dataset with dims (“time”, “point”), variable MASS_BALANCE_COL_NAME (kg), optionally MASS_BALANCE_ERROR_COL_NAME (kg), and coordinates “y” (latitude, deg) and “x” (longitude, deg) along “point”. If the error variable is missing, an uncertainty of 15 % of the mass change is assumed (see attrs below).
scale_factor (float) – Scaling factor applied to mass balance and its error (default: 1.0).
output_units (str) – “mm” (default) or “m”.
- Returns:
Dataset with dims (“time”, “x”, “y”) containing ndot, udot, sdot, sig_ndot, sig_udot, sig_sdot, rot_total.
attrscontainsunitsandmass_balance_uncertainty_assumed(1 if the uncertainty was assumed, else 0; if 1, alsomass_balance_uncertainty_assumed_fractionandmass_balance_uncertainty_note).- Return type:
xr.Dataset
- compute_global_slr(ds: Dataset, scale_factor: float = 1.0, output_units: str = 'mm') Dataset
Compute the global sea-level response from a VMB dataset.
If the dataset has a “time” dimension, the mass balance (and its error) is first averaged over time and the emulator is run once on the mean. Otherwise the dataset is used as a single snapshot.
- Parameters:
ds (xr.Dataset) – VMB dataset with dim “point” (and optionally “time”); see
compute_annual_slr. If the error variable is missing, an uncertainty of 15 % of the mass change is assumed (see attrs below).scale_factor (float) – Scaling factor for mass balance and its error (default: 1.0).
output_units (str) – “mm” (default) or “m”.
- Returns:
Dataset with dims (“x”, “y”) containing sdot, ndot, udot, rot_total, sig_sdot, sig_ndot, sig_udot. The ocean-mean values are stored in
attrsas gmsl_sdot, gmsl_ndot, gmsl_udot, together withunitsandmass_balance_uncertainty_assumed(1 if the uncertainty was assumed, else 0; if 1, alsomass_balance_uncertainty_assumed_fractionandmass_balance_uncertainty_note).- Return type:
xr.Dataset
- run_emulator(lat_p_deg: ndarray, lon_p_deg: ndarray, mass_gt: ndarray, masserr_gt: ndarray, gdot_fit: ndarray, udot_fit: ndarray, gdot_unc: ndarray, udot_unc: ndarray, ocean_mask: ndarray, target_res_deg: float = 0.5, compute_res_deg: float = 2.0) dict[str, ndarray]
Run the SELREM emulator for a set of point loads.
- Parameters:
lat_p_deg (np.ndarray) – Load location latitudes in degrees.
lon_p_deg (np.ndarray) – Load location longitudes in degrees.
mass_gt (np.ndarray) – Load in Gt (positive = mass gain).
masserr_gt (np.ndarray) – Load uncertainties in Gt
gdot_fit (np.ndarray) – SELREM fit for rate of change of the geoid.
udot_fit (np.ndarray) – SELREM fit for rate of vertical land motion.
gdot_unc (np.ndarray) – SELREM fit uncertainty for rate of change of the geoid.
udot_unc (np.ndarray) – SELREM fit uncertainty for rate of vertical land motion.
ocean_mask (np.ndarray) – Global ocean mask, shape (nlon, nlat), 1 = ocean. Assumed lon -180..180 (no end point), lat 90..-90.
target_res_deg (float) – Resolution of the output grid in degrees.
compute_res_deg (float) – Resolution of the internal computation grid in degrees.
- Returns:
Keys: lons, lats (1D), ndot, udot, sdot, rot, sig_ndot, sig_udot, sig_sdot (2D, shape (nlon, nlat), in metres), ocean_mask (2D, target grid), gmsl (m, global-mean sea level of the input loads) and c (m, the uniform mass-conservation term).
- Return type:
dict[str, np.ndarray]