| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | budget_id | = | TRACER_BUDGET_NONE |
Which conservation-budget contributor slot this tracer’s
kernels fill on the OCEAN path: NONE (no budget — passive
tracers, ideal age, pseudo-salt), HEAT ( |
|
| logical, | public | :: | do_clamp | = | .true. | ||
| logical, | public | :: | do_horizontal_advection | = | .true. | ||
| logical, | public | :: | do_horizontal_diffusion | = | .true. | ||
| logical, | public | :: | do_vertical_diffusion | = | .true. | ||
| logical, | public | :: | do_vertical_exchange | = | .true. | ||
| real(kind=wp), | public | :: | eos_coeff | = | 0.0_wp | ||
| real(kind=wp), | public | :: | eos_ref | = | 0.0_wp | ||
| real(kind=wp), | public, | allocatable | :: | hTr(:,:,:) | |||
| real(kind=wp), | public, | allocatable | :: | hTr0(:,:,:) | |||
| real(kind=wp), | public | :: | hdiff_kappa | = | 0.0_wp |
Horizontal Laplacian diffusivity (m^2/s) |
|
| real(kind=wp), | public | :: | kappa_bg | = | 0.0_wp |
Background vertical diffusivity (m^2/s) |
|
| character(len=64), | public | :: | long_name | = | "" | ||
| character(len=32), | public | :: | name | = | "" | ||
| character(len=64), | public | :: | standard_name | = | "" |
CF-1.11 standard_name (e.g. “sea_water_salinity”). Empty string => no standard_name attribute is written. |
|
| real(kind=wp), | public | :: | tr_inflow | = | 0.0_wp |
BC inflow concentration for BC_INFLOW / BC_DISCHARGE |
|
| real(kind=wp), | public | :: | tr_init | = | 0.0_wp |
Uniform initial concentration (set by init from cfg) |
|
| real(kind=wp), | public | :: | tr_max | = | huge(1.0_wp) |
Physical upper clamp bound |
|
| real(kind=wp), | public | :: | tr_min | = | -huge(1.0_wp) |
Physical lower clamp bound |
|
| character(len=16), | public | :: | units | = | "" |
Counted allocatable footprint of one tracer (hTr + RK2 save).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(tracer_t), | intent(in) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(tracer_t), | intent(inout) | :: | this |
Allocate hTr / hTr0 at the multilayer grid size, zero-filled.
Caller is responsible for populating the prognostic field
(e.g. hTr = h_layer * tr_init) after layer thicknesses are set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(tracer_t), | intent(inout) | :: | this | |||
| type(hgrid_t), | intent(in) | :: | grid | |||
| integer, | intent(in) | :: | nz |
type :: tracer_t ! Identity (used for output/config lookup). All four strings are ! written verbatim onto the NetCDF variable; output loops over the ! registry, so a new tracer needs no changes to `rdb_output`. character(len=32) :: name = "" character(len=64) :: long_name = "" character(len=16) :: units = "" character(len=64) :: standard_name = "" !! CF-1.11 standard_name (e.g. "sea_water_salinity"). Empty !! string => no standard_name attribute is written. ! Prognostic field and RK2 save (nx_total, ny_total, nz_ml) real(wp), allocatable :: hTr(:, :, :) real(wp), allocatable :: hTr0(:, :, :) ! Scalar config real(wp) :: tr_init = 0.0_wp !! Uniform initial concentration (set by init from cfg) real(wp) :: tr_inflow = 0.0_wp !! BC inflow concentration for BC_INFLOW / BC_DISCHARGE real(wp) :: tr_min = -huge(1.0_wp) !! Physical lower clamp bound real(wp) :: tr_max = huge(1.0_wp) !! Physical upper clamp bound real(wp) :: kappa_bg = 0.0_wp !! Background vertical diffusivity (m^2/s) real(wp) :: hdiff_kappa = 0.0_wp !! Horizontal Laplacian diffusivity (m^2/s) ! Linear EOS contribution: rho_anomaly += eos_coeff * (Tr - eos_ref) ! Salinity: eos_coeff = +beta_S, eos_ref = S_ref ! Temperature: eos_coeff = -alpha_T, eos_ref = T_ref ! Passive scalar: eos_coeff = 0 real(wp) :: eos_coeff = 0.0_wp real(wp) :: eos_ref = 0.0_wp integer :: budget_id = TRACER_BUDGET_NONE !! Which conservation-budget contributor slot this tracer's !! kernels fill on the OCEAN path: NONE (no budget — passive !! tracers, ideal age, pseudo-salt), HEAT (`heat_budget_*`) or !! SALT (`salt_budget_*`). Read HOST-side only, at the seven !! budget dispatch blocks; never dereferenced inside a device !! loop. Unused on the coastal paths (no budget slots there) — !! left at NONE. ! Pipeline opt-outs (skip work for diagnostic/passive tracers) logical :: do_horizontal_advection = .true. logical :: do_vertical_exchange = .true. logical :: do_vertical_diffusion = .true. logical :: do_horizontal_diffusion = .true. logical :: do_clamp = .true. contains procedure, non_overridable :: init => tracer_init procedure, non_overridable :: destroy => tracer_destroy procedure, non_overridable :: bytes => tracer_bytes end type tracer_t