nw2_spike Function

private pure function nw2_spike(x, L) result(s)

Sin-spike kernel for the Neverworld2 basin: 1 − sin(π·min(|x/L|,0.5)). Equals 1 at x=0 and drops to 0 at |x|=L/2 (the 0.5 cap stops the sine re-ascending past its first zero). Re-derived from Marques et al. (2022, GMD); MOM6-inspired.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: L

Return Value real(kind=wp)


Called by

proc~~nw2_spike~~CalledByGraph proc~nw2_spike nw2_spike proc~set_bathymetry_neverworld2 set_bathymetry_neverworld2 proc~set_bathymetry_neverworld2->proc~nw2_spike proc~ocean_state_seed_from_cfg ocean_state_seed_from_cfg proc~ocean_state_seed_from_cfg->proc~set_bathymetry_neverworld2 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, parameter :: PI = 4.0_wp*atan(1.0_wp)

Source Code

   pure function nw2_spike(x, L) result(s)
      !! Sin-spike kernel for the Neverworld2 basin: `1 − sin(π·min(|x/L|,0.5))`.
      !! Equals 1 at x=0 and drops to 0 at |x|=L/2 (the 0.5 cap stops the sine
      !! re-ascending past its first zero).  Re-derived from Marques et al.
      !! (2022, GMD); MOM6-inspired.
      real(wp), intent(in) :: x, L
      real(wp) :: s
      real(wp), parameter :: PI = 4.0_wp*atan(1.0_wp)
      s = 1.0_wp - sin(PI*min(abs(x/L), 0.5_wp))
   end function nw2_spike