Register the OCMIP2 CFC tracers to be used with MOM and read the parameters that are used with this tracer package.
93 type(hor_index_type),
intent(in) :: HI
94 type(verticalGrid_type),
intent(in) :: GV
95 type(param_file_type),
intent(in) :: param_file
96 type(OCMIP2_CFC_CS),
pointer :: CS
98 type(tracer_registry_type), &
100 type(MOM_restart_CS),
pointer :: restart_CS
105 character(len=40) :: mdl =
"MOM_OCMIP2_CFC"
106 character(len=200) :: inputdir
108 #include "version_variable.h"
109 real,
dimension(:,:,:),
pointer :: tr_ptr => null()
110 real :: a11_dflt(4), a12_dflt(4)
111 real :: d11_dflt(4), d12_dflt(4)
112 real :: e11_dflt(3), e12_dflt(3)
113 character(len=48) :: flux_units
114 logical :: register_OCMIP2_CFC
115 integer :: isd, ied, jsd, jed, nz, m
117 isd = hi%isd ; ied = hi%ied ; jsd = hi%jsd ; jed = hi%jed ; nz = gv%ke
119 if (
associated(cs))
then
120 call mom_error(warning,
"register_OCMIP2_CFC called with an "// &
121 "associated control structure.")
128 call flux_init_ocmip2_cfc(cs, verbosity=3)
129 if ((cs%ind_cfc_11_flux < 0) .or. (cs%ind_cfc_11_flux < 0))
then
132 call mom_error(warning,
"CFCs are currently only set up to be run in " // &
133 " coupled model configurations, and will be disabled.")
135 register_ocmip2_cfc = .false.
140 call log_version(param_file, mdl, version,
"")
141 call get_param(param_file, mdl,
"CFC_IC_FILE", cs%IC_file, &
142 "The file in which the CFC initial values can be "//&
143 "found, or an empty string for internal initialization.", &
145 if ((len_trim(cs%IC_file) > 0) .and. (scan(cs%IC_file,
'/') == 0))
then
147 call get_param(param_file, mdl,
"INPUTDIR", inputdir, default=
".")
148 cs%IC_file = trim(slasher(inputdir))//trim(cs%IC_file)
149 call log_param(param_file, mdl,
"INPUTDIR/CFC_IC_FILE", cs%IC_file)
151 call get_param(param_file, mdl,
"CFC_IC_FILE_IS_Z", cs%Z_IC_file, &
152 "If true, CFC_IC_FILE is in depth space, not layer space", &
154 call get_param(param_file, mdl,
"TRACERS_MAY_REINIT", cs%tracers_may_reinit, &
155 "If true, tracers may go through the initialization code "//&
156 "if they are not found in the restart files. Otherwise "//&
157 "it is a fatal error if tracers are not found in the "//&
158 "restart files of a restarted run.", default=.false.)
162 cs%CFC11_name =
"CFC11" ; cs%CFC12_name =
"CFC12"
163 cs%CFC11_desc = var_desc(cs%CFC11_name,
"mol m-3",
"CFC-11 Concentration", caller=mdl)
164 cs%CFC12_desc = var_desc(cs%CFC12_name,
"mol m-3",
"CFC-12 Concentration", caller=mdl)
165 if (gv%Boussinesq)
then ; flux_units =
"mol s-1"
166 else ; flux_units =
"mol m-3 kg s-1" ;
endif
168 allocate(cs%CFC11(isd:ied,jsd:jed,nz)) ; cs%CFC11(:,:,:) = 0.0
169 allocate(cs%CFC12(isd:ied,jsd:jed,nz)) ; cs%CFC12(:,:,:) = 0.0
175 call register_tracer(tr_ptr, tr_reg, param_file, hi, gv, &
176 tr_desc=cs%CFC11_desc, registry_diags=.true., &
177 flux_units=flux_units, &
178 restart_cs=restart_cs, mandatory=.not.cs%tracers_may_reinit)
181 call register_tracer(tr_ptr, tr_reg, param_file, hi, gv, &
182 tr_desc=cs%CFC12_desc, registry_diags=.true., &
183 flux_units=flux_units, &
184 restart_cs=restart_cs, mandatory=.not.cs%tracers_may_reinit)
192 a11_dflt(:) = (/ 3501.8, -210.31, 6.1851, -0.07513 /)
193 a12_dflt(:) = (/ 3845.4, -228.95, 6.1908, -0.06743 /)
194 call get_param(param_file, mdl,
"CFC11_A1", cs%a1_11, &
195 "A coefficient in the Schmidt number of CFC11.", &
196 units=
"nondim", default=a11_dflt(1))
197 call get_param(param_file, mdl,
"CFC11_A2", cs%a2_11, &
198 "A coefficient in the Schmidt number of CFC11.", &
199 units=
"degC-1", default=a11_dflt(2))
200 call get_param(param_file, mdl,
"CFC11_A3", cs%a3_11, &
201 "A coefficient in the Schmidt number of CFC11.", &
202 units=
"degC-2", default=a11_dflt(3))
203 call get_param(param_file, mdl,
"CFC11_A4", cs%a4_11, &
204 "A coefficient in the Schmidt number of CFC11.", &
205 units=
"degC-3", default=a11_dflt(4))
207 call get_param(param_file, mdl,
"CFC12_A1", cs%a1_12, &
208 "A coefficient in the Schmidt number of CFC12.", &
209 units=
"nondim", default=a12_dflt(1))
210 call get_param(param_file, mdl,
"CFC12_A2", cs%a2_12, &
211 "A coefficient in the Schmidt number of CFC12.", &
212 units=
"degC-1", default=a12_dflt(2))
213 call get_param(param_file, mdl,
"CFC12_A3", cs%a3_12, &
214 "A coefficient in the Schmidt number of CFC12.", &
215 units=
"degC-2", default=a12_dflt(3))
216 call get_param(param_file, mdl,
"CFC12_A4", cs%a4_12, &
217 "A coefficient in the Schmidt number of CFC12.", &
218 units=
"degC-3", default=a12_dflt(4))
224 d11_dflt(:) = (/ -229.9261, 319.6552, 119.4471, -1.39165 /)
225 e11_dflt(:) = (/ -0.142382, 0.091459, -0.0157274 /)
226 d12_dflt(:) = (/ -218.0971, 298.9702, 113.8049, -1.39165 /)
227 e12_dflt(:) = (/ -0.143566, 0.091015, -0.0153924 /)
229 call get_param(param_file, mdl,
"CFC11_D1", cs%d1_11, &
230 "A coefficient in the solubility of CFC11.", &
231 units=
"none", default=d11_dflt(1))
232 call get_param(param_file, mdl,
"CFC11_D2", cs%d2_11, &
233 "A coefficient in the solubility of CFC11.", &
234 units=
"hK", default=d11_dflt(2))
235 call get_param(param_file, mdl,
"CFC11_D3", cs%d3_11, &
236 "A coefficient in the solubility of CFC11.", &
237 units=
"none", default=d11_dflt(3))
238 call get_param(param_file, mdl,
"CFC11_D4", cs%d4_11, &
239 "A coefficient in the solubility of CFC11.", &
240 units=
"hK-2", default=d11_dflt(4))
241 call get_param(param_file, mdl,
"CFC11_E1", cs%e1_11, &
242 "A coefficient in the solubility of CFC11.", &
243 units=
"PSU-1", default=e11_dflt(1))
244 call get_param(param_file, mdl,
"CFC11_E2", cs%e2_11, &
245 "A coefficient in the solubility of CFC11.", &
246 units=
"PSU-1 hK-1", default=e11_dflt(2))
247 call get_param(param_file, mdl,
"CFC11_E3", cs%e3_11, &
248 "A coefficient in the solubility of CFC11.", &
249 units=
"PSU-1 hK-2", default=e11_dflt(3))
251 call get_param(param_file, mdl,
"CFC12_D1", cs%d1_12, &
252 "A coefficient in the solubility of CFC12.", &
253 units=
"none", default=d12_dflt(1))
254 call get_param(param_file, mdl,
"CFC12_D2", cs%d2_12, &
255 "A coefficient in the solubility of CFC12.", &
256 units=
"hK", default=d12_dflt(2))
257 call get_param(param_file, mdl,
"CFC12_D3", cs%d3_12, &
258 "A coefficient in the solubility of CFC12.", &
259 units=
"none", default=d12_dflt(3))
260 call get_param(param_file, mdl,
"CFC12_D4", cs%d4_12, &
261 "A coefficient in the solubility of CFC12.", &
262 units=
"hK-2", default=d12_dflt(4))
263 call get_param(param_file, mdl,
"CFC12_E1", cs%e1_12, &
264 "A coefficient in the solubility of CFC12.", &
265 units=
"PSU-1", default=e12_dflt(1))
266 call get_param(param_file, mdl,
"CFC12_E2", cs%e2_12, &
267 "A coefficient in the solubility of CFC12.", &
268 units=
"PSU-1 hK-1", default=e12_dflt(2))
269 call get_param(param_file, mdl,
"CFC12_E3", cs%e3_12, &
270 "A coefficient in the solubility of CFC12.", &
271 units=
"PSU-1 hK-2", default=e12_dflt(3))
274 cs%restart_CSp => restart_cs
276 register_ocmip2_cfc = .true.