MAPL_CapGridComp Derived Type

type, public :: MAPL_CapGridComp


Inherits

type~~mapl_capgridcomp~~InheritsGraph type~mapl_capgridcomp MAPL_CapGridComp ESMF_Alarm ESMF_Alarm type~mapl_capgridcomp->ESMF_Alarm alarm_list ESMF_Clock ESMF_Clock type~mapl_capgridcomp->ESMF_Clock clock, clock_hist ESMF_Config ESMF_Config type~mapl_capgridcomp->ESMF_Config cf_ext, cf_root, cf_hist, config ESMF_GridComp ESMF_GridComp type~mapl_capgridcomp->ESMF_GridComp gc, gcs ESMF_State ESMF_State type~mapl_capgridcomp->ESMF_State import_state, export_state, child_imports, child_exports ESMF_Time ESMF_Time type~mapl_capgridcomp->ESMF_Time cap_restart_time, AlarmRingTime ESMF_VM ESMF_VM type~mapl_capgridcomp->ESMF_VM vm type~throughputtimers ThroughputTimers type~mapl_capgridcomp->type~throughputtimers starts

Inherited by

type~~mapl_capgridcomp~~InheritedByGraph type~mapl_capgridcomp MAPL_CapGridComp type~mapl_cap MAPL_Cap type~mapl_cap->type~mapl_capgridcomp cap_gc type~mapl_capgridcomp_wrapper MAPL_CapGridComp_Wrapper type~mapl_capgridcomp_wrapper->type~mapl_capgridcomp ptr

Components

Type Visibility Attributes Name Initial
type(ESMF_State), public :: export_state
type(ESMF_State), public :: import_state

Type-Bound Procedures

procedure, public :: destroy_state

  • private subroutine destroy_state(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    integer, intent(out) :: rc

procedure, public :: finalize

  • private subroutine finalize(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: get_am_i_root

  • private function get_am_i_root(this, rc) result(amiroot)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp) :: this
    integer, intent(out), optional :: rc

    Return Value logical

procedure, public :: get_current_time

  • private function get_current_time(this, rc) result(current_time)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp) :: this
    integer, intent(out), optional :: rc

    Return Value type(ESMF_Time)

procedure, public :: get_field_from_import

  • private subroutine get_field_from_import(this, field_name, state_name, field, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    character(len=*), intent(in) :: field_name
    character(len=*), intent(in) :: state_name
    type(ESMF_Field), intent(inout) :: field
    integer, intent(out) :: rc

procedure, public :: get_field_from_internal

  • private subroutine get_field_from_internal(this, field_name, state_name, field, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    character(len=*), intent(in) :: field_name
    character(len=*), intent(in) :: state_name
    type(ESMF_Field), intent(inout) :: field
    integer, intent(out) :: rc

procedure, public :: get_heartbeat_dt

  • private function get_heartbeat_dt(this, rc) result(heartbeatdt)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp) :: this
    integer, intent(out), optional :: rc

    Return Value integer

procedure, public :: get_model_duration

  • private function get_model_duration(this, rc) result(duration)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp) :: this
    integer, intent(out), optional :: rc

    Return Value integer

procedure, public :: get_step_counter

  • private function get_step_counter(this) result(step_counter)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(in) :: this

    Return Value integer

procedure, public :: increment_step_counter

  • private subroutine increment_step_counter(this)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this

procedure, public :: initialize

  • private subroutine initialize(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: initialize_extdata

  • private subroutine initialize_extdata(cap, root_gc, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: cap
    type(ESMF_GridComp), intent(inout), pointer :: root_gc
    integer, intent(out), optional :: rc

procedure, public :: initialize_history

  • private subroutine initialize_history(cap, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: cap
    integer, intent(out), optional :: rc

procedure, public :: inject_external_grid

  • private subroutine inject_external_grid(this, unusable, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure, public :: record_state

  • private subroutine record_state(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    integer, intent(out) :: rc

procedure, public :: refresh_state

  • private subroutine refresh_state(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    integer, intent(out) :: rc

procedure, public :: rewind_clock

  • private subroutine rewind_clock(this, time, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    type(ESMF_Time), intent(inout) :: time
    integer, intent(out) :: rc

procedure, public :: run

  • private subroutine run(this, phase, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    integer, intent(in), optional :: phase
    integer, intent(out), optional :: rc

procedure, public :: set_clock

  • private subroutine set_clock(this, clock, unusable, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    type(ESMF_Clock), intent(in) :: clock
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure, public :: set_grid

  • private subroutine set_grid(this, grid, unusable, lm, grid_type, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    type(ESMF_Grid), intent(in) :: grid
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(in), optional :: lm
    character(len=*), intent(in), optional :: grid_type
    integer, intent(out), optional :: rc

procedure, public :: set_services

  • private subroutine set_services(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: set_step_counter

  • private subroutine set_step_counter(this, n)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    integer, intent(in) :: n

procedure, public :: step

  • private subroutine step(this, unusable, phase, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_CapGridComp), intent(inout) :: this
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(in), optional :: phase
    integer, intent(out), optional :: rc

Source Code

  type :: MAPL_CapGridComp
     private
     type (ESMF_GridComp)          :: gc
     procedure(), pointer, nopass  :: root_set_services => null()
     character(len=:), allocatable :: root_dso
     character(len=:), allocatable :: final_file, name, cap_rc_file
     integer :: nsteps, heartbeat_dt, perpetual_year, perpetual_month, perpetual_day
     logical :: amiroot, started_loop_timer
     logical :: lperp = .false.
     integer :: extdata_id, history_id, root_id, printspec
     type(ESMF_Clock) :: clock, clock_hist
     type(ESMF_Config) :: cf_ext, cf_root, cf_hist, config
     type(ESMF_GridComp), allocatable :: gcs(:)
     type(ESMF_State), public :: import_state, export_state
     type(ESMF_State), allocatable :: child_imports(:), child_exports(:)
     type(ESMF_VM) :: vm
     type(ESMF_Time) :: cap_restart_time
     type(ESMF_Alarm), allocatable :: alarm_list(:)
     type(ESMF_Time),  allocatable :: AlarmRingTime(:)
     logical,          allocatable :: ringingState(:)
     logical :: compute_throughput
     integer :: n_run_phases
     type (ThroughputTimers) :: starts
     integer :: step_counter
   contains
     procedure :: set_services
     procedure :: initialize
     procedure :: initialize_extdata
     procedure :: initialize_history
     procedure :: run
     procedure :: step
     procedure :: finalize
     procedure :: get_model_duration
     procedure :: get_am_i_root
     procedure :: get_heartbeat_dt
     procedure :: get_current_time
     procedure :: rewind_clock
     procedure :: record_state
     procedure :: refresh_state
     procedure :: destroy_state
     procedure :: get_field_from_import
     procedure :: get_field_from_internal
     procedure :: set_grid
     procedure :: inject_external_grid
     procedure :: set_clock
     procedure :: set_step_counter
     procedure :: increment_step_counter
     procedure :: get_step_counter
  end type MAPL_CapGridComp