isomip_plus_by Function

public pure function isomip_plus_by(y, y_len) result(by)

Across-flow bedrock elevation, Asay-Davis et al. (2016) Eq. (4):

By(y) = d_c/(1 + exp(-2*(y - Ly/2 - w_c)/f_c))
      + d_c/(1 + exp( 2*(y - Ly/2 + w_c)/f_c))

A two-sided logistic trough: ~0 within |y - Ly/2| < w_c (the trough floor) rising to d_c on both side walls over the f_c transition. Note the paper’s own caveat (their Fig. 1b): By is an OFFSET relative to the trough, not a transect — the bed is Bx + By, and Bx is never zero.

y and y_len are METRES. y_len is the model’s own domain width, which for the prescribed ISOMIP+ box (0 <= y <= 80 km) is the paper’s Ly — taking it from the grid rather than hard-coding 80 km keeps the trough centred in whatever box the caller actually built.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: y
real(kind=wp), intent(in) :: y_len

Return Value real(kind=wp)


Calls

proc~~isomip_plus_by~~CallsGraph proc~isomip_plus_by isomip_plus_by proc~isomip_logistic isomip_logistic proc~isomip_plus_by->proc~isomip_logistic

Called by

proc~~isomip_plus_by~~CalledByGraph proc~isomip_plus_by isomip_plus_by proc~set_bathymetry_isomip_plus set_bathymetry_isomip_plus proc~set_bathymetry_isomip_plus->proc~isomip_plus_by proc~ocean_state_seed_from_cfg ocean_state_seed_from_cfg proc~ocean_state_seed_from_cfg->proc~set_bathymetry_isomip_plus proc~engine_setup engine_setup proc~engine_setup->proc~ocean_state_seed_from_cfg proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Variables

Type Visibility Attributes Name Initial
real(kind=wp), private :: yc

Source Code

   pure function isomip_plus_by(y, y_len) result(by)
      !! Across-flow bedrock elevation, Asay-Davis et al. (2016) Eq. (4):
      !!
      !!     By(y) = d_c/(1 + exp(-2*(y - Ly/2 - w_c)/f_c))
      !!           + d_c/(1 + exp( 2*(y - Ly/2 + w_c)/f_c))
      !!
      !! A two-sided logistic trough: ~0 within `|y - Ly/2| < w_c` (the
      !! trough floor) rising to `d_c` on both side walls over the
      !! `f_c` transition.  Note the paper's own caveat (their Fig. 1b):
      !! `By` is an OFFSET relative to the trough, not a transect — the
      !! bed is `Bx + By`, and `Bx` is never zero.
      !!
      !! `y` and `y_len` are METRES.  `y_len` is the model's own domain
      !! width, which for the prescribed ISOMIP+ box (`0 <= y <= 80 km`)
      !! is the paper's `Ly` — taking it from the grid rather than
      !! hard-coding 80 km keeps the trough centred in whatever box the
      !! caller actually built.
      real(wp), intent(in) :: y, y_len
      real(wp) :: by
      real(wp) :: yc
      yc = y - 0.5_wp*y_len
      by = ISOMIP_DC*isomip_logistic(-2.0_wp*(yc - ISOMIP_WC)/ISOMIP_FC) &
           + ISOMIP_DC*isomip_logistic(2.0_wp*(yc + ISOMIP_WC)/ISOMIP_FC)
   end function isomip_plus_by