Copy the &ocean_foxkemper_nml knobs onto the MLE slot (B5).
Validates: B5 reads epbl%mld, so EPBL must be enabled; and the
resolution_taper hook is a hard error until B2 lands.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg | |||
| type(ocean_state_t), | intent(inout) | :: | ocean_state | |||
| integer, | intent(in) | :: | compute_rank | |||
| integer, | intent(out), | optional | :: | ierr |
Non-zero on a Fox-Kemper MLE configuration conflict when
present; absent behaves as today ( |
subroutine configure_ocean_foxkemper(cfg, ocean_state, compute_rank, ierr) !! Copy the `&ocean_foxkemper_nml` knobs onto the MLE slot (B5). !! Validates: B5 reads `epbl%mld`, so EPBL must be enabled; and the !! `resolution_taper` hook is a hard error until B2 lands. type(config_t), intent(in) :: cfg type(ocean_state_t), intent(inout) :: ocean_state integer, intent(in) :: compute_rank integer, intent(out), optional :: ierr !! Non-zero on a Fox-Kemper MLE configuration conflict when !! present; absent behaves as today (`error stop`). associate (mle => ocean_state%mle, fcfg => cfg%ocean%foxkemper) mle%enable = fcfg%enable if (.not. fcfg%enable) then if (present(ierr)) ierr = OCEAN_STATUS_OK return end if mle%ce = fcfg%ce mle%f_floor = fcfg%f_floor mle%mld_decay_time = fcfg%mld_decay_time mle%tail_dh = fcfg%tail_dh mle%use_mom_mixrate = fcfg%use_mom_mixrate mle%resolution_taper = fcfg%resolution_taper mle%use_bodner = fcfg%use_bodner mle%cr = fcfg%cr mle%bodner_mstar = fcfg%bodner_mstar mle%bodner_nstar = fcfg%bodner_nstar mle%min_wstar2 = fcfg%min_wstar2 ! B5 takes the mixed-layer depth from epbl%mld — EPBL is the ! enabler and must be on. if (.not. ocean_state%epbl%enable) then call fail("ocean_foxkemper_nml: enable=.true. requires "// & "ocean_epbl_nml enable=.true. (B5 reads epbl%mld)", ierr, OCEAN_STATUS_ERR_SETUP) return end if ! resolution_taper is a B2 hook; the res_fn is not available yet. if (mle%resolution_taper) then call fail("ocean_foxkemper_nml: resolution_taper=.true. "// & "requires the B2 resolution function (not yet "// & "available) — leave it .false. until B2 lands", ierr, OCEAN_STATUS_ERR_SETUP) return end if if (mle%tail_dh /= 0.0_wp) then call fail("ocean_foxkemper_nml: tail_dh /= 0 (mu cubic "// & "tail) is deferred; use the exact mu (tail_dh=0)", ierr, OCEAN_STATUS_ERR_SETUP) return end if if (compute_rank == 0) then if (fcfg%use_bodner) then call logger%info("Fox-Kemper MLE: restratification enabled "// & "Bodner-2023 frontogenesis arrest Cr="//to_string(fcfg%cr)) else call logger%info("Fox-Kemper MLE: restratification enabled Ce="// & to_string(fcfg%ce)//" timescale="// & merge("FK11-mixrate", "bare Ce/|f| ", fcfg%use_mom_mixrate)) end if end if end associate if (present(ierr)) ierr = OCEAN_STATUS_OK end subroutine configure_ocean_foxkemper