FE-Project
Loading...
Searching...
No Matches
mod_user_base.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2!> module USER_base
3!!
4!! @par Description
5!! User defined module (base class)
6!!
7!! @author Yuta Kawai, Team SCALE
8!!
9!<
10!-------------------------------------------------------------------------------
11#include "scaleFElib.h"
13
14 !-----------------------------------------------------------------------------
15 !
16 !++ used modules
17 !
18 use scale_precision
19 use scale_io
20 use scale_prof
21
24 use mod_experiment, only: experiment
25
26 !-----------------------------------------------------------------------------
27 implicit none
28 private
29 !-----------------------------------------------------------------------------
30 !
31 !++ Public procedure
32 !
33 type, public :: userbase
34 logical :: user_do !< do user step?
35 contains
36 procedure :: mkinit_base => user_base_mkinit
37 generic :: mkinit => mkinit_base
38 procedure :: mkinit_base_ocn => user_base_mkinit_ocn_exp
39 procedure :: mkinit_ocn => user_base_mkinit_ocn
40 procedure :: mkfinal => user_base_mkfinal
41 procedure :: setup_base => user_base_setup
42 generic :: setup => setup_base
43 procedure :: final => user_base_final
44 procedure :: calc_tendency => user_base_calc_tendency
45 procedure :: update_pre => user_base_update_pre
46 procedure :: update => user_base_update
47 end type userbase
48
49 !-----------------------------------------------------------------------------
50 !
51 !++ Public parameters & variables
52 !
53 !-----------------------------------------------------------------------------
54 !
55 !++ Private procedure
56 !
57 !-----------------------------------------------------------------------------
58 !
59 !++ Private parameters & variables
60 !
61
62 !-----------------------------------------------------------------------------
63contains
64 subroutine user_base_mkinit( this, atm, exp )
65 implicit none
66 class(userbase), intent(inout) :: this
67 class(atmoscomponent), intent(inout) :: atm
68 class(experiment), intent(inout) :: exp
69 !------------------------------------------
70
71 call exp%SetInitCond( atm%mesh, &
72 atm%vars%container%PROGVARS_manager, atm%vars%container%AUXVARS_manager, &
73 atm%vars%container%QTRCVARS_manager )
74 return
75 end subroutine user_base_mkinit
76
77 subroutine user_base_mkinit_ocn_exp( this, ocn, exp )
78 implicit none
79 class(userbase), intent(inout) :: this
80 class(oceancomponent), intent(inout) :: ocn
81 class(experiment), intent(inout) :: exp
82 !------------------------------------------
83
84 call exp%SetInitCond_ocn( ocn%mesh, &
85 ocn%vars%PROGVARS_manager, ocn%vars%AUXVARS2D_manager )
86 return
87 end subroutine user_base_mkinit_ocn_exp
88
89 subroutine user_base_mkinit_ocn( this, ocn )
90 implicit none
91 class(userbase), intent(inout) :: this
92 class(oceancomponent), intent(inout), target :: ocn
93 !------------------------------------------
94 return
95 end subroutine user_base_mkinit_ocn
96
97 subroutine user_base_mkfinal( this )
98 implicit none
99 class(userbase), intent(inout) :: this
100 !------------------------------------------
101 return
102 end subroutine user_base_mkfinal
103
104 subroutine user_base_setup( this, atm, user_do )
105 implicit none
106 class(userbase), intent(inout) :: this
107 class(atmoscomponent), intent(inout) :: atm
108 logical, intent(in) :: user_do
109 !------------------------------------------
110
111 this%USER_do = user_do
112
113 return
114 end subroutine user_base_setup
115
116 subroutine user_base_final( this )
117 implicit none
118 class(userbase), intent(inout) :: this
119 !------------------------------------------
120 return
121 end subroutine user_base_final
122
123 subroutine user_base_calc_tendency( this, atm )
124 implicit none
125 class(userbase), intent(inout) :: this
126 class(atmoscomponent), intent(inout) :: atm
127 !------------------------------------------
128
129 return
130 end subroutine user_base_calc_tendency
131
132 subroutine user_base_update_pre( this, atm )
133 implicit none
134 class(userbase), intent(inout) :: this
135 class(atmoscomponent), intent(inout) :: atm
136 !------------------------------------------
137 return
138 end subroutine user_base_update_pre
139
140 subroutine user_base_update( this, atm )
141 implicit none
142 class(userbase), intent(inout) :: this
143 class(atmoscomponent), intent(inout) :: atm
144 !------------------------------------------
145 return
146 end subroutine user_base_update
147
148end module mod_user_base
module Atmosphere component
module Oceanic component
module USER_base
subroutine user_base_mkinit(this, atm, exp)
Derived type to manage atmospheric component.
Derived type to manage oceanic component.