This subroutine sets up the sponges for the southern bouundary of the domain. Maximum damping occurs within 2 degrees lat of the boundary. The damping linearly decreases northward over the next 2 degrees.
80 type(ocean_grid_type),
intent(in) :: G
81 type(verticalGrid_type),
intent(in) :: GV
82 type(unit_scale_type),
intent(in) :: US
83 logical,
intent(in) :: use_temperature
85 type(thermo_var_ptrs),
intent(in) :: tv
86 type(param_file_type),
intent(in) :: param_file
87 type(sponge_CS),
pointer :: CSp
88 real,
dimension(NIMEM_, NJMEM_, NKMEM_), &
92 real :: eta(SZI_(G),SZJ_(G),SZK_(G)+1)
93 real :: Idamp(SZI_(G),SZJ_(G))
96 real :: damp, e_dense, damp_new, slat, wlon, lenlat, lenlon, nlat
97 character(len=40) :: mdl =
"BFB_initialize_sponges_southonly"
98 integer :: i, j, k, is, ie, js, je, isd, ied, jsd, jed, nz
100 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
101 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
103 eta(:,:,:) = 0.0 ; idamp(:,:) = 0.0
111 call get_param(param_file, mdl,
"MINIMUM_DEPTH", min_depth, &
112 "The minimum depth of the ocean.", units=
"m", default=0.0, scale=us%m_to_Z)
114 call get_param(param_file, mdl,
"SOUTHLAT", slat, &
115 "The southern latitude of the domain.", units=
"degrees")
116 call get_param(param_file, mdl,
"LENLAT", lenlat, &
117 "The latitudinal length of the domain.", units=
"degrees")
118 call get_param(param_file, mdl,
"WESTLON", wlon, &
119 "The western longitude of the domain.", units=
"degrees", default=0.0)
120 call get_param(param_file, mdl,
"LENLON", lenlon, &
121 "The longitudinal length of the domain.", units=
"degrees")
123 do k=1,nz ; h0(k) = -g%max_depth * real(k-1) / real(nz) ;
enddo
128 do i=is,ie;
do j=js,je
129 if (g%geoLatT(i,j) < slat+2.0)
then ; damp = 1.0
130 elseif (g%geoLatT(i,j) < slat+4.0)
then
131 damp_new = 1.0*(slat+4.0-g%geoLatT(i,j))/2.0
139 do k = 1,nz; eta(i,j,k) = h0(k);
enddo
153 eta(i,j,nz+1) = -g%max_depth
155 if (g%bathyT(i,j) > min_depth)
then
156 idamp(i,j) = damp/86400.0
157 else ; idamp(i,j) = 0.0 ;
endif
162 call initialize_sponge(idamp, eta, g, param_file, csp, gv)
168 if (first_call)
call write_bfb_log(param_file)