| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public, | allocatable | :: | amp_c(:) |
(nconst) equilibrium amplitudes A (m). |
||
| real(kind=wp), | public, | allocatable | :: | amp_cos(:) |
(nconst) per-step scratch Alovefcos(omeganow+V+u). |
||
| real(kind=wp), | public, | allocatable | :: | amp_sin(:) |
(nconst) per-step scratch Alovef*sin(…). |
||
| real(kind=wp), | public | :: | beta_sal | = | 0.0_wp |
Scalar SAL factor beta (~0.085-0.12; C2). |
|
| real(kind=wp), | public, | allocatable | :: | cos_struct(:,:,:) |
(nx,ny,3) cos-part spatial structure per species slice. |
||
| logical, | public | :: | enable | = | .false. |
Master switch (default off => bit-identical). |
|
| real(kind=wp), | public, | allocatable | :: | eta_eq(:,:) |
(nx,ny) equilibrium tide elevation (m) at cell centres. |
||
| real(kind=wp), | public, | allocatable | :: | eta_forcing(:,:) |
(nx,ny) combined seam field |
||
| real(kind=wp), | public, | allocatable | :: | eta_sal(:,:) |
(nx,ny) scalar-SAL elevation (m); |
||
| real(kind=wp), | public, | allocatable | :: | f_nodal(:) |
(nconst) nodal amplitude factor (fixed at nodal_ref_date). |
||
| logical, | public | :: | is_init | = | .false. |
True between |
|
| real(kind=wp), | public, | allocatable | :: | love_c(:) |
(nconst) Love-number factors. |
||
| integer, | public | :: | nconst | = | 0 |
Number of active harmonic constituents. |
|
| real(kind=wp), | public, | allocatable | :: | omega_c(:) |
(nconst) angular frequencies (rad/s). |
||
| real(kind=wp), | public, | allocatable | :: | phase0(:) |
(nconst) equilibrium argument V_c at ref_date (rad). |
||
| real(kind=wp), | public, | allocatable | :: | sin_struct(:,:,:) |
(nx,ny,3) sin-part spatial structure per species slice. |
||
| integer, | public, | allocatable | :: | species_c(:) |
(nconst) structure-slice index 1/2/3 (diurnal/semidi/long-per). |
||
| real(kind=wp), | public | :: | t_epoch | = | 0.0_wp |
Seconds from ref_date to the model’s t=0 (v1: 0). |
|
| real(kind=wp), | public, | allocatable | :: | u_nodal(:) |
(nconst) nodal phase (rad). |
||
| logical, | public | :: | use_sal | = | .false. |
Apply scalar self-attraction & loading (C2). |
Counted allocatable footprint of the tides 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_tides_t), | intent(in) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_tides_t), | intent(inout) | :: | this |
Attach the device-resident tide arrays. Only when enabled.
select-type -> non-poly _impl (AMD libomptarget class-box rule).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_tides_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_tides_t), | intent(inout) | :: | this |
Minimal init — the real allocation + astronomy fill happens in
tides_configure_astronomy / tides_build_struct once the
namelist + metrics are available (host, before enter_data).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_tides_t), | intent(inout) | :: | this | |||
| type(hgrid_t), | intent(in) | :: | grid |
type :: ocean_tides_t logical :: is_init = .false. !! True between `init` and `destroy` (tracks GPU attachment too). ! ---- Master switches ---- logical :: enable = .false. !! Master switch (default off => bit-identical). logical :: use_sal = .false. !! Apply scalar self-attraction & loading (C2). ! ---- Active constituent catalog (nconst <= TIDES_CATALOG_SIZE) ---- integer :: nconst = 0 !! Number of active harmonic constituents. integer, allocatable :: species_c(:) !! (nconst) structure-slice index 1/2/3 (diurnal/semidi/long-per). real(wp), allocatable :: omega_c(:) !! (nconst) angular frequencies (rad/s). real(wp), allocatable :: amp_c(:) !! (nconst) equilibrium amplitudes A (m). real(wp), allocatable :: love_c(:) !! (nconst) Love-number factors. real(wp), allocatable :: phase0(:) !! (nconst) equilibrium argument V_c at ref_date (rad). real(wp), allocatable :: f_nodal(:) !! (nconst) nodal amplitude factor (fixed at nodal_ref_date). real(wp), allocatable :: u_nodal(:) !! (nconst) nodal phase (rad). real(wp), allocatable :: amp_cos(:) !! (nconst) per-step scratch A*love*f*cos(omega*now+V+u). real(wp), allocatable :: amp_sin(:) !! (nconst) per-step scratch A*love*f*sin(...). ! ---- Spatial structure (built ONCE at init) ---- real(wp), allocatable :: cos_struct(:, :, :) !! (nx,ny,3) cos-part spatial structure per species slice. real(wp), allocatable :: sin_struct(:, :, :) !! (nx,ny,3) sin-part spatial structure per species slice. ! ---- 2D forcing fields (filled once per OUTER step) ---- real(wp), allocatable :: eta_eq(:, :) !! (nx,ny) equilibrium tide elevation (m) at cell centres. real(wp), allocatable :: eta_sal(:, :) !! (nx,ny) scalar-SAL elevation (m); `beta_sal*eta` (C2). real(wp), allocatable :: eta_forcing(:, :) !! (nx,ny) combined seam field `eta_eq + eta_sal` — the surface !! elevation the barotropic PGF drives `-g grad(eta - .)` against. real(wp) :: beta_sal = 0.0_wp !! Scalar SAL factor beta (~0.085-0.12; C2). ! ---- Time tracker ---- real(wp) :: t_epoch = 0.0_wp !! Seconds from ref_date to the model's t=0 (v1: 0). contains procedure, non_overridable :: init => ocean_tides_init procedure, non_overridable :: destroy => ocean_tides_destroy procedure, non_overridable :: enter_data => ocean_tides_enter_data procedure, non_overridable :: exit_data => ocean_tides_exit_data procedure, non_overridable :: bytes => ocean_tides_bytes end type ocean_tides_t