Build the STATIC VarMix grid terms (f2_dx2_*, beta_dx2_*,
l2_*) on the varmix slot once at configure time, from the filled
curvilinear metrics + the cell-centre Coriolis magnitude. The slot
scalars are copied earlier by ocean_state_copy_config; this only
fills the static arrays (the per-step Res_fn/SN/assembly fire in the
dyn step). No-op when VarMix is disabled.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg | |||
| type(ocean_state_t), | intent(inout) | :: | ocean_state | |||
| type(hgrid_t), | intent(in) | :: | grid |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private, | allocatable | :: | f_centre(:,:) |
subroutine configure_ocean_varmix(cfg, ocean_state, grid) !! Build the STATIC VarMix grid terms (`f2_dx2_*`, `beta_dx2_*`, !! `l2_*`) on the varmix slot once at configure time, from the filled !! curvilinear metrics + the cell-centre Coriolis magnitude. The slot !! scalars are copied earlier by `ocean_state_copy_config`; this only !! fills the static arrays (the per-step Res_fn/SN/assembly fire in the !! dyn step). No-op when VarMix is disabled. type(config_t), intent(in) :: cfg type(ocean_state_t), intent(inout) :: ocean_state type(hgrid_t), intent(in) :: grid real(wp), allocatable :: f_centre(:, :) if (.not. ocean_state%varmix%enable) return allocate (f_centre(grid%nx_total, grid%ny_total)) call fill_coriolis_centre(cfg, ocean_state%metrics, grid, f_centre) call ocean_state%varmix%build_static(ocean_state%metrics, f_centre) deallocate (f_centre) end subroutine configure_ocean_varmix