MOM6
MOM_dynamics_unsplit_RK2.F90
Go to the documentation of this file.
2 
3 !***********************************************************************
4 !* GNU General Public License *
5 !* This file is a part of MOM. *
6 !* *
7 !* MOM is free software; you can redistribute it and/or modify it and *
8 !* are expected to follow the terms of the GNU General Public License *
9 !* as published by the Free Software Foundation; either version 2 of *
10 !* the License, or (at your option) any later version. *
11 !* *
12 !* MOM is distributed in the hope that it will be useful, but WITHOUT *
13 !* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
14 !* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public *
15 !* License for more details. *
16 !* *
17 !* For the full text of the GNU General Public License, *
18 !* write to: Free Software Foundation, Inc., *
19 !* 675 Mass Ave, Cambridge, MA 02139, USA. *
20 !* or see: http://www.gnu.org/licenses/gpl.html *
21 !***********************************************************************
22 
23 !********+*********+*********+*********+*********+*********+*********+**
24 !* *
25 !* By Alistair Adcroft and Robert Hallberg, 2010-2012 *
26 !* *
27 !* This file contains code that does the time-stepping of the *
28 !* adiabatic dynamic core, in this case with a pseudo-second order *
29 !* Runge-Kutta time stepping scheme for the momentum and a forward- *
30 !* backward coupling between the momentum and continuity equations, *
31 !* but without any splitting between the baroclinic and barotropic *
32 !* modes. Apart from the lack of splitting, this is closely analogous *
33 !* to the split time stepping scheme, and efforts have been taken to *
34 !* ensure that for certain configurations (e.g., very short *
35 !* baroclinic time steps, a single barotropic step per baroclinic *
36 !* step, and particular choices about how to coupled the baroclinic *
37 !* and barotropic solves, the two solutions reproduce each other. *
38 !* Although this time stepping scheme is not very efficient with a *
39 !* large number of layers, it is valuable for verifying the proper *
40 !* behavior of the more complicated split time stepping scheme, and *
41 !* is not too inefficient for use with only a few layers. *
42 !* *
43 !* The subroutine step_MOM_dyn_unsplit_RK2 actually does the time *
44 !* stepping, while register_restarts_dyn_unsplit_RK2 sets the fields *
45 !* that are found in a full restart file with this scheme, and *
46 !* initialize_dyn_unsplit_RK2 initializes the cpu clocks that are * *
47 !* used in this module. For largely historical reasons, this module *
48 !* does not have its own control structure, but shares the same *
49 !* control structure with MOM.F90 and the other MOM_dynamics_... *
50 !* modules. *
51 !* *
52 !* Macros written all in capital letters are defined in MOM_memory.h. *
53 !* *
54 !* A small fragment of the grid is shown below: *
55 !* *
56 !* j+1 x ^ x ^ x At x: q, CoriolisBu *
57 !* j+1 > o > o > At ^: v, PFv, CAv, vh, diffv, tauy, vbt, vhtr *
58 !* j x ^ x ^ x At >: u, PFu, CAu, uh, diffu, taux, ubt, uhtr *
59 !* j > o > o > At o: h, bathyT, eta, T, S, tr *
60 !* j-1 x ^ x ^ x *
61 !* i-1 i i+1 *
62 !* i i+1 *
63 !* *
64 !* The boundaries always run through q grid points (x). *
65 !* *
66 !********+*********+*********+*********+*********+*********+*********+**
67 
70 use mom_forcing_type, only : forcing
72 use mom_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end
73 use mom_cpu_clock, only : clock_component, clock_subcomponent
74 use mom_cpu_clock, only : clock_module_driver, clock_module, clock_routine
76 use mom_diag_mediator, only : disable_averaging, post_data, safe_alloc_ptr
82 use mom_domains, only : to_south, to_west, to_all, cgrid_ne, scalar_pair
83 use mom_error_handler, only : mom_error, mom_mesg, fatal, warning, is_root_pe
86 use mom_get_input, only : directories
87 use mom_io, only : mom_io_init, vardesc
90 use mom_time_manager, only : time_type, set_time, time_type_to_real, operator(+)
91 use mom_time_manager, only : operator(-), operator(>), operator(*), operator(/)
92 
93 use mom_ale, only : ale_cs
98 use mom_grid, only : ocean_grid_type
99 use mom_hor_index, only : hor_index_type
102 use mom_meke_types, only : meke_type
113 
114 implicit none ; private
115 
116 #include <MOM_memory.h>
117 
118 type, public :: mom_dyn_unsplit_rk2_cs ; private
119  real allocable_, dimension(NIMEMB_PTR_,NJMEM_,NKMEM_) :: &
120  cau, & ! CAu = f*v - u.grad(u) in m s-2.
121  pfu, & ! PFu = -dM/dx, in m s-2.
122  diffu ! Zonal acceleration due to convergence of the along-isopycnal
123  ! stress tensor, in m s-2.
124  real allocable_, dimension(NIMEM_,NJMEMB_PTR_,NKMEM_) :: &
125  cav, & ! CAv = -f*u - u.grad(v) in m s-2.
126  pfv, & ! PFv = -dM/dy, in m s-2.
127  diffv ! Meridional acceleration due to convergence of the
128  ! along-isopycnal stress tensor, in m s-2.
129 
130 
131  real, pointer, dimension(:,:) :: taux_bot => null(), tauy_bot => null()
132  ! The frictional bottom stresses from the ocean to the seafloor, in Pa.
133 
134  real :: be ! A nondimensional number from 0.5 to 1 that controls
135  ! the backward weighting of the time stepping scheme.
136  real :: begw ! A nondimensional number from 0 to 1 that controls
137  ! the extent to which the treatment of gravity waves
138  ! is forward-backward (0) or simulated backward
139  ! Euler (1). 0 is almost always used.
140  logical :: debug ! If true, write verbose checksums for debugging purposes.
141 
142  logical :: module_is_initialized = .false.
143 
144  integer :: id_uh = -1, id_vh = -1
145  integer :: id_pfu = -1, id_pfv = -1, id_cau = -1, id_cav = -1
146 
147  type(diag_ctrl), pointer :: diag ! A structure that is used to regulate the
148  ! timing of diagnostic output.
149  type(accel_diag_ptrs), pointer :: adp ! A structure pointing to the various
150  ! accelerations in the momentum equations,
151  ! which can later be used to calculate
152  ! derived diagnostics like energy budgets.
153  type(cont_diag_ptrs), pointer :: cdp ! A structure with pointers to various
154  ! terms in the continuity equations,
155  ! which can later be used to calculate
156  ! derived diagnostics like energy budgets.
157 
158 ! The remainder of the structure is pointers to child subroutines' control strings.
159  type(hor_visc_cs), pointer :: hor_visc_csp => null()
160  type(continuity_cs), pointer :: continuity_csp => null()
161  type(coriolisadv_cs), pointer :: coriolisadv_csp => null()
162  type(pressureforce_cs), pointer :: pressureforce_csp => null()
163  type(vertvisc_cs), pointer :: vertvisc_csp => null()
164  type(set_visc_cs), pointer :: set_visc_csp => null()
165  type(ocean_obc_type), pointer :: obc => null() ! A pointer to an open boundary
166  ! condition type that specifies whether, where, and what open boundary
167  ! conditions are used. If no open BCs are used, this pointer stays
168  ! nullified. Flather OBCs use open boundary_CS as well.
169  type(tidal_forcing_cs), pointer :: tides_csp => null()
170  type(update_obc_cs), pointer :: update_obc_csp => null()
171 
172 ! This is a copy of the pointer in the top-level control structure.
173  type(ale_cs), pointer :: ale_csp => null()
174 
175 end type mom_dyn_unsplit_rk2_cs
176 
177 
180 
184 
185 contains
186 
187 ! =============================================================================
188 
189 subroutine step_mom_dyn_unsplit_rk2(u_in, v_in, h_in, tv, visc, Time_local, dt, fluxes, &
190  p_surf_begin, p_surf_end, uh, vh, uhtr, vhtr, eta_av, G, GV, CS, &
191  VarMix, MEKE)
192  type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure.
193  type(verticalgrid_type), intent(in) :: GV !< The ocean's vertical grid
194  !! structure.
195  real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
196  intent(inout) :: u_in !< The input and output zonal
197  !! velocity, in m s-1.
198  real, dimension(SZI_(G),SZJB_(G),SZK_(G)), &
199  intent(inout) :: v_in !< The input and output meridional
200  !! velocity, in m s-1.
201  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), &
202  intent(inout) :: h_in !< The input and output layer
203  !! thicknesses, in m or kg m-2, depending on
204  !! whether the Boussinesq approximation is made.
205  type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various
206  !! thermodynamic variables.
207  type(vertvisc_type), intent(inout) :: visc !< A structure containing vertical
208  !! viscosities, bottom drag
209  !! viscosities, and related fields.
210  type(time_type), intent(in) :: Time_local !< The model time at the end of
211  !! the time step.
212  real, intent(in) :: dt !< The baroclinic dynamics time step,
213  !! in s.
214  type(forcing), intent(in) :: fluxes !< A structure containing pointers to
215  !! any possible forcing fields. Unused
216  !! fields have NULL ptrs.
217  real, dimension(:,:), pointer :: p_surf_begin !< A pointer (perhaps NULL) to
218  !! the surface pressure at the beginning
219  !! of this dynamic step, in Pa.
220  real, dimension(:,:), pointer :: p_surf_end !< A pointer (perhaps NULL) to
221  !! the surface pressure at the end of
222  !! this dynamic step, in Pa.
223  real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
224  intent(inout) :: uh !< The zonal volume or mass transport,
225  !! in m3 s-1 or kg s-1.
226  real, dimension(SZI_(G),SZJB_(G),SZK_(G)), &
227  intent(inout) :: vh !< The meridional volume or mass
228  !! transport, in m3 s-1 or kg s-1.
229  real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
230  intent(inout) :: uhtr !< The accumulated zonal volume or
231  !! mass transport since the last
232  !! tracer advection, in m3 or kg.
233  real, dimension(SZI_(G),SZJB_(G),SZK_(G)), &
234  intent(inout) :: vhtr !< The accumulated meridional volume
235  !! or mass transport since the last
236  !! tracer advection, in m3 or kg.
237  real, dimension(SZI_(G),SZJ_(G)), intent(out) :: eta_av !< The time-mean free surface height
238  !! or column mass, in m or kg m-2.
239  type(mom_dyn_unsplit_rk2_cs), pointer :: CS !< The control structure set up by
240  !! initialize_dyn_unsplit_RK2.
241  type(varmix_cs), pointer :: VarMix !< A pointer to a structure with
242  !! fields that specify the spatially
243  !! variable viscosities.
244  type(meke_type), pointer :: MEKE !< A pointer to a structure containing
245  !! fields related to the Mesoscale
246  !! Eddy Kinetic Energy.
247 ! Arguments: u_in - The input and output zonal velocity, in m s-1.
248 ! (inout) v_in - The input and output meridional velocity, in m s-1.
249 ! (inout) h_in - The input and output layer thicknesses, in m or kg m-2,
250 ! depending on whether the Boussinesq approximation is made.
251 ! (in) tv - a structure pointing to various thermodynamic variables.
252 ! (inout) visc - A structure containing vertical viscosities, bottom drag
253 ! viscosities, and related fields.
254 ! (in) Time_local - The model time at the end of the time step.
255 ! (in) dt - The time step in s.
256 ! (in) fluxes - A structure containing pointers to any possible
257 ! forcing fields. Unused fields have NULL ptrs.
258 ! (in) p_surf_begin - A pointer (perhaps NULL) to the surface pressure
259 ! at the beginning of this dynamic step, in Pa.
260 ! (in) p_surf_end - A pointer (perhaps NULL) to the surface pressure
261 ! at the end of this dynamic step, in Pa.
262 ! (inout) uh - The zonal volume or mass transport, in m3 s-1 or kg s-1.
263 ! (inout) vh - The meridional volume or mass transport, in m3 s-1 or kg s-1.
264 ! (inout) uhtr - The accumulated zonal volume or mass transport since the last
265 ! tracer advection, in m3 or kg.
266 ! (inout) vhtr - The accumulated meridional volume or mass transport since the last
267 ! tracer advection, in m3 or kg.
268 ! (out) eta_av - The time-mean free surface height or column mass, in m or
269 ! kg m-2.
270 ! (in) G - The ocean's grid structure.
271 ! (in) GV - The ocean's vertical grid structure.
272 ! (in) CS - The control structure set up by initialize_dyn_unsplit_RK2.
273 ! (in) VarMix - A pointer to a structure with fields that specify the
274 ! spatially variable viscosities.
275 ! (inout) MEKE - A pointer to a structure containing fields related to
276 ! the Mesoscale Eddy Kinetic Energy.
277 
278  real, dimension(SZI_(G),SZJ_(G),SZK_(G)) :: h_av, hp
279  real, dimension(SZIB_(G),SZJ_(G),SZK_(G)) :: up
280  real, dimension(SZI_(G),SZJB_(G),SZK_(G)) :: vp
281  real, dimension(:,:), pointer :: p_surf
282  real :: dt_pred ! The time step for the predictor part of the baroclinic
283  ! time stepping.
284  logical :: dyn_p_surf
285  integer :: i, j, k, is, ie, js, je, Isq, Ieq, Jsq, Jeq, nz
286  is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
287  isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
288  dt_pred = dt * cs%BE
289 
290  h_av(:,:,:) = 0; hp(:,:,:) = 0
291  up(:,:,:) = 0
292  vp(:,:,:) = 0
293 
294  dyn_p_surf = associated(p_surf_begin) .and. associated(p_surf_end)
295  if (dyn_p_surf) then
296  call safe_alloc_ptr(p_surf,g%isd,g%ied,g%jsd,g%jed) ; p_surf(:,:) = 0.0
297  else
298  p_surf => fluxes%p_surf
299  endif
300 
301 ! Runge-Kutta second order accurate two step scheme is used to step
302 ! all of the fields except h. h is stepped separately.
303 
304  if (cs%debug) then
305  call mom_state_chksum("Start Predictor ", u_in, v_in, h_in, uh, vh, g, gv)
306  endif
307 
308 ! diffu = horizontal viscosity terms (u,h)
309  call enable_averaging(dt,time_local, cs%diag)
310  call cpu_clock_begin(id_clock_horvisc)
311  call horizontal_viscosity(u_in, v_in, h_in, cs%diffu, cs%diffv, meke, varmix, &
312  g, gv, cs%hor_visc_CSp)
313  call cpu_clock_end(id_clock_horvisc)
314  call disable_averaging(cs%diag)
315  call cpu_clock_begin(id_clock_pass)
316  call pass_vector(cs%diffu, cs%diffv, g%Domain)
317  call cpu_clock_end(id_clock_pass)
318 
319 ! This continuity step is solely for the Coroilis terms, specifically in the
320 ! denominator of PV and in the mass transport or PV.
321 ! uh = u[n-1]*h[n-1/2]
322 ! hp = h[n-1/2] + dt/2 div . uh
323  call cpu_clock_begin(id_clock_continuity)
324  ! This is a duplicate calculation of the last continuity from the previous step
325  ! and could/should be optimized out. -AJA
326  call continuity(u_in, v_in, h_in, hp, uh, vh, dt_pred, g, gv, cs%continuity_CSp, &
327  obc=cs%OBC)
328  call cpu_clock_end(id_clock_continuity)
329  call cpu_clock_begin(id_clock_pass)
330  call pass_var(hp, g%Domain)
331  call pass_vector(uh, vh, g%Domain)
332  call cpu_clock_end(id_clock_pass)
333 
334 ! h_av = (h + hp)/2 (used in PV denominator)
335  call cpu_clock_begin(id_clock_mom_update)
336  do k=1,nz
337  do j=js-2,je+2 ; do i=is-2,ie+2
338  h_av(i,j,k) = (h_in(i,j,k) + hp(i,j,k)) * 0.5
339  enddo ; enddo ; enddo
340  call cpu_clock_end(id_clock_mom_update)
341 
342 ! CAu = -(f+zeta)/h_av vh + d/dx KE (function of u[n-1] and uh[n-1])
343  call cpu_clock_begin(id_clock_cor)
344  call coradcalc(u_in, v_in, h_av, uh, vh, cs%CAu, cs%CAv, cs%OBC, cs%ADp, &
345  g, gv, cs%CoriolisAdv_CSp)
346  call cpu_clock_end(id_clock_cor)
347 
348 ! PFu = d/dx M(h_av,T,S) (function of h[n-1/2])
349  call cpu_clock_begin(id_clock_pres)
350  if (dyn_p_surf) then ; do j=js-2,je+2 ; do i=is-2,ie+2
351  p_surf(i,j) = 0.5*p_surf_begin(i,j) + 0.5*p_surf_end(i,j)
352  enddo ; enddo ; endif
353  call pressureforce(h_in, tv, cs%PFu, cs%PFv, g, gv, &
354  cs%PressureForce_CSp, cs%ALE_CSp, p_surf)
355  call cpu_clock_end(id_clock_pres)
356  call cpu_clock_begin(id_clock_pass)
357  call pass_vector(cs%PFu, cs%PFv, g%Domain)
358  call pass_vector(cs%CAu, cs%CAv, g%Domain)
359  call cpu_clock_end(id_clock_pass)
360 
361  if (associated(cs%OBC)) then; if (cs%OBC%update_OBC) then
362  call update_obc_data(cs%OBC, g, gv, tv, h_in, cs%update_OBC_CSp, time_local)
363  endif; endif
364  if (associated(cs%OBC)) then
365  call open_boundary_zero_normal_flow(cs%OBC, g, cs%PFu, cs%PFv)
366  call open_boundary_zero_normal_flow(cs%OBC, g, cs%CAu, cs%CAv)
367  call open_boundary_zero_normal_flow(cs%OBC, g, cs%diffu, cs%diffv)
368  endif
369 
370 ! up+[n-1/2] = u[n-1] + dt_pred * (PFu + CAu)
371  call cpu_clock_begin(id_clock_mom_update)
372  do k=1,nz ; do j=js,je ; do i=isq,ieq
373  up(i,j,k) = g%mask2dCu(i,j) * (u_in(i,j,k) + dt_pred * &
374  ((cs%PFu(i,j,k) + cs%CAu(i,j,k)) + cs%diffu(i,j,k)))
375  enddo ; enddo ; enddo
376  do k=1,nz ; do j=jsq,jeq ; do i=is,ie
377  vp(i,j,k) = g%mask2dCv(i,j) * (v_in(i,j,k) + dt_pred * &
378  ((cs%PFv(i,j,k) + cs%CAv(i,j,k)) + cs%diffv(i,j,k)))
379  enddo ; enddo ; enddo
380  call cpu_clock_end(id_clock_mom_update)
381 
382  if (cs%debug) &
383  call mom_accel_chksum("Predictor 1 accel", cs%CAu, cs%CAv, cs%PFu, cs%PFv,&
384  cs%diffu, cs%diffv, g, gv)
385 
386  ! up[n-1/2] <- up*[n-1/2] + dt/2 d/dz visc d/dz up[n-1/2]
387  call cpu_clock_begin(id_clock_vertvisc)
388  call enable_averaging(dt, time_local, cs%diag)
389  call set_viscous_ml(up, vp, h_av, tv, fluxes, visc, dt_pred, g, gv, &
390  cs%set_visc_CSp)
391  call disable_averaging(cs%diag)
392  call vertvisc_coef(up, vp, h_av, fluxes, visc, dt_pred, g, gv, &
393  cs%vertvisc_CSp, cs%OBC)
394  call vertvisc(up, vp, h_av, fluxes, visc, dt_pred, cs%OBC, cs%ADp, cs%CDp, &
395  g, gv, cs%vertvisc_CSp)
396  call cpu_clock_end(id_clock_vertvisc)
397  call cpu_clock_begin(id_clock_pass)
398  call pass_vector(up, vp, g%Domain)
399  call cpu_clock_end(id_clock_pass)
400 
401 ! uh = up[n-1/2] * h[n-1/2]
402 ! h_av = h + dt div . uh
403  call cpu_clock_begin(id_clock_continuity)
404  call continuity(up, vp, h_in, hp, uh, vh, &
405  dt, g, gv, cs%continuity_CSp, obc=cs%OBC)
406  call cpu_clock_end(id_clock_continuity)
407  call cpu_clock_begin(id_clock_pass)
408  call pass_var(hp, g%Domain)
409  call pass_vector(uh, vh, g%Domain)
410  call cpu_clock_end(id_clock_pass)
411 
412 ! h_av <- (h + hp)/2 (centered at n-1/2)
413  do k=1,nz ; do j=js-2,je+2 ; do i=is-2,ie+2
414  h_av(i,j,k) = (h_in(i,j,k) + hp(i,j,k)) * 0.5
415  enddo ; enddo ; enddo
416 
417  if (cs%debug) &
418  call mom_state_chksum("Predictor 1", up, vp, h_av, uh, vh, g, gv)
419 
420 ! CAu = -(f+zeta(up))/h_av vh + d/dx KE(up) (function of up[n-1/2], h[n-1/2])
421  call cpu_clock_begin(id_clock_cor)
422  call coradcalc(up, vp, h_av, uh, vh, cs%CAu, cs%CAv, cs%OBC, cs%ADp, &
423  g, gv, cs%CoriolisAdv_CSp)
424  call cpu_clock_end(id_clock_cor)
425  if (associated(cs%OBC)) then
426  call open_boundary_zero_normal_flow(cs%OBC, g, cs%CAu, cs%CAv)
427  endif
428 
429 ! call enable_averaging(dt,Time_local, CS%diag) ?????????????????????/
430 
431 ! up* = u[n] + (1+gamma) * dt * ( PFu + CAu ) Extrapolated for damping
432 ! u*[n+1] = u[n] + dt * ( PFu + CAu )
433  do k=1,nz ; do j=js,je ; do i=isq,ieq
434  up(i,j,k) = g%mask2dCu(i,j) * (u_in(i,j,k) + dt * (1.+cs%begw) * &
435  ((cs%PFu(i,j,k) + cs%CAu(i,j,k)) + cs%diffu(i,j,k)))
436  u_in(i,j,k) = g%mask2dCu(i,j) * (u_in(i,j,k) + dt * &
437  ((cs%PFu(i,j,k) + cs%CAu(i,j,k)) + cs%diffu(i,j,k)))
438  enddo ; enddo ; enddo
439  do k=1,nz ; do j=jsq,jeq ; do i=is,ie
440  vp(i,j,k) = g%mask2dCv(i,j) * (v_in(i,j,k) + dt * (1.+cs%begw) * &
441  ((cs%PFv(i,j,k) + cs%CAv(i,j,k)) + cs%diffv(i,j,k)))
442  v_in(i,j,k) = g%mask2dCv(i,j) * (v_in(i,j,k) + dt * &
443  ((cs%PFv(i,j,k) + cs%CAv(i,j,k)) + cs%diffv(i,j,k)))
444  enddo ; enddo ; enddo
445 
446 ! up[n] <- up* + dt d/dz visc d/dz up
447 ! u[n] <- u*[n] + dt d/dz visc d/dz u[n]
448  call cpu_clock_begin(id_clock_vertvisc)
449  call vertvisc_coef(up, vp, h_av, fluxes, visc, dt, g, gv, &
450  cs%vertvisc_CSp, cs%OBC)
451  call vertvisc(up, vp, h_av, fluxes, visc, dt, cs%OBC, cs%ADp, cs%CDp, &
452  g, gv, cs%vertvisc_CSp, cs%taux_bot, cs%tauy_bot)
453  call vertvisc_coef(u_in, v_in, h_av, fluxes, visc, dt, g, gv, &
454  cs%vertvisc_CSp, cs%OBC)
455  call vertvisc(u_in, v_in, h_av, fluxes, visc, dt, cs%OBC, cs%ADp, cs%CDp,&
456  g, gv, cs%vertvisc_CSp, cs%taux_bot, cs%tauy_bot)
457  call cpu_clock_end(id_clock_vertvisc)
458  call cpu_clock_begin(id_clock_pass)
459  call pass_vector(up, vp, g%Domain)
460  call pass_vector(u_in, v_in, g%Domain)
461  call cpu_clock_end(id_clock_pass)
462 
463 ! uh = up[n] * h[n] (up[n] might be extrapolated to damp GWs)
464 ! h[n+1] = h[n] + dt div . uh
465  call cpu_clock_begin(id_clock_continuity)
466  call continuity(up, vp, h_in, h_in, uh, vh, &
467  dt, g, gv, cs%continuity_CSp, obc=cs%OBC)
468  call cpu_clock_end(id_clock_continuity)
469  call cpu_clock_begin(id_clock_pass)
470  call pass_var(h_in, g%Domain)
471  call pass_vector(uh, vh, g%Domain)
472  call cpu_clock_end(id_clock_pass)
473 
474 ! Accumulate mass flux for tracer transport
475  do k=1,nz
476  do j=js-2,je+2 ; do i=isq-2,ieq+2
477  uhtr(i,j,k) = uhtr(i,j,k) + dt*uh(i,j,k)
478  enddo ; enddo
479  do j=jsq-2,jeq+2 ; do i=is-2,ie+2
480  vhtr(i,j,k) = vhtr(i,j,k) + dt*vh(i,j,k)
481  enddo ; enddo
482  enddo
483 
484  if (cs%debug) then
485  call mom_state_chksum("Corrector", u_in, v_in, h_in, uh, vh, g, gv)
486  call mom_accel_chksum("Corrector accel", cs%CAu, cs%CAv, cs%PFu, cs%PFv, &
487  cs%diffu, cs%diffv, g, gv)
488  endif
489 
490  if (gv%Boussinesq) then
491  do j=js,je ; do i=is,ie ; eta_av(i,j) = -g%bathyT(i,j) ; enddo ; enddo
492  else
493  do j=js,je ; do i=is,ie ; eta_av(i,j) = 0.0 ; enddo ; enddo
494  endif
495  do k=1,nz ; do j=js,je ; do i=is,ie
496  eta_av(i,j) = eta_av(i,j) + h_av(i,j,k)
497  enddo ; enddo ; enddo
498 
499  if (dyn_p_surf) deallocate(p_surf)
500 
501 ! Here various terms used in to update the momentum equations are
502 ! offered for averaging.
503  if (cs%id_PFu > 0) call post_data(cs%id_PFu, cs%PFu, cs%diag)
504  if (cs%id_PFv > 0) call post_data(cs%id_PFv, cs%PFv, cs%diag)
505  if (cs%id_CAu > 0) call post_data(cs%id_CAu, cs%CAu, cs%diag)
506  if (cs%id_CAv > 0) call post_data(cs%id_CAv, cs%CAv, cs%diag)
507 
508 ! Here the thickness fluxes are offered for averaging.
509  if (cs%id_uh > 0) call post_data(cs%id_uh, uh, cs%diag)
510  if (cs%id_vh > 0) call post_data(cs%id_vh, vh, cs%diag)
511 
512 end subroutine step_mom_dyn_unsplit_rk2
513 
514 ! =============================================================================
515 
516 subroutine register_restarts_dyn_unsplit_rk2(HI, GV, param_file, CS, restart_CS)
517  type(hor_index_type), intent(in) :: HI !< A horizontal index type structure.
518  type(verticalgrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
519  type(param_file_type), intent(in) :: param_file !< A structure to parse for run-time
520  !! parameters.
521  type(mom_dyn_unsplit_rk2_cs), pointer :: CS !< The control structure set up by
522  !! initialize_dyn_unsplit_RK2.
523  type(mom_restart_cs), pointer :: restart_CS !< A pointer to the restart control
524  !! structure.
525 ! This subroutine sets up any auxiliary restart variables that are specific
526 ! to the unsplit time stepping scheme. All variables registered here should
527 ! have the ability to be recreated if they are not present in a restart file.
528 
529 ! Arguments: HI - A horizontal index type structure.
530 ! (in) GV - The ocean's vertical grid structure.
531 ! (in) param_file - A structure indicating the open file to parse for
532 ! model parameter values.
533 ! (inout) CS - The control structure set up by initialize_dyn_unsplit_RK2.
534 ! (inout) restart_CS - A pointer to the restart control structure.
535 
536  type(vardesc) :: vd
537  character(len=48) :: thickness_units, flux_units
538  integer :: isd, ied, jsd, jed, nz, IsdB, IedB, JsdB, JedB
539  isd = hi%isd ; ied = hi%ied ; jsd = hi%jsd ; jed = hi%jed ; nz = gv%ke
540  isdb = hi%IsdB ; iedb = hi%IedB ; jsdb = hi%JsdB ; jedb = hi%JedB
541 
542 ! This is where a control structure that is specific to this module would be allocated.
543  if (associated(cs)) then
544  call mom_error(warning, "register_restarts_dyn_unsplit_RK2 called with an associated "// &
545  "control structure.")
546  return
547  endif
548  allocate(cs)
549 
550  alloc_(cs%diffu(isdb:iedb,jsd:jed,nz)) ; cs%diffu(:,:,:) = 0.0
551  alloc_(cs%diffv(isd:ied,jsdb:jedb,nz)) ; cs%diffv(:,:,:) = 0.0
552  alloc_(cs%CAu(isdb:iedb,jsd:jed,nz)) ; cs%CAu(:,:,:) = 0.0
553  alloc_(cs%CAv(isd:ied,jsdb:jedb,nz)) ; cs%CAv(:,:,:) = 0.0
554  alloc_(cs%PFu(isdb:iedb,jsd:jed,nz)) ; cs%PFu(:,:,:) = 0.0
555  alloc_(cs%PFv(isd:ied,jsdb:jedb,nz)) ; cs%PFv(:,:,:) = 0.0
556 
557  thickness_units = get_thickness_units(gv)
558  flux_units = get_flux_units(gv)
559 
560 ! No extra restart fields are needed with this time stepping scheme.
561 
563 
564 subroutine initialize_dyn_unsplit_rk2(u, v, h, Time, G, GV, param_file, diag, CS, &
565  restart_CS, Accel_diag, Cont_diag, MIS, &
566  OBC, update_OBC_CSp, ALE_CSp, setVisc_CSp, &
567  visc, dirs, ntrunc)
568  type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure.
569  type(verticalgrid_type), intent(in) :: GV !< The ocean's vertical grid
570  !! structure.
571  real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: u !< The zonal velocity, in m s-1.
572  real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: v !< The meridional velocity,
573  !! in m s-1.
574  real, dimension(SZI_(G),SZJ_(G),SZK_(G)) , intent(inout) :: h !< Layer thicknesses, in H
575  !! (usually m or kg m-2).
576  type(time_type), target, intent(in) :: Time !< The current model time.
577  type(param_file_type), intent(in) :: param_file !< A structure to parse
578  !! for run-time parameters.
579  type(diag_ctrl), target, intent(inout) :: diag !< A structure that is used to
580  !! regulate diagnostic output.
581  type(mom_dyn_unsplit_rk2_cs), pointer :: CS !< The control structure set up
582  !! by initialize_dyn_unsplit_RK2.
583  type(mom_restart_cs), pointer :: restart_CS !< A pointer to the restart
584  !! control structure.
585  type(accel_diag_ptrs), target, intent(inout) :: Accel_diag !< A set of pointers to the
586  !! various accelerations in the momentum equations, which can
587  !! be used for later derived diagnostics, like energy budgets.
588  type(cont_diag_ptrs), target, intent(inout) :: Cont_diag !<A structure with pointers
589  !! to various terms in the
590  !! continuity equations.
591  type(ocean_internal_state), intent(inout) :: MIS !< The "MOM6 Internal State"
592  !! structure, used to pass around pointers
593  !! to various arrays for diagnostic purposes.
594  type(ocean_obc_type), pointer :: OBC !< If open boundary conditions
595  !! are used, this points to the ocean_OBC_type
596  !! that was set up in MOM_initialization.
597  type(update_obc_cs), pointer :: update_OBC_CSp !< If open boundary
598  !! condition updates are used, this points
599  !! to the appropriate control structure.
600  type(ale_cs), pointer :: ALE_CSp !< This points to the ALE
601  !! control structure.
602  type(set_visc_cs), pointer :: setVisc_CSp !< This points to the
603  !! set_visc control
604  !! structure.
605  type(vertvisc_type), intent(inout) :: visc !< A structure containing
606  !! vertical viscosities, bottom drag
607  !! viscosities, and related fields.
608  type(directories), intent(in) :: dirs !< A structure containing several
609  !! relevant directory paths.
610  integer, target, intent(inout) :: ntrunc !< A target for the variable
611  !! that records the number of times the
612  !! velocity is truncated (this should be 0).
613 ! Arguments: u - The zonal velocity, in m s-1.
614 ! (inout) v - The meridional velocity, in m s-1.
615 ! (inout) h - The layer thicknesses, in m or kg m-2, depending on whether
616 ! the Boussinesq approximation is made.
617 ! (in) Time - The current model time.
618 ! (in) G - The ocean's grid structure.
619 ! (in) GV - The ocean's vertical grid structure.
620 ! (in) param_file - A structure indicating the open file to parse for
621 ! model parameter values.
622 ! (in) diag - A structure that is used to regulate diagnostic output.
623 ! (inout) CS - The control structure set up by initialize_dyn_unsplit_RK2.
624 ! (in) restart_CS - A pointer to the restart control structure.
625 ! (inout) Accel_diag - A set of pointers to the various accelerations in
626 ! the momentum equations, which can be used for later derived
627 ! diagnostics, like energy budgets.
628 ! (inout) Cont_diag - A structure with pointers to various terms in the
629 ! continuity equations.
630 ! (inout) MIS - The "MOM6 Internal State" structure, used to pass around
631 ! pointers to various arrays for diagnostic purposes.
632 ! (in) OBC - If open boundary conditions are used, this points to the
633 ! ocean_OBC_type that was set up in MOM_initialization.
634 ! (in) update_OBC_CSp - If open boundary condition updates are used,
635 ! this points to the appropriate control structure.
636 ! (in) ALE_CS - This points to the ALE control structure.
637 ! (in) setVisc_CSp - This points to the set_visc control structure.
638 ! (inout) visc - A structure containing vertical viscosities, bottom drag
639 ! viscosities, and related fields.
640 ! (in) dirs - A structure containing several relevant directory paths.
641 ! (in) ntrunc - A target for the variable that records the number of times
642 ! the velocity is truncated (this should be 0).
643 
644  ! This subroutine initializes all of the variables that are used by this
645  ! dynamic core, including diagnostics and the cpu clocks.
646  character(len=40) :: mdl = "MOM_dynamics_unsplit_RK2" ! This module's name.
647  character(len=48) :: thickness_units, flux_units
648  logical :: use_tides
649  integer :: isd, ied, jsd, jed, nz, IsdB, IedB, JsdB, JedB
650  isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed ; nz = g%ke
651  isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
652 
653  if (.not.associated(cs)) call mom_error(fatal, &
654  "initialize_dyn_unsplit_RK2 called with an unassociated control structure.")
655  if (cs%module_is_initialized) then
656  call mom_error(warning, "initialize_dyn_unsplit_RK2 called with a control "// &
657  "structure that has already been initialized.")
658  return
659  endif
660  cs%module_is_initialized = .true.
661 
662  cs%diag => diag
663 
664  call get_param(param_file, mdl, "BE", cs%be, &
665  "If SPLIT is true, BE determines the relative weighting \n"//&
666  "of a 2nd-order Runga-Kutta baroclinic time stepping \n"//&
667  "scheme (0.5) and a backward Euler scheme (1) that is \n"//&
668  "used for the Coriolis and inertial terms. BE may be \n"//&
669  "from 0.5 to 1, but instability may occur near 0.5. \n"//&
670  "BE is also applicable if SPLIT is false and USE_RK2 \n"//&
671  "is true.", units="nondim", default=0.6)
672  call get_param(param_file, mdl, "BEGW", cs%begw, &
673  "If SPLIT is true, BEGW is a number from 0 to 1 that \n"//&
674  "controls the extent to which the treatment of gravity \n"//&
675  "waves is forward-backward (0) or simulated backward \n"//&
676  "Euler (1). 0 is almost always used.\n"//&
677  "If SPLIT is false and USE_RK2 is true, BEGW can be \n"//&
678  "between 0 and 0.5 to damp gravity waves.", &
679  units="nondim", default=0.0)
680  call get_param(param_file, mdl, "DEBUG", cs%debug, &
681  "If true, write out verbose debugging data.", default=.false.)
682  call get_param(param_file, mdl, "TIDES", use_tides, &
683  "If true, apply tidal momentum forcing.", default=.false.)
684 
685  allocate(cs%taux_bot(isdb:iedb,jsd:jed)) ; cs%taux_bot(:,:) = 0.0
686  allocate(cs%tauy_bot(isd:ied,jsdb:jedb)) ; cs%tauy_bot(:,:) = 0.0
687 
688  mis%diffu => cs%diffu ; mis%diffv => cs%diffv
689  mis%PFu => cs%PFu ; mis%PFv => cs%PFv
690  mis%CAu => cs%CAu ; mis%CAv => cs%CAv
691 
692  cs%ADp => accel_diag ; cs%CDp => cont_diag
693  accel_diag%diffu => cs%diffu ; accel_diag%diffv => cs%diffv
694  accel_diag%PFu => cs%PFu ; accel_diag%PFv => cs%PFv
695  accel_diag%CAu => cs%CAu ; accel_diag%CAv => cs%CAv
696 
697  call continuity_init(time, g, gv, param_file, diag, cs%continuity_CSp)
698  call coriolisadv_init(time, g, param_file, diag, cs%ADp, cs%CoriolisAdv_CSp)
699  if (use_tides) call tidal_forcing_init(time, g, param_file, cs%tides_CSp)
700  call pressureforce_init(time, g, gv, param_file, diag, cs%PressureForce_CSp, &
701  cs%tides_CSp)
702  call hor_visc_init(time, g, param_file, diag, cs%hor_visc_CSp)
703  call vertvisc_init(mis, time, g, gv, param_file, diag, cs%ADp, dirs, &
704  ntrunc, cs%vertvisc_CSp)
705  if (.not.associated(setvisc_csp)) call mom_error(fatal, &
706  "initialize_dyn_unsplit_RK2 called with setVisc_CSp unassociated.")
707  cs%set_visc_CSp => setvisc_csp
708 
709  if (associated(ale_csp)) cs%ALE_CSp => ale_csp
710  if (associated(obc)) cs%OBC => obc
711 
712  flux_units = get_flux_units(gv)
713  cs%id_uh = register_diag_field('ocean_model', 'uh', diag%axesCuL, time, &
714  'Zonal Thickness Flux', flux_units, y_cell_method='sum', v_extensive=.true.)
715  cs%id_vh = register_diag_field('ocean_model', 'vh', diag%axesCvL, time, &
716  'Meridional Thickness Flux', flux_units, x_cell_method='sum', v_extensive=.true.)
717  cs%id_CAu = register_diag_field('ocean_model', 'CAu', diag%axesCuL, time, &
718  'Zonal Coriolis and Advective Acceleration', 'meter second-2')
719  cs%id_CAv = register_diag_field('ocean_model', 'CAv', diag%axesCvL, time, &
720  'Meridional Coriolis and Advective Acceleration', 'meter second-2')
721  cs%id_PFu = register_diag_field('ocean_model', 'PFu', diag%axesCuL, time, &
722  'Zonal Pressure Force Acceleration', 'meter second-2')
723  cs%id_PFv = register_diag_field('ocean_model', 'PFv', diag%axesCvL, time, &
724  'Meridional Pressure Force Acceleration', 'meter second-2')
725 
726  id_clock_cor = cpu_clock_id('(Ocean Coriolis & mom advection)', grain=clock_module)
727  id_clock_continuity = cpu_clock_id('(Ocean continuity equation)', grain=clock_module)
728  id_clock_pres = cpu_clock_id('(Ocean pressure force)', grain=clock_module)
729  id_clock_vertvisc = cpu_clock_id('(Ocean vertical viscosity)', grain=clock_module)
730  id_clock_horvisc = cpu_clock_id('(Ocean horizontal viscosity)', grain=clock_module)
731  id_clock_mom_update = cpu_clock_id('(Ocean momentum increments)', grain=clock_module)
732  id_clock_pass = cpu_clock_id('(Ocean message passing)', grain=clock_module)
733  id_clock_pass_init = cpu_clock_id('(Ocean init message passing)', grain=clock_routine)
734 
735 end subroutine initialize_dyn_unsplit_rk2
736 
737 subroutine end_dyn_unsplit_rk2(CS)
738  type(mom_dyn_unsplit_rk2_cs), pointer :: CS
739 ! (inout) CS - The control structure set up by initialize_dyn_unsplit_RK2.
740 
741  dealloc_(cs%diffu) ; dealloc_(cs%diffv)
742  dealloc_(cs%CAu) ; dealloc_(cs%CAv)
743  dealloc_(cs%PFu) ; dealloc_(cs%PFv)
744 
745  deallocate(cs)
746 end subroutine end_dyn_unsplit_rk2
747 
748 end module mom_dynamics_unsplit_rk2
subroutine, public mom_io_init(param_file)
Initialize the MOM_io module.
Definition: MOM_io.F90:840
subroutine, public step_mom_dyn_unsplit_rk2(u_in, v_in, h_in, tv, visc, Time_local, dt, fluxes, p_surf_begin, p_surf_end, uh, vh, uhtr, vhtr, eta_av, G, GV, CS, VarMix, MEKE)
subroutine, public set_diag_mediator_grid(G, diag_cs)
subroutine, public mom_thermo_chksum(mesg, tv, G, haloshift)
subroutine, public coradcalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, CS)
Calculates the Coriolis and momentum advection contributions to the acceleration. ...
subroutine, public end_dyn_unsplit_rk2(CS)
This module contains the main regridding routines. Regridding comprises two steps: (1) Interpolation ...
Definition: MOM_ALE.F90:7
character(len=48) function, public get_flux_units(GV)
Returns the model&#39;s thickness flux units, usually m^3/s or kg/s.
This module implements boundary forcing for MOM6.
subroutine, public enable_averaging(time_int_in, time_end_in, diag_cs)
subroutine, public register_restarts_dyn_unsplit_rk2(HI, GV, param_file, CS, restart_CS)
subroutine, public continuity_init(Time, G, GV, param_file, diag, CS)
Initializes continuity_cs.
integer, parameter, public to_all
subroutine, public hor_visc_init(Time, G, param_file, diag, CS)
This subroutine allocates space for and calculates static variables used by this module. The metrics may be 0, 1, or 2-D arrays, while fields like the background viscosities are 2-D arrays. ALLOC is a macro defined in MOM_memory.h to either allocate for dynamic memory, or do nothing when using static memory.
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...
subroutine, public initialize_dyn_unsplit_rk2(u, v, h, Time, G, GV, param_file, diag, CS, restart_CS, Accel_diag, Cont_diag, MIS, OBC, update_OBC_CSp, ALE_CSp, setVisc_CSp, visc, dirs, ntrunc)
Solve the layer continuity equation.
Controls where open boundary conditions are applied.
Implements vertical viscosity (vertvisc)
Provides the ocean grid type.
Definition: MOM_grid.F90:2
The vertvisc_type structure contains vertical viscosities, drag coefficients, and related fields...
subroutine, public pressureforce_init(Time, G, GV, param_file, diag, CS, tides_CSp)
Initialize the pressure force control structure.
Accelerations due to the Coriolis force and momentum advection.
subroutine, public diag_mediator_init(G, nz, param_file, diag_cs, doc_file_dir)
diag_mediator_init initializes the MOM diag_mediator and opens the available diagnostics file...
A thin wrapper for Boussinesq/non-Boussinesq forms of the pressure force calculation.
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 mom_accel_chksum(mesg, CAu, CAv, PFu, PFv, diffu, diffv, G, GV, pbce, u_accel_bt, v_accel_bt, symmetric)
The accel_diag_ptrs structure contains pointers to arrays with accelerations, which can later be used...
Variable mixing coefficients.
subroutine, public coriolisadv_init(Time, G, param_file, diag, AD, CS)
Initializes the control structure for coriolisadv_cs.
character(len=48) function, public get_tr_flux_units(GV, tr_units, tr_vol_conc_units, tr_mass_conc_units)
Returns the model&#39;s tracer flux units.
Container for horizontal index ranges for data, computational and global domains. ...
Control structure for mom_coriolisadv.
subroutine, public horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, CS, OBC)
This subroutine determines the acceleration due to the horizontal viscosity. A combination of biharmo...
Control structure for mom_continuity.
subroutine, public open_boundary_zero_normal_flow(OBC, G, u, v)
Applies zero values to 3d u,v fields on OBC segments.
subroutine, public radiation_open_bdry_conds(OBC, u_new, u_old, v_new, v_old, G, dt)
Apply radiation conditions to 3D u,v at open boundaries.
subroutine, public mom_domains_init(MOM_dom, param_file, symmetric, static_memory, NIHALO, NJHALO, NIGLOBAL, NJGLOBAL, NIPROC, NJPROC, min_halo, domain_name, include_name, param_suffix)
logical function, public is_root_pe()
The cont_diag_ptrs structure contains pointers to arrays with transports, which can later be used for...
subroutine, public pressureforce(h, tv, PFu, PFv, G, GV, CS, ALE_CSp, p_atm, pbce, eta)
A thin layer between the model and the Boussinesq and non-Boussinesq pressure force routines...
subroutine, public mom_set_verbosity(verb)
character(len=48) function, public get_thickness_units(GV)
Returns the model&#39;s thickness units, usually m or kg/m^2.
The ocean_internal_state structure contains pointers to all of the prognostic variables allocated in ...
subroutine, public vertvisc_coef(u, v, h, fluxes, visc, dt, G, GV, CS, OBC)
Calculate the coupling coefficients (CSa_u and CSa_v) and effective layer thicknesses (CSh_u and CSh_...
subroutine, public update_obc_data(OBC, G, GV, tv, h, CS, Time)
Calls appropriate routine to update the open boundary conditions.
Structure that contains pointers to the boundary forcing used to drive the liquid ocean simulated by ...
subroutine, public vertvisc_init(MIS, Time, G, GV, param_file, diag, ADp, dirs, ntrunc, CS)
Initialise the vertical friction module.
subroutine, public set_viscous_ml(u, v, h, tv, fluxes, visc, dt, G, GV, CS)
The following subroutine calculates the thickness of the surface boundary layer for applying an eleva...
subroutine, public mom_mesg(message, verb, all_print)
Type for describing a variable, typically a tracer.
Definition: MOM_io.F90:51
integer function, public register_static_field(module_name, field_name, axes, long_name, units, missing_value, range, mask_variant, standard_name, do_not_log, interp_method, tile_count, cmor_field_name, cmor_long_name, cmor_units, cmor_standard_name, area)
Registers a static diagnostic, returning an integer handle.
subroutine, public tidal_forcing_init(Time, G, param_file, CS)
This subroutine allocates space for the static variables used by this module. The metrics may be effe...
subroutine, public continuity(u, v, hin, h, uh, vh, dt, G, GV, CS, uhbt, vhbt, OBC, visc_rem_u, visc_rem_v, u_cor, v_cor, uhbt_aux, vhbt_aux, u_cor_aux, v_cor_aux, BT_cont)
Time steps the layer thicknesses, using a monotonically limited, directionally split PPM scheme...
subroutine, public save_restart(directory, time, G, CS, time_stamped, filename, GV)
subroutine, public vertvisc_limit_vel(u, v, h, ADp, CDp, fluxes, visc, dt, G, GV, CS)
Velocity components which exceed a threshold for physically reasonable values are truncated...
The thermo_var_ptrs structure contains pointers to an assortment of thermodynamic fields that may be ...
subroutine, public disable_averaging(diag_cs)
Controls where open boundary conditions are applied.
ALE control structure.
Definition: MOM_ALE.F90:61
subroutine, public restart_init(param_file, CS, restart_root)
subroutine, public vertvisc(u, v, h, fluxes, visc, dt, OBC, ADp, CDp, G, GV, CS, taux_bot, tauy_bot)
Perform a fully implicit vertical diffusion of momentum. Stress top and bottom boundary conditions ar...
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)