Line data Source code
1 : !================================================================================================
2 : ! This is the 'none' chemistry module.
3 : ! Most of the routines return without doing anything.
4 : !================================================================================================
5 :
6 : module chemistry
7 : use shr_kind_mod, only: r8 => shr_kind_r8
8 : use physics_types, only: physics_state, physics_ptend
9 : use ppgrid, only: begchunk, endchunk, pcols
10 :
11 :
12 : implicit none
13 : private
14 : save
15 : !
16 : ! Public interfaces
17 : !
18 : public :: chem_is ! identify which chemistry is being used
19 : public :: chem_register ! register consituents
20 : public :: chem_is_active ! returns true if this package is active (ghg_chem=.true.)
21 : public :: chem_implements_cnst ! returns true if consituent is implemented by this package
22 : public :: chem_init_cnst ! initialize mixing ratios if not read from initial file
23 : public :: chem_init ! initialize (history) variables
24 : public :: chem_timestep_init ! time interpolate chemical loss frequencies
25 : public :: chem_timestep_tend ! interface to tendency computation
26 : public :: chem_final
27 : public :: chem_write_restart
28 : public :: chem_read_restart
29 : public :: chem_init_restart
30 : public :: chem_readnl ! read chem namelist
31 : public :: chem_reset_fluxes
32 : public :: chem_emissions
33 : public :: chem_has_ndep_flx
34 :
35 : interface chem_write_restart
36 : module procedure chem_write_restart_bin
37 : module procedure chem_write_restart_pio
38 : end interface
39 : interface chem_read_restart
40 : module procedure chem_read_restart_bin
41 : module procedure chem_read_restart_pio
42 : end interface
43 :
44 : logical, parameter :: chem_has_ndep_flx = .false.
45 :
46 : ! Private data
47 :
48 : !================================================================================================
49 : contains
50 : !================================================================================================
51 :
52 63688 : logical function chem_is (name)
53 :
54 : character(len=*), intent(in) :: name
55 :
56 0 : chem_is = .false.
57 0 : if (name == 'none' ) then
58 0 : chem_is = .true.
59 : end if
60 :
61 0 : end function chem_is
62 :
63 : !================================================================================================
64 :
65 1024 : subroutine chem_register
66 : use aero_model, only : aero_model_register
67 : !-----------------------------------------------------------------------
68 : !
69 : ! Purpose: register advected constituents for parameterized greenhouse gas chemistry
70 : !
71 : !-----------------------------------------------------------------------
72 :
73 : ! for prescribed aerosols
74 1024 : call aero_model_register()
75 :
76 1024 : end subroutine chem_register
77 :
78 : !================================================================================================
79 :
80 1024 : subroutine chem_readnl(nlfile)
81 :
82 : ! args
83 :
84 : character(len=*), intent(in) :: nlfile ! filepath for file containing namelist input
85 :
86 :
87 1024 : end subroutine chem_readnl
88 :
89 : !================================================================================================
90 :
91 63688 : function chem_is_active()
92 : !-----------------------------------------------------------------------
93 : logical :: chem_is_active
94 : !-----------------------------------------------------------------------
95 63688 : chem_is_active = .false.
96 63688 : end function chem_is_active
97 :
98 : !================================================================================================
99 :
100 10800 : function chem_implements_cnst(name)
101 : !-----------------------------------------------------------------------
102 : !
103 : ! Purpose: return true if specified constituent is implemented by this package
104 : !
105 : ! Author: B. Eaton
106 : !
107 : !-----------------------------------------------------------------------
108 : implicit none
109 : !-----------------------------Arguments---------------------------------
110 :
111 : character(len=*), intent(in) :: name ! constituent name
112 : logical :: chem_implements_cnst ! return value
113 :
114 10800 : chem_implements_cnst = .false.
115 :
116 10800 : end function chem_implements_cnst
117 :
118 : !===============================================================================
119 :
120 1024 : subroutine chem_init(phys_state, pbuf2d)
121 : !-----------------------------------------------------------------------
122 : !
123 : ! Purpose: initialize parameterized greenhouse gas chemistry
124 : ! (declare history variables)
125 : !
126 : !-----------------------------------------------------------------------
127 : use physics_buffer, only : physics_buffer_desc
128 : use aero_model, only : aero_model_init
129 :
130 : type(physics_state), intent(in):: phys_state(begchunk:endchunk)
131 : type(physics_buffer_desc), pointer :: pbuf2d(:,:)
132 :
133 : ! for prescribed aerosols
134 1024 : call aero_model_init(pbuf2d)
135 :
136 1024 : end subroutine chem_init
137 :
138 : !===============================================================================
139 :
140 10752 : subroutine chem_timestep_init(phys_state, pbuf2d)
141 1024 : use physics_buffer, only : physics_buffer_desc
142 : use time_manager, only: get_curr_date, get_perp_date, get_curr_calday, &
143 : is_perpetual
144 : type(physics_state), intent(in):: phys_state(begchunk:endchunk)
145 : type(physics_buffer_desc), pointer :: pbuf2d(:,:)
146 :
147 :
148 :
149 10752 : end subroutine chem_timestep_init
150 :
151 : !===============================================================================
152 :
153 0 : subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dt, pbuf, fh2o)
154 10752 : use physics_buffer, only: physics_buffer_desc
155 : use cam_history, only: outfld
156 : use camsrfexch, only: cam_in_t, cam_out_t
157 : !-----------------------------------------------------------------------
158 : !
159 : ! Arguments:
160 : !
161 : real(r8), intent(in) :: dt ! time step
162 : type(physics_state), intent(in) :: state ! Physics state variables
163 : type(physics_ptend), intent(out) :: ptend ! indivdual parameterization tendencies
164 : type(cam_in_t), intent(inout) :: cam_in
165 : type(cam_out_t), intent(in) :: cam_out
166 : type(physics_buffer_desc), pointer :: pbuf(:)
167 : real(r8), optional, intent(out) :: fh2o(pcols) ! h2o flux to balance source from chemistry
168 :
169 0 : return
170 0 : end subroutine chem_timestep_tend
171 :
172 : !===============================================================================
173 :
174 0 : subroutine chem_init_cnst(name, latvals, lonvals, mask, q)
175 :
176 : character(len=*), intent(in) :: name ! constituent name
177 : real(r8), intent(in) :: latvals(:) ! lat in degrees (ncol)
178 : real(r8), intent(in) :: lonvals(:) ! lon in degrees (ncol)
179 : logical, intent(in) :: mask(:) ! Only initialize where .true.
180 : real(r8), intent(out) :: q(:,:) ! kg tracer/kg dry air (gcol, plev
181 :
182 0 : return
183 0 : end subroutine chem_init_cnst
184 :
185 : !===============================================================================
186 1024 : subroutine chem_final
187 1024 : return
188 : end subroutine chem_final
189 : !===============================================================================
190 0 : subroutine chem_write_restart_bin( nrg )
191 : implicit none
192 : integer,intent(in) :: nrg ! Unit number
193 0 : return
194 : end subroutine chem_write_restart_bin
195 : !===============================================================================
196 0 : subroutine chem_read_restart_bin( nrg )
197 : implicit none
198 : integer,intent(in) :: nrg ! Unit number
199 0 : return
200 : end subroutine chem_read_restart_bin
201 : !===============================================================================
202 1024 : subroutine chem_write_restart_pio( File )
203 : use pio, only : file_desc_t
204 : type(file_desc_t) :: File
205 1024 : return
206 : end subroutine chem_write_restart_pio
207 : !===============================================================================
208 512 : subroutine chem_read_restart_pio( File )
209 : use pio, only : file_desc_t
210 : type(file_desc_t) :: File
211 512 : return
212 : end subroutine chem_read_restart_pio
213 : !===============================================================================
214 1024 : subroutine chem_init_restart(File)
215 : use pio, only : file_desc_t
216 : type(file_desc_t) :: File
217 1024 : return
218 : end subroutine chem_init_restart
219 : !================================================================================
220 0 : subroutine chem_reset_fluxes( fptr, cam_in )
221 : use camsrfexch, only : cam_in_t
222 :
223 : real(r8), pointer :: fptr(:,:) ! pointer into array data
224 : type(cam_in_t), intent(inout) :: cam_in(begchunk:endchunk)
225 :
226 0 : end subroutine chem_reset_fluxes
227 : !================================================================================
228 63688 : subroutine chem_emissions( state, cam_in, pbuf )
229 0 : use camsrfexch, only: cam_in_t
230 : use physics_buffer, only: physics_buffer_desc
231 :
232 : ! Arguments:
233 :
234 : type(physics_state), intent(in) :: state ! Physics state variables
235 : type(cam_in_t), intent(inout) :: cam_in ! import state
236 : type(physics_buffer_desc), pointer :: pbuf(:) ! Physics buffer in chunk, for HEMCO
237 :
238 63688 : end subroutine chem_emissions
239 : end module chemistry
|