sea_level_response.selrem.numba_functions

Functions accelerated with Numba for SELREM computation.

These have been separated because Numba JIT-compiled functions can have issues with type hints. Keeping them here allows us to keep type hints in other parts of the SELREM logic.

Functions

accumulate_fields(lat_p_rad, lon_p_rad, ...)

Accumulate sea-level and deformation fields from mass change points using SELREM parameterizations.

accumulate_fields(lat_p_rad, lon_p_rad, mass_gt, masserr_gt, sin_lat_g, cos_lat_g, lon_g_rad, y21_real_g, gdot_fit, udot_fit, gdot_unc, udot_unc)

Accumulate sea-level and deformation fields from mass change points using SELREM parameterizations.

Parameters:
  • lat_p_rad (np.ndarray) – 1D array of latitudes of load locations in radians.

  • lon_p_rad (np.ndarray) – 1D array of longitudes of load locations in radians.

  • mass_gt (np.ndarray) – 1D array of mass balance loads in Gt.

  • masserr_gt (np.ndarray) – 1D array of mass balance uncertainties in Gt.

  • sin_lat_g (np.ndarray) – 2D (nlon, nlat) array of the sine of the latitude of each computation grid cell.

  • cos_lat_g (np.ndarray) – 2D (nlon, nlat) array of the cosine of the latitude of each computation grid cell.

  • lon_g_rad (np.ndarray) – 2D (nlon, nlat) array of the longitude of each computation grid cell in radians.

  • y21_real_g (np.ndarray) – 2D (nlon, nlat) array of the real part of the Y21 spherical harmonic (rotational pattern) on the computation grid, normalised to +1 and -1.

  • 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.

Returns:

gdot, udot, rot, gdot_radial_unc, udot_radial_unc, gdot_vmb_var, udot_vmb_var, all in metres (the last two are variances, i.e. m^2). gdot already includes the rotational term.

Return type:

tuple of np.ndarray