cable_timing_mod Module

Module for handling timing in CABLE.


Uses

  • module~~cable_timing_mod~~UsesGraph module~cable_timing_mod cable_timing_mod module~cable_common_module cable_common_module module~cable_timing_mod->module~cable_common_module module~cable_error_handler_mod cable_error_handler_mod module~cable_timing_mod->module~cable_error_handler_mod module~cable_io_vars_module cable_IO_vars_module module~cable_timing_mod->module~cable_io_vars_module module~cable_runtime_opts_mod cable_runtime_opts_mod module~cable_common_module->module~cable_runtime_opts_mod module~cable_error_handler_base_mod cable_error_handler_base_mod module~cable_error_handler_mod->module~cable_error_handler_base_mod module~cable_def_types_mod cable_def_types_mod module~cable_io_vars_module->module~cable_def_types_mod module~aggregator_mod aggregator_mod module~cable_def_types_mod->module~aggregator_mod module~cable_climate_type_mod cable_climate_type_mod module~cable_def_types_mod->module~cable_climate_type_mod iso_fortran_env iso_fortran_env module~cable_error_handler_base_mod->iso_fortran_env module~aggregator_mod->module~cable_error_handler_mod module~aggregator_mod->iso_fortran_env

Used by

  • module~~cable_timing_mod~~UsedByGraph module~cable_timing_mod cable_timing_mod module~cable_diagnostics_casa_mod cable_diagnostics_casa_mod module~cable_diagnostics_casa_mod->module~cable_timing_mod module~cable_mpimaster~2 cable_mpimaster module~cable_mpimaster~2->module~cable_timing_mod module~cable_mpimaster~2->module~cable_diagnostics_casa_mod module~cable_output_impl_smod cable_output_impl_smod module~cable_output_impl_smod->module~cable_timing_mod module~cable_serial cable_serial module~cable_serial->module~cable_timing_mod module~cable_serial->module~cable_diagnostics_casa_mod program~cable_offline_driver cable_offline_driver program~cable_offline_driver->module~cable_serial

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: seconds_per_hour = 3600
integer, public, parameter :: hours_per_day = 24
integer, public, parameter :: seconds_per_day = 86400
integer, public, parameter :: months_in_year = 12
integer, private, parameter, dimension(months_in_year) :: last_day = [31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]

Cumulative day of year at the end of each month for a non-leap year.

integer, private, parameter, dimension(months_in_year) :: last_day_leap = [31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366]

Cumulative day of year at the end of each month for a leap year.

integer, private, parameter :: START_YEAR_UNDEFINED = -1
integer, private :: start_year = START_YEAR_UNDEFINED

Start year of the simulation.


Functions

public function cable_timing_frequency_matches(dels, ktau, frequency) result(match)

Determines whether the current time step matches the specified frequency.

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dels

Model time step in seconds

integer, intent(in) :: ktau

Current time step index

character(len=*), intent(in) :: frequency

Frequency string: 'all', 'user', 'daily', 'monthly'

Return Value logical

public function cable_timing_frequency_is_greater_than(freq_a, freq_b, dels) result(freq_a_greater_than_b)

Utility function to determine whether one frequency is greater than another following the ordering "all" > "user" > "daily" > "monthly".

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: freq_a

The first frequency to compare, one of "all", "user", "daily", or "monthly".

character(len=*), intent(in) :: freq_b

The second frequency to compare, one of "all", "user", "daily", or "monthly".

real, intent(in) :: dels

Model time step in seconds, used for comparing against "user" frequencies.

Return Value logical


Subroutines

public subroutine cable_timing_set_start_year(year)

Set the start year of the simulation. This is used for calculating monthly timing.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: year