diff --git a/src/shared/cvmix_convection.F90 b/src/shared/cvmix_convection.F90 index 058dda33c..7cb13648d 100644 --- a/src/shared/cvmix_convection.F90 +++ b/src/shared/cvmix_convection.F90 @@ -65,13 +65,16 @@ module cvmix_convection private ! Convective diff ! diffusivity coefficient used in convective regime - real(cvmix_r8) :: convect_diff ! units: m^2/s + real(cvmix_r8) :: convect_diff ! units: m^2/s + ! viscosity coefficient used in convective regime real(cvmix_r8) :: convect_visc ! units: m^2/s logical :: lBruntVaisala + ! Threshold for squared buoyancy frequency needed to trigger ! Brunt-Vaisala parameterization real(cvmix_r8) :: BVsqr_convect ! units: s^-2 + ! Flag for what to do with old values of CVmix_vars%[MTS]diff integer :: handle_old_vals end type cvmix_conv_params_type diff --git a/src/shared/cvmix_ddiff.F90 b/src/shared/cvmix_ddiff.F90 index 682577e83..0b9caff8e 100644 --- a/src/shared/cvmix_ddiff.F90 +++ b/src/shared/cvmix_ddiff.F90 @@ -419,8 +419,8 @@ subroutine cvmix_coeffs_ddiff_low(Tdiff_out, Sdiff_out, strat_param_num, & CVmix_ddiff_params_in%kappa_ddiff_param3* & (cvmix_one/Rrho-cvmix_one))) case ("K88") - ddiff = CVmix_ddiff_params_in%mol_diff * real(8.7,cvmix_r8) * & - (Rrho**real(1.1,cvmix_r8)) + ddiff = CVmix_ddiff_params_in%mol_diff * 8.7_cvmix_r8 * & + (Rrho**1.1_cvmix_r8) case DEFAULT print*, "ERROR: ", trim(CVmix_ddiff_params_in%diff_conv_type), & " is not a valid value for diff_conv_type" diff --git a/src/shared/cvmix_kinds_and_types.F90 b/src/shared/cvmix_kinds_and_types.F90 index 1eb4977de..07b7da587 100644 --- a/src/shared/cvmix_kinds_and_types.F90 +++ b/src/shared/cvmix_kinds_and_types.F90 @@ -39,8 +39,8 @@ module cvmix_kinds_and_types ! Global parameters: ! The constant 1 is used repeatedly in PP and double-diff mixing. ! The value for pi is needed for Bryan-Lewis mixing. - real(cvmix_r8), parameter, public :: cvmix_zero = 0.0_cvmix_r8, & - cvmix_one = 1.0_cvmix_r8 + real(cvmix_r8), parameter, public :: cvmix_zero = real(0,cvmix_r8), & + cvmix_one = real(1,cvmix_r8) real(cvmix_r8), parameter, public :: cvmix_PI = & 3.14159265358979323846_cvmix_r8 diff --git a/src/shared/cvmix_kpp.F90 b/src/shared/cvmix_kpp.F90 index 7b873f42a..77933ed59 100644 --- a/src/shared/cvmix_kpp.F90 +++ b/src/shared/cvmix_kpp.F90 @@ -1512,7 +1512,7 @@ subroutine cvmix_kpp_compute_nonlocal(shape_fun, sigma, nonlocal, & GatS = cvmix_math_evaluate_cubic(shape_fun, sigma) nonlocal = GatS*(Cstar*vonkar*(vonkar*surf_layer_ext*c_s)** & - (real(1,cvmix_r8)/real(3,cvmix_r8))) + (cvmix_one/real(3,cvmix_r8))) ! EOC end subroutine cvmix_kpp_compute_nonlocal @@ -1831,7 +1831,7 @@ subroutine cvmix_kpp_compute_turbulent_scales_1d_sigma(sigma_coord, & vonkar * surf_buoy_force ! w_m = vonkar * u* / phi_m ! = vonkar * ((u*/phi_m)^3)^1/3 - w_m(kw) = vonkar*(w_m(kw)**(real(1,cvmix_r8)/real(3,cvmix_r8))) + w_m(kw) = vonkar*(w_m(kw)**(cvmix_one/real(3,cvmix_r8))) end do end if ! surf_buoy_force >= 0 end if ! compute_wm @@ -1850,7 +1850,7 @@ subroutine cvmix_kpp_compute_turbulent_scales_1d_sigma(sigma_coord, & vonkar * surf_buoy_force ! w_s = vonkar * u* / phi_s ! = vonkar * ((u*/phi_s)^3)^1/3 - w_s(kw) = vonkar*(w_s(kw)**(real(1,cvmix_r8)/real(3,cvmix_r8))) + w_s(kw) = vonkar*(w_s(kw)**(cvmix_one/real(3,cvmix_r8))) end do end if ! surf_buoy_force >= 0 end if ! compute_ws @@ -1962,7 +1962,7 @@ subroutine cvmix_kpp_compute_turbulent_scales_1d_OBL(sigma_coord, & vonkar * surf_buoy_force(kw) ! w_m = vonkar * u* / phi_m ! = vonkar * ((u*/phi_m)^3)^1/3 - w_m(kw) = vonkar*(w_m(kw)**(real(1,cvmix_r8)/real(3,cvmix_r8))) + w_m(kw) = vonkar*(w_m(kw)**(cvmix_one/real(3,cvmix_r8))) endif end do end if ! compute_wm @@ -1982,7 +1982,7 @@ subroutine cvmix_kpp_compute_turbulent_scales_1d_OBL(sigma_coord, & vonkar * surf_buoy_force(kw) ! w_s = vonkar * u* / phi_s ! = vonkar * ((u*/phi_s)^3)^1/3 - w_s(kw) = vonkar*(w_s(kw)**(real(1,cvmix_r8)/real(3,cvmix_r8))) + w_s(kw) = vonkar*(w_s(kw)**(cvmix_one/real(3,cvmix_r8))) end if ! surf_buoy_force >= 0 end do end if ! compute_ws diff --git a/src/shared/cvmix_math.F90 b/src/shared/cvmix_math.F90 index e6b992417..6f2b6122a 100644 --- a/src/shared/cvmix_math.F90 +++ b/src/shared/cvmix_math.F90 @@ -22,7 +22,8 @@ module cvmix_math ! !USES: - use cvmix_kinds_and_types, only : cvmix_r8 + use cvmix_kinds_and_types, only : cvmix_r8, & + cvmix_one !EOP @@ -111,9 +112,9 @@ subroutine cvmix_math_poly_interp(coeffs, interp_type, x, y, x0, y0) rhs(3) = 0.0_cvmix_r8 end if - Minv(1,1) = -real(1, cvmix_r8)/det - Minv(1,2) = real(1, cvmix_r8)/det - Minv(1,3) = -real(1, cvmix_r8)/(x(2)-x(1)) + Minv(1,1) = -cvmix_one/det + Minv(1,2) = cvmix_one/det + Minv(1,3) = -cvmix_one/(x(2)-x(1)) Minv(2,1) = real(2, cvmix_r8)*x(1)/det Minv(2,2) = -real(2, cvmix_r8)*x(1)/det Minv(2,3) = (x(2)+x(1))/(x(2)-x(1))