48 use mom_io, only : write_field, slasher
54 implicit none ;
private 56 #include <MOM_memory.h> 65 subroutine bfb_set_coord(Rlay, g_prime, GV, param_file, eqn_of_state)
69 real,
dimension(NKMEM_),
intent(out) :: Rlay, g_prime
72 type(
eos_type),
pointer :: eqn_of_state
73 real :: drho_dt, SST_s, T_bot, rho_top, rho_bot
75 character(len=40) :: mdl =
"BFB_set_coord" 77 call get_param(param_file, mdl,
"DRHO_DT", drho_dt, &
78 "Rate of change of density with temperature.", &
79 units=
"kg m-3 K-1", default=-0.2)
80 call get_param(param_file, mdl,
"SST_S", sst_s, &
81 "SST at the suothern edge of the domain.", units=
"C", default=20.0)
82 call get_param(param_file, mdl,
"T_BOT", t_bot, &
83 "Bottom Temp", units=
"C", default=5.0)
84 rho_top = gv%rho0 + drho_dt*sst_s
85 rho_bot = gv%rho0 + drho_dt*t_bot
92 rlay(k) = (rho_bot - rho_top)/(nz-1)*
real(k-1) + rho_top
94 g_prime(k) = (rlay(k) - rlay(k-1))*gv%g_earth/gv%rho0
96 g_prime(k) = gv%g_earth
110 logical,
intent(in) :: use_temperature
114 real,
dimension(NIMEM_, NJMEM_, NKMEM_),
intent(in) :: h
119 real :: eta(szi_(g),szj_(g),szk_(g)+1)
120 real :: Idamp(szi_(g),szj_(g))
124 real :: damp, e_dense, damp_new, slat, wlon, lenlat, lenlon, nlat
125 character(len=40) :: mdl =
"BFB_initialize_sponges_southonly" 126 integer :: i, j, k, is, ie, js, je, isd, ied, jsd, jed, nz
128 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
129 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
131 eta(:,:,:) = 0.0 ; idamp(:,:) = 0.0
139 call get_param(param_file, mdl,
"MINIMUM_DEPTH", min_depth, &
140 "The minimum depth of the ocean.", units=
"m", default=0.0)
142 call get_param(param_file, mdl,
"SOUTHLAT", slat, &
143 "The southern latitude of the domain.", units=
"degrees")
144 call get_param(param_file, mdl,
"LENLAT", lenlat, &
145 "The latitudinal length of the domain.", units=
"degrees")
146 call get_param(param_file, mdl,
"WESTLON", wlon, &
147 "The western longitude of the domain.", units=
"degrees", default=0.0)
148 call get_param(param_file, mdl,
"LENLON", lenlon, &
149 "The longitudinal length of the domain.", units=
"degrees")
151 do k=1,nz ; h0(k) = -g%max_depth *
real(k-1) /
real(nz) ; enddo
153 do i=is,ie;
do j=js,je
154 if (g%geoLatT(i,j) < slat+2.0)
then ; damp = 1.0
155 elseif (g%geoLatT(i,j) < slat+4.0)
then 156 damp_new = 1.0*(slat+4.0-g%geoLatT(i,j))/2.0
164 do k = 1,nz; eta(i,j,k) = h0(k);
enddo 177 eta(i,j,nz+1) = -g%max_depth
179 if (g%bathyT(i,j) > min_depth)
then 180 idamp(i,j) = damp/86400.0
181 else ; idamp(i,j) = 0.0 ;
endif 203 #include "version_variable.h" 204 character(len=40) :: mdl =
"BFB_initialization" subroutine, public read_axis_data(filename, axis_name, var)
subroutine write_bfb_log(param_file)
Write output about the parameter values being used.
Ocean grid type. See mom_grid for details.
Calculates density of sea water from T, S and P.
Provides the ocean grid type.
This module contains I/O framework code.
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
subroutine, public calculate_density_derivs(T, S, pressure, drho_dT, drho_dS, start, npts, EOS)
Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs.
subroutine, public initialize_sponge(Iresttime, int_height, G, param_file, CS, Iresttime_i_mean, int_height_i_mean)
subroutine, public set_up_sponge_field(sp_val, f_ptr, G, nlay, CS, sp_val_i_mean)
Type to carry basic tracer information.
logical function, public is_root_pe()
subroutine, public add_tracer_obc_values(name, Reg, OBC_inflow, OBC_in_u, OBC_in_v)
This subroutine adds open boundary condition concentrations for a tracer that has previously been reg...
subroutine, public mom_mesg(message, verb, all_print)
Provides subroutines for quantities specific to the equation of state.
subroutine, public bfb_set_coord(Rlay, g_prime, GV, param_file, eqn_of_state)
The thermo_var_ptrs structure contains pointers to an assortment of thermodynamic fields that may be ...
subroutine, public create_file(unit, filename, vars, novars, fields, threading, timeunit, G, dG, GV)
Routine creates a new NetCDF file. It also sets up structures that describe this file and variables t...
subroutine, public mom_error(level, message, all_print)
subroutine, public bfb_initialize_sponges_southonly(G, use_temperature, tv, param_file, CSp, h)
A control structure for the equation of state.