ocean_diffusive_number Function

public pure function ocean_diffusive_number(kappa_h, dt_therm, dx_min) result(dnum)

Two-axis explicit forward-Euler diffusive number kappa_h*dt_therm*(1/dx_min^2+1/dy_min^2), conservatively evaluated at the SAME worst-case dx_min on both axes (matches the “use the minimum cell” instruction; exact on an isotropic worst cell, strictly more conservative than using the true per-axis pair). dx_min<=0 returns 0.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: kappa_h
real(kind=wp), intent(in) :: dt_therm
real(kind=wp), intent(in) :: dx_min

Return Value real(kind=wp)


Called by

proc~~ocean_diffusive_number~~CalledByGraph proc~ocean_diffusive_number ocean_diffusive_number proc~ocean_stability_audit ocean_stability_audit proc~ocean_stability_audit->proc~ocean_diffusive_number proc~engine_setup engine_setup proc~engine_setup->proc~ocean_stability_audit 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

Source Code

   pure function ocean_diffusive_number(kappa_h, dt_therm, dx_min) result(dnum)
      !! Two-axis explicit forward-Euler diffusive number
      !! `kappa_h*dt_therm*(1/dx_min^2+1/dy_min^2)`, conservatively
      !! evaluated at the SAME worst-case `dx_min` on both axes (matches
      !! the "use the minimum cell" instruction; exact on an isotropic
      !! worst cell, strictly more conservative than using the true
      !! per-axis pair). `dx_min<=0` returns 0.
      real(wp), intent(in) :: kappa_h, dt_therm, dx_min
      real(wp) :: dnum
      if (dx_min > 0.0_wp) then
         dnum = kappa_h*dt_therm*(2.0_wp/dx_min**2)
      else
         dnum = 0.0_wp
      end if
   end function ocean_diffusive_number