Go to the documentation of this file.
14 implicit none ;
private
16 #include <MOM_memory.h>
32 real,
dimension(SZI_(G),SZJ_(G),SZK_(GV)), &
36 logical,
optional,
intent(in) :: just_read_params
39 real :: eta1d(szk_(g)+1)
41 real :: ssh_anomaly_height
42 real :: ssh_anomaly_width
44 character(len=40) :: mdl =
"external_gwave_initialize_thickness"
46 #include "version_variable.h"
47 integer :: i, j, k, is, ie, js, je, nz
50 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
52 just_read = .false. ;
if (
present(just_read_params)) just_read = just_read_params
55 call mom_mesg(
" external_gwave_initialization.F90, external_gwave_initialize_thickness: setting thickness", 5)
57 if (.not.just_read)
call log_version(param_file, mdl, version,
"")
58 call get_param(param_file, mdl,
"SSH_ANOMALY_HEIGHT", ssh_anomaly_height, &
59 "The vertical displacement of the SSH anomaly. ", units=
"m", &
60 fail_if_missing=.not.just_read, do_not_log=just_read, scale=us%m_to_Z)
61 call get_param(param_file, mdl,
"SSH_ANOMALY_WIDTH", ssh_anomaly_width, &
62 "The lateral width of the SSH anomaly. ", units=
"coordinate", &
63 fail_if_missing=.not.just_read, do_not_log=just_read)
68 do j=g%jsc,g%jec ;
do i=g%isc,g%iec
69 xnondim = (g%geoLonT(i,j)-g%west_lon-0.5*g%len_lon) / ssh_anomaly_width
70 xnondim = min(1., abs(xnondim))
71 eta1d(1) = ssh_anomaly_height * 0.5 * ( 1. + cos(pi*xnondim) )
73 eta1d(k) = -g%max_depth &
74 + (eta1d(1)+g%max_depth) * ( real(nz+1-k)/real(nz) )
76 eta1d(nz+1) = -g%max_depth
78 h(i,j,k) = gv%Z_to_H * (eta1d(k) - eta1d(k+1))
Provides a transparent vertical ocean grid type and supporting routines.
An overloaded interface to log version information about modules.
Initialization for the "external gravity wave wave" configuration.
Pointers to an assortment of thermodynamic fields that may be available, including potential temperat...
subroutine, public mom_mesg(message, verb, all_print)
This provides a convenient interface for writing an informative comment.
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
A structure that can be parsed to read and document run-time parameters.
An overloaded interface to read and log the values of various types of parameters.
Describes various unit conversion factors.
Describes the vertical ocean grid, including unit conversion factors.
Provides transparent structures with groups of MOM6 variables and supporting routines.
The MOM6 facility to parse input files for runtime parameters.
Type to carry basic tracer information.
Provides the ocean grid type.
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.
logical function, public is_root_pe()
This returns .true. if the current PE is the root PE.
subroutine, public mom_error(level, message, all_print)
This provides a convenient interface for writing an mpp_error message with run-time filter based on a...
Routines for error handling and I/O management.
Ocean grid type. See mom_grid for details.
subroutine, public external_gwave_initialize_thickness(h, G, GV, US, param_file, just_read_params)
This subroutine initializes layer thicknesses for the external_gwave experiment.