| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public, | allocatable | :: | beta_centre(:,:) |
|grad f| at cell centres (1/(m*s)); static, filled at
configure by |
||
| real(kind=wp), | public, | allocatable | :: | cg1(:,:) |
First-baroclinic gravity-wave speed (m/s). |
||
| logical, | public | :: | enable | = | .false. |
Master switch. Default off — bit-identity preserved. |
|
| real(kind=wp), | public, | allocatable | :: | f_centre(:,:) |
|f| at cell centres (1/s); filled by |
||
| logical, | public | :: | is_init | = | .false. |
True between |
|
| real(kind=wp), | public | :: | mono_n2_depth | = | -1.0_wp |
depth. |
|
| integer, | public | :: | n_wavespeed | = | 1 |
diagnostic). Default every step (cheap when default-off). |
|
| real(kind=wp), | public, | allocatable | :: | rd(:,:) |
First-mode Rossby deformation radius (m). |
||
| real(kind=wp), | public, | allocatable | :: | rd_over_dx(:,:) |
Rd / dx (nondim) — the B2 resolution ratio. |
||
| real(kind=wp), | public | :: | rho0 | = | 1035.0_wp |
Boussinesq reference density (kg/m^3) for |
|
| logical, | public | :: | use_ebt | = | .false. |
DEFERRED: pressure-Neumann / equivalent-barotropic variant. |
Copy a pre-filled cell-centre Coriolis magnitude |f| (1/s) onto
the slot (mirror of ocean_meke_set_f_centre — the caller
builds f_centre via fill_coriolis_centre /
metrics_fill_coriolis, which handles beta-plane AND
planetary/spherical), and fill the static beta_centre =
|grad f| field with the SAME centred-difference stencil
meke_length_scales uses (edge rows/columns left at 0 -> the
extratropical Rd = cg1/|f| branch there).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_wave_speed_t), | intent(inout) | :: | this | |||
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(ocean_metrics_t), | intent(in) | :: | metrics | |||
| real(kind=wp), | intent(in) | :: | f_centre(grid%nx_total,grid%ny_total) |
Counted allocatable footprint of the wave speed slot (0 when unallocated). One arr_bytes term per array — add a term here when a new allocatable joins the type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_wave_speed_t), | intent(in) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_wave_speed_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_wave_speed_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_wave_speed_t), | intent(inout) | :: | this |
Allocate the persistent (nx, ny) fields. Always allocates
(configure runs after init, so enable is not known yet);
the off-state footprint is four 2D arrays.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_wave_speed_t), | intent(inout) | :: | this | |||
| type(hgrid_t), | intent(in) | :: | grid |
type :: ocean_wave_speed_t logical :: is_init = .false. !! True between `init` and `destroy`. ! ---- Scheme selection + master switch ---- logical :: enable = .false. !! Master switch. Default off — bit-identity preserved. real(wp) :: mono_n2_depth = -1.0_wp !! DEFERRED: limit N^2 from increasing with depth below this !! depth. `< 0` = off. logical :: use_ebt = .false. !! DEFERRED: pressure-Neumann / equivalent-barotropic variant. integer :: n_wavespeed = 1 !! Cadence: recompute every `n_wavespeed` steps (slow !! diagnostic). Default every step (cheap when default-off). ! ---- Environment (copied from the EOS slot at configure) ---- real(wp) :: rho0 = 1035.0_wp !! Boussinesq reference density (kg/m^3) for `gprime`. ! ---- Persistent fields ---- real(wp), allocatable :: f_centre(:, :) !! |f| at cell centres (1/s); filled by `build_static` from !! `metrics_fill_coriolis` (planetary or beta-plane, per !! `&ocean_grid_nml coriolis_scheme`). real(wp), allocatable :: beta_centre(:, :) !! |grad f| at cell centres (1/(m*s)); static, filled at !! configure by `build_static` from the same Coriolis field !! (the `meke_length_scales` centred-difference idiom). Feeds !! the equatorial branch of `wavespeed_rd` — replaces the old !! namelist-scalar `beta`. real(wp), allocatable :: cg1(:, :) !! First-baroclinic gravity-wave speed (m/s). real(wp), allocatable :: rd(:, :) !! First-mode Rossby deformation radius (m). real(wp), allocatable :: rd_over_dx(:, :) !! Rd / dx (nondim) — the B2 resolution ratio. `dx` here is !! `metrics%dxT` (metres), NOT `grid%dx` (degrees on !! spherical/supergrid/tripolar). contains procedure :: init => ocean_wave_speed_init procedure :: destroy => ocean_wave_speed_destroy procedure :: enter_data => ocean_wave_speed_enter_data procedure :: exit_data => ocean_wave_speed_exit_data procedure :: build_static => ocean_wave_speed_build_static procedure, non_overridable :: bytes => ocean_wave_speed_bytes end type ocean_wave_speed_t