FV3DYCORE  Version1.0.0
DYCORE_typedefs.F90
Go to the documentation of this file.
1 !***********************************************************************
2 !* GNU Lesser General Public License
3 !*
4 !* This file is part of the FV3 dynamical core.
5 !*
6 !* The FV3 dynamical core is free software: you can redistribute it
7 !* and/or modify it under the terms of the
8 !* GNU Lesser General Public License as published by the
9 !* Free Software Foundation, either version 3 of the License, or
10 !* (at your option) any later version.
11 !*
12 !* The FV3 dynamical core is distributed in the hope that it will be
13 !* useful, but WITHOUT ANYWARRANTY; without even the implied warranty
14 !* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 !* See the GNU General Public License for more details.
16 !*
17 !* You should have received a copy of the GNU Lesser General Public
18 !* License along with the FV3 dynamical core.
19 !* If not, see <http://www.gnu.org/licenses/>.
20 !***********************************************************************
22 
24 
25  use platform_mod, only: r8_kind
26 
27  !--- parameter constants used for default initializations
28  real(kind=r8_kind), parameter :: zero = 0.0_r8_kind
29  real(kind=r8_kind), parameter :: huge = 9.9999d15
30  real(kind=r8_kind), parameter :: clear_val = zero
31 
33  real(kind=r8_kind), pointer :: var2p(:) => null()
34  real(kind=r8_kind), pointer :: var3p(:,:) => null()
35  end type var_subtype
36 
37 
38 !---------------------------------------------------------------------
39 ! DYCORE_coupling_type
40 ! fields to/from other coupled components (e.g. land/ice/ocean/etc.)
41 !---------------------------------------------------------------------
43 
44  !--- surface pressure
45  real (kind=r8_kind), pointer :: p_srf(:) => null()
46 
47  !--- bottom layer temperature, pressure, winds, and height
48  real (kind=r8_kind), pointer :: t_bot(:) => null()
49  real (kind=r8_kind), pointer :: p_bot(:) => null()
50  real (kind=r8_kind), pointer :: u_bot(:) => null()
51  real (kind=r8_kind), pointer :: v_bot(:) => null()
52  real (kind=r8_kind), pointer :: z_bot(:) => null()
53 
54  !--- sea-level pressure
55  real (kind=r8_kind), pointer :: slp(:) => null()
56 
57  !--- bottom layer tracers
58  real (kind=r8_kind), pointer :: tr_bot(:,:) => null()
59 
60  !--- outgoing accumulated quantities
61  contains
62  procedure :: create => coupling_create
63  end type dycore_coupling_type
64 
65 !-------------------------------------------------------------
66 ! DYCORE_diag_type
67 ! diagnostic type to be used with an external write component
68 !-------------------------------------------------------------
70  character(len=32) :: name
71  character(len=32) :: output_name
72  character(len=32) :: mod_name
73  character(len=32) :: file_name
74  character(len=128) :: desc
75  character(len=32) :: unit
76  character(len=32) :: type_stat_proc
78  !minimal, etc.
79  character(len=32) :: level_type
80  integer :: level
81  real(kind=r8_kind) :: cnvfac
82  real(kind=r8_kind) :: zhour
83  real(kind=r8_kind) :: fcst_hour
84  type(var_subtype), allocatable :: data(:)
85  contains
86  procedure :: create => diag_create
87  procedure :: zero => diag_zero
88  end type dycore_diag_type
89 
90 
91 !----------------------
92 ! DYCORE_Data container
93 !----------------------
95  type(dycore_coupling_type) :: coupling
96 ! type(xxxxxxxx_type) :: Xxxxxxxx
97  end type dycore_data_type
98 
99 !----------------
100 ! PUBLIC ENTITIES
101 !----------------
103 
104 !*******************************************************************************************
105  CONTAINS
106 
107 
108 !------------------------
109 ! DYCORE_coupling_type%create
110 !------------------------
111  subroutine coupling_create (Coupling, IM, Ntracers)
112  implicit none
113 
114  class(DYCORE_coupling_type) :: Coupling
115  integer, intent(in) :: IM
116  integer, intent(in) :: Ntracers
117 
118  !--- surface pressure
119  allocate (coupling%p_srf (im))
120  coupling%p_srf = clear_val
121 
122  !--- bottom layer temperature, pressure, winds, and height
123  allocate (coupling%t_bot (im))
124  allocate (coupling%p_bot (im))
125  allocate (coupling%u_bot (im))
126  allocate (coupling%v_bot (im))
127  allocate (coupling%z_bot (im))
128  coupling%t_bot = clear_val
129  coupling%p_bot = clear_val
130  coupling%u_bot = clear_val
131  coupling%v_bot = clear_val
132  coupling%z_bot = clear_val
133 
134  !--- sea-level pressure
135  allocate (coupling%slp (im))
136  coupling%slp = clear_val
137 
138  !--- bottom layer tracers
139  allocate (coupling%tr_bot (im,ntracers))
140  coupling%tr_bot = clear_val
141 
142  end subroutine coupling_create
143 
144 
145 !------------------------
146 ! DYCORE_diag_type%create
147 !------------------------
148  subroutine diag_create (Diag, IM, Ntracers)
149  implicit none
150 
151  class(DYCORE_diag_type) :: Diag
152  integer, intent(in) :: IM
153  integer, intent(in) :: Ntracers
154 
155  end subroutine diag_create
156 
157 
158 !------------------------
159 ! DYCORE_diag_type%zero
160 !------------------------
161  subroutine diag_zero (Diag)
162  implicit none
163 
164  class(DYCORE_diag_type) :: Diag
165 
166  end subroutine diag_zero
167 
168 end module dycore_typedefs
real(kind=r8_kind), parameter clear_val
subroutine diag_zero(Diag)
subroutine coupling_create(Coupling, IM, Ntracers)
subroutine diag_create(Diag, IM, Ntracers)
real(kind=r8_kind), parameter huge
real(kind=r8_kind), parameter zero