Does the FV_MOM6 constant-by-layer branch take the IN-SITU
density path (compute_fv_mom6_insitu_pcm_impl)? Only when it
can change the answer: the knob is on, there is an EOS handle and
T/S to evaluate it on, and the EOS depends on pressure. For the
linear EOS ms%rho_layer already IS the in-situ density, so the
legacy path runs, bit-identical.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_pressure_force_t), | intent(in) | :: | pgf | |||
| type(multilayer_state_t), | intent(in) | :: | ms | |||
| type(eos_t), | intent(in), | optional | :: | eos |
pure function use_insitu_pcm(pgf, ms, eos) result(yes) !! Does the FV_MOM6 constant-by-layer branch take the IN-SITU !! density path (`compute_fv_mom6_insitu_pcm_impl`)? Only when it !! can change the answer: the knob is on, there is an EOS handle and !! T/S to evaluate it on, and the EOS depends on pressure. For the !! linear EOS `ms%rho_layer` already IS the in-situ density, so the !! legacy path runs, bit-identical. type(ocean_pressure_force_t), intent(in) :: pgf type(multilayer_state_t), intent(in) :: ms type(eos_t), intent(in), optional :: eos logical :: yes yes = .false. if (.not. pgf%insitu_density) return if (.not. present(eos)) return if (ms%idx_salinity <= 0 .or. ms%idx_temperature <= 0) return yes = eos%variant == EOS_VARIANT_WRIGHT_97 .or. & eos%variant == EOS_VARIANT_ROQUET_SPV end function use_insitu_pcm