FE-Project
All Classes Namespaces Files Functions Variables Pages
scale_model_component_proc.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
10#include "scaleFElib.h"
12 !-----------------------------------------------------------------------------
13 !
14 !++ used modules
15 !
16 use scale_precision
17 use scale_io
18 use scale_prof
19
20 use scale_time_manager, only: &
24 use scale_model_var_manager, only: &
26
27 !-----------------------------------------------------------------------------
28 implicit none
29 private
30
31 !-----------------------------------------------------------------------------
32 !
33 !++ Public type & procedure
34 !
35
36 type, abstract, public :: modelcomponentproc
37 character(len=H_SHORT) :: name
38 logical, private :: is_activated = .false.
39 integer :: tm_process_id
40 contains
41 procedure(modelcomponentproc_setup), deferred, public :: setup
42 procedure(modelcomponentproc_calc_tendency), deferred, public :: calc_tendency
43 procedure(modelcomponentproc_update), deferred, public :: update
44 procedure(modelcomponentproc_finalize), deferred, public :: finalize
45
46 procedure, public :: modelcomponentproc_init
47 procedure, public :: isactivated => modelcomponentproc_isactivated
48 end type modelcomponentproc
49
50 interface
51 subroutine modelcomponentproc_setup( this, model_mesh, tm_parent_comp )
53 import modelmeshbase
55 class(modelcomponentproc), intent(inout) :: this
56 class(modelmeshbase), target, intent(in) :: model_mesh
57 class(time_manager_component), intent(inout) :: tm_parent_comp
58 end subroutine modelcomponentproc_setup
59
60 subroutine modelcomponentproc_calc_tendency( this, model_mesh, prgvars_list, trcvars_list, auxvars_list, forcing_list, is_update )
62 import modelmeshbase
63 import modelvarmanager
64 class(modelcomponentproc), intent(inout) :: this
65 class(modelmeshbase), intent(in) :: model_mesh
66 class(modelvarmanager), intent(inout) :: prgvars_list
67 class(modelvarmanager), intent(inout) :: trcvars_list
68 class(modelvarmanager), intent(inout) :: auxvars_list
69 class(modelvarmanager), intent(inout) :: forcing_list
70 logical, intent(in) :: is_update
71 end subroutine modelcomponentproc_calc_tendency
72
73 subroutine modelcomponentproc_update( this, model_mesh, prgvars_list, trcvars_list, auxvars_list, forcing_list, is_update )
75 import modelmeshbase
76 import modelvarmanager
77 class(modelcomponentproc), intent(inout) :: this
78 class(modelmeshbase), intent(in) :: model_mesh
79 class(modelvarmanager), intent(inout) :: prgvars_list
80 class(modelvarmanager), intent(inout) :: trcvars_list
81 class(modelvarmanager), intent(inout) :: auxvars_list
82 class(modelvarmanager), intent(inout) :: forcing_list
83 logical, intent(in) :: is_update
84 end subroutine modelcomponentproc_update
85
86 subroutine modelcomponentproc_finalize( this )
88 class(modelcomponentproc), intent(inout) :: this
89 end subroutine modelcomponentproc_finalize
90 end interface
91
92
93 !-----------------------------------------------------------------------------
94 !
95 !++ Public parameters & variables
96 !
97 !-----------------------------------------------------------------------------
98 !
99 !++ Private procedure
100 !
101 !-----------------------------------------------------------------------------
102 !
103 !++ Private parameters & variables
104 !
105 !-----------------------------------------------------------------------------
106
107contains
108!OCL SERIAL
109 subroutine modelcomponentproc_init( this, name, is_activated )
110 implicit none
111
112 class(modelcomponentproc), intent(inout) :: this
113 character(len=*), intent(in) :: name
114 logical, intent(in) :: is_activated
115 !---------------------------------------------------
116
117 this%name = name
118 this%is_activated = is_activated
119
120 return
121 end subroutine modelcomponentproc_init
122
123!OCL SERIAL
124 function modelcomponentproc_isactivated( this ) result( is_activated )
125 implicit none
126
127 class(modelcomponentproc), intent(in) :: this
128 logical :: is_activated
129 !---------------------------------------------------
130
131 is_activated = this%is_activated
132 return
133 end function modelcomponentproc_isactivated
134
135end module scale_model_component_proc
FElib / model framework / physics process.
FElib / model framework / mesh manager (base)
FElib / model framework / variable manager.
module common / time