14 implicit none ;
private 16 #include <MOM_memory.h> 18 public external_gwave_initialize_thickness
28 subroutine external_gwave_initialize_thickness(h, G, GV, US, param_file, just_read_params)
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))
82 end subroutine external_gwave_initialize_thickness
Initialization for the "external gravity wave wave" configuration.
Ocean grid type. See mom_grid for details.
A structure that can be parsed to read and document run-time parameters.
Provides the ocean grid type.
The MOM6 facility to parse input files for runtime parameters.
Describes various unit conversion factors.
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.
Type to carry basic tracer information.
Routines for error handling and I/O management.
An overloaded interface to log version information about modules.
Describes the vertical ocean grid, including unit conversion factors.
Pointers to an assortment of thermodynamic fields that may be available, including potential temperat...
Provides a transparent vertical ocean grid type and supporting routines.
Provides transparent structures with groups of MOM6 variables and supporting routines.
An overloaded interface to read and log the values of various types of parameters.