evp_project_ci_impl Subroutine

private pure subroutine evp_project_ci_impl(ci, sh_dd, dt_cum, p0_rho, c0, pres_mice, nx, ny)

PR 36: PROJECT_ICE_CONCENTRATION (SIS2 SIS_dyn_cgrid.F90:1064- 1077). ci_proj = ci*exp(-dt_cum*sh_dd) then pres_mice = p0_rho*exp(-c0*max(1-ci_proj, 0)). ci_proj is a local() scalar, NOT an array: SIS2 materialises it only for the sigI/sigII/find_ice_strength diagnostics Roundabout does not have (documented divergence). del_sh_min_pr is NOT recomputed here (it has no ci dependence, evp_pres_mice_impl above). ci_proj is deliberately unclamped above 1 – max(1-ci_proj, 0) already saturates the effect at p0_rho, and for dt_cum*|sh_dd| > 709 (an unreachable regime in any sane run) exp overflows to +Inf, max(1-Inf, 0) = 0, exp(0) = 1 – IEEE launders the overflow to exactly the correct saturated value, so no guard is needed (SIS2 has none either).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: ci(nx,ny)
real(kind=wp), intent(in) :: sh_dd(nx,ny)
real(kind=wp), intent(in) :: dt_cum
real(kind=wp), intent(in) :: p0_rho
real(kind=wp), intent(in) :: c0
real(kind=wp), intent(inout) :: pres_mice(nx,ny)
integer, intent(in) :: nx
integer, intent(in) :: ny

Calls

proc~~evp_project_ci_impl~~CallsGraph proc~evp_project_ci_impl evp_project_ci_impl local local proc~evp_project_ci_impl->local

Called by

proc~~evp_project_ci_impl~~CalledByGraph proc~evp_project_ci_impl evp_project_ci_impl proc~ice_evp_dynamics_impl ice_evp_dynamics_impl proc~ice_evp_dynamics_impl->proc~evp_project_ci_impl proc~ice_evp_dynamics ice_evp_dynamics proc~ice_evp_dynamics->proc~ice_evp_dynamics_impl proc~ice_evp_step ice_evp_step proc~ice_evp_step->proc~ice_evp_dynamics proc~engine_step_ice engine_step_ice proc~engine_step_ice->proc~ice_evp_step proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step_ice proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step_ice

Variables

Type Visibility Attributes Name Initial
real(kind=wp), private :: ci_proj
integer, private :: i
integer, private :: j

Source Code

   pure subroutine evp_project_ci_impl(ci, sh_dd, dt_cum, p0_rho, c0, pres_mice, nx, ny)
      !! PR 36: `PROJECT_ICE_CONCENTRATION` (SIS2 `SIS_dyn_cgrid.F90:1064-
      !! 1077`). `ci_proj = ci*exp(-dt_cum*sh_dd)` then `pres_mice =
      !! p0_rho*exp(-c0*max(1-ci_proj, 0))`. `ci_proj` is a `local()`
      !! scalar, NOT an array: SIS2 materialises it only for the
      !! sigI/sigII/find_ice_strength diagnostics Roundabout does not have
      !! (documented divergence). `del_sh_min_pr` is NOT recomputed here
      !! (it has no `ci` dependence, `evp_pres_mice_impl` above). `ci_proj`
      !! is deliberately unclamped above 1 -- `max(1-ci_proj, 0)` already
      !! saturates the effect at `p0_rho`, and for `dt_cum*|sh_dd| > 709`
      !! (an unreachable regime in any sane run) `exp` overflows to `+Inf`,
      !! `max(1-Inf, 0) = 0`, `exp(0) = 1` -- IEEE launders the overflow to
      !! exactly the correct saturated value, so no guard is needed (SIS2
      !! has none either).
      integer, intent(in) :: nx, ny
      real(wp), intent(in) :: ci(nx, ny), sh_dd(nx, ny)
      real(wp), intent(in) :: dt_cum, p0_rho, c0
      real(wp), intent(inout) :: pres_mice(nx, ny)
      integer :: i, j
      real(wp) :: ci_proj

      do concurrent(j=1:ny, i=1:nx) local(ci_proj)
         ci_proj = ci(i, j)*exp(-dt_cum*sh_dd(i, j))
         pres_mice(i, j) = p0_rho*exp(-c0*max(1.0_wp - ci_proj, 0.0_wp))
      end do
   end subroutine evp_project_ci_impl