75 use mom_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end
77 use mom_cpu_clock, only : clock_module_driver, clock_module, clock_routine
92 use mom_time_manager, only : time_type, set_time, time_type_to_real,
operator(+)
93 use mom_time_manager, only :
operator(-),
operator(>),
operator(*),
operator(/)
117 implicit none ;
private 119 #include <MOM_memory.h> 121 real allocable_,
dimension(NIMEMB_PTR_,NJMEM_,NKMEM_) :: &
127 real allocable_,
dimension(NIMEM_,NJMEMB_PTR_,NKMEM_) :: &
133 real,
pointer,
dimension(:,:) :: taux_bot => null(), tauy_bot => null()
138 logical :: module_is_initialized = .false.
140 integer :: id_uh = -1, id_vh = -1
141 integer :: id_pfu = -1, id_pfv = -1, id_cau = -1, id_cav = -1
168 type(
ale_cs),
pointer :: ale_csp => null()
184 p_surf_begin, p_surf_end, uh, vh, uhtr, vhtr, eta_av, G, GV, CS, &
188 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
190 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
192 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
199 type(time_type),
intent(in) :: Time_local
201 real,
intent(in) :: dt
202 type(
forcing),
intent(in) :: fluxes
204 real,
dimension(:,:),
pointer :: p_surf_begin
206 real,
dimension(:,:),
pointer :: p_surf_end
208 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
211 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
214 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
215 intent(inout) :: uhtr
217 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
218 intent(inout) :: vhtr
220 real,
dimension(SZI_(G),SZJ_(G)),
intent(out) :: eta_av
259 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)) :: h_av, hp
260 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)) :: up, upp
261 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)) :: vp, vpp
262 real,
dimension(:,:),
pointer :: p_surf
265 logical :: dyn_p_surf
266 integer :: i, j, k, is, ie, js, je, Isq, Ieq, Jsq, Jeq, nz
267 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
268 isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
271 h_av(:,:,:) = 0; hp(:,:,:) = 0
272 up(:,:,:) = 0; upp(:,:,:) = 0
273 vp(:,:,:) = 0; vpp(:,:,:) = 0
275 dyn_p_surf =
associated(p_surf_begin) .and.
associated(p_surf_end)
277 call safe_alloc_ptr(p_surf,g%isd,g%ied,g%jsd,g%jed) ; p_surf(:,:) = 0.0
279 p_surf => fluxes%p_surf
290 call enable_averaging(dt,time_local, cs%diag)
293 g, gv, cs%hor_visc_CSp)
295 call disable_averaging(cs%diag)
300 call continuity(u, v, h, hp, uh, vh, dt*0.5, g, gv, cs%continuity_CSp, &
308 call enable_averaging(0.5*dt,time_local-set_time(int(0.5*dt)), cs%diag)
310 if (cs%id_uh > 0)
call post_data(cs%id_uh, uh, cs%diag)
311 if (cs%id_vh > 0)
call post_data(cs%id_vh, vh, cs%diag)
312 call disable_averaging(cs%diag)
318 do j=js-2,je+2 ;
do i=is-2,ie+2
319 h_av(i,j,k) = (h(i,j,k) + hp(i,j,k)) * 0.5
321 do j=js,je ;
do i=isq,ieq
322 u(i,j,k) = u(i,j,k) + dt * cs%diffu(i,j,k) * g%mask2dCu(i,j)
324 do j=jsq,jeq ;
do i=is,ie
325 v(i,j,k) = v(i,j,k) + dt * cs%diffv(i,j,k) * g%mask2dCv(i,j)
327 do j=js-2,je+2 ;
do i=isq-2,ieq+2
328 uhtr(i,j,k) = uhtr(i,j,k) + 0.5*dt*uh(i,j,k)
330 do j=jsq-2,jeq+2 ;
do i=is-2,ie+2
331 vhtr(i,j,k) = vhtr(i,j,k) + 0.5*dt*vh(i,j,k)
341 call coradcalc(u, v, h_av, uh, vh, cs%CAu, cs%CAv, cs%OBC, cs%ADp, &
342 g, gv, cs%CoriolisAdv_CSp)
347 if (dyn_p_surf)
then ;
do j=js-2,je+2 ;
do i=is-2,ie+2
348 p_surf(i,j) = 0.75*p_surf_begin(i,j) + 0.25*p_surf_end(i,j)
349 enddo ;
enddo ;
endif 351 cs%PressureForce_CSp, cs%ALE_CSp, p_surf)
354 if (
associated(cs%OBC)) then;
if (cs%OBC%update_OBC)
then 355 call update_obc_data(cs%OBC, g, gv, tv, h, cs%update_OBC_CSp, time_local)
357 if (
associated(cs%OBC))
then 364 do k=1,nz ;
do j=js,je ;
do i=isq,ieq
365 up(i,j,k) = g%mask2dCu(i,j) * (u(i,j,k) + dt_pred * &
366 (cs%PFu(i,j,k) + cs%CAu(i,j,k)))
367 enddo ;
enddo ;
enddo 368 do k=1,nz ;
do j=jsq,jeq ;
do i=is,ie
369 vp(i,j,k) = g%mask2dCv(i,j) * (v(i,j,k) + dt_pred * &
370 (cs%PFv(i,j,k) + cs%CAv(i,j,k)))
371 enddo ;
enddo ;
enddo 377 cs%diffu, cs%diffv, g, gv)
382 call enable_averaging(dt, time_local, cs%diag)
383 call set_viscous_ml(u, v, h_av, tv, fluxes, visc, dt*0.5, g, gv, &
385 call disable_averaging(cs%diag)
386 call vertvisc_coef(up, vp, h_av, fluxes, visc, dt*0.5, g, gv, &
387 cs%vertvisc_CSp, cs%OBC)
388 call vertvisc(up, vp, h_av, fluxes, visc, dt*0.5, cs%OBC, cs%ADp, cs%CDp, &
389 g, gv, cs%vertvisc_CSp)
399 (0.5*dt), g, gv, cs%continuity_CSp, obc=cs%OBC)
407 do k=1,nz ;
do j=js-2,je+2 ;
do i=is-2,ie+2
408 h_av(i,j,k) = (hp(i,j,k) + h_av(i,j,k)) * 0.5
409 enddo ;
enddo ;
enddo 413 call coradcalc(up, vp, h_av, uh, vh, cs%CAu, cs%CAv, cs%OBC, cs%ADp, &
414 g, gv, cs%CoriolisAdv_CSp)
419 if (dyn_p_surf)
then ;
do j=js-2,je+2 ;
do i=is-2,ie+2
420 p_surf(i,j) = 0.25*p_surf_begin(i,j) + 0.75*p_surf_end(i,j)
421 enddo ;
enddo ;
endif 423 cs%PressureForce_CSp, cs%ALE_CSp, p_surf)
426 if (
associated(cs%OBC)) then;
if (cs%OBC%update_OBC)
then 427 call update_obc_data(cs%OBC, g, gv, tv, h, cs%update_OBC_CSp, time_local)
429 if (
associated(cs%OBC))
then 430 call open_boundary_zero_normal_flow(cs%OBC, g, cs%PFu, cs%PFv)
431 call open_boundary_zero_normal_flow(cs%OBC, g, cs%CAu, cs%CAv)
436 do k=1,nz ;
do j=js,je ;
do i=isq,ieq
437 upp(i,j,k) = g%mask2dCu(i,j) * (u(i,j,k) + dt * 0.5 * &
438 (cs%PFu(i,j,k) + cs%CAu(i,j,k)))
439 enddo ;
enddo ;
enddo 440 do k=1,nz ;
do j=jsq,jeq ;
do i=is,ie
441 vpp(i,j,k) = g%mask2dCv(i,j) * (v(i,j,k) + dt * 0.5 * &
442 (cs%PFv(i,j,k) + cs%CAv(i,j,k)))
443 enddo ;
enddo ;
enddo 447 call mom_state_chksum(
"Predictor 2", upp, vpp, h_av, uh, vh, g, gv)
448 call mom_accel_chksum(
"Predictor 2 accel", cs%CAu, cs%CAv, cs%PFu, cs%PFv,&
449 cs%diffu, cs%diffv, g, gv)
454 call vertvisc_coef(upp, vpp, hp, fluxes, visc, dt*0.5, g, gv, &
455 cs%vertvisc_CSp, cs%OBC)
456 call vertvisc(upp, vpp, hp, fluxes, visc, dt*0.5, cs%OBC, cs%ADp, cs%CDp, &
457 g, gv, cs%vertvisc_CSp)
460 call pass_vector(upp, vpp, g%Domain)
466 call continuity(upp, vpp, hp, h, uh, vh, &
467 (dt*0.5), g, gv, cs%continuity_CSp, obc=cs%OBC)
470 call pass_var(h, g%Domain)
471 call pass_vector(uh, vh, g%Domain)
475 call diag_update_remap_grids(cs%diag)
477 call enable_averaging(0.5*dt, time_local, cs%diag)
479 if (cs%id_uh > 0)
call post_data(cs%id_uh, uh, cs%diag)
480 if (cs%id_vh > 0)
call post_data(cs%id_vh, vh, cs%diag)
481 call disable_averaging(cs%diag)
482 call enable_averaging(dt, time_local, cs%diag)
486 do j=js-2,je+2 ;
do i=is-2,ie+2
487 h_av(i,j,k) = 0.5*(h(i,j,k) + hp(i,j,k))
489 do j=js-2,je+2 ;
do i=isq-2,ieq+2
490 uhtr(i,j,k) = uhtr(i,j,k) + 0.5*dt*uh(i,j,k)
492 do j=jsq-2,jeq+2 ;
do i=is-2,ie+2
493 vhtr(i,j,k) = vhtr(i,j,k) + 0.5*dt*vh(i,j,k)
499 call coradcalc(upp, vpp, h_av, uh, vh, cs%CAu, cs%CAv, cs%OBC, cs%ADp, &
500 g, gv, cs%CoriolisAdv_CSp)
505 call pressureforce(h_av, tv, cs%PFu, cs%PFv, g, gv, &
506 cs%PressureForce_CSp, cs%ALE_CSp, p_surf)
509 if (
associated(cs%OBC)) then;
if (cs%OBC%update_OBC)
then 510 call update_obc_data(cs%OBC, g, gv, tv, h, cs%update_OBC_CSp, time_local)
514 if (
associated(cs%OBC))
then 515 call open_boundary_zero_normal_flow(cs%OBC, g, cs%PFu, cs%PFv)
516 call open_boundary_zero_normal_flow(cs%OBC, g, cs%CAu, cs%CAv)
518 do k=1,nz ;
do j=js,je ;
do i=isq,ieq
519 u(i,j,k) = g%mask2dCu(i,j) * (u(i,j,k) + dt * &
520 (cs%PFu(i,j,k) + cs%CAu(i,j,k)))
521 enddo ;
enddo ;
enddo 522 do k=1,nz ;
do j=jsq,jeq ;
do i=is,ie
523 v(i,j,k) = g%mask2dCv(i,j) * (v(i,j,k) + dt * &
524 (cs%PFv(i,j,k) + cs%CAv(i,j,k)))
525 enddo ;
enddo ;
enddo 529 call vertvisc_coef(u, v, h_av, fluxes, visc, dt, g, gv, cs%vertvisc_CSp, cs%OBC)
530 call vertvisc(u, v, h_av, fluxes, visc, dt, cs%OBC, cs%ADp, cs%CDp, &
531 g, gv, cs%vertvisc_CSp, cs%taux_bot, cs%tauy_bot)
534 call pass_vector(u, v, g%Domain)
538 call mom_state_chksum(
"Corrector", u, v, h, uh, vh, g, gv)
539 call mom_accel_chksum(
"Corrector accel", cs%CAu, cs%CAv, cs%PFu, cs%PFv, &
540 cs%diffu, cs%diffv, g, gv)
543 if (gv%Boussinesq)
then 544 do j=js,je ;
do i=is,ie ; eta_av(i,j) = -g%bathyT(i,j) ;
enddo ;
enddo 546 do j=js,je ;
do i=is,ie ; eta_av(i,j) = 0.0 ;
enddo ;
enddo 548 do k=1,nz ;
do j=js,je ;
do i=is,ie
549 eta_av(i,j) = eta_av(i,j) + h_av(i,j,k)
550 enddo ;
enddo ;
enddo 552 if (dyn_p_surf)
deallocate(p_surf)
556 if (cs%id_PFu > 0)
call post_data(cs%id_PFu, cs%PFu, cs%diag)
557 if (cs%id_PFv > 0)
call post_data(cs%id_PFv, cs%PFv, cs%diag)
558 if (cs%id_CAu > 0)
call post_data(cs%id_CAu, cs%CAu, cs%diag)
559 if (cs%id_CAv > 0)
call post_data(cs%id_CAv, cs%CAv, cs%diag)
566 type(hor_index_type),
intent(in) :: HI
567 type(verticalgrid_type),
intent(in) :: GV
568 type(param_file_type),
intent(in) :: param_file
572 type(mom_restart_cs),
pointer :: restart_CS
586 character(len=40) :: mdl =
"MOM_dynamics_unsplit" 587 character(len=48) :: thickness_units, flux_units
588 integer :: isd, ied, jsd, jed, nz, IsdB, IedB, JsdB, JedB
589 isd = hi%isd ; ied = hi%ied ; jsd = hi%jsd ; jed = hi%jed ; nz = gv%ke
590 isdb = hi%IsdB ; iedb = hi%IedB ; jsdb = hi%JsdB ; jedb = hi%JedB
593 if (
associated(cs))
then 594 call mom_error(warning,
"register_restarts_dyn_unsplit called with an associated "// &
595 "control structure.")
600 alloc_(cs%diffu(isdb:iedb,jsd:jed,nz)) ; cs%diffu(:,:,:) = 0.0
601 alloc_(cs%diffv(isd:ied,jsdb:jedb,nz)) ; cs%diffv(:,:,:) = 0.0
602 alloc_(cs%CAu(isdb:iedb,jsd:jed,nz)) ; cs%CAu(:,:,:) = 0.0
603 alloc_(cs%CAv(isd:ied,jsdb:jedb,nz)) ; cs%CAv(:,:,:) = 0.0
604 alloc_(cs%PFu(isdb:iedb,jsd:jed,nz)) ; cs%PFu(:,:,:) = 0.0
605 alloc_(cs%PFv(isd:ied,jsdb:jedb,nz)) ; cs%PFv(:,:,:) = 0.0
607 thickness_units = get_thickness_units(gv)
608 flux_units = get_flux_units(gv)
615 restart_CS, Accel_diag, Cont_diag, MIS, &
616 OBC, update_OBC_CSp, ALE_CSp, setVisc_CSp, &
618 type(ocean_grid_type),
intent(inout) :: G
619 type(verticalgrid_type),
intent(in) :: GV
621 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
623 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
625 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)) , &
628 type(time_type),
target,
intent(in) :: Time
629 type(param_file_type),
intent(in) :: param_file
631 type(diag_ctrl),
target,
intent(inout) :: diag
635 type(mom_restart_cs),
pointer :: restart_CS
637 type(accel_diag_ptrs),
target,
intent(inout) :: Accel_diag
640 type(cont_diag_ptrs),
target,
intent(inout) :: Cont_diag
643 type(ocean_internal_state),
intent(inout) :: MIS
646 type(ocean_obc_type),
pointer :: OBC
649 type(update_obc_cs),
pointer :: update_OBC_CSp
652 type(ale_cs),
pointer :: ALE_CSp
654 type(set_visc_cs),
pointer :: setVisc_CSp
656 type(vertvisc_type),
intent(inout) :: visc
659 type(directories),
intent(in) :: dirs
661 integer,
target,
intent(inout) :: ntrunc
698 character(len=40) :: mdl =
"MOM_dynamics_unsplit" 699 character(len=48) :: thickness_units, flux_units
701 integer :: isd, ied, jsd, jed, nz, IsdB, IedB, JsdB, JedB
702 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed ; nz = g%ke
703 isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
705 if (.not.
associated(cs))
call mom_error(fatal, &
706 "initialize_dyn_unsplit called with an unassociated control structure.")
707 if (cs%module_is_initialized)
then 708 call mom_error(warning,
"initialize_dyn_unsplit called with a control "// &
709 "structure that has already been initialized.")
712 cs%module_is_initialized = .true.
716 call get_param(param_file, mdl,
"DEBUG", cs%debug, &
717 "If true, write out verbose debugging data.", default=.false.)
718 call get_param(param_file, mdl,
"TIDES", use_tides, &
719 "If true, apply tidal momentum forcing.", default=.false.)
721 allocate(cs%taux_bot(isdb:iedb,jsd:jed)) ; cs%taux_bot(:,:) = 0.0
722 allocate(cs%tauy_bot(isd:ied,jsdb:jedb)) ; cs%tauy_bot(:,:) = 0.0
724 mis%diffu => cs%diffu ; mis%diffv => cs%diffv
725 mis%PFu => cs%PFu ; mis%PFv => cs%PFv
726 mis%CAu => cs%CAu ; mis%CAv => cs%CAv
728 cs%ADp => accel_diag ; cs%CDp => cont_diag
729 accel_diag%diffu => cs%diffu ; accel_diag%diffv => cs%diffv
730 accel_diag%PFu => cs%PFu ; accel_diag%PFv => cs%PFv
731 accel_diag%CAu => cs%CAu ; accel_diag%CAv => cs%CAv
733 call continuity_init(time, g, gv, param_file, diag, cs%continuity_CSp)
734 call coriolisadv_init(time, g, param_file, diag, cs%ADp, cs%CoriolisAdv_CSp)
735 if (use_tides)
call tidal_forcing_init(time, g, param_file, cs%tides_CSp)
736 call pressureforce_init(time, g, gv, param_file, diag, cs%PressureForce_CSp, &
738 call hor_visc_init(time, g, param_file, diag, cs%hor_visc_CSp)
739 call vertvisc_init(mis, time, g, gv, param_file, diag, cs%ADp, dirs, &
740 ntrunc, cs%vertvisc_CSp)
741 if (.not.
associated(setvisc_csp))
call mom_error(fatal, &
742 "initialize_dyn_unsplit called with setVisc_CSp unassociated.")
743 cs%set_visc_CSp => setvisc_csp
745 if (
associated(ale_csp)) cs%ALE_CSp => ale_csp
746 if (
associated(obc)) cs%OBC => obc
747 if (
associated(update_obc_csp)) cs%update_OBC_CSp => update_obc_csp
749 flux_units = get_flux_units(gv)
750 cs%id_uh = register_diag_field(
'ocean_model',
'uh', diag%axesCuL, time, &
751 'Zonal Thickness Flux', flux_units, y_cell_method=
'sum', v_extensive=.true.)
752 cs%id_vh = register_diag_field(
'ocean_model',
'vh', diag%axesCvL, time, &
753 'Meridional Thickness Flux', flux_units, x_cell_method=
'sum', v_extensive=.true.)
754 cs%id_CAu = register_diag_field(
'ocean_model',
'CAu', diag%axesCuL, time, &
755 'Zonal Coriolis and Advective Acceleration',
'meter second-2')
756 cs%id_CAv = register_diag_field(
'ocean_model',
'CAv', diag%axesCvL, time, &
757 'Meridional Coriolis and Advective Acceleration',
'meter second-2')
758 cs%id_PFu = register_diag_field(
'ocean_model',
'PFu', diag%axesCuL, time, &
759 'Zonal Pressure Force Acceleration',
'meter second-2')
760 cs%id_PFv = register_diag_field(
'ocean_model',
'PFv', diag%axesCvL, time, &
761 'Meridional Pressure Force Acceleration',
'meter second-2')
763 id_clock_cor = cpu_clock_id(
'(Ocean Coriolis & mom advection)', grain=clock_module)
765 id_clock_pres = cpu_clock_id(
'(Ocean pressure force)', grain=clock_module)
766 id_clock_vertvisc = cpu_clock_id(
'(Ocean vertical viscosity)', grain=clock_module)
767 id_clock_horvisc = cpu_clock_id(
'(Ocean horizontal viscosity)', grain=clock_module)
769 id_clock_pass = cpu_clock_id(
'(Ocean message passing)', grain=clock_module)
770 id_clock_pass_init = cpu_clock_id(
'(Ocean init message passing)', grain=clock_routine)
778 dealloc_(cs%diffu) ; dealloc_(cs%diffv)
779 dealloc_(cs%CAu) ; dealloc_(cs%CAv)
780 dealloc_(cs%PFu) ; dealloc_(cs%PFv)
subroutine, public mom_io_init(param_file)
Initialize the MOM_io module.
subroutine, public end_dyn_unsplit(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 initialize_dyn_unsplit(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)
This module contains the main regridding routines. Regridding comprises two steps: (1) Interpolation ...
character(len=48) function, public get_flux_units(GV)
Returns the model's thickness flux units, usually m^3/s or kg/s.
This module implements boundary forcing for MOM6.
integer id_clock_continuity
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.
The module calculates interface heights, including free surface height.
Ocean grid type. See mom_grid for details.
Solve the layer continuity equation.
Controls where open boundary conditions are applied.
integer id_clock_pass_init
Implements vertical viscosity (vertvisc)
Provides the ocean grid type.
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.
A thin wrapper for Boussinesq/non-Boussinesq forms of the pressure force calculation.
This module contains I/O framework code.
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's tracer flux units.
Container for horizontal index ranges for data, computational and global domains. ...
Control structure for mom_coriolisadv.
Variable mixing coefficients.
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 register_restarts_dyn_unsplit(HI, GV, param_file, CS, restart_CS)
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...
character(len=48) function, public get_thickness_units(GV)
Returns the model'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.
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 ...
Controls where open boundary conditions are applied.
integer id_clock_mom_update
subroutine, public step_mom_dyn_unsplit(u, v, h, 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 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...
subroutine, public mom_error(level, message, all_print)
integer id_clock_vertvisc