ocean_viscous_cfl_max_nu_h Function

public pure function ocean_viscous_cfl_max_nu_h(dt, dx_min, limit) result(nu_h_max)

Largest nu_h (m^2/s) that keeps ocean_viscous_cfl_number at or below limit, at fixed dt/dx_min — the “reduce nu_h below …” half of the audit’s suggested fix.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: dt
real(kind=wp), intent(in) :: dx_min
real(kind=wp), intent(in) :: limit

Return Value real(kind=wp)


Called by

proc~~ocean_viscous_cfl_max_nu_h~~CalledByGraph proc~ocean_viscous_cfl_max_nu_h ocean_viscous_cfl_max_nu_h proc~ocean_stability_audit ocean_stability_audit proc~ocean_stability_audit->proc~ocean_viscous_cfl_max_nu_h 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_viscous_cfl_max_nu_h(dt, dx_min, limit) result(nu_h_max)
      !! Largest `nu_h` (m^2/s) that keeps `ocean_viscous_cfl_number` at
      !! or below `limit`, at fixed `dt`/`dx_min` — the "reduce nu_h
      !! below ..." half of the audit's suggested fix.
      real(wp), intent(in) :: dt, dx_min, limit
      real(wp) :: nu_h_max
      if (dt > 0.0_wp) then
         nu_h_max = limit*dx_min**2/dt
      else
         nu_h_max = 0.0_wp
      end if
   end function ocean_viscous_cfl_max_nu_h