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(SZI_(G),SZJ_(G),SZK_(GV)), &
92 real :: eta(SZI_(G),SZJ_(G),SZK_(GV)+1)
93 real :: Idamp(SZI_(G),SZJ_(G))
96 real :: slat, wlon, lenlat, lenlon, nlat
98 character(len=40) :: mdl =
"BFB_initialize_sponges_southonly" 99 integer :: i, j, k, is, ie, js, je, isd, ied, jsd, jed, nz
101 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
102 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
104 eta(:,:,:) = 0.0 ; idamp(:,:) = 0.0
112 call get_param(param_file, mdl,
"MINIMUM_DEPTH", min_depth, &
113 "The minimum depth of the ocean.", units=
"m", default=0.0, scale=us%m_to_Z)
115 call get_param(param_file, mdl,
"SOUTHLAT", slat, &
116 "The southern latitude of the domain.", units=
"degrees")
117 call get_param(param_file, mdl,
"LENLAT", lenlat, &
118 "The latitudinal length of the domain.", units=
"degrees")
119 call get_param(param_file, mdl,
"WESTLON", wlon, &
120 "The western longitude of the domain.", units=
"degrees", default=0.0)
121 call get_param(param_file, mdl,
"LENLON", lenlon, &
122 "The longitudinal length of the domain.", units=
"degrees")
124 do k=1,nz ; h0(k) = -g%max_depth * real(k-1) / real(nz) ;
enddo 129 max_damping = 1.0 / (86400.0*us%s_to_T)
131 do i=is,ie;
do j=js,je
132 if (g%bathyT(i,j) <= min_depth)
then ; idamp(i,j) = 0.0
133 elseif (g%geoLatT(i,j) < slat+2.0)
then ; idamp(i,j) = max_damping
134 elseif (g%geoLatT(i,j) < slat+4.0)
then 135 idamp(i,j) = max_damping * (slat+4.0-g%geoLatT(i,j))/2.0
136 else ; idamp(i,j) = 0.0
143 do k = 1,nz; eta(i,j,k) = h0(k);
enddo 157 eta(i,j,nz+1) = -g%max_depth
163 call initialize_sponge(idamp, eta, g, param_file, csp, gv)
169 if (first_call)
call write_bfb_log(param_file)