10 implicit none ;
private 27 real :: compressibility_fraction = 0.
31 real :: rho_ml_avg_depth = 1.0
34 real :: nlay_ml_offset = 2.0
37 integer :: nz_fixed_surface = 2
40 real :: dz_ml_min = 1.0
44 logical :: fix_haloclines = .false.
48 real :: halocline_filter_length = 2.0
51 real :: halocline_strat_tol = 0.25
54 real,
allocatable,
dimension(:) :: target_density
57 real,
allocatable,
dimension(:) :: max_interface_depths
60 real,
allocatable,
dimension(:) :: max_layer_thickness
73 integer,
intent(in) :: nk
74 real,
intent(in) :: ref_pressure
75 real,
dimension(:),
intent(in) :: target_density
78 if (
associated(cs))
call mom_error(fatal,
"init_coord_slight: CS already associated!")
80 allocate(cs%target_density(nk+1))
83 cs%ref_pressure = ref_pressure
84 cs%target_density(:) = target_density(:)
85 cs%interp_CS = interp_cs
92 if (.not.
associated(cs))
return 93 deallocate(cs%target_density)
98 min_thickness, compressibility_fraction, &
99 dz_ml_min, nz_fixed_surface, Rho_ML_avg_depth, nlay_ML_offset, fix_haloclines, &
100 halocline_filter_length, halocline_strat_tol, interp_CS)
102 real,
optional,
dimension(:),
intent(in) :: max_interface_depths
103 real,
optional,
dimension(:),
intent(in) :: max_layer_thickness
104 real,
optional,
intent(in) :: min_thickness
105 real,
optional,
intent(in) :: compressibility_fraction
106 real,
optional,
intent(in) :: dz_ml_min
107 integer,
optional,
intent(in) :: nz_fixed_surface
108 real,
optional,
intent(in) :: Rho_ML_avg_depth
109 real,
optional,
intent(in) :: nlay_ML_offset
110 logical,
optional,
intent(in) :: fix_haloclines
111 real,
optional,
intent(in) :: halocline_filter_length
112 real,
optional,
intent(in) :: halocline_strat_tol
115 if (.not.
associated(cs))
call mom_error(fatal,
"set_slight_params: CS not associated")
117 if (
present(max_interface_depths))
then 118 if (
size(max_interface_depths) /= cs%nk+1) &
119 call mom_error(fatal,
"set_slight_params: max_interface_depths inconsistent size")
120 allocate(cs%max_interface_depths(cs%nk+1))
121 cs%max_interface_depths(:) = max_interface_depths(:)
124 if (
present(max_layer_thickness))
then 125 if (
size(max_layer_thickness) /= cs%nk) &
126 call mom_error(fatal,
"set_slight_params: max_layer_thickness inconsistent size")
127 allocate(cs%max_layer_thickness(cs%nk))
128 cs%max_layer_thickness(:) = max_layer_thickness(:)
131 if (
present(min_thickness)) cs%min_thickness = min_thickness
132 if (
present(compressibility_fraction)) cs%compressibility_fraction = compressibility_fraction
134 if (
present(dz_ml_min)) cs%dz_ml_min = dz_ml_min
135 if (
present(nz_fixed_surface)) cs%nz_fixed_surface = nz_fixed_surface
136 if (
present(rho_ml_avg_depth)) cs%Rho_ML_avg_depth = rho_ml_avg_depth
137 if (
present(nlay_ml_offset)) cs%nlay_ML_offset = nlay_ml_offset
138 if (
present(fix_haloclines)) cs%fix_haloclines = fix_haloclines
139 if (
present(halocline_filter_length)) cs%halocline_filter_length = halocline_filter_length
140 if (
present(halocline_strat_tol))
then 141 if (halocline_strat_tol > 1.0)
call mom_error(fatal,
"set_slight_params: "//&
142 "HALOCLINE_STRAT_TOL must not exceed 1.0.")
143 cs%halocline_strat_tol = halocline_strat_tol
146 if (
present(interp_cs)) cs%interp_CS = interp_cs
151 nz, depth, h_col, T_col, S_col, p_col, z_col, z_col_new)
153 type(
eos_type),
pointer :: eqn_of_state
154 real,
intent(in) :: H_to_Pa
155 real,
intent(in) :: m_to_H
156 real,
intent(in) :: H_subroundoff
157 integer,
intent(in) :: nz
158 real,
intent(in) :: depth
159 real,
dimension(nz),
intent(in) :: T_col, S_col
160 real,
dimension(nz),
intent(in) :: h_col
161 real,
dimension(nz),
intent(in) :: p_col
162 real,
dimension(nz+1),
intent(in) :: z_col
163 real,
dimension(nz+1),
intent(inout) :: z_col_new
166 real,
dimension(nz) :: rho_col
167 real,
dimension(nz) :: T_f, S_f
168 logical,
dimension(nz+1) :: reliable
169 real,
dimension(nz+1) :: T_int, S_int
170 real,
dimension(nz+1) :: rho_tmp, drho_dp, p_IS, p_R
171 real,
dimension(nz+1) :: drhoIS_dT, drhoIS_dS
172 real,
dimension(nz+1) :: drhoR_dT, drhoR_dS
173 real,
dimension(nz+1) :: strat_rat
175 real :: drIS, drR, Fn_now, I_HStol, Fn_zero_val
191 logical :: maximum_depths_set
192 logical :: maximum_h_set
193 real :: k2_used, k2here, dz_sum, z_max
195 real :: h_tr, b_denom_1, b1, d1
196 real,
dimension(nz) :: c1
197 integer :: kur1, kur2
199 integer :: i, j, k, nkml
201 maximum_depths_set =
allocated(cs%max_interface_depths)
202 maximum_h_set =
allocated(cs%max_layer_thickness)
204 if (z_col(nz+1) - z_col(1) < nz*cs%min_thickness)
then 206 dz = (z_col(nz+1) - z_col(1)) /
real(nz)
207 do k=2,nz ; z_col_new(k) = z_col(1) + dz*
real(K-1) ; enddo
215 z_col_new, cs, reliable, debug=.true.)
218 if (cs%min_thickness > 0.0)
then 220 do k=2,nz ;
if (z_col_new(k) < z_col_new(k-1) + cs%min_thickness)
then 221 z_col_new(k) = z_col_new(k-1) + cs%min_thickness
224 do k=nz,2,-1 ;
if (z_col_new(k) > z_col_new(k+1) - cs%min_thickness)
then 225 z_col_new(k) = z_col_new(k+1) - cs%min_thickness
236 do k=kur_ss,nz ;
if (.not.reliable(k))
then 242 do k=kur1+1,nz+1 ;
if (reliable(k))
then 243 kur2 = k-1 ; kur_ss = k ;
exit 245 if (kur2 < kur1)
call mom_error(fatal,
"Bad unreliable range.")
247 dz_ur = z_col_new(kur2+1) - z_col_new(kur1-1)
251 wgt = 1.0 ; cowgt = 0.0
253 z_col_new(k) = cowgt*z_col_new(k) + &
254 wgt * (z_col_new(kur1-1) + dz_ur*(k - (kur1-1)) / ((kur2 - kur1) + 2))
260 z_wt = 0.0 ; rho_x_z = 0.0
261 h_ml_av = m_to_h*cs%Rho_ml_avg_depth
263 if (z_wt + h_col(k) >= h_ml_av)
then 264 rho_x_z = rho_x_z + rho_col(k) * (h_ml_av - z_wt)
268 rho_x_z = rho_x_z + rho_col(k) * h_col(k)
269 z_wt = z_wt + h_col(k)
272 if (z_wt > 0.0) rho_ml_av = rho_x_z / z_wt
274 nkml = cs%nz_fixed_surface
276 if (rho_ml_av <= cs%target_density(nkml))
then 277 k_interior = cs%nlay_ml_offset +
real(nkml)
278 elseif (rho_ml_av > cs%target_density(nz+1))
then 279 k_interior =
real(nz+1)
281 if ((rho_ml_av >= cs%target_density(k)) .and. &
282 (rho_ml_av < cs%target_density(k+1)))
then 283 k_interior = (cs%nlay_ml_offset + k) + &
284 (rho_ml_av - cs%target_density(k)) / &
285 (cs%target_density(k+1) - cs%target_density(k))
289 if (k_interior >
real(nz+1)) k_interior = real(nz+1)
292 k = int(ceiling(k_interior))
293 z_interior = (k-k_interior)*z_col_new(k-1) + (1.0+(k_interior-k))*z_col_new(k)
295 if (cs%fix_haloclines)
then 301 if (cs%halocline_filter_length > 0.0)
then 302 lfilt = cs%halocline_filter_length*m_to_h
305 h_tr = h_col(1) + h_subroundoff
306 b1 = 1.0 / (h_tr + lfilt) ; d1 = h_tr * b1
307 t_f(1) = (b1*h_tr)*t_col(1) ; s_f(1) = (b1*h_tr)*s_col(1)
310 h_tr = h_col(k) + h_subroundoff ; b_denom_1 = h_tr + d1*lfilt
311 b1 = 1.0 / (b_denom_1 + lfilt) ; d1 = b_denom_1 * b1
312 t_f(k) = b1 * (h_tr*t_col(k) + lfilt*t_f(k-1))
313 s_f(k) = b1 * (h_tr*s_col(k) + lfilt*s_f(k-1))
316 t_f(k) = t_f(k) + c1(k+1)*t_f(k+1) ; s_f(k) = s_f(k) + c1(k+1)*s_f(k+1)
319 do k=1,nz ; t_f(k) = t_col(k) ; s_f(k) = s_col(k) ;
enddo 322 t_int(1) = t_f(1) ; s_int(1) = s_f(1)
324 t_int(k) = 0.5*(t_f(k-1) + t_f(k)) ; s_int(k) = 0.5*(s_f(k-1) + s_f(k))
325 p_is(k) = z_col(k) * h_to_pa
326 p_r(k) = cs%ref_pressure + cs%compressibility_fraction * ( p_is(k) - cs%ref_pressure )
328 t_int(nz+1) = t_f(nz) ; s_int(nz+1) = s_f(nz)
329 p_is(nz+1) = z_col(nz+1) * h_to_pa
334 if (cs%compressibility_fraction > 0.0)
then 335 call calculate_compress(t_int, s_int, p_r, rho_tmp, drho_dp, 2, nz-1, &
338 do k=2,nz ; drho_dp(k) = 0.0 ;
enddo 341 h_to_cpa = cs%compressibility_fraction*h_to_pa
344 dris = drhois_dt(k) * (t_f(k) - t_f(k-1)) + &
345 drhois_ds(k) * (s_f(k) - s_f(k-1))
346 drr = (drhor_dt(k) * (t_f(k) - t_f(k-1)) + &
347 drhor_ds(k) * (s_f(k) - s_f(k-1))) + &
348 drho_dp(k) * (h_to_cpa*0.5*(h_col(k) + h_col(k-1)))
350 if (dris <= 0.0)
then 353 strat_rat(k) = 2.0*max(drr,0.0) / (dris + abs(drr))
356 strat_rat(nz+1) = 1.0
358 z_int_unst = 0.0 ; fn_now = 0.0
359 fn_zero_val = min(2.0*cs%halocline_strat_tol, &
360 0.5*(1.0 + cs%halocline_strat_tol))
361 if (cs%halocline_strat_tol > 0.0)
then 363 i_hstol = 0.0 ;
if (fn_zero_val - cs%halocline_strat_tol > 0.0) &
364 i_hstol = 1.0 / (fn_zero_val - cs%halocline_strat_tol)
365 do k=nz,1,-1 ;
if (cs%ref_pressure > p_is(k+1))
then 366 z_int_unst = z_int_unst + fn_now * h_col(k)
367 if (strat_rat(k) <= fn_zero_val)
then 368 if (strat_rat(k) <= cs%halocline_strat_tol)
then ; fn_now = 1.0
370 fn_now = max(fn_now, (fn_zero_val - strat_rat(k)) * i_hstol)
375 do k=nz,1,-1 ;
if (cs%ref_pressure > p_is(k+1))
then 376 z_int_unst = z_int_unst + fn_now * h_col(k)
377 if (strat_rat(k) <= cs%halocline_strat_tol) fn_now = 1.0
381 if (z_interior < z_int_unst)
then 383 kur1 = max(int(ceiling(k_interior)),2)
384 if (z_col_new(kur1-1) < z_interior)
then 386 do k = kur1,nz+1 ;
if (z_col_new(k) >= z_int_unst)
then 388 if (z_col_new(k-1) >= z_int_unst) &
389 call mom_error(fatal,
"build_grid_SLight, bad halocline structure.")
390 k_int2 =
real(K-1) + (z_int_unst - z_col_new(k-1)) / &
391 (z_col_new(k) - z_col_new(k-1))
394 if (z_col_new(nz+1) < z_int_unst)
then 396 z_int_unst = z_col_new(nz+1) ; k_int2 =
real(nz+1)
400 if (k_int2 > k_interior)
then 401 k_interior = k_int2 ; z_interior = z_int_unst
409 z_col_new(k) = min((k-1)*cs%dz_ml_min, &
410 z_col_new(nz+1) - cs%min_thickness*(nz+1-k))
412 z_ml_fix = z_col_new(nkml+1)
413 if (z_interior > z_ml_fix)
then 414 dz_dk = (z_interior - z_ml_fix) / (k_interior - (nkml+1))
415 do k=nkml+2,int(floor(k_interior))
416 z_col_new(k) = z_ml_fix + dz_dk * (k - (nkml+1))
420 if (z_col_new(k) <= z_col_new(cs%nz_fixed_surface+1))
then 421 z_col_new(k) = z_col_new(cs%nz_fixed_surface+1)
426 if (maximum_depths_set .and. maximum_h_set)
then ;
do k=2,nz
429 z_col_new(k) = min(z_col_new(k), cs%max_interface_depths(k), &
430 z_col_new(k-1) + cs%max_layer_thickness(k-1))
431 enddo ;
elseif (maximum_depths_set)
then ;
do k=2,nz
432 z_col_new(k) = min(z_col_new(k), cs%max_interface_depths(k))
433 enddo ;
elseif (maximum_h_set)
then ;
do k=2,nz
434 z_col_new(k) = min(z_col_new(k), z_col_new(k-1) + cs%max_layer_thickness(k-1))
445 integer,
intent(in) :: nz
446 real,
dimension(nz),
intent(in) :: rho_col
447 real,
dimension(nz),
intent(in) :: h_col
448 real,
dimension(nz+1),
intent(in) :: z_col
449 real,
dimension(nz+1),
intent(in) :: rho_tgt
450 real,
dimension(nz+1),
intent(inout) :: z_col_new
452 logical,
dimension(nz+1),
intent(inout) :: reliable
454 logical,
optional,
intent(in) :: debug
456 real,
dimension(nz+1) :: ru_max_int
457 real,
dimension(nz+1) :: ru_min_int
458 real,
dimension(nz) :: ru_max_lay
459 real,
dimension(nz) :: ru_min_lay
460 real,
dimension(nz,2) :: ppoly_i_E
461 real,
dimension(nz,2) :: ppoly_i_S
462 real,
dimension(nz,DEGREE_MAX+1) :: ppoly_i_coefficients
463 logical,
dimension(nz) :: unstable_lay
464 logical,
dimension(nz+1) :: unstable_int
469 real :: zf1, zf2, rfn1, rfn2
470 real :: drfn_dzf, sgn, delta_zf, zf_prev
474 integer :: ppoly_degree
475 integer :: k, k1, k1_min, itt, max_itt, m
480 debugging = .false. ;
if (
present(debug)) debugging = debug
484 z_sgn = 1.0 ;
if ( z_col(1) > z_col(nz+1) ) z_sgn = -1.0
487 if (abs((z_col(k+1) - z_col(k)) - z_sgn*h_col(k)) > &
488 1.0e-14*(abs(z_col(k+1)) + abs(z_col(k)) + abs(h_col(k))) ) &
489 call mom_error(fatal,
"rho_interfaces_col: Inconsistent z_col and h_col")
493 if ( z_col(1) == z_col(nz+1) )
then 495 do k=1,nz+1 ; z_col_new(k) = z_col(1) ; reliable(k) = .true. ;
enddo 500 call regridding_set_ppolys(cs%interp_CS, rho_col, nz, h_col, ppoly_i_e, ppoly_i_s, &
501 ppoly_i_coefficients, ppoly_degree)
507 unstable_int(1) = .false.
508 ru_max_int(1) = ppoly_i_e(1,1)
510 unstable_lay(1) = (ppoly_i_e(1,1) > ppoly_i_e(1,2))
511 ru_max_lay(1) = max(ppoly_i_e(1,1), ppoly_i_e(1,2))
514 unstable_int(k) = (ppoly_i_e(k-1,2) > ppoly_i_e(k,1))
515 ru_max_int(k) = max(ppoly_i_e(k-1,2), ppoly_i_e(k,1))
516 ru_min_int(k) = min(ppoly_i_e(k-1,2), ppoly_i_e(k,1))
517 if (unstable_int(k) .and. unstable_lay(k-1)) &
518 ru_max_int(k) = max(ru_max_lay(k-1), ru_max_int(k))
520 unstable_lay(k) = (ppoly_i_e(k,1) > ppoly_i_e(k,2))
521 ru_max_lay(k) = max(ppoly_i_e(k,1), ppoly_i_e(k,2))
522 ru_min_lay(k) = min(ppoly_i_e(k,1), ppoly_i_e(k,2))
523 if (unstable_lay(k) .and. unstable_int(k)) &
524 ru_max_lay(k) = max(ru_max_int(k), ru_max_lay(k))
526 unstable_int(nz+1) = .false.
527 ru_min_int(nz+1) = ppoly_i_e(nz,2)
530 if (unstable_lay(k) .and. unstable_int(k+1)) &
531 ru_min_lay(k) = min(ru_min_int(k+1), ru_min_lay(k))
533 if (unstable_int(k) .and. unstable_lay(k)) &
534 ru_min_int(k) = min(ru_min_lay(k), ru_min_int(k))
537 z_col_new(1) = z_col(1) ; reliable(1) = .true.
545 if (rt <= ppoly_i_e(k1_min,1))
then 546 z_col_new(k) = z_col(k1_min)
549 elseif (k1_min == nz+1)
then 550 z_col_new(k) = z_col(nz+1)
553 if (unstable_int(k) .and. (rt >= ru_min_int(k)) .and. (rt <= ru_max_int(k)))
then 555 z_col_new(k) = z_col(k) ; reliable(k) = .false.
556 k1_min = k ; k_found = .true.
557 elseif ((rt >= ppoly_i_e(k-1,2)) .and. (rt <= ppoly_i_e(k,1)))
then 559 z_col_new(k) = z_col(k) ; reliable(k) = .true.
560 k1_min = k ; k_found = .true.
561 elseif (rt < ppoly_i_e(k-1,2))
then 564 if ((rt < ppoly_i_e(k1,2)) .and. (rt > ppoly_i_e(k1,1)))
then 567 k1_min = k1 ; k_found = .true. ;
exit 568 elseif (unstable_lay(k1) .and. (rt >= ru_min_lay(k1)) .and. (rt <= ru_max_lay(k1)))
then 571 z_col_new(k) = z_col(k1+1) ; reliable(k) = .false.
572 k1_min = k1 ; k_found = .true. ;
exit 575 if (k1 > 1)
then ;
if ((rt <= ppoly_i_e(k1,1)) .and. (rt >= ppoly_i_e(k1-1,2)))
then 577 z_col_new(k) = z_col(k1) ; reliable(k) = .true.
578 k1_min = k1 ; k_found = .true. ;
exit 579 elseif (unstable_int(k1) .and. (rt >= ru_min_int(k1)) .and. (rt <= ru_max_int(k1)))
then 582 z_col_new(k) = z_col(k1) ; reliable(k) = .false.
583 k1_min = k1 ; k_found = .true. ;
exit 587 if (.not.k_found)
then 590 z_col_new(k) = z_col(k1_min)
592 z_col_new(k) = z_col(k1_min)
598 if ((rt < ppoly_i_e(k1,2)) .and. (rt > ppoly_i_e(k1,1)))
then 601 k1_min = k1 ; k_found = .true. ;
exit 602 elseif (unstable_lay(k1) .and. (rt >= ru_min_lay(k1)) .and. (rt <= ru_max_lay(k1)))
then 605 z_col_new(k) = z_col(k1)
606 reliable(k) = .false.
607 k1_min = k1 ; k_found = .true. ;
exit 609 if (k1 < nz)
then ;
if ((rt <= ppoly_i_e(k1+1,1)) .and. (rt >= ppoly_i_e(k1,2)))
then 612 z_col_new(k) = z_col(k1+1) ; reliable(k) = .true.
613 k1_min = k1+1 ; k_found = .true. ;
exit 614 elseif (unstable_int(k1+1) .and. (rt >= ru_min_int(k1+1)) .and. (rt <= ru_max_int(k1+1)))
then 617 z_col_new(k) = z_col(k1+1)
618 reliable(k) = .false.
619 k1_min = k1+1 ; k_found = .true. ;
exit 622 if (.not.k_found)
then 623 z_col_new(k) = z_col(nz+1)
624 if (rt >= ppoly_i_e(nz,2))
then 627 reliable(k) = .false.
632 if (k_layer > 0)
then 634 if (.not.(ppoly_i_e(k1,2) > ppoly_i_e(k1,1)))
call mom_error(fatal, &
635 "build_grid_SLight: Erroneously searching for an interface in an unstratified layer.")
638 zf = (rt - ppoly_i_e(k1,1)) / (ppoly_i_e(k1,2) - ppoly_i_e(k1,1))
640 if (ppoly_degree > 1)
then 641 a(:) = 0.0 ; a(1) = ppoly_i_coefficients(k_layer,1) - rt
642 do m=2,ppoly_degree+1 ; a(m) = ppoly_i_coefficients(k_layer,m) ;
enddo 644 zf1 = 0.0 ; rfn1 = a(1)
645 zf2 = 1.0 ; rfn2 = a(1) + (a(2) + (a(3) + (a(4) + a(5))))
646 if (rfn1 * rfn2 > 0.0)
call mom_error(fatal,
"build_grid_SLight: Bad bracketing.")
649 rfn = a(1) + zf*(a(2) + zf*(a(3) + zf*(a(4) + zf*a(5))))
651 if (rfn * rfn1 > 0.0)
then 652 zf1 = zf ; rfn1 = rfn
654 zf2 = zf ; rfn2 = rfn
656 if (rfn1 == rfn2)
exit 658 drfn_dzf = (a(2) + zf*(2.0*a(3) + zf*(3.0*a(4) + zf*4.0*a(5))))
659 sgn = 1.0 ;
if (drfn_dzf < 0.0) sgn = -1.0
661 if ((sgn*(zf - rfn) >= zf1 * abs(drfn_dzf)) .and. &
662 (sgn*(zf - rfn) <= zf2 * abs(drfn_dzf)))
then 663 delta_zf = -rfn / drfn_dzf
667 zf = ( rfn2 * zf1 - rfn1 * zf2 ) / (rfn2 - rfn1)
668 delta_zf = zf - zf_prev
671 if (abs(delta_zf) < tol)
exit 674 z_col_new(k) = z_col(k_layer) + zf * z_sgn * h_col(k_layer)
681 z_col_new(nz+1) = z_col(nz+1) ; reliable(nz+1) = .true.
subroutine, public end_coord_slight(CS)
Calculates density of sea water from T, S and P.
subroutine, public calculate_compress(T, S, pressure, rho, drho_dp, start, npts, EOS)
Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs...
subroutine, public set_slight_params(CS, max_interface_depths, max_layer_thickness, min_thickness, compressibility_fraction, dz_ml_min, nz_fixed_surface, Rho_ML_avg_depth, nlay_ML_offset, fix_haloclines, halocline_filter_length, halocline_strat_tol, interp_CS)
subroutine, public init_coord_slight(CS, nk, ref_pressure, target_density, interp_CS)
Initialise a slight_CS with pointers to parameters.
subroutine, public regridding_set_ppolys(CS, densities, n0, h0, ppoly0_E, ppoly0_S, ppoly0_coefficients, degree)
Given the set of target values and cell densities, this routine builds an interpolated profile for th...
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.
Control structure containing required parameters for the SLight coordinate.
integer, parameter, public nr_iterations
Maximum number of Newton-Raphson iterations. Newton-Raphson iterations are used to build the new grid...
Provides subroutines for quantities specific to the equation of state.
integer, parameter, public degree_max
subroutine rho_interfaces_col(rho_col, h_col, z_col, rho_tgt, nz, z_col_new, CS, reliable, debug)
Finds the new interface locations in a column of water that match the prescribed target densities...
real, parameter, public nr_tolerance
Tolerance for Newton-Raphson iterations (stop when increment falls below this)
Regrid columns for the SLight coordinate.
subroutine, public mom_error(level, message, all_print)
subroutine, public build_slight_column(CS, eqn_of_state, H_to_Pa, m_to_H, H_subroundoff, nz, depth, h_col, T_col, S_col, p_col, z_col, z_col_new)
Build a SLight coordinate column.
A control structure for the equation of state.