nw2_cosbell Function

private pure function nw2_cosbell(x, L) result(c)

Cosine-bell kernel for the Neverworld2 basin: 0.5·(1 + cos(π·min(|x/L|,1))). Peaks at 1 for x=0, decays smoothly to 0 at |x|=L. Re-derived from Marques et al. (2022, GMD) “Neverworld2”; 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_cosbell~~CalledByGraph proc~nw2_cosbell nw2_cosbell proc~set_bathymetry_neverworld2 set_bathymetry_neverworld2 proc~set_bathymetry_neverworld2->proc~nw2_cosbell 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_cosbell(x, L) result(c)
      !! Cosine-bell kernel for the Neverworld2 basin: `0.5·(1 + cos(π·min(|x/L|,1)))`.
      !! Peaks at 1 for x=0, decays smoothly to 0 at |x|=L.  Re-derived from
      !! Marques et al. (2022, GMD) "Neverworld2"; MOM6-inspired.
      real(wp), intent(in) :: x, L
      real(wp) :: c
      real(wp), parameter :: PI = 4.0_wp*atan(1.0_wp)
      c = 0.5_wp*(1.0_wp + cos(PI*min(abs(x/L), 1.0_wp)))
   end function nw2_cosbell