dataovr_freshwater_needs_components Function

public pure function dataovr_freshwater_needs_components(cfg, use_components) result(bad)

.true. when evap/lprec are file-driven but the surface-flux component set they write into is switched off. Note the polarity: this reports the PROBLEM, not validity — named for how it reads at the call site.

Arguments

Type IntentOptional Attributes Name
type(ocean_dataovr_config_t), intent(in) :: cfg
logical, intent(in) :: use_components

Return Value logical


Called by

proc~~dataovr_freshwater_needs_components~~CalledByGraph proc~dataovr_freshwater_needs_components dataovr_freshwater_needs_components proc~validate_config validate_config proc~validate_config->proc~dataovr_freshwater_needs_components proc~build_pending_handle build_pending_handle proc~build_pending_handle->proc~validate_config proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~build_pending_handle proc~rdb_ocean_create_pending rdb_ocean_create_pending proc~rdb_ocean_create_pending->proc~build_pending_handle

Source Code

   pure function dataovr_freshwater_needs_components(cfg, use_components) result(bad)
      !! `.true.` when `evap`/`lprec` are file-driven but the
      !! surface-flux component set they write into is switched off.
      !! Note the polarity: this reports the PROBLEM, not validity —
      !! named for how it reads at the call site.
      type(ocean_dataovr_config_t), intent(in) :: cfg
      logical, intent(in) :: use_components
      logical :: bad
      bad = (len_trim(cfg%evap%file) > 0 .or. len_trim(cfg%lprec%file) > 0) &
            .and. (.not. use_components)
   end function dataovr_freshwater_needs_components