30 implicit none ;
private 32 #include <MOM_memory.h> 43 real,
dimension(SZI_(G),SZJ_(G),SZK_(GV)), &
47 logical,
optional,
intent(in) :: just_read_params
52 real :: e_pert(szk_(gv))
54 real :: eta1D(szk_(gv)+1)
56 real :: front_displacement
57 real :: thermocline_thickness
60 #include "version_variable.h" 61 character(len=40) :: mdl =
"lock_exchange_initialize_thickness" 62 integer :: i, j, k, is, ie, js, je, nz
64 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
66 just_read = .false. ;
if (
present(just_read_params)) just_read = just_read_params
69 call mom_mesg(
" lock_exchange_initialization.F90, lock_exchange_initialize_thickness: setting thickness", 5)
71 if (.not.just_read)
call log_version(param_file, mdl, version,
"")
72 call get_param(param_file, mdl,
"FRONT_DISPLACEMENT", front_displacement, &
73 "The vertical displacement of interfaces across the front. \n"//&
74 "A value larger in magnitude that MAX_DEPTH is truncated,", &
75 units=
"m", fail_if_missing=.not.just_read, do_not_log=just_read)
76 call get_param(param_file, mdl,
"THERMOCLINE_THICKNESS", thermocline_thickness, &
77 "The thickness of the thermocline in the lock exchange \n"//&
78 "experiment. A value of zero creates a two layer system \n"//&
79 "with vanished layers in between the two inflated layers.", &
80 default=0., units=
"m", do_not_log=just_read)
84 do j=g%jsc,g%jec ;
do i=g%isc,g%iec
86 eta1d(k) = -0.5 * g%max_depth &
87 - thermocline_thickness * ( (
real(k-1))/
real(nz) -0.5 )
88 if (g%geoLonT(i,j)-g%west_lon < 0.5 * g%len_lon)
then 89 eta1d(k)=eta1d(k) + 0.5 * front_displacement
90 elseif (g%geoLonT(i,j)-g%west_lon > 0.5 * g%len_lon)
then 91 eta1d(k)=eta1d(k) - 0.5 * front_displacement
94 eta1d(nz+1) = -g%max_depth
96 eta1d(k) = max( eta1d(k), eta1d(k+1) + gv%Angstrom )
100 eta1d(k) = min( eta1d(k), eta1d(k-1) - gv%Angstrom )
103 h(i,j,k) = eta1d(k) - eta1d(k+1)
Ocean grid type. See mom_grid for details.
Provides the ocean grid type.
subroutine, public lock_exchange_initialize_thickness(h, G, GV, param_file, just_read_params)
This subroutine initializes layer thicknesses for the lock_exchange experiment.
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
Type to carry basic tracer information.
logical function, public is_root_pe()
The module configures the model for the "lock_exchange" experiment. lock_exchange = A 2-d density dri...
subroutine, public mom_mesg(message, verb, all_print)
The thermo_var_ptrs structure contains pointers to an assortment of thermodynamic fields that may be ...
subroutine, public mom_error(level, message, all_print)