model_control Module

Change history:

01/07/2021 Andres Perez Hortal: Group parameters into derived datatypes.!

Model control module


Uses

  • module~~model_control~~UsesGraph module~model_control model_control module~types types module~model_control->module~types iso_fortran_env iso_fortran_env module~types->iso_fortran_env

Used by

  • module~~model_control~~UsedByGraph module~model_control model_control proc~initialize_state initialize_state proc~initialize_state->module~model_control module~prognostics prognostics proc~initialize_state->module~prognostics proc~set_forcing set_forcing proc~set_forcing->module~model_control module~prognostics->module~model_control proc~initialize_coupler initialize_coupler proc~initialize_coupler->module~model_control proc~couple_sea_land couple_sea_land proc~couple_sea_land->module~model_control proc~do_single_step do_single_step proc~do_single_step->module~model_control proc~couple_sea_atm couple_sea_atm proc~couple_sea_atm->module~model_control module~speedy_driver speedy_driver module~speedy_driver->module~model_control proc~transform_grid2spectral transform_grid2spectral proc~transform_grid2spectral->module~prognostics proc~transform_spectral2grid transform_spectral2grid proc~transform_spectral2grid->module~prognostics proc~apply_grid_filter apply_grid_filter proc~apply_grid_filter->module~prognostics

Contents


Variables

TypeVisibility AttributesNameInitial
integer, private, parameter:: ncal =365

The number of days in a year

integer, private, parameter:: ncal365(12) =(/31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/)

The number of days in each month


Derived Types

type, public :: Datetime_t

For storing dates and times.

Components

TypeVisibility AttributesNameInitial
integer, private :: year
integer, private :: month
integer, private :: day
integer, private :: hour
integer, private :: minute
logical, private :: allocated =.false.

type, public :: Datetime_Ptr_t

Components

TypeVisibility AttributesNameInitial
type(Datetime_t), private, pointer:: p=> NULL()

type, public :: ControlParams_t

Structure used to store the model control parameter, like start datem current date, end date, etc.

Components

TypeVisibility AttributesNameInitial
type(Datetime_t), private :: model_datetime

The model's current datetime (continuously updated)

type(Datetime_t), private :: start_datetime

The start datetime

type(Datetime_t), private :: end_datetime

The end datetime

integer, private :: imont1

The month used for computing seasonal forcing fields

real(kind=p), private :: tmonth

The fraction of the current month elapsed

real(kind=p), private :: tyear

The fraction of the current year elapsed

integer, private :: month_idx =1

Simulation month (star month=1)

integer, private :: ndaycal(12,2)

The model calendar

integer, private :: diag_interval

Period (number of steps) for diagnostic print-out

type, public :: ControlParams_Ptr_t

Components

TypeVisibility AttributesNameInitial
type(ControlParams_t), private, pointer:: p=> NULL()

Functions

public function datetime_equal(datetime1, datetime2)

Checks whether two datetimes are equal.

Arguments

Type IntentOptional AttributesName
type(Datetime_t), intent(in) :: datetime1
type(Datetime_t), intent(in) :: datetime2

Return Value logical


Subroutines

public subroutine initialize_control(control_params, start_datetime, end_datetime, diag_interval)

Initializes control structure with the default parameters.

Arguments

Type IntentOptional AttributesName
type(ControlParams_t), intent(inout), target:: control_params
type(Datetime_t), intent(in) :: start_datetime
type(Datetime_t), intent(in) :: end_datetime
integer, intent(in) :: diag_interval

public subroutine advance_date(control_params)

Updates the current datetime and related date variables.

Arguments

Type IntentOptional AttributesName
type(ControlParams_t), intent(inout), target:: control_params

private subroutine update_forcing_params(control_params)

Arguments

Type IntentOptional AttributesName
type(ControlParams_t), intent(inout), target:: control_params