28 implicit none ;
private 30 #include <MOM_memory.h> 40 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
44 logical,
optional,
intent(in) :: just_read_params
49 real :: e_pert(szk_(g))
51 real :: eta1D(szk_(g)+1)
53 real :: ssh_anomaly_height
54 real :: ssh_anomaly_width
56 character(len=40) :: mdl =
"external_gwave_initialize_thickness" 58 #include "version_variable.h" 59 integer :: i, j, k, is, ie, js, je, nz
62 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
64 just_read = .false. ;
if (
present(just_read_params)) just_read = just_read_params
67 call mom_mesg(
" external_gwave_initialization.F90, external_gwave_initialize_thickness: setting thickness", 5)
69 if (.not.just_read)
call log_version(param_file, mdl, version,
"")
70 call get_param(param_file, mdl,
"SSH_ANOMALY_HEIGHT", ssh_anomaly_height, &
71 "The vertical displacement of the SSH anomaly. ", units=
"m", &
72 fail_if_missing=.not.just_read, do_not_log=just_read)
73 call get_param(param_file, mdl,
"SSH_ANOMALY_WIDTH", ssh_anomaly_width, &
74 "The lateral width of the SSH anomaly. ", units=
"coordinate", &
75 fail_if_missing=.not.just_read, do_not_log=just_read)
80 do j=g%jsc,g%jec ;
do i=g%isc,g%iec
81 xnondim = (g%geoLonT(i,j)-g%west_lon-0.5*g%len_lon) / ssh_anomaly_width
82 xnondim = min(1., abs(xnondim))
83 eta1d(1) = ssh_anomaly_height * 0.5 * ( 1. + cos(pi*xnondim) )
85 eta1d(k) = -g%max_depth &
86 + (eta1d(1)+g%max_depth) * (
real(nz+1-k)/
real(nz) )
88 eta1d(nz+1) = -g%max_depth
90 h(i,j,k) = eta1d(k) - eta1d(k+1)
The module configures the model for the "external_gwave" experiment. external_gwave = External Gravit...
Ocean grid type. See mom_grid for details.
Provides the ocean grid type.
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()
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 external_gwave_initialize_thickness(h, G, param_file, just_read_params)
This subroutine initializes layer thicknesses for the external_gwave experiment.
subroutine, public mom_error(level, message, all_print)