check_time_mode Subroutine

private subroutine check_time_mode(cfg, ierr)

Fail loud on a cyclic group with no period. The reader makes the same check per field; catching it once here names the namelist group the user actually edited.

Arguments

Type IntentOptional Attributes Name
type(ocean_dataovr_config_t), intent(in) :: cfg
integer, intent(out), optional :: ierr

Calls

proc~~check_time_mode~~CallsGraph proc~check_time_mode check_time_mode proc~fail fail proc~check_time_mode->proc~fail error error proc~fail->error proc~error_ring_push error_ring_push proc~fail->proc~error_ring_push

Called by

proc~~check_time_mode~~CalledByGraph proc~check_time_mode check_time_mode proc~ocean_data_forcing_configure ocean_data_forcing_configure proc~ocean_data_forcing_configure->proc~check_time_mode proc~engine_setup engine_setup proc~engine_setup->proc~ocean_data_forcing_configure proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Source Code

   subroutine check_time_mode(cfg, ierr)
      !! Fail loud on a `cyclic` group with no period.  The reader makes
      !! the same check per field; catching it once here names the
      !! namelist group the user actually edited.
      type(ocean_dataovr_config_t), intent(in) :: cfg
      integer, intent(out), optional :: ierr
      if (present(ierr)) ierr = OCEAN_STATUS_OK
      if (trim(cfg%time_mode) == "cyclic" .and. cfg%cycle_period <= 0.0_wp) then
         call fail("&ocean_dataovr_nml: time_mode = 'cyclic' requires cycle_period > 0", &
                   ierr, OCEAN_STATUS_ERR_SETUP)
      end if
   end subroutine check_time_mode