MOM6
MOM_tracer_flow_control.F90
1 !> Orchestrates the registration and calling of tracer packages
3 
4 ! This file is part of MOM6. See LICENSE.md for the license.
5 
6 use mom_diag_mediator, only : time_type, diag_ctrl
7 use mom_error_handler, only : mom_error, fatal, warning
8 use mom_file_parser, only : get_param, log_version, param_file_type, close_param_file
9 use mom_forcing_type, only : forcing, optics_type
10 use mom_get_input, only : get_mom_input
11 use mom_grid, only : ocean_grid_type
12 use mom_hor_index, only : hor_index_type
14 use mom_restart, only : mom_restart_cs
15 use mom_sponge, only : sponge_cs
16 use mom_ale_sponge, only : ale_sponge_cs
21 #include <MOM_memory.h>
22 
23 ! Add references to other user-provide tracer modules here.
24 use user_tracer_example, only : tracer_column_physics, user_initialize_tracer, user_tracer_stock
25 use user_tracer_example, only : user_register_tracer_example, user_tracer_surface_state
26 use user_tracer_example, only : user_tracer_example_end, user_tracer_example_cs
27 use dome_tracer, only : register_dome_tracer, initialize_dome_tracer
28 use dome_tracer, only : dome_tracer_column_physics, dome_tracer_surface_state
29 use dome_tracer, only : dome_tracer_end, dome_tracer_cs
30 use isomip_tracer, only : register_isomip_tracer, initialize_isomip_tracer
31 use isomip_tracer, only : isomip_tracer_column_physics, isomip_tracer_surface_state
32 use isomip_tracer, only : isomip_tracer_end, isomip_tracer_cs
33 use rgc_tracer, only : register_rgc_tracer, initialize_rgc_tracer
34 use rgc_tracer, only : rgc_tracer_column_physics
35 use rgc_tracer, only : rgc_tracer_end, rgc_tracer_cs
36 use ideal_age_example, only : register_ideal_age_tracer, initialize_ideal_age_tracer
37 use ideal_age_example, only : ideal_age_tracer_column_physics, ideal_age_tracer_surface_state
38 use ideal_age_example, only : ideal_age_stock, ideal_age_example_end, ideal_age_tracer_cs
39 use regional_dyes, only : register_dye_tracer, initialize_dye_tracer
40 use regional_dyes, only : dye_tracer_column_physics, dye_tracer_surface_state
41 use regional_dyes, only : dye_stock, regional_dyes_end, dye_tracer_cs
42 use mom_ocmip2_cfc, only : register_ocmip2_cfc, initialize_ocmip2_cfc, flux_init_ocmip2_cfc
43 use mom_ocmip2_cfc, only : ocmip2_cfc_column_physics, ocmip2_cfc_surface_state
44 use mom_ocmip2_cfc, only : ocmip2_cfc_stock, ocmip2_cfc_end, ocmip2_cfc_cs
45 use oil_tracer, only : register_oil_tracer, initialize_oil_tracer
46 use oil_tracer, only : oil_tracer_column_physics, oil_tracer_surface_state
47 use oil_tracer, only : oil_stock, oil_tracer_end, oil_tracer_cs
48 use advection_test_tracer, only : register_advection_test_tracer, initialize_advection_test_tracer
49 use advection_test_tracer, only : advection_test_tracer_column_physics, advection_test_tracer_surface_state
50 use advection_test_tracer, only : advection_test_stock, advection_test_tracer_end, advection_test_tracer_cs
51 use dyed_obc_tracer, only : register_dyed_obc_tracer, initialize_dyed_obc_tracer
52 use dyed_obc_tracer, only : dyed_obc_tracer_column_physics
53 use dyed_obc_tracer, only : dyed_obc_tracer_end, dyed_obc_tracer_cs
54 use mom_generic_tracer, only : register_mom_generic_tracer, initialize_mom_generic_tracer
55 use mom_generic_tracer, only : mom_generic_tracer_column_physics, mom_generic_tracer_surface_state
56 use mom_generic_tracer, only : end_mom_generic_tracer, mom_generic_tracer_get, mom_generic_flux_init
57 use mom_generic_tracer, only : mom_generic_tracer_stock, mom_generic_tracer_min_max, mom_generic_tracer_cs
58 use pseudo_salt_tracer, only : register_pseudo_salt_tracer, initialize_pseudo_salt_tracer
59 use pseudo_salt_tracer, only : pseudo_salt_tracer_column_physics, pseudo_salt_tracer_surface_state
60 use pseudo_salt_tracer, only : pseudo_salt_stock, pseudo_salt_tracer_end, pseudo_salt_tracer_cs
61 use boundary_impulse_tracer, only : register_boundary_impulse_tracer, initialize_boundary_impulse_tracer
62 use boundary_impulse_tracer, only : boundary_impulse_tracer_column_physics, boundary_impulse_tracer_surface_state
63 use boundary_impulse_tracer, only : boundary_impulse_stock, boundary_impulse_tracer_end
65 
66 implicit none ; private
67 
68 public call_tracer_register, tracer_flow_control_init, call_tracer_set_forcing
69 public call_tracer_column_fns, call_tracer_surface_state, call_tracer_stocks
70 public call_tracer_flux_init, get_chl_from_model, tracer_flow_control_end
71 
72 !> The control structure for orchestrating the calling of tracer packages
73 type, public :: tracer_flow_control_cs ; private
74  logical :: use_user_tracer_example = .false. !< If true, use the USER_tracer_example package
75  logical :: use_dome_tracer = .false. !< If true, use the DOME_tracer package
76  logical :: use_isomip_tracer = .false. !< If true, use the ISOMPE_tracer package
77  logical :: use_rgc_tracer =.false. !< If true, use the RGC_tracer package
78  logical :: use_ideal_age = .false. !< If true, use the ideal age tracer package
79  logical :: use_regional_dyes = .false. !< If true, use the regional dyes tracer package
80  logical :: use_oil = .false. !< If true, use the oil tracer package
81  logical :: use_advection_test_tracer = .false. !< If true, use the advection_test_tracer package
82  logical :: use_ocmip2_cfc = .false. !< If true, use the OCMIP2_CFC tracer package
83  logical :: use_mom_generic_tracer = .false. !< If true, use the MOM_generic_tracer packages
84  logical :: use_pseudo_salt_tracer = .false. !< If true, use the psuedo_salt tracer package
85  logical :: use_boundary_impulse_tracer = .false. !< If true, use the boundary impulse tracer package
86  logical :: use_dyed_obc_tracer = .false. !< If true, use the dyed OBC tracer package
87  !>@{ Pointers to the control strucures for the tracer packages
88  type(user_tracer_example_cs), pointer :: user_tracer_example_csp => null()
89  type(dome_tracer_cs), pointer :: dome_tracer_csp => null()
90  type(isomip_tracer_cs), pointer :: isomip_tracer_csp => null()
91  type(rgc_tracer_cs), pointer :: rgc_tracer_csp => null()
92  type(ideal_age_tracer_cs), pointer :: ideal_age_tracer_csp => null()
93  type(dye_tracer_cs), pointer :: dye_tracer_csp => null()
94  type(oil_tracer_cs), pointer :: oil_tracer_csp => null()
95  type(advection_test_tracer_cs), pointer :: advection_test_tracer_csp => null()
96  type(ocmip2_cfc_cs), pointer :: ocmip2_cfc_csp => null()
97  type(mom_generic_tracer_cs), pointer :: mom_generic_tracer_csp => null()
98  type(pseudo_salt_tracer_cs), pointer :: pseudo_salt_tracer_csp => null()
99  type(boundary_impulse_tracer_cs), pointer :: boundary_impulse_tracer_csp => null()
100  type(dyed_obc_tracer_cs), pointer :: dyed_obc_tracer_csp => null()
101  !>@}
102 end type tracer_flow_control_cs
103 
104 contains
105 
106 !> This subroutine carries out a series of calls to initialize the air-sea
107 !! tracer fluxes, but it does not record the generated indicies, and it may
108 !! be called _before_ the ocean model has been initialized and may be called
109 !! on non-ocean PEs. It is not necessary to call this routine for ocean-only
110 !! runs, because the same calls are made again inside of the routines called by
111 !! call_tracer_register
112 subroutine call_tracer_flux_init(verbosity)
113  integer, optional, intent(in) :: verbosity !< A 0-9 integer indicating a level of verbosity.
114 
115  type(param_file_type) :: param_file ! A structure to parse for run-time parameters
116  character(len=40) :: mdl = "call_tracer_flux_init" ! This module's name.
117  logical :: use_ocmip_cfcs, use_mom_generic_tracer
118 
119  ! Determine which tracer routines with tracer fluxes are to be called. Note
120  ! that not every tracer package is required to have a flux_init call.
121  call get_mom_input(param_file, check_params=.false.)
122 
123  call get_param(param_file, mdl, "USE_OCMIP2_CFC", use_ocmip_cfcs, &
124  default=.false., do_not_log=.true.)
125  call get_param(param_file, mdl, "USE_generic_tracer", use_mom_generic_tracer,&
126  default=.false., do_not_log=.true.)
127  call close_param_file(param_file, quiet_close=.true.)
128 
129  if (use_ocmip_cfcs) call flux_init_ocmip2_cfc(verbosity=verbosity)
130  if (use_mom_generic_tracer) then
131  call mom_generic_flux_init(verbosity=verbosity)
132  endif
133 
134 end subroutine call_tracer_flux_init
135 
136 ! The following 5 subroutines and associated definitions provide the machinery to register and call
137 ! the subroutines that initialize tracers and apply vertical column processes to tracers.
138 
139 !> This subroutine determines which tracer packages are to be used and does the calls to
140 !! register their tracers to be advected, diffused, and read from restarts.
141 subroutine call_tracer_register(HI, GV, US, param_file, CS, tr_Reg, restart_CS)
142  type(hor_index_type), intent(in) :: hi !< A horizontal index type structure.
143  type(verticalgrid_type), intent(in) :: gv !< The ocean's vertical grid structure.
144  type(unit_scale_type), intent(in) :: us !< A dimensional unit scaling type
145  type(param_file_type), intent(in) :: param_file !< A structure to parse for run-time
146  !! parameters.
147  type(tracer_flow_control_cs), pointer :: cs !< A pointer that is set to point to the
148  !! control structure for this module.
149  type(tracer_registry_type), pointer :: tr_reg !< A pointer that is set to point to the
150  !! control structure for the tracer
151  !! advection and diffusion module.
152  type(mom_restart_cs), pointer :: restart_cs !< A pointer to the restart control
153  !! structure.
154 
155 
156  ! This include declares and sets the variable "version".
157 # include "version_variable.h"
158  character(len=40) :: mdl = "MOM_tracer_flow_control" ! This module's name.
159 
160  if (associated(cs)) then
161  call mom_error(warning, "call_tracer_register called with an associated "// &
162  "control structure.")
163  return
164  else ; allocate(cs) ; endif
165 
166  ! Read all relevant parameters and write them to the model log.
167  call log_version(param_file, mdl, version, "")
168  call get_param(param_file, mdl, "USE_USER_TRACER_EXAMPLE", &
169  cs%use_USER_tracer_example, &
170  "If true, use the USER_tracer_example tracer package.", &
171  default=.false.)
172  call get_param(param_file, mdl, "USE_DOME_TRACER", cs%use_DOME_tracer, &
173  "If true, use the DOME_tracer tracer package.", &
174  default=.false.)
175  call get_param(param_file, mdl, "USE_ISOMIP_TRACER", cs%use_ISOMIP_tracer, &
176  "If true, use the ISOMIP_tracer tracer package.", &
177  default=.false.)
178  call get_param(param_file, mdl, "USE_RGC_TRACER", cs%use_RGC_tracer, &
179  "If true, use the RGC_tracer tracer package.", &
180  default=.false.)
181  call get_param(param_file, mdl, "USE_IDEAL_AGE_TRACER", cs%use_ideal_age, &
182  "If true, use the ideal_age_example tracer package.", &
183  default=.false.)
184  call get_param(param_file, mdl, "USE_REGIONAL_DYES", cs%use_regional_dyes, &
185  "If true, use the regional_dyes tracer package.", &
186  default=.false.)
187  call get_param(param_file, mdl, "USE_OIL_TRACER", cs%use_oil, &
188  "If true, use the oil_tracer tracer package.", &
189  default=.false.)
190  call get_param(param_file, mdl, "USE_ADVECTION_TEST_TRACER", cs%use_advection_test_tracer, &
191  "If true, use the advection_test_tracer tracer package.", &
192  default=.false.)
193  call get_param(param_file, mdl, "USE_OCMIP2_CFC", cs%use_OCMIP2_CFC, &
194  "If true, use the MOM_OCMIP2_CFC tracer package.", &
195  default=.false.)
196  call get_param(param_file, mdl, "USE_generic_tracer", cs%use_MOM_generic_tracer, &
197  "If true and _USE_GENERIC_TRACER is defined as a "//&
198  "preprocessor macro, use the MOM_generic_tracer packages.", &
199  default=.false.)
200  call get_param(param_file, mdl, "USE_PSEUDO_SALT_TRACER", cs%use_pseudo_salt_tracer, &
201  "If true, use the pseudo salt tracer, typically run as a diagnostic.", &
202  default=.false.)
203  call get_param(param_file, mdl, "USE_BOUNDARY_IMPULSE_TRACER", cs%use_boundary_impulse_tracer, &
204  "If true, use the boundary impulse tracer.", &
205  default=.false.)
206  call get_param(param_file, mdl, "USE_DYED_OBC_TRACER", cs%use_dyed_obc_tracer, &
207  "If true, use the dyed_obc_tracer tracer package.", &
208  default=.false.)
209 
210 ! Add other user-provided calls to register tracers for restarting here. Each
211 ! tracer package registration call returns a logical false if it cannot be run
212 ! for some reason. This then overrides the run-time selection from above.
213  if (cs%use_USER_tracer_example) cs%use_USER_tracer_example = &
214  user_register_tracer_example(hi, gv, param_file, cs%USER_tracer_example_CSp, &
215  tr_reg, restart_cs)
216  if (cs%use_DOME_tracer) cs%use_DOME_tracer = &
217  register_dome_tracer(hi, gv, param_file, cs%DOME_tracer_CSp, &
218  tr_reg, restart_cs)
219  if (cs%use_ISOMIP_tracer) cs%use_ISOMIP_tracer = &
220  register_isomip_tracer(hi, gv, param_file, cs%ISOMIP_tracer_CSp, &
221  tr_reg, restart_cs)
222  if (cs%use_RGC_tracer) cs%use_RGC_tracer = &
223  register_rgc_tracer(hi, gv, param_file, cs%RGC_tracer_CSp, &
224  tr_reg, restart_cs)
225  if (cs%use_ideal_age) cs%use_ideal_age = &
226  register_ideal_age_tracer(hi, gv, param_file, cs%ideal_age_tracer_CSp, &
227  tr_reg, restart_cs)
228  if (cs%use_regional_dyes) cs%use_regional_dyes = &
229  register_dye_tracer(hi, gv, us, param_file, cs%dye_tracer_CSp, &
230  tr_reg, restart_cs)
231  if (cs%use_oil) cs%use_oil = &
232  register_oil_tracer(hi, gv, us, param_file, cs%oil_tracer_CSp, &
233  tr_reg, restart_cs)
234  if (cs%use_advection_test_tracer) cs%use_advection_test_tracer = &
235  register_advection_test_tracer(hi, gv, param_file, cs%advection_test_tracer_CSp, &
236  tr_reg, restart_cs)
237  if (cs%use_OCMIP2_CFC) cs%use_OCMIP2_CFC = &
238  register_ocmip2_cfc(hi, gv, param_file, cs%OCMIP2_CFC_CSp, &
239  tr_reg, restart_cs)
240  if (cs%use_MOM_generic_tracer) cs%use_MOM_generic_tracer = &
241  register_mom_generic_tracer(hi, gv, param_file, cs%MOM_generic_tracer_CSp, &
242  tr_reg, restart_cs)
243  if (cs%use_pseudo_salt_tracer) cs%use_pseudo_salt_tracer = &
244  register_pseudo_salt_tracer(hi, gv, param_file, cs%pseudo_salt_tracer_CSp, &
245  tr_reg, restart_cs)
246  if (cs%use_boundary_impulse_tracer) cs%use_boundary_impulse_tracer = &
247  register_boundary_impulse_tracer(hi, gv, param_file, cs%boundary_impulse_tracer_CSp, &
248  tr_reg, restart_cs)
249  if (cs%use_dyed_obc_tracer) cs%use_dyed_obc_tracer = &
250  register_dyed_obc_tracer(hi, gv, param_file, cs%dyed_obc_tracer_CSp, &
251  tr_reg, restart_cs)
252 
253 
254 end subroutine call_tracer_register
255 
256 !> This subroutine calls all registered tracer initialization
257 !! subroutines.
258 subroutine tracer_flow_control_init(restart, day, G, GV, US, h, param_file, diag, OBC, &
259  CS, sponge_CSp, ALE_sponge_CSp, tv)
260  logical, intent(in) :: restart !< 1 if the fields have already
261  !! been read from a restart file.
262  type(time_type), target, intent(in) :: day !< Time of the start of the run.
263  type(ocean_grid_type), intent(inout) :: g !< The ocean's grid structure.
264  type(verticalgrid_type), intent(in) :: gv !< The ocean's vertical grid
265  !! structure.
266  type(unit_scale_type), intent(in) :: us !< A dimensional unit scaling type
267  real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), &
268  intent(in) :: h !< Layer thicknesses [H ~> m or kg m-2]
269  type(param_file_type), intent(in) :: param_file !< A structure to parse for
270  !! run-time parameters
271  type(diag_ctrl), target, intent(in) :: diag !< A structure that is used to
272  !! regulate diagnostic output.
273  type(ocean_obc_type), pointer :: obc !< This open boundary condition
274  !! type specifies whether, where,
275  !! and what open boundary
276  !! conditions are used.
277  type(tracer_flow_control_cs), pointer :: cs !< The control structure returned
278  !! by a previous call to
279  !! call_tracer_register.
280  type(sponge_cs), pointer :: sponge_csp !< A pointer to the control
281  !! structure for the sponges, if they are in use.
282  !! Otherwise this may be unassociated.
283  type(ale_sponge_cs), pointer :: ale_sponge_csp !< A pointer to the control
284  !! structure for the ALE sponges, if they are in use.
285  !! Otherwise this may be unassociated.
286  type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various
287  !! thermodynamic variables
288 
289  if (.not. associated(cs)) call mom_error(fatal, "tracer_flow_control_init: "// &
290  "Module must be initialized via call_tracer_register before it is used.")
291 
292 ! Add other user-provided calls here.
293  if (cs%use_USER_tracer_example) &
294  call user_initialize_tracer(restart, day, g, gv, h, diag, obc, cs%USER_tracer_example_CSp, &
295  sponge_csp)
296  if (cs%use_DOME_tracer) &
297  call initialize_dome_tracer(restart, day, g, gv, us, h, diag, obc, cs%DOME_tracer_CSp, &
298  sponge_csp, param_file)
299  if (cs%use_ISOMIP_tracer) &
300  call initialize_isomip_tracer(restart, day, g, gv, h, diag, obc, cs%ISOMIP_tracer_CSp, &
301  ale_sponge_csp)
302  if (cs%use_RGC_tracer) &
303  call initialize_rgc_tracer(restart, day, g, gv, h, diag, obc, &
304  cs%RGC_tracer_CSp, sponge_csp, ale_sponge_csp)
305  if (cs%use_ideal_age) &
306  call initialize_ideal_age_tracer(restart, day, g, gv, us, h, diag, obc, cs%ideal_age_tracer_CSp, &
307  sponge_csp)
308  if (cs%use_regional_dyes) &
309  call initialize_dye_tracer(restart, day, g, gv, h, diag, obc, cs%dye_tracer_CSp, &
310  sponge_csp)
311  if (cs%use_oil) &
312  call initialize_oil_tracer(restart, day, g, gv, us, h, diag, obc, cs%oil_tracer_CSp, &
313  sponge_csp)
314  if (cs%use_advection_test_tracer) &
315  call initialize_advection_test_tracer(restart, day, g, gv, h, diag, obc, cs%advection_test_tracer_CSp, &
316  sponge_csp)
317  if (cs%use_OCMIP2_CFC) &
318  call initialize_ocmip2_cfc(restart, day, g, gv, us, h, diag, obc, cs%OCMIP2_CFC_CSp, &
319  sponge_csp)
320  if (cs%use_MOM_generic_tracer) &
321  call initialize_mom_generic_tracer(restart, day, g, gv, us, h, param_file, diag, obc, &
322  cs%MOM_generic_tracer_CSp, sponge_csp, ale_sponge_csp)
323  if (cs%use_pseudo_salt_tracer) &
324  call initialize_pseudo_salt_tracer(restart, day, g, gv, h, diag, obc, cs%pseudo_salt_tracer_CSp, &
325  sponge_csp, tv)
326  if (cs%use_boundary_impulse_tracer) &
327  call initialize_boundary_impulse_tracer(restart, day, g, gv, h, diag, obc, cs%boundary_impulse_tracer_CSp, &
328  sponge_csp, tv)
329  if (cs%use_dyed_obc_tracer) &
330  call initialize_dyed_obc_tracer(restart, day, g, gv, h, diag, obc, cs%dyed_obc_tracer_CSp)
331 
332 end subroutine tracer_flow_control_init
333 
334 !> This subroutine extracts the chlorophyll concentrations from the model state, if possible
335 subroutine get_chl_from_model(Chl_array, G, CS)
336  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure.
337  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), &
338  intent(out) :: chl_array !< The array in which to store the model's
339  !! Chlorophyll-A concentrations in mg m-3.
340  type(tracer_flow_control_cs), pointer :: cs !< The control structure returned by a
341  !! previous call to call_tracer_register.
342 
343  if (cs%use_MOM_generic_tracer) then
344  call mom_generic_tracer_get('chl', 'field', chl_array, cs%MOM_generic_tracer_CSp)
345  else
346  call mom_error(fatal, "get_chl_from_model was called in a configuration "// &
347  "that is unable to provide a sensible model-based value.\n"// &
348  "CS%use_MOM_generic_tracer is false and no other viable options are on.")
349  endif
350 
351 end subroutine get_chl_from_model
352 
353 !> This subroutine calls the individual tracer modules' subroutines to
354 !! specify or read quantities related to their surface forcing.
355 subroutine call_tracer_set_forcing(sfc_state, fluxes, day_start, day_interval, G, CS)
356 
357  type(surface), intent(inout) :: sfc_state !< A structure containing fields that
358  !! describe the surface state of the
359  !! ocean.
360  type(forcing), intent(inout) :: fluxes !< A structure containing pointers to any
361  !! possible forcing fields. Unused fields
362  !! have NULL ptrs.
363  type(time_type), intent(in) :: day_start !< Start time of the fluxes.
364  type(time_type), intent(in) :: day_interval !< Length of time over which these
365  !! fluxes will be applied.
366  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure.
367  type(tracer_flow_control_cs), pointer :: cs !< The control structure returned by a
368  !! previous call to call_tracer_register.
369 
370  if (.not. associated(cs)) call mom_error(fatal, "call_tracer_set_forcing"// &
371  "Module must be initialized via call_tracer_register before it is used.")
372 ! if (CS%use_ideal_age) &
373 ! call ideal_age_tracer_set_forcing(sfc_state, fluxes, day_start, day_interval, &
374 ! G, CS%ideal_age_tracer_CSp)
375 
376 end subroutine call_tracer_set_forcing
377 
378 !> This subroutine calls all registered tracer column physics subroutines.
379 subroutine call_tracer_column_fns(h_old, h_new, ea, eb, fluxes, Hml, dt, G, GV, US, tv, optics, CS, &
380  debug, evap_CFL_limit, minimum_forcing_depth)
381  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure.
382  type(verticalgrid_type), intent(in) :: gv !< The ocean's vertical grid structure.
383  real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: h_old !< Layer thickness before entrainment
384  !! [H ~> m or kg m-2].
385  real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: h_new !< Layer thickness after entrainment
386  !! [H ~> m or kg m-2].
387  real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: ea !< an array to which the amount of
388  !! fluid entrained from the layer above during this call
389  !! will be added [H ~> m or kg m-2].
390  real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: eb !< an array to which the amount of
391  !! fluid entrained from the layer below during this call
392  !! will be added [H ~> m or kg m-2].
393  type(forcing), intent(in) :: fluxes !< A structure containing pointers to
394  !! any possible forcing fields.
395  !! Unused fields have NULL ptrs.
396  real, dimension(SZI_(G),SZJ_(G)), intent(in) :: hml !< Mixed layer depth [Z ~> m]
397  real, intent(in) :: dt !< The amount of time covered by this
398  !! call [T ~> s]
399  type(unit_scale_type), intent(in) :: us !< A dimensional unit scaling type
400  type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various
401  !! thermodynamic variables.
402  type(optics_type), pointer :: optics !< The structure containing optical
403  !! properties.
404  type(tracer_flow_control_cs), pointer :: cs !< The control structure returned by
405  !! a previous call to
406  !! call_tracer_register.
407  logical, intent(in) :: debug !< If true calculate checksums
408  real, optional, intent(in) :: evap_cfl_limit !< Limit on the fraction of
409  !! the water that can be fluxed out
410  !! of the top layer in a timestep [nondim]
411  real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over
412  !! which fluxes can be applied [H ~> m or kg m-2]
413 
414  if (.not. associated(cs)) call mom_error(fatal, "call_tracer_column_fns: "// &
415  "Module must be initialized via call_tracer_register before it is used.")
416 
417  ! Use the applyTracerBoundaryFluxesInOut to handle surface fluxes
418  if (present(evap_cfl_limit) .and. present(minimum_forcing_depth)) then
419  ! Add calls to tracer column functions here.
420  if (cs%use_USER_tracer_example) &
421  call tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
422  g, gv, us, cs%USER_tracer_example_CSp)
423  if (cs%use_DOME_tracer) &
424  call dome_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
425  g, gv, us, cs%DOME_tracer_CSp, &
426  evap_cfl_limit=evap_cfl_limit, &
427  minimum_forcing_depth=minimum_forcing_depth)
428  if (cs%use_ISOMIP_tracer) &
429  call isomip_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
430  g, gv, us, cs%ISOMIP_tracer_CSp, &
431  evap_cfl_limit=evap_cfl_limit, &
432  minimum_forcing_depth=minimum_forcing_depth)
433  if (cs%use_RGC_tracer) &
434  call rgc_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
435  g, gv, us, cs%RGC_tracer_CSp, &
436  evap_cfl_limit=evap_cfl_limit, &
437  minimum_forcing_depth=minimum_forcing_depth)
438  if (cs%use_ideal_age) &
439  call ideal_age_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
440  g, gv, us, cs%ideal_age_tracer_CSp, &
441  evap_cfl_limit=evap_cfl_limit, &
442  minimum_forcing_depth=minimum_forcing_depth)
443  if (cs%use_regional_dyes) &
444  call dye_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
445  g, gv, us, cs%dye_tracer_CSp, &
446  evap_cfl_limit=evap_cfl_limit, &
447  minimum_forcing_depth=minimum_forcing_depth)
448  if (cs%use_oil) &
449  call oil_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
450  g, gv, us, cs%oil_tracer_CSp, tv, &
451  evap_cfl_limit=evap_cfl_limit, &
452  minimum_forcing_depth=minimum_forcing_depth)
453 
454  if (cs%use_advection_test_tracer) &
455  call advection_test_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
456  g, gv, us, cs%advection_test_tracer_CSp, &
457  evap_cfl_limit=evap_cfl_limit, &
458  minimum_forcing_depth=minimum_forcing_depth)
459  if (cs%use_OCMIP2_CFC) &
460  call ocmip2_cfc_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
461  g, gv, us, cs%OCMIP2_CFC_CSp, &
462  evap_cfl_limit=evap_cfl_limit, &
463  minimum_forcing_depth=minimum_forcing_depth)
464  if (cs%use_MOM_generic_tracer) then
465  if (us%QRZ_T_to_W_m2 /= 1.0) call mom_error(fatal, "MOM_generic_tracer_column_physics "//&
466  "has not been written to permit dimensionsal rescaling. Set all 4 of the "//&
467  "[QRZT]_RESCALE_POWER parameters to 0.")
468  call mom_generic_tracer_column_physics(h_old, h_new, ea, eb, fluxes, hml, us%T_to_s*dt, &
469  g, gv, cs%MOM_generic_tracer_CSp, tv, optics, &
470  evap_cfl_limit=evap_cfl_limit, &
471  minimum_forcing_depth=minimum_forcing_depth)
472  endif
473  if (cs%use_pseudo_salt_tracer) &
474  call pseudo_salt_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
475  g, gv, us, cs%pseudo_salt_tracer_CSp, tv, debug, &
476  evap_cfl_limit=evap_cfl_limit, &
477  minimum_forcing_depth=minimum_forcing_depth)
478  if (cs%use_boundary_impulse_tracer) &
479  call boundary_impulse_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
480  g, gv, us, cs%boundary_impulse_tracer_CSp, tv, debug, &
481  evap_cfl_limit=evap_cfl_limit, &
482  minimum_forcing_depth=minimum_forcing_depth)
483  if (cs%use_dyed_obc_tracer) &
484  call dyed_obc_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
485  g, gv, us, cs%dyed_obc_tracer_CSp, &
486  evap_cfl_limit=evap_cfl_limit, &
487  minimum_forcing_depth=minimum_forcing_depth)
488 
489 
490  else ! Apply tracer surface fluxes using ea on the first layer
491  if (cs%use_USER_tracer_example) &
492  call tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
493  g, gv, us, cs%USER_tracer_example_CSp)
494  if (cs%use_DOME_tracer) &
495  call dome_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
496  g, gv, us, cs%DOME_tracer_CSp)
497  if (cs%use_ISOMIP_tracer) &
498  call isomip_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
499  g, gv, us, cs%ISOMIP_tracer_CSp)
500  if (cs%use_RGC_tracer) &
501  call rgc_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
502  g, gv, us, cs%RGC_tracer_CSp)
503  if (cs%use_ideal_age) &
504  call ideal_age_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
505  g, gv, us, cs%ideal_age_tracer_CSp)
506  if (cs%use_regional_dyes) &
507  call dye_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
508  g, gv, us, cs%dye_tracer_CSp)
509  if (cs%use_oil) &
510  call oil_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
511  g, gv, us, cs%oil_tracer_CSp, tv)
512  if (cs%use_advection_test_tracer) &
513  call advection_test_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
514  g, gv, us, cs%advection_test_tracer_CSp)
515  if (cs%use_OCMIP2_CFC) &
516  call ocmip2_cfc_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
517  g, gv, us, cs%OCMIP2_CFC_CSp)
518  if (cs%use_MOM_generic_tracer) then
519  if (us%QRZ_T_to_W_m2 /= 1.0) call mom_error(fatal, "MOM_generic_tracer_column_physics "//&
520  "has not been written to permit dimensionsal rescaling. Set all 4 of the "//&
521  "[QRZT]_RESCALE_POWER parameters to 0.")
522  call mom_generic_tracer_column_physics(h_old, h_new, ea, eb, fluxes, hml, us%T_to_s*dt, &
523  g, gv, cs%MOM_generic_tracer_CSp, tv, optics)
524  endif
525  if (cs%use_pseudo_salt_tracer) &
526  call pseudo_salt_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
527  g, gv, us, cs%pseudo_salt_tracer_CSp, tv, debug)
528  if (cs%use_boundary_impulse_tracer) &
529  call boundary_impulse_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
530  g, gv, us, cs%boundary_impulse_tracer_CSp, tv, debug)
531  if (cs%use_dyed_obc_tracer) &
532  call dyed_obc_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, &
533  g, gv, us, cs%dyed_obc_tracer_CSp)
534 
535  endif
536 
537 
538 end subroutine call_tracer_column_fns
539 
540 !> This subroutine calls all registered tracer packages to enable them to
541 !! add to the surface state returned to the coupler. These routines are optional.
542 subroutine call_tracer_stocks(h, stock_values, G, GV, CS, stock_names, stock_units, &
543  num_stocks, stock_index, got_min_max, global_min, global_max, &
544  xgmin, ygmin, zgmin, xgmax, ygmax, zgmax)
545  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure.
546  type(verticalgrid_type), intent(in) :: gv !< The ocean's vertical grid structure.
547  real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), &
548  intent(in) :: h !< Layer thicknesses [H ~> m or kg m-2]
549  real, dimension(:), intent(out) :: stock_values !< The integrated amounts of a tracer
550  !! on the current PE, usually in kg x concentration [kg conc].
551  type(tracer_flow_control_cs), pointer :: cs !< The control structure returned by a
552  !! previous call to
553  !! call_tracer_register.
554  character(len=*), dimension(:), &
555  optional, intent(out) :: stock_names !< Diagnostic names to use for each stock.
556  character(len=*), dimension(:), &
557  optional, intent(out) :: stock_units !< Units to use in the metadata for each stock.
558  integer, optional, intent(out) :: num_stocks !< The number of tracer stocks being returned.
559  integer, optional, intent(in) :: stock_index !< The integer stock index from
560  !! stocks_constants_mod of the stock to be returned. If this is
561  !! present and greater than 0, only a single stock can be returned.
562  logical, dimension(:), &
563  optional, intent(inout) :: got_min_max !< Indicates whether the global min and
564  !! max are found for each tracer
565  real, dimension(:), optional, intent(out) :: global_min !< The global minimum of each tracer
566  real, dimension(:), optional, intent(out) :: global_max !< The global maximum of each tracer
567  real, dimension(:), optional, intent(out) :: xgmin !< The x-position of the global minimum
568  real, dimension(:), optional, intent(out) :: ygmin !< The y-position of the global minimum
569  real, dimension(:), optional, intent(out) :: zgmin !< The z-position of the global minimum
570  real, dimension(:), optional, intent(out) :: xgmax !< The x-position of the global maximum
571  real, dimension(:), optional, intent(out) :: ygmax !< The y-position of the global maximum
572  real, dimension(:), optional, intent(out) :: zgmax !< The z-position of the global maximum
573 
574  ! Local variables
575  character(len=200), dimension(MAX_FIELDS_) :: names, units
576  character(len=200) :: set_pkg_name
577  real, dimension(MAX_FIELDS_) :: values
578  integer :: max_ns, ns_tot, ns, index, pkg, max_pkgs, nn
579 
580  if (.not. associated(cs)) call mom_error(fatal, "call_tracer_stocks: "// &
581  "Module must be initialized via call_tracer_register before it is used.")
582 
583  index = -1 ; if (present(stock_index)) index = stock_index
584  ns_tot = 0
585  max_ns = size(stock_values)
586  if (present(stock_names)) max_ns = min(max_ns,size(stock_names))
587  if (present(stock_units)) max_ns = min(max_ns,size(stock_units))
588 
589 ! Add other user-provided calls here.
590  if (cs%use_USER_tracer_example) then
591  ns = user_tracer_stock(h, values, g, gv, cs%USER_tracer_example_CSp, &
592  names, units, stock_index)
593  call store_stocks("tracer_example", ns, names, units, values, index, stock_values, &
594  set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
595  endif
596 ! if (CS%use_DOME_tracer) then
597 ! ns = DOME_tracer_stock(h, values, G, GV, CS%DOME_tracer_CSp, &
598 ! names, units, stock_index)
599 ! call store_stocks("DOME_tracer", ns, names, units, values, index, stock_values, &
600 ! set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
601 ! endif
602  if (cs%use_ideal_age) then
603  ns = ideal_age_stock(h, values, g, gv, cs%ideal_age_tracer_CSp, &
604  names, units, stock_index)
605  call store_stocks("ideal_age_example", ns, names, units, values, index, &
606  stock_values, set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
607  endif
608  if (cs%use_regional_dyes) then
609  ns = dye_stock(h, values, g, gv, cs%dye_tracer_CSp, &
610  names, units, stock_index)
611  call store_stocks("regional_dyes", ns, names, units, values, index, &
612  stock_values, set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
613  endif
614  if (cs%use_oil) then
615  ns = oil_stock(h, values, g, gv, cs%oil_tracer_CSp, &
616  names, units, stock_index)
617  call store_stocks("oil_tracer", ns, names, units, values, index, &
618  stock_values, set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
619  endif
620  if (cs%use_OCMIP2_CFC) then
621  ns = ocmip2_cfc_stock(h, values, g, gv, cs%OCMIP2_CFC_CSp, names, units, stock_index)
622  call store_stocks("MOM_OCMIP2_CFC", ns, names, units, values, index, stock_values, &
623  set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
624  endif
625 
626  if (cs%use_advection_test_tracer) then
627  ns = advection_test_stock( h, values, g, gv, cs%advection_test_tracer_CSp, &
628  names, units, stock_index )
629  call store_stocks("advection_test_tracer", ns, names, units, values, index, &
630  stock_values, set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
631  endif
632 
633  if (cs%use_MOM_generic_tracer) then
634  ns = mom_generic_tracer_stock(h, values, g, gv, cs%MOM_generic_tracer_CSp, &
635  names, units, stock_index)
636  call store_stocks("MOM_generic_tracer", ns, names, units, values, index, stock_values, &
637  set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
638  nn=ns_tot-ns+1
639  nn=mom_generic_tracer_min_max(nn, got_min_max, global_min, global_max, &
640  xgmin, ygmin, zgmin, xgmax, ygmax, zgmax ,&
641  g, cs%MOM_generic_tracer_CSp,names, units)
642 
643  endif
644  if (cs%use_pseudo_salt_tracer) then
645  ns = pseudo_salt_stock(h, values, g, gv, cs%pseudo_salt_tracer_CSp, &
646  names, units, stock_index)
647  call store_stocks("pseudo_salt_tracer", ns, names, units, values, index, &
648  stock_values, set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
649  endif
650 
651  if (cs%use_boundary_impulse_tracer) then
652  ns = boundary_impulse_stock(h, values, g, gv, cs%boundary_impulse_tracer_CSp, &
653  names, units, stock_index)
654  call store_stocks("boundary_impulse_tracer", ns, names, units, values, index, &
655  stock_values, set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
656  endif
657 
658  if (ns_tot == 0) stock_values(1) = 0.0
659 
660  if (present(num_stocks)) num_stocks = ns_tot
661 
662 end subroutine call_tracer_stocks
663 
664 !> This routine stores the stocks and does error handling for call_tracer_stocks.
665 subroutine store_stocks(pkg_name, ns, names, units, values, index, stock_values, &
666  set_pkg_name, max_ns, ns_tot, stock_names, stock_units)
667  character(len=*), intent(in) :: pkg_name !< The tracer package name
668  integer, intent(in) :: ns !< The number of stocks associated with this tracer package
669  character(len=*), dimension(:), &
670  intent(in) :: names !< Diagnostic names to use for each stock.
671  character(len=*), dimension(:), &
672  intent(in) :: units !< Units to use in the metadata for each stock.
673  real, dimension(:), intent(in) :: values !< The values of the tracer stocks
674  integer, intent(in) :: index !< The integer stock index from
675  !! stocks_constants_mod of the stock to be returned. If this is
676  !! present and greater than 0, only a single stock can be returned.
677  real, dimension(:), intent(inout) :: stock_values !< The master list of stock values
678  character(len=*), intent(inout) :: set_pkg_name !< The name of the last tracer package whose
679  !! stocks were stored for a specific index. This is
680  !! used to trigger an error if there are redundant stocks.
681  integer, intent(in) :: max_ns !< The maximum size of the master stock list
682  integer, intent(inout) :: ns_tot !< The total number of stocks in the master list
683  character(len=*), dimension(:), &
684  optional, intent(inout) :: stock_names !< Diagnostic names to use for each stock in the master list
685  character(len=*), dimension(:), &
686  optional, intent(inout) :: stock_units !< Units to use in the metadata for each stock in the master list
687 
688 ! This routine stores the stocks and does error handling for call_tracer_stocks.
689  character(len=16) :: ind_text, ns_text, max_text
690  integer :: n
691 
692  if ((index > 0) .and. (ns > 0)) then
693  write(ind_text,'(i8)') index
694  if (ns > 1) then
695  call mom_error(fatal,"Tracer package "//trim(pkg_name)//&
696  " is not permitted to return more than one value when queried"//&
697  " for specific stock index "//trim(adjustl(ind_text))//".")
698  elseif (ns+ns_tot > 1) then
699  call mom_error(fatal,"Tracer packages "//trim(pkg_name)//" and "//&
700  trim(set_pkg_name)//" both attempted to set values for"//&
701  " specific stock index "//trim(adjustl(ind_text))//".")
702  else
703  set_pkg_name = pkg_name
704  endif
705  endif
706 
707  if (ns_tot+ns > max_ns) then
708  write(ns_text,'(i8)') ns_tot+ns ; write(max_text,'(i8)') max_ns
709  call mom_error(fatal,"Attempted to return more tracer stock values (at least "//&
710  trim(adjustl(ns_text))//") than the size "//trim(adjustl(max_text))//&
711  "of the smallest value, name, or units array.")
712  endif
713 
714  do n=1,ns
715  stock_values(ns_tot+n) = values(n)
716  if (present(stock_names)) stock_names(ns_tot+n) = names(n)
717  if (present(stock_units)) stock_units(ns_tot+n) = units(n)
718  enddo
719  ns_tot = ns_tot + ns
720 
721 end subroutine store_stocks
722 
723 !> This subroutine calls all registered tracer packages to enable them to
724 !! add to the surface state returned to the coupler. These routines are optional.
725 subroutine call_tracer_surface_state(sfc_state, h, G, CS)
726  type(surface), intent(inout) :: sfc_state !< A structure containing fields that
727  !! describe the surface state of the ocean.
728  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure.
729  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), &
730  intent(in) :: h !< Layer thicknesses [H ~> m or kg m-2]
731  type(tracer_flow_control_cs), pointer :: cs !< The control structure returned by a
732  !! previous call to call_tracer_register.
733 
734  if (.not. associated(cs)) call mom_error(fatal, "call_tracer_surface_state: "// &
735  "Module must be initialized via call_tracer_register before it is used.")
736 
737 ! Add other user-provided calls here.
738  if (cs%use_USER_tracer_example) &
739  call user_tracer_surface_state(sfc_state, h, g, cs%USER_tracer_example_CSp)
740  if (cs%use_DOME_tracer) &
741  call dome_tracer_surface_state(sfc_state, h, g, cs%DOME_tracer_CSp)
742  if (cs%use_ISOMIP_tracer) &
743  call isomip_tracer_surface_state(sfc_state, h, g, cs%ISOMIP_tracer_CSp)
744  if (cs%use_ideal_age) &
745  call ideal_age_tracer_surface_state(sfc_state, h, g, cs%ideal_age_tracer_CSp)
746  if (cs%use_regional_dyes) &
747  call dye_tracer_surface_state(sfc_state, h, g, cs%dye_tracer_CSp)
748  if (cs%use_oil) &
749  call oil_tracer_surface_state(sfc_state, h, g, cs%oil_tracer_CSp)
750  if (cs%use_advection_test_tracer) &
751  call advection_test_tracer_surface_state(sfc_state, h, g, cs%advection_test_tracer_CSp)
752  if (cs%use_OCMIP2_CFC) &
753  call ocmip2_cfc_surface_state(sfc_state, h, g, cs%OCMIP2_CFC_CSp)
754  if (cs%use_MOM_generic_tracer) &
755  call mom_generic_tracer_surface_state(sfc_state, h, g, cs%MOM_generic_tracer_CSp)
756 
757 end subroutine call_tracer_surface_state
758 
759 subroutine tracer_flow_control_end(CS)
760  type(tracer_flow_control_cs), pointer :: cs !< The control structure returned by a
761  !! previous call to call_tracer_register.
762 
763  if (cs%use_USER_tracer_example) &
764  call user_tracer_example_end(cs%USER_tracer_example_CSp)
765  if (cs%use_DOME_tracer) call dome_tracer_end(cs%DOME_tracer_CSp)
766  if (cs%use_ISOMIP_tracer) call isomip_tracer_end(cs%ISOMIP_tracer_CSp)
767  if (cs%use_RGC_tracer) call rgc_tracer_end(cs%RGC_tracer_CSp)
768  if (cs%use_ideal_age) call ideal_age_example_end(cs%ideal_age_tracer_CSp)
769  if (cs%use_regional_dyes) call regional_dyes_end(cs%dye_tracer_CSp)
770  if (cs%use_oil) call oil_tracer_end(cs%oil_tracer_CSp)
771  if (cs%use_advection_test_tracer) call advection_test_tracer_end(cs%advection_test_tracer_CSp)
772  if (cs%use_OCMIP2_CFC) call ocmip2_cfc_end(cs%OCMIP2_CFC_CSp)
773  if (cs%use_MOM_generic_tracer) call end_mom_generic_tracer(cs%MOM_generic_tracer_CSp)
774  if (cs%use_pseudo_salt_tracer) call pseudo_salt_tracer_end(cs%pseudo_salt_tracer_CSp)
775  if (cs%use_boundary_impulse_tracer) call boundary_impulse_tracer_end(cs%boundary_impulse_tracer_CSp)
776  if (cs%use_dyed_obc_tracer) call dyed_obc_tracer_end(cs%dyed_obc_tracer_CSp)
777 
778  if (associated(cs)) deallocate(cs)
779 end subroutine tracer_flow_control_end
780 
781 !> \namespace MOM_tracer_flow_control
782 !!
783 !! By Will Cooke, April 2003
784 !! Edited by Elizabeth Yankovsky, May 2019
785 !!
786 !! This module contains two subroutines into which calls to other
787 !! tracer initialization (call_tracer_init_fns) and column physics
788 !! routines (call_tracer_column_fns) can be inserted.
789 !!
790 end module mom_tracer_flow_control
advection_test_tracer::advection_test_tracer_cs
The control structure for the advect_test_tracer module.
Definition: advection_test_tracer.F90:37
mom_variables::surface
Pointers to various fields which may be used describe the surface state of MOM, and which will be ret...
Definition: MOM_variables.F90:41
regional_dyes
A tracer package for using dyes to diagnose regional flows.
Definition: dye_example.F90:2
dyed_obc_tracer
This tracer package dyes flow through open boundaries.
Definition: dyed_obc_tracer.F90:2
rgc_tracer
This module contains the routines used to set up a dynamically passive tracer. Set up and use passive...
Definition: RGC_tracer.F90:12
mom_verticalgrid
Provides a transparent vertical ocean grid type and supporting routines.
Definition: MOM_verticalGrid.F90:2
ideal_age_example
A tracer package of ideal age tracers.
Definition: ideal_age_example.F90:2
boundary_impulse_tracer::boundary_impulse_tracer_cs
The control structure for the boundary impulse tracer package.
Definition: boundary_impulse_tracer.F90:40
mom_file_parser::log_version
An overloaded interface to log version information about modules.
Definition: MOM_file_parser.F90:109
mom_diag_mediator
The subroutines here provide convenient wrappers to the fms diag_manager interfaces with additional d...
Definition: MOM_diag_mediator.F90:3
mom_variables::thermo_var_ptrs
Pointers to an assortment of thermodynamic fields that may be available, including potential temperat...
Definition: MOM_variables.F90:80
boundary_impulse_tracer
Implements a boundary impulse response tracer to calculate Green's functions.
Definition: boundary_impulse_tracer.F90:2
mom_ale_sponge::ale_sponge_cs
ALE sponge control structure.
Definition: MOM_ALE_sponge.F90:86
oil_tracer::oil_tracer_cs
The control structure for the oil tracer package.
Definition: oil_tracer.F90:38
dyed_obc_tracer::dyed_obc_tracer_cs
The control structure for the dyed_obc tracer package.
Definition: dyed_obc_tracer.F90:33
mom_tracer_registry
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
Definition: MOM_tracer_registry.F90:5
mom_file_parser::param_file_type
A structure that can be parsed to read and document run-time parameters.
Definition: MOM_file_parser.F90:54
mom_file_parser::get_param
An overloaded interface to read and log the values of various types of parameters.
Definition: MOM_file_parser.F90:102
mom_hor_index
Defines the horizontal index type (hor_index_type) used for providing index ranges.
Definition: MOM_hor_index.F90:2
mom_ale_sponge
This module contains the routines used to apply sponge layers when using the ALE mode.
Definition: MOM_ALE_sponge.F90:11
pseudo_salt_tracer
A tracer package that mimics salinity.
Definition: pseudo_salt_tracer.F90:2
mom_restart::mom_restart_cs
A restart registry and the control structure for restarts.
Definition: MOM_restart.F90:75
mom_ocmip2_cfc
Simulates CFCs using the OCMIP2 protocols.
Definition: MOM_OCMIP2_CFC.F90:2
mom_get_input
Reads the only Fortran name list needed to boot-strap the model.
Definition: MOM_get_input.F90:6
mom_unit_scaling::unit_scale_type
Describes various unit conversion factors.
Definition: MOM_unit_scaling.F90:14
ideal_age_example::ideal_age_tracer_cs
The control structure for the ideal_age_tracer package.
Definition: ideal_age_example.F90:38
mom_generic_tracer
Drives the generic version of tracers TOPAZ and CFC and other GFDL BGC components.
Definition: MOM_generic_tracer.F90:2
mom_forcing_type
This module implements boundary forcing for MOM6.
Definition: MOM_forcing_type.F90:2
mom_verticalgrid::verticalgrid_type
Describes the vertical ocean grid, including unit conversion factors.
Definition: MOM_verticalGrid.F90:24
mom_restart
The MOM6 facility for reading and writing restart files, and querying what has been read.
Definition: MOM_restart.F90:2
mom_variables
Provides transparent structures with groups of MOM6 variables and supporting routines.
Definition: MOM_variables.F90:2
mom_open_boundary
Controls where open boundary conditions are applied.
Definition: MOM_open_boundary.F90:2
user_tracer_example::user_tracer_example_cs
The control structure for the USER_tracer_example module.
Definition: tracer_example.F90:35
dome_tracer
A tracer package that is used as a diagnostic in the DOME experiments.
Definition: DOME_tracer.F90:2
mom_file_parser
The MOM6 facility to parse input files for runtime parameters.
Definition: MOM_file_parser.F90:2
mom_sponge
Implements sponge regions in isopycnal mode.
Definition: MOM_sponge.F90:2
advection_test_tracer
This tracer package is used to test advection schemes.
Definition: advection_test_tracer.F90:2
mom_tracer_flow_control
Orchestrates the registration and calling of tracer packages.
Definition: MOM_tracer_flow_control.F90:2
user_tracer_example
A sample tracer package that has striped initial conditions.
Definition: tracer_example.F90:2
mom_tracer_registry::tracer_registry_type
Type to carry basic tracer information.
Definition: MOM_tracer_registry.F90:138
mom_hor_index::hor_index_type
Container for horizontal index ranges for data, computational and global domains.
Definition: MOM_hor_index.F90:16
mom_generic_tracer::mom_generic_tracer_cs
Control structure for generic tracers.
Definition: MOM_generic_tracer.F90:69
mom_grid
Provides the ocean grid type.
Definition: MOM_grid.F90:2
mom_open_boundary::ocean_obc_type
Open-boundary data.
Definition: MOM_open_boundary.F90:218
mom_sponge::sponge_cs
This control structure holds memory and parameters for the MOM_sponge module.
Definition: MOM_sponge.F90:41
isomip_tracer::isomip_tracer_cs
ISOMIP tracer package control structure.
Definition: ISOMIP_tracer.F90:45
mom_unit_scaling
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.
Definition: MOM_unit_scaling.F90:2
regional_dyes::dye_tracer_cs
The control structure for the regional dyes tracer package.
Definition: dye_example.F90:41
mom_tracer_flow_control::tracer_flow_control_cs
The control structure for orchestrating the calling of tracer packages.
Definition: MOM_tracer_flow_control.F90:73
rgc_tracer::rgc_tracer_cs
tracer control structure
Definition: RGC_tracer.F90:45
mom_forcing_type::forcing
Structure that contains pointers to the boundary forcing used to drive the liquid ocean simulated by ...
Definition: MOM_forcing_type.F90:66
oil_tracer
A tracer package to mimic dissolved oil.
Definition: oil_tracer.F90:2
pseudo_salt_tracer::pseudo_salt_tracer_cs
The control structure for the pseudo-salt tracer.
Definition: pseudo_salt_tracer.F90:39
dome_tracer::dome_tracer_cs
The DOME_tracer control structure.
Definition: DOME_tracer.F90:42
isomip_tracer
Routines used to set up and use a set of (one for now) dynamically passive tracers in the ISOMIP conf...
Definition: ISOMIP_tracer.F90:6
mom_error_handler
Routines for error handling and I/O management.
Definition: MOM_error_handler.F90:2
mom_grid::ocean_grid_type
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:26
mom_ocmip2_cfc::ocmip2_cfc_cs
The control structure for the OCMPI2_CFC tracer package.
Definition: MOM_OCMIP2_CFC.F90:40
mom_diag_mediator::diag_ctrl
The following data type a list of diagnostic fields an their variants, as well as variables that cont...
Definition: MOM_diag_mediator.F90:240