MOM6
ISOMIP_tracer.F90
Go to the documentation of this file.
1 !> This module contains the routines used to set up and use a set of (one for now)
2 !! dynamically passive tracers. For now, just one passive tracer is injected in
3 !! the sponge layer.
4 !! Set up and use passive tracers requires the following:
5 !! (1) register_ISOMIP_tracer
6 !! (2)
7 
8 !********+*********+*********+*********+*********+*********+*********+**
9 !* *
10 !* By Robert Hallberg, 2002 *
11 !* Adapted to the ISOMIP test case by Gustavo Marques, May 2016 * !* *
12 !********+*********+*********+*********+*********+*********+*********+**
13 
15 
16 ! This file is part of MOM6. See LICENSE.md for the license.
17 
18 use mom_diag_mediator, only : post_data, register_diag_field, safe_alloc_ptr
19 use mom_diag_mediator, only : diag_ctrl
21 use mom_error_handler, only : mom_error, fatal, warning
23 use mom_forcing_type, only : forcing
24 use mom_hor_index, only : hor_index_type
25 use mom_grid, only : ocean_grid_type
26 use mom_io, only : file_exists, read_data, slasher, vardesc, var_desc, query_vardesc
29 use mom_time_manager, only : time_type, get_time
33 use mom_variables, only : surface
36 use mom_coms, only : max_across_pes
37 use coupler_util, only : set_coupler_values, ind_csurf
39 
40 implicit none ; private
41 
42 #include <MOM_memory.h>
43 
44 !< Publicly available functions
47 
48 !< ntr is the number of tracers in this module.
49 integer, parameter :: ntr = 1
50 
51 type p3d
52  real, dimension(:,:,:), pointer :: p => null()
53 end type p3d
54 
55 !> tracer control structure
56 type, public :: isomip_tracer_cs ; private
57  logical :: coupled_tracers = .false. !< These tracers are not offered to the
58  !< coupler.
59  character(len = 200) :: tracer_ic_file !< The full path to the IC file, or " "
60  !< to initialize internally.
61  type(time_type), pointer :: time !< A pointer to the ocean model's clock.
62  type(tracer_registry_type), pointer :: tr_reg => null()
63  real, pointer :: tr(:,:,:,:) => null() !< The array of tracers used in this
64  !< subroutine, in g m-3?
65  real, pointer :: tr_aux(:,:,:,:) => null() !< The masked tracer concentration
66  !< for output, in g m-3.
67  type(p3d), dimension(NTR) :: &
68  tr_adx, &!< Tracer zonal advective fluxes in g m-3 m3 s-1.
69  tr_ady, &!< Tracer meridional advective fluxes in g m-3 m3 s-1.
70  tr_dfx, &!< Tracer zonal diffusive fluxes in g m-3 m3 s-1.
71  tr_dfy !< Tracer meridional diffusive fluxes in g m-3 m3 s-1.
72  real :: land_val(ntr) = -1.0 !< The value of tr used where land is masked out.
73  logical :: mask_tracers !< If true, tracers are masked out in massless layers.
74  logical :: use_sponge
75 
76  integer, dimension(NTR) :: ind_tr !< Indices returned by aof_set_coupler_flux
77  !< if it is used and the surface tracer concentrations are to be
78  !< provided to the coupler.
79 
80  type(diag_ctrl), pointer :: diag !< A structure that is used to regulate the
81  !< timing of diagnostic output.
82  integer, dimension(NTR) :: id_tracer = -1, id_tr_adx = -1, id_tr_ady = -1
83  integer, dimension(NTR) :: id_tr_dfx = -1, id_tr_dfy = -1
84 
85  type(vardesc) :: tr_desc(ntr)
86 end type isomip_tracer_cs
87 
88 contains
89 
90 
91 !> This subroutine is used to register tracer fields
92 function register_isomip_tracer(HI, GV, param_file, CS, tr_Reg, &
93  restart_CS)
94  type(hor_index_type), intent(in) :: HI !<A horizontal index type structure.
95  type(verticalgrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
96  type(param_file_type), intent(in) :: param_file !<A structure indicating the open file to parse for model parameter values.
97  type(isomip_tracer_cs), pointer :: CS !<A pointer that is set to point to the control structure for this module (in/out).
98  type(tracer_registry_type), pointer :: tr_Reg !<A pointer to the tracer registry.
99  type(mom_restart_cs), pointer :: restart_CS !<A pointer to the restart control structure.
100 
101  character(len=80) :: name, longname
102 ! This include declares and sets the variable "version".
103 #include "version_variable.h"
104  character(len=40) :: mdl = "ISOMIP_tracer" ! This module's name.
105  character(len=200) :: inputdir
106  real, pointer :: tr_ptr(:,:,:) => null()
107  logical :: register_ISOMIP_tracer
108  integer :: isd, ied, jsd, jed, nz, m
109  isd = hi%isd ; ied = hi%ied ; jsd = hi%jsd ; jed = hi%jed ; nz = gv%ke
110 
111  if (associated(cs)) then
112  call mom_error(warning, "ISOMIP_register_tracer called with an "// &
113  "associated control structure.")
114  return
115  endif
116  allocate(cs)
117 
118  ! Read all relevant parameters and write them to the model log.
119  call log_version(param_file, mdl, version, "")
120  call get_param(param_file, mdl, "ISOMIP_TRACER_IC_FILE", cs%tracer_IC_file, &
121  "The name of a file from which to read the initial \n"//&
122  "conditions for the ISOMIP tracers, or blank to initialize \n"//&
123  "them internally.", default=" ")
124  if (len_trim(cs%tracer_IC_file) >= 1) then
125  call get_param(param_file, mdl, "INPUTDIR", inputdir, default=".")
126  inputdir = slasher(inputdir)
127  cs%tracer_IC_file = trim(inputdir)//trim(cs%tracer_IC_file)
128  call log_param(param_file, mdl, "INPUTDIR/ISOMIP_TRACER_IC_FILE", &
129  cs%tracer_IC_file)
130  endif
131  call get_param(param_file, mdl, "SPONGE", cs%use_sponge, &
132  "If true, sponges may be applied anywhere in the domain. \n"//&
133  "The exact location and properties of those sponges are \n"//&
134  "specified from MOM_initialization.F90.", default=.false.)
135 
136  allocate(cs%tr(isd:ied,jsd:jed,nz,ntr)) ; cs%tr(:,:,:,:) = 0.0
137  if (cs%mask_tracers) then
138  allocate(cs%tr_aux(isd:ied,jsd:jed,nz,ntr)) ; cs%tr_aux(:,:,:,:) = 0.0
139  endif
140 
141  do m=1,ntr
142  if (m < 10) then ; write(name,'("tr_D",I1.1)') m
143  else ; write(name,'("tr_D",I2.2)') m ; endif
144  write(longname,'("Concentration of ISOMIP Tracer ",I2.2)') m
145  cs%tr_desc(m) = var_desc(name, units="kg kg-1", longname=longname, caller=mdl)
146 
147  ! This is needed to force the compiler not to do a copy in the registration
148  ! calls. Curses on the designers and implementers of Fortran90.
149  tr_ptr => cs%tr(:,:,:,m)
150  ! Register the tracer for the restart file.
151  call register_restart_field(tr_ptr, cs%tr_desc(m), .true., restart_cs)
152  ! Register the tracer for horizontal advection & diffusion.
153  call register_tracer(tr_ptr, cs%tr_desc(m), param_file, hi, gv, tr_reg, &
154  tr_desc_ptr=cs%tr_desc(m))
155 
156  ! Set coupled_tracers to be true (hard-coded above) to provide the surface
157  ! values to the coupler (if any). This is meta-code and its arguments will
158  ! currently (deliberately) give fatal errors if it is used.
159  if (cs%coupled_tracers) &
160  cs%ind_tr(m) = aof_set_coupler_flux(trim(name)//'_flux', &
161  flux_type=' ', implementation=' ', caller="register_ISOMIP_tracer")
162  enddo
163 
164  cs%tr_Reg => tr_reg
165  register_isomip_tracer = .true.
166 end function register_isomip_tracer
167 
168 !> Initializes the NTR tracer fields in tr(:,:,:,:)
169 ! and it sets up the tracer output.
170 subroutine initialize_isomip_tracer(restart, day, G, GV, h, diag, OBC, CS, &
171  ALE_sponge_CSp, diag_to_Z_CSp)
173  type(ocean_grid_type), intent(in) :: G !< Grid structure.
174  type(verticalgrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
175  logical, intent(in) :: restart !< .true. if the fields have already been read from a restart file.
176  type(time_type), target, intent(in) :: day !< Time of the start of the run.
177  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thickness, in m or kg m-2.
178  type(diag_ctrl), target, intent(in) :: diag
179  type(ocean_obc_type), pointer :: OBC !< This open boundary condition type specifies whether, where, and what open boundary conditions are used. This is not being used for now.
180  type(isomip_tracer_cs), pointer :: CS !< The control structure returned by a previous call to ISOMIP_register_tracer.
181  type(ale_sponge_cs), pointer :: ALE_sponge_CSp !< A pointer to the control structure for the sponges, if they are in use. Otherwise this may be unassociated.
182  type(diag_to_z_cs), pointer :: diag_to_Z_CSp !< A pointer to the control structure for diagnostics in depth space.
183 
184  real, allocatable :: temp(:,:,:)
185  real, pointer, dimension(:,:,:) :: &
186  OBC_tr1_u => null(), & ! These arrays should be allocated and set to
187  obc_tr1_v => null() ! specify the values of tracer 1 that should come
188  ! in through u- and v- points through the open
189  ! boundary conditions, in the same units as tr.
190  character(len=16) :: name ! A variable's name in a NetCDF file.
191  character(len=72) :: longname ! The long name of that variable.
192  character(len=48) :: units ! The dimensions of the variable.
193  character(len=48) :: flux_units ! The units for tracer fluxes, usually
194  ! kg(tracer) kg(water)-1 m3 s-1 or kg(tracer) s-1.
195  real, pointer :: tr_ptr(:,:,:) => null()
196  real :: PI ! 3.1415926... calculated as 4*atan(1)
197  real :: tr_y ! Initial zonally uniform tracer concentrations.
198  real :: dist2 ! The distance squared from a line, in m2.
199  real :: h_neglect ! A thickness that is so small it is usually lost
200  ! in roundoff and can be neglected, in m.
201  real :: e(szk_(g)+1), e_top, e_bot, d_tr
202  integer :: i, j, k, is, ie, js, je, isd, ied, jsd, jed, nz, m
203  integer :: IsdB, IedB, JsdB, JedB
204 
205  if (.not.associated(cs)) return
206  is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
207  isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
208  isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
209  h_neglect = gv%H_subroundoff
210 
211  cs%Time => day
212  cs%diag => diag
213 
214  if (.not.restart) then
215  if (len_trim(cs%tracer_IC_file) >= 1) then
216  ! Read the tracer concentrations from a netcdf file.
217  if (.not.file_exists(cs%tracer_IC_file, g%Domain)) &
218  call mom_error(fatal, "ISOMIP_initialize_tracer: Unable to open "// &
219  cs%tracer_IC_file)
220  do m=1,ntr
221  call query_vardesc(cs%tr_desc(m), name, caller="initialize_ISOMIP_tracer")
222  call read_data(cs%tracer_IC_file, trim(name), &
223  cs%tr(:,:,:,m), domain=g%Domain%mpp_domain)
224  enddo
225  else
226  do m=1,ntr
227  do k=1,nz ; do j=js,je ; do i=is,ie
228  cs%tr(i,j,k,m) = 0.0
229  enddo ; enddo ; enddo
230  enddo
231  endif
232  endif ! restart
233 
234 ! the following does not work in layer mode yet
235 !! if ( CS%use_sponge ) then
236  ! If sponges are used, this example damps tracers in sponges in the
237  ! northern half of the domain to 1 and tracers in the southern half
238  ! to 0. For any tracers that are not damped in the sponge, the call
239  ! to set_up_sponge_field can simply be omitted.
240 ! if (.not.associated(ALE_sponge_CSp)) &
241 ! call MOM_error(FATAL, "ISOMIP_initialize_tracer: "// &
242 ! "The pointer to ALEsponge_CSp must be associated if SPONGE is defined.")
243 
244 ! allocate(temp(G%isd:G%ied,G%jsd:G%jed,nz))
245 
246 ! do j=js,je ; do i=is,ie
247 ! if (G%geoLonT(i,j) >= 790.0 .AND. G%geoLonT(i,j) <= 800.0) then
248 ! temp(i,j,:) = 1.0
249 ! else
250 ! temp(i,j,:) = 0.0
251 ! endif
252 ! enddo ; enddo
253 
254  ! do m=1,NTR
255 ! do m=1,1
256  ! This is needed to force the compiler not to do a copy in the sponge
257  ! calls. Curses on the designers and implementers of Fortran90.
258 ! tr_ptr => CS%tr(:,:,:,m)
259 ! call set_up_ALE_sponge_field(temp, G, tr_ptr, ALE_sponge_CSp)
260 ! enddo
261 ! deallocate(temp)
262 ! endif
263 
264  ! This needs to be changed if the units of tracer are changed above.
265  if (gv%Boussinesq) then ; flux_units = "kg kg-1 m3 s-1"
266  else ; flux_units = "kg s-1" ; endif
267 
268  do m=1,ntr
269  ! Register the tracer for the restart file.
270  call query_vardesc(cs%tr_desc(m), name, units=units, longname=longname, &
271  caller="initialize_ISOMIP_tracer")
272  cs%id_tracer(m) = register_diag_field("ocean_model", trim(name), cs%diag%axesTL, &
273  day, trim(longname) , trim(units))
274  cs%id_tr_adx(m) = register_diag_field("ocean_model", trim(name)//"_adx", &
275  cs%diag%axesCuL, day, trim(longname)//" advective zonal flux" , &
276  trim(flux_units))
277  cs%id_tr_ady(m) = register_diag_field("ocean_model", trim(name)//"_ady", &
278  cs%diag%axesCvL, day, trim(longname)//" advective meridional flux" , &
279  trim(flux_units))
280  cs%id_tr_dfx(m) = register_diag_field("ocean_model", trim(name)//"_dfx", &
281  cs%diag%axesCuL, day, trim(longname)//" diffusive zonal flux" , &
282  trim(flux_units))
283  cs%id_tr_dfy(m) = register_diag_field("ocean_model", trim(name)//"_dfy", &
284  cs%diag%axesCvL, day, trim(longname)//" diffusive zonal flux" , &
285  trim(flux_units))
286  if (cs%id_tr_adx(m) > 0) call safe_alloc_ptr(cs%tr_adx(m)%p,isdb,iedb,jsd,jed,nz)
287  if (cs%id_tr_ady(m) > 0) call safe_alloc_ptr(cs%tr_ady(m)%p,isd,ied,jsdb,jedb,nz)
288  if (cs%id_tr_dfx(m) > 0) call safe_alloc_ptr(cs%tr_dfx(m)%p,isdb,iedb,jsd,jed,nz)
289  if (cs%id_tr_dfy(m) > 0) call safe_alloc_ptr(cs%tr_dfy(m)%p,isd,ied,jsdb,jedb,nz)
290 
291 ! Register the tracer for horizontal advection & diffusion.
292  if ((cs%id_tr_adx(m) > 0) .or. (cs%id_tr_ady(m) > 0) .or. &
293  (cs%id_tr_dfx(m) > 0) .or. (cs%id_tr_dfy(m) > 0)) &
294  call add_tracer_diagnostics(name, cs%tr_Reg, cs%tr_adx(m)%p, &
295  cs%tr_ady(m)%p, cs%tr_dfx(m)%p, cs%tr_dfy(m)%p)
296 
297  call register_z_tracer(cs%tr(:,:,:,m), trim(name), longname, units, &
298  day, g, diag_to_z_csp)
299  enddo
300 
301 end subroutine initialize_isomip_tracer
302 
303 !> This subroutine applies diapycnal diffusion and any other column
304 ! tracer physics or chemistry to the tracers from this file.
305 ! This is a simple example of a set of advected passive tracers.
306 subroutine isomip_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, CS, &
307  evap_CFL_limit, minimum_forcing_depth)
308  type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure
309  type(verticalgrid_type), intent(in) :: GV !< The ocean's vertical grid structure
310  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h_old, h_new, ea, eb
311  type(forcing), intent(in) :: fluxes
312  real, intent(in) :: dt !< The amount of time covered by this call, in s
313  type(isomip_tracer_cs), pointer :: CS
314  real, optional,intent(in) :: evap_CFL_limit
315  real, optional,intent(in) :: minimum_forcing_depth
316 
317 ! Arguments: h_old - Layer thickness before entrainment, in m or kg m-2.
318 ! (in) h_new - Layer thickness after entrainment, in m or kg m-2.
319 ! (in) ea - an array to which the amount of fluid entrained
320 ! from the layer above during this call will be
321 ! added, in m or kg m-2.
322 ! (in) eb - an array to which the amount of fluid entrained
323 ! from the layer below during this call will be
324 ! added, in m or kg m-2.
325 ! (in) fluxes - A structure containing pointers to any possible
326 ! forcing fields. Unused fields have NULL ptrs.
327 ! (in) dt - The amount of time covered by this call, in s.
328 ! (in) G - The ocean's grid structure.
329 ! (in) GV - The ocean's vertical grid structure.
330 ! (in) CS - The control structure returned by a previous call to
331 ! ISOMIP_register_tracer.
332 !
333 ! The arguments to this subroutine are redundant in that
334 ! h_new[k] = h_old[k] + ea[k] - eb[k-1] + eb[k] - ea[k+1]
335 
336  real :: mmax
337  real :: b1(szi_(g)) ! b1 and c1 are variables used by the
338  real :: c1(szi_(g),szk_(g)) ! tridiagonal solver.
339  real, dimension(SZI_(G),SZJ_(G),SZK_(G)) :: h_work ! Used so that h can be modified
340  real :: melt(szi_(g),szj_(g)) ! melt water (positive for melting
341  ! negative for freezing)
342  integer :: i, j, k, is, ie, js, je, nz, m
343  is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
344 
345  if (.not.associated(cs)) return
346 
347  melt(:,:) = fluxes%iceshelf_melt
348 
349  ! max. melt
350  mmax = maxval(melt(is:ie,js:je))
351  call max_across_pes(mmax)
352  !write(*,*)'max melt', mmax
353  ! dye melt water (m=1), dye = 1 if melt=max(melt)
354  do m=1,ntr
355  do j=js,je ; do i=is,ie
356  if (melt(i,j) > 0.0) then ! melting
357  !write(*,*)'i,j,melt,melt/mmax',i,j,melt(i,j),melt(i,j)/mmax
358  cs%tr(i,j,1:2,m) = melt(i,j)/mmax ! inject dye in the ML
359  else ! freezing
360  cs%tr(i,j,1:2,m) = 0.0
361  endif
362  enddo ; enddo
363  enddo
364 
365  if (present(evap_cfl_limit) .and. present(minimum_forcing_depth)) then
366  do m=1,ntr
367  do k=1,nz ;do j=js,je ; do i=is,ie
368  h_work(i,j,k) = h_old(i,j,k)
369  enddo ; enddo ; enddo;
370  call applytracerboundaryfluxesinout(g, gv, cs%tr(:,:,:,m) , dt, fluxes, h_work, &
371  evap_cfl_limit, minimum_forcing_depth)
372  call tracer_vertdiff(h_work, ea, eb, dt, cs%tr(:,:,:,m), g, gv)
373  enddo
374  else
375  do m=1,ntr
376  call tracer_vertdiff(h_old, ea, eb, dt, cs%tr(:,:,:,m), g, gv)
377  enddo
378  endif
379 
380  if (cs%mask_tracers) then
381  do m = 1,ntr ; if (cs%id_tracer(m) > 0) then
382  do k=1,nz ; do j=js,je ; do i=is,ie
383  if (h_new(i,j,k) < 1.1*gv%Angstrom) then
384  cs%tr_aux(i,j,k,m) = cs%land_val(m)
385  else
386  cs%tr_aux(i,j,k,m) = cs%tr(i,j,k,m)
387  endif
388  enddo ; enddo ; enddo
389  endif ; enddo
390  endif
391 
392  do m=1,ntr
393  if (cs%mask_tracers) then
394  if (cs%id_tracer(m)>0) &
395  call post_data(cs%id_tracer(m),cs%tr_aux(:,:,:,m),cs%diag)
396  else
397  if (cs%id_tracer(m)>0) &
398  call post_data(cs%id_tracer(m),cs%tr(:,:,:,m),cs%diag)
399  endif
400  if (cs%id_tr_adx(m)>0) &
401  call post_data(cs%id_tr_adx(m),cs%tr_adx(m)%p(:,:,:),cs%diag)
402  if (cs%id_tr_ady(m)>0) &
403  call post_data(cs%id_tr_ady(m),cs%tr_ady(m)%p(:,:,:),cs%diag)
404  if (cs%id_tr_dfx(m)>0) &
405  call post_data(cs%id_tr_dfx(m),cs%tr_dfx(m)%p(:,:,:),cs%diag)
406  if (cs%id_tr_dfy(m)>0) &
407  call post_data(cs%id_tr_dfy(m),cs%tr_dfy(m)%p(:,:,:),cs%diag)
408  enddo
409 
410 end subroutine isomip_tracer_column_physics
411 
412 !> This particular tracer package does not report anything back to the coupler.
413 ! The code that is here is just a rough guide for packages that would.
414 subroutine isomip_tracer_surface_state(state, h, G, CS)
415  type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure.
416  type(surface), intent(inout) :: state !< A structure containing fields that describe the surface state of the ocean.
417  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thickness, in m or kg m-2.
418  type(isomip_tracer_cs), pointer :: CS !< The control structure returned by a previous call to ISOMIP_register_tracer.
419  integer :: i, j, m, is, ie, js, je, nz
420  is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
421 
422  if (.not.associated(cs)) return
423 
424  if (cs%coupled_tracers) then
425  do m=1,ntr
426  ! This call loads the surface vlues into the appropriate array in the
427  ! coupler-type structure.
428  call set_coupler_values(cs%tr(:,:,1,1), state%tr_fields, cs%ind_tr(m), &
429  ind_csurf, is, ie, js, je)
430  enddo
431  endif
432 
433 end subroutine isomip_tracer_surface_state
434 
435 subroutine isomip_tracer_end(CS)
436  type(isomip_tracer_cs), pointer :: CS
437  integer :: m
438 
439  if (associated(cs)) then
440  if (associated(cs%tr)) deallocate(cs%tr)
441  if (associated(cs%tr_aux)) deallocate(cs%tr_aux)
442  do m=1,ntr
443  if (associated(cs%tr_adx(m)%p)) deallocate(cs%tr_adx(m)%p)
444  if (associated(cs%tr_ady(m)%p)) deallocate(cs%tr_ady(m)%p)
445  if (associated(cs%tr_dfx(m)%p)) deallocate(cs%tr_dfx(m)%p)
446  if (associated(cs%tr_dfy(m)%p)) deallocate(cs%tr_dfy(m)%p)
447  enddo
448 
449  deallocate(cs)
450  endif
451 end subroutine isomip_tracer_end
452 
453 end module isomip_tracer
The following structure contains pointers to various fields which may be used describe the surface st...
type(vardesc) function, public var_desc(name, units, longname, hor_grid, z_grid, t_grid, cmor_field_name, cmor_units, conversion, caller)
Returns a vardesc type whose elements have been filled with the provided fields. The argument name is...
Definition: MOM_io.F90:585
This module implements boundary forcing for MOM6.
integer function, public aof_set_coupler_flux(name, flux_type, implementation, atm_tr_index, param, flag, ice_restart_file, ocean_restart_file, units, caller)
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:19
The following data type a list of diagnostic fields an their variants, as well as variables that cont...
Provides the ocean grid type.
Definition: MOM_grid.F90:2
subroutine, public isomip_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, CS, evap_CFL_limit, minimum_forcing_depth)
This subroutine applies diapycnal diffusion and any other column.
This module contains the routines used to set up and use a set of (one for now) dynamically passive t...
integer, parameter ntr
This module contains I/O framework code.
Definition: MOM_io.F90:2
Defines the horizontal index type (hor_index_type) used for providing index ranges.
subroutine, public set_up_ale_sponge_field(sp_val, G, f_ptr, CS)
This subroutine stores the reference profile at h points for the variable.
This module contains the routines used to apply sponge layers when using the ALE mode. Applying sponges requires the following: (1) initialize_ALE_sponge (2) set_up_ALE_sponge_field (tracers) and set_up_ALE_sponge_vel_field (vel) (3) apply_ALE_sponge (4) init_ALE_sponge_diags (not being used for now) (5) ALE_sponge_end (not being used for now)
SPONGE control structure.
Container for horizontal index ranges for data, computational and global domains. ...
subroutine, public register_tracer(tr1, tr_desc, param_file, HI, GV, Reg, tr_desc_ptr, ad_x, ad_y, df_x, df_y, OBC_inflow, OBC_in_u, OBC_in_v, ad_2d_x, ad_2d_y, df_2d_x, df_2d_y, advection_xy)
This subroutine registers a tracer to be advected and laterally diffused.
subroutine, public initialize_isomip_tracer(restart, day, G, GV, h, diag, OBC, CS, ALE_sponge_CSp, diag_to_Z_CSp)
Initializes the NTR tracer fields in tr(:,:,:,:)
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
subroutine, public applytracerboundaryfluxesinout(G, GV, Tr, dt, fluxes, h, evap_CFL_limit, minimum_forcing_depth, in_flux_optional, out_flux_optional, update_h_opt)
This routine is modeled after applyBoundaryFluxesInOut in MOM_diabatic_aux.F90 NOTE: Please note that...
Type to carry basic tracer information.
This module contains routines that implement physical fluxes of tracers (e.g. due to surface fluxes o...
subroutine, public register_z_tracer(tr_ptr, name, long_name, units, Time, G, CS, standard_name, cmor_field_name, cmor_long_name, cmor_units, cmor_standard_name)
This subroutine registers a tracer to be output in depth space.
subroutine, public add_tracer_obc_values(name, Reg, OBC_inflow, OBC_in_u, OBC_in_v)
This subroutine adds open boundary condition concentrations for a tracer that has previously been reg...
logical function, public register_isomip_tracer(HI, GV, param_file, CS, tr_Reg, restart_CS)
This subroutine is used to register tracer fields.
subroutine, public add_tracer_diagnostics(name, Reg, ad_x, ad_y, df_x, df_y, ad_2d_x, ad_2d_y, df_2d_x, df_2d_y, advection_xy)
This subroutine adds diagnostic arrays for a tracer that has previously been registered by a call to ...
Structure that contains pointers to the boundary forcing used to drive the liquid ocean simulated by ...
subroutine, public set_coupler_values(array_in, BC_struc, BC_index, BC_element, is, ie, js, je, conversion)
Type for describing a variable, typically a tracer.
Definition: MOM_io.F90:51
subroutine, public isomip_tracer_end(CS)
subroutine, public tracer_vertdiff(h_old, ea, eb, dt, tr, G, GV, sfc_flux, btm_flux, btm_reservoir, sink_rate, convert_flux_in)
This subroutine solves a tridiagonal equation for the final tracer concentrations after the dual-entr...
subroutine, public query_vardesc(vd, name, units, longname, hor_grid, z_grid, t_grid, cmor_field_name, cmor_units, conversion, caller)
This routine queries vardesc.
Definition: MOM_io.F90:664
Controls where open boundary conditions are applied.
tracer control structure
integer function, public register_diag_field(module_name, field_name, axes, init_time, long_name, units, missing_value, range, mask_variant, standard_name, verbose, do_not_log, err_msg, interp_method, tile_count, cmor_field_name, cmor_long_name, cmor_units, cmor_standard_name, cell_methods, x_cell_method, y_cell_method, v_cell_method, conversion, v_extensive)
Returns the "diag_mediator" handle for a group (native, CMOR, z-coord, ...) of diagnostics derived fr...
subroutine, public mom_error(level, message, all_print)
subroutine, public isomip_tracer_surface_state(state, h, G, CS)
This particular tracer package does not report anything back to the coupler.