diff --git a/src/tracer/DOME_tracer.F90 b/src/tracer/DOME_tracer.F90 index 5793f75914..45eebb983e 100644 --- a/src/tracer/DOME_tracer.F90 +++ b/src/tracer/DOME_tracer.F90 @@ -308,7 +308,7 @@ subroutine DOME_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, type(DOME_tracer_CS), pointer :: CS !< The control structure returned by a previous !! call to DOME_register_tracer. real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] diff --git a/src/tracer/ISOMIP_tracer.F90 b/src/tracer/ISOMIP_tracer.F90 index c7909300e0..36bc3edb65 100644 --- a/src/tracer/ISOMIP_tracer.F90 +++ b/src/tracer/ISOMIP_tracer.F90 @@ -272,7 +272,7 @@ subroutine ISOMIP_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, G type(ISOMIP_tracer_CS), pointer :: CS !< The control structure returned by a previous !! call to ISOMIP_register_tracer. real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] diff --git a/src/tracer/MOM_OCMIP2_CFC.F90 b/src/tracer/MOM_OCMIP2_CFC.F90 index 3dbbde970f..805409c16b 100644 --- a/src/tracer/MOM_OCMIP2_CFC.F90 +++ b/src/tracer/MOM_OCMIP2_CFC.F90 @@ -45,24 +45,28 @@ module MOM_OCMIP2_CFC type(time_type), pointer :: Time => NULL() !< A pointer to the ocean model's clock. type(tracer_registry_type), pointer :: tr_Reg => NULL() !< A pointer to the MOM6 tracer registry real, pointer, dimension(:,:,:) :: & - CFC11 => NULL(), & !< The CFC11 concentration in mol m-3. - CFC12 => NULL() !< The CFC12 concentration in mol m-3. + CFC11 => NULL(), & !< The CFC11 concentration [mol m-3]. + CFC12 => NULL() !< The CFC12 concentration [mol m-3]. ! In the following variables a suffix of _11 refers to CFC11 and _12 to CFC12. !>@{ Coefficients used in the CFC11 and CFC12 solubility calculation - real :: a1_11, a2_11, a3_11, a4_11 ! Coefficients in the calculation of the - real :: a1_12, a2_12, a3_12, a4_12 ! CFC11 and CFC12 Schmidt numbers, in - ! units of ND, degC-1, degC-2, degC-3. - real :: d1_11, d2_11, d3_11, d4_11 ! Coefficients in the calculation of the - real :: d1_12, d2_12, d3_12, d4_12 ! CFC11 and CFC12 solubilities, in units - ! of ND, K-1, log(K)^-1, K-2. - real :: e1_11, e2_11, e3_11 ! More coefficients in the calculation of - real :: e1_12, e2_12, e3_12 ! the CFC11 and CFC12 solubilities, in - ! units of PSU-1, PSU-1 K-1, PSU-1 K-2. + real :: a1_11, a1_12 ! Coefficients for calculating CFC11 and CFC12 Schmidt numbers [nondim] + real :: a2_11, a2_12 ! Coefficients for calculating CFC11 and CFC12 Schmidt numbers [degC-1] + real :: a3_11, a3_12 ! Coefficients for calculating CFC11 and CFC12 Schmidt numbers [degC-2] + real :: a4_11, a4_12 ! Coefficients for calculating CFC11 and CFC12 Schmidt numbers [degC-3] + + real :: d1_11, d1_12 ! Coefficients for calculating CFC11 and CFC12 solubilities [nondim] + real :: d2_11, d2_12 ! Coefficients for calculating CFC11 and CFC12 solubilities [hectoKelvin-1] + real :: d3_11, d3_12 ! Coefficients for calculating CFC11 and CFC12 solubilities [log(hectoKelvin)-1] + real :: d4_11, d4_12 ! Coefficients for calculating CFC11 and CFC12 solubilities [hectoKelvin-2] + + real :: e1_11, e1_12 ! Coefficients for calculating CFC11 and CFC12 solubilities [PSU-1] + real :: e2_11, e2_12 ! Coefficients for calculating CFC11 and CFC12 solubilities [PSU-1 hectoKelvin-1] + real :: e3_11, e3_12 ! Coefficients for calculating CFC11 and CFC12 solubilities [PSU-2 hectoKelvin-2] !!@} - real :: CFC11_IC_val = 0.0 !< The initial value assigned to CFC11. - real :: CFC12_IC_val = 0.0 !< The initial value assigned to CFC12. - real :: CFC11_land_val = -1.0 !< The value of CFC11 used where land is masked out. - real :: CFC12_land_val = -1.0 !< The value of CFC12 used where land is masked out. + real :: CFC11_IC_val = 0.0 !< The initial value assigned to CFC11 [mol m-3]. + real :: CFC12_IC_val = 0.0 !< The initial value assigned to CFC12 [mol m-3]. + real :: CFC11_land_val = -1.0 !< The value of CFC11 used where land is masked out [mol m-3]. + real :: CFC12_land_val = -1.0 !< The value of CFC12 used where land is masked out [mol m-3]. logical :: tracers_may_reinit !< If true, tracers may be reset via the initialization code !! if they are not found in the restart files. character(len=16) :: CFC11_name !< CFC11 variable name @@ -427,7 +431,7 @@ subroutine OCMIP2_CFC_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, CS type(OCMIP2_CFC_CS), pointer :: CS !< The control structure returned by a !! previous call to register_OCMIP2_CFC. real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] ! This subroutine applies diapycnal diffusion and any other column @@ -551,15 +555,15 @@ subroutine OCMIP2_CFC_surface_state(state, h, G, CS) ! Local variables real, dimension(SZI_(G),SZJ_(G)) :: & - CFC11_Csurf, & ! The CFC-11 and CFC-12 surface concentrations times the - CFC12_Csurf, & ! Schmidt number term, both in mol m-3. - CFC11_alpha, & ! The CFC-11 solubility in mol m-3 pptv-1. - CFC12_alpha ! The CFC-12 solubility in mol m-3 pptv-1. - real :: ta ! Absolute sea surface temperature in units of dekaKelvin!?! - real :: sal ! Surface salinity in PSU. - real :: SST ! Sea surface temperature in degrees Celsius. - real :: alpha_11 ! The solubility of CFC 11 in mol m-3 pptv-1. - real :: alpha_12 ! The solubility of CFC 12 in mol m-3 pptv-1. + CFC11_Csurf, & ! The CFC-11 surface concentrations times the Schmidt number term [mol m-3]. + CFC12_Csurf, & ! The CFC-12 surface concentrations times the Schmidt number term [mol m-3]. + CFC11_alpha, & ! The CFC-11 solubility [mol m-3 pptv-1]. + CFC12_alpha ! The CFC-12 solubility [mol m-3 pptv-1]. + real :: ta ! Absolute sea surface temperature [hectoKelvin] (Why use such bizzare units?) + real :: sal ! Surface salinity [PSU]. + real :: SST ! Sea surface temperature [degC]. + real :: alpha_11 ! The solubility of CFC 11 [mol m-3 pptv-1]. + real :: alpha_12 ! The solubility of CFC 12 [mol m-3 pptv-1]. real :: sc_11, sc_12 ! The Schmidt numbers of CFC 11 and CFC 12. real :: sc_no_term ! A term related to the Schmidt number. integer :: i, j, m, is, ie, js, je, idim(4), jdim(4) diff --git a/src/tracer/MOM_neutral_diffusion.F90 b/src/tracer/MOM_neutral_diffusion.F90 index 19e32fe057..d5a6f45c5f 100644 --- a/src/tracer/MOM_neutral_diffusion.F90 +++ b/src/tracer/MOM_neutral_diffusion.F90 @@ -55,28 +55,28 @@ module MOM_neutral_diffusion !! at a u-point integer, allocatable, dimension(:,:,:) :: uKoR !< Index of right interface corresponding to neutral surface, !! at a u-point - real, allocatable, dimension(:,:,:) :: uHeff !< Effective thickness at u-point (H units) + real, allocatable, dimension(:,:,:) :: uHeff !< Effective thickness at u-point [H ~> m or kg m-2] real, allocatable, dimension(:,:,:) :: vPoL !< Non-dimensional position with left layer uKoL-1, v-point real, allocatable, dimension(:,:,:) :: vPoR !< Non-dimensional position with right layer uKoR-1, v-point integer, allocatable, dimension(:,:,:) :: vKoL !< Index of left interface corresponding to neutral surface, !! at a v-point integer, allocatable, dimension(:,:,:) :: vKoR !< Index of right interface corresponding to neutral surface, !! at a v-point - real, allocatable, dimension(:,:,:) :: vHeff !< Effective thickness at v-point (H units) + real, allocatable, dimension(:,:,:) :: vHeff !< Effective thickness at v-point [H ~> m or kg m-2] ! Coefficients of polynomial reconstructions for temperature and salinity real, allocatable, dimension(:,:,:,:) :: ppoly_coeffs_T !< Polynomial coefficients for temperature real, allocatable, dimension(:,:,:,:) :: ppoly_coeffs_S !< Polynomial coefficients for salinity ! Variables needed for continuous reconstructions - real, allocatable, dimension(:,:,:) :: dRdT !< dRho/dT (kg/m3/degC) at interfaces - real, allocatable, dimension(:,:,:) :: dRdS !< dRho/dS (kg/m3/ppt) at interfaces - real, allocatable, dimension(:,:,:) :: Tint !< Interface T (degC) - real, allocatable, dimension(:,:,:) :: Sint !< Interface S (ppt) + real, allocatable, dimension(:,:,:) :: dRdT !< dRho/dT [kg m-3 degC-1] at interfaces + real, allocatable, dimension(:,:,:) :: dRdS !< dRho/dS [kg m-3 ppt-1] at interfaces + real, allocatable, dimension(:,:,:) :: Tint !< Interface T [degC] + real, allocatable, dimension(:,:,:) :: Sint !< Interface S [ppt] real, allocatable, dimension(:,:,:) :: Pint !< Interface pressure [Pa] ! Variables needed for discontinuous reconstructions - real, allocatable, dimension(:,:,:,:) :: T_i !< Top edge reconstruction of temperature (degC) - real, allocatable, dimension(:,:,:,:) :: S_i !< Top edge reconstruction of salinity (ppt) - real, allocatable, dimension(:,:,:,:) :: dRdT_i !< dRho/dT (kg/m3/degC) at top edge - real, allocatable, dimension(:,:,:,:) :: dRdS_i !< dRho/dS (kg/m3/ppt) at top edge + real, allocatable, dimension(:,:,:,:) :: T_i !< Top edge reconstruction of temperature [degC] + real, allocatable, dimension(:,:,:,:) :: S_i !< Top edge reconstruction of salinity [ppt] + real, allocatable, dimension(:,:,:,:) :: dRdT_i !< dRho/dT [kg m-3 degC-1] at top edge + real, allocatable, dimension(:,:,:,:) :: dRdS_i !< dRho/dS [kg m-3 ppt-1] at top edge integer, allocatable, dimension(:,:) :: ns !< Number of interfacs in a column logical, allocatable, dimension(:,:,:) :: stable_cell !< True if the cell is stably stratified wrt to the next cell type(diag_ctrl), pointer :: diag => NULL() !< A structure that is used to @@ -233,9 +233,9 @@ end function neutral_diffusion_init subroutine neutral_diffusion_calc_coeffs(G, GV, h, T, S, CS) type(ocean_grid_type), intent(in) :: G !< Ocean grid structure type(verticalGrid_type), intent(in) :: GV !< ocean vertical grid structure - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thickness (H units) - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: T !< Potential temperature (degC) - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: S !< Salinity (ppt) + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thickness [H ~> m or kg m-2] + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: T !< Potential temperature [degC] + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: S !< Salinity [ppt] type(neutral_diffusion_CS), pointer :: CS !< Neutral diffusion control structure ! Local variables @@ -410,17 +410,18 @@ end subroutine neutral_diffusion_calc_coeffs subroutine neutral_diffusion(G, GV, h, Coef_x, Coef_y, dt, Reg, CS) type(ocean_grid_type), intent(in) :: G !< Ocean grid structure type(verticalGrid_type), intent(in) :: GV !< ocean vertical grid structure - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thickness (H units) - real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: Coef_x !< dt * Kh * dy / dx at u-points (m^2) - real, dimension(SZI_(G),SZJB_(G)), intent(in) :: Coef_y !< dt * Kh * dx / dy at v-points (m^2) + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thickness [H ~> m or kg m-2] + real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: Coef_x !< dt * Kh * dy / dx at u-points [m2] + real, dimension(SZI_(G),SZJB_(G)), intent(in) :: Coef_y !< dt * Kh * dx / dy at v-points [m2] real, intent(in) :: dt !< Tracer time step * I_numitts !! (I_numitts in tracer_hordiff) type(tracer_registry_type), pointer :: Reg !< Tracer registry type(neutral_diffusion_CS), pointer :: CS !< Neutral diffusion control structure ! Local variables - real, dimension(SZIB_(G),SZJ_(G),CS%nsurf-1) :: uFlx ! Zonal flux of tracer (concentration * H) - real, dimension(SZI_(G),SZJB_(G),CS%nsurf-1) :: vFlx ! Meridional flux of tracer (concentration * H) + real, dimension(SZIB_(G),SZJ_(G),CS%nsurf-1) :: uFlx ! Zonal flux of tracer [H conc ~> m conc or conc kg m-2] + real, dimension(SZI_(G),SZJB_(G),CS%nsurf-1) :: vFlx ! Meridional flux of tracer + ! [H conc ~> m conc or conc kg m-2] real, dimension(SZI_(G),SZJ_(G),G%ke) :: tendency ! tendency array for diagn real, dimension(SZI_(G),SZJ_(G)) :: tendency_2d ! depth integrated content tendency for diagn real, dimension(SZIB_(G),SZJ_(G)) :: trans_x_2d ! depth integrated diffusive tracer x-transport diagn @@ -568,12 +569,12 @@ end subroutine neutral_diffusion !> Returns interface scalar, Si, for a column of layer values, S. subroutine interface_scalar(nk, h, S, Si, i_method, h_neglect) integer, intent(in) :: nk !< Number of levels - real, dimension(nk), intent(in) :: h !< Layer thickness (H units) + real, dimension(nk), intent(in) :: h !< Layer thickness [H ~> m or kg m-2] real, dimension(nk), intent(in) :: S !< Layer scalar (conc, e.g. ppt) real, dimension(nk+1), intent(inout) :: Si !< Interface scalar (conc, e.g. ppt) integer, intent(in) :: i_method !< =1 use average of PLM edges !! =2 use continuous PPM edge interpolation - real, intent(in) :: h_neglect !< A negligibly small thickness (H units) + real, intent(in) :: h_neglect !< A negligibly small thickness [H ~> m or kg m-2] ! Local variables integer :: k, km2, kp1 real, dimension(nk) :: diff @@ -613,7 +614,7 @@ real function ppm_edge(hkm1, hk, hkp1, hkp2, Ak, Akp1, Pk, Pkp1, h_neglect) real, intent(in) :: Akp1 !< Average scalar value of cell k+1 real, intent(in) :: Pk !< PLM slope for cell k real, intent(in) :: Pkp1 !< PLM slope for cell k+1 - real, intent(in) :: h_neglect !< A negligibly small thickness (H units) + real, intent(in) :: h_neglect !< A negligibly small thickness [H ~> m or kg m-2] ! Local variables real :: R_hk_hkp1, R_2hk_hkp1, R_hk_2hkp1, f1, f2, f3, f4 @@ -684,7 +685,7 @@ end function signum !! The limiting follows equation 1.8 in Colella & Woodward, 1984: JCP 54, 174-201. subroutine PLM_diff(nk, h, S, c_method, b_method, diff) integer, intent(in) :: nk !< Number of levels - real, dimension(nk), intent(in) :: h !< Layer thickness (H units) + real, dimension(nk), intent(in) :: h !< Layer thickness [H ~> m or kg m-2] real, dimension(nk), intent(in) :: S !< Layer salinity (conc, e.g. ppt) integer, intent(in) :: c_method !< Method to use for the centered difference integer, intent(in) :: b_method !< =1, use PCM in first/last cell, =2 uses linear extrapolation @@ -809,15 +810,15 @@ subroutine find_neutral_surface_positions_continuous(nk, Pl, Tl, Sl, dRdTl, dRdS dRdTr, dRdSr, PoL, PoR, KoL, KoR, hEff) integer, intent(in) :: nk !< Number of levels real, dimension(nk+1), intent(in) :: Pl !< Left-column interface pressure [Pa] - real, dimension(nk+1), intent(in) :: Tl !< Left-column interface potential temperature (degC) - real, dimension(nk+1), intent(in) :: Sl !< Left-column interface salinity (ppt) - real, dimension(nk+1), intent(in) :: dRdTl !< Left-column dRho/dT (kg/m3/degC) - real, dimension(nk+1), intent(in) :: dRdSl !< Left-column dRho/dS (kg/m3/ppt) + real, dimension(nk+1), intent(in) :: Tl !< Left-column interface potential temperature [degC] + real, dimension(nk+1), intent(in) :: Sl !< Left-column interface salinity [ppt] + real, dimension(nk+1), intent(in) :: dRdTl !< Left-column dRho/dT [kg m-3 degC-1] + real, dimension(nk+1), intent(in) :: dRdSl !< Left-column dRho/dS [kg m-3 ppt-1] real, dimension(nk+1), intent(in) :: Pr !< Right-column interface pressure [Pa] - real, dimension(nk+1), intent(in) :: Tr !< Right-column interface potential temperature (degC) - real, dimension(nk+1), intent(in) :: Sr !< Right-column interface salinity (ppt) - real, dimension(nk+1), intent(in) :: dRdTr !< Left-column dRho/dT (kg/m3/degC) - real, dimension(nk+1), intent(in) :: dRdSr !< Left-column dRho/dS (kg/m3/ppt) + real, dimension(nk+1), intent(in) :: Tr !< Right-column interface potential temperature [degC] + real, dimension(nk+1), intent(in) :: Sr !< Right-column interface salinity [ppt] + real, dimension(nk+1), intent(in) :: dRdTr !< Left-column dRho/dT [kg m-3 degC-1] + real, dimension(nk+1), intent(in) :: dRdSr !< Left-column dRho/dS [kg m-3 ppt-1] real, dimension(2*nk+2), intent(inout) :: PoL !< Fractional position of neutral surface within !! layer KoL of left column real, dimension(2*nk+2), intent(inout) :: PoR !< Fractional position of neutral surface within @@ -995,18 +996,18 @@ subroutine find_neutral_surface_positions_discontinuous(CS, nk, ns, Pres_l, hcol integer, intent(in) :: ns !< Number of neutral surfaces real, dimension(nk+1), intent(in) :: Pres_l !< Left-column interface pressure [Pa] real, dimension(nk), intent(in) :: hcol_l !< Left-column layer thicknesses - real, dimension(nk,2), intent(in) :: Tl !< Left-column top interface potential temperature (degC) - real, dimension(nk,2), intent(in) :: Sl !< Left-column top interface salinity (ppt) - real, dimension(nk,2), intent(in) :: dRdT_l !< Left-column, top interface dRho/dT (kg/m3/degC) - real, dimension(nk,2), intent(in) :: dRdS_l !< Left-column, top interface dRho/dS (kg/m3/ppt) - logical, dimension(nk), intent(in) :: stable_l !< Left-column, top interface dRho/dS (kg/m3/ppt) + real, dimension(nk,2), intent(in) :: Tl !< Left-column top interface potential temperature [degC] + real, dimension(nk,2), intent(in) :: Sl !< Left-column top interface salinity [ppt] + real, dimension(nk,2), intent(in) :: dRdT_l !< Left-column, top interface dRho/dT [kg m-3 degC-1] + real, dimension(nk,2), intent(in) :: dRdS_l !< Left-column, top interface dRho/dS [kg m-3 ppt-1] + logical, dimension(nk), intent(in) :: stable_l !< Left-column, top interface is stable real, dimension(nk+1), intent(in) :: Pres_r !< Right-column interface pressure [Pa] real, dimension(nk), intent(in) :: hcol_r !< Left-column layer thicknesses - real, dimension(nk,2), intent(in) :: Tr !< Right-column top interface potential temperature (degC) - real, dimension(nk,2), intent(in) :: Sr !< Right-column top interface salinity (ppt) - real, dimension(nk,2), intent(in) :: dRdT_r !< Right-column, top interface dRho/dT (kg/m3/degC) - real, dimension(nk,2), intent(in) :: dRdS_r !< Right-column, top interface dRho/dS (kg/m3/ppt) - logical, dimension(nk), intent(in) :: stable_r !< Left-column, top interface dRho/dS (kg/m3/ppt) + real, dimension(nk,2), intent(in) :: Tr !< Right-column top interface potential temperature [degC] + real, dimension(nk,2), intent(in) :: Sr !< Right-column top interface salinity [ppt] + real, dimension(nk,2), intent(in) :: dRdT_r !< Right-column, top interface dRho/dT [kg m-3 degC-1] + real, dimension(nk,2), intent(in) :: dRdS_r !< Right-column, top interface dRho/dS [kg m-3 ppt-1] + logical, dimension(nk), intent(in) :: stable_r !< Right-column, top interface is stable real, dimension(4*nk), intent(inout) :: PoL !< Fractional position of neutral surface within !! layer KoL of left column real, dimension(4*nk), intent(inout) :: PoR !< Fractional position of neutral surface within @@ -2050,9 +2051,9 @@ end function test_fvlsq_slope !> Returns true if a test of interpolate_for_nondim_position() fails, and conditionally writes results to stream logical function test_ifndp(verbose, rhoNeg, Pneg, rhoPos, Ppos, Ptrue, title) logical, intent(in) :: verbose !< If true, write results to stdout - real, intent(in) :: rhoNeg !< Lighter density (kg/m3) + real, intent(in) :: rhoNeg !< Lighter density [kg m-3] real, intent(in) :: Pneg !< Interface position of lighter density [Pa] - real, intent(in) :: rhoPos !< Heavier density (kg/m3) + real, intent(in) :: rhoPos !< Heavier density [kg m-3] real, intent(in) :: Ppos !< Interface position of heavier density [Pa] real, intent(in) :: Ptrue !< True answer [Pa] character(len=*), intent(in) :: title !< Title for messages diff --git a/src/tracer/MOM_neutral_diffusion_aux.F90 b/src/tracer/MOM_neutral_diffusion_aux.F90 index c25564b8da..88df1ddbc5 100644 --- a/src/tracer/MOM_neutral_diffusion_aux.F90 +++ b/src/tracer/MOM_neutral_diffusion_aux.F90 @@ -24,8 +24,8 @@ module MOM_neutral_diffusion_aux type, public :: ndiff_aux_CS_type ; private integer :: nterm !< Number of terms in polynomial (deg+1) integer :: max_iter !< Maximum number of iterations - real :: drho_tol !< Tolerance criterion for difference in density (kg/m3) - real :: xtol !< Criterion for how much position changes (nondim) + real :: drho_tol !< Tolerance criterion for difference in density [kg m-3] + real :: xtol !< Criterion for how much position changes [nondim] real :: ref_pres !< Determines whether a constant reference pressure is used everywhere or locally referenced !< density is done. ref_pres <-1 is the latter, ref_pres >= 0. otherwise logical :: force_brent = .false. !< Use Brent's method instead of Newton even when second derivatives are available @@ -62,10 +62,10 @@ end subroutine set_ndiff_aux_params !! For an layer to be unstable the top interface must be denser than the bottom or the bottom interface of the layer subroutine mark_unstable_cells(nk, dRdT, dRdS,T, S, stable_cell, ns) integer, intent(in) :: nk !< Number of levels in a column - real, dimension(nk,2), intent(in) :: dRdT !< drho/dT (kg/m3/degC) at interfaces - real, dimension(nk,2), intent(in) :: dRdS !< drho/dS (kg/m3/ppt) at interfaces - real, dimension(nk,2), intent(in) :: T !< drho/dS (kg/m3/ppt) at interfaces - real, dimension(nk,2), intent(in) :: S !< drho/dS (kg/m3/ppt) at interfaces + real, dimension(nk,2), intent(in) :: dRdT !< drho/dT [kg m-3 degC-1] at interfaces + real, dimension(nk,2), intent(in) :: dRdS !< drho/dS [kg m-3 ppt-1] at interfaces + real, dimension(nk,2), intent(in) :: T !< Temperature [degC] at interfaces + real, dimension(nk,2), intent(in) :: S !< Salinity [ppt] at interfaces logical, dimension(nk), intent( out) :: stable_cell !< True if this cell is unstably stratified integer, intent( out) :: ns !< Number of neutral surfaces in unmasked part of the column diff --git a/src/tracer/MOM_offline_main.F90 b/src/tracer/MOM_offline_main.F90 index 4f6ce6b5bb..a4676583bd 100644 --- a/src/tracer/MOM_offline_main.F90 +++ b/src/tracer/MOM_offline_main.F90 @@ -158,10 +158,10 @@ module MOM_offline_main ! Fields at T-point real, allocatable, dimension(:,:,:) :: eatr !< Amount of fluid entrained from the layer above within - !! one time step (m for Bouss, kg/m^2 for non-Bouss) + !! one time step [H ~> m or kg m-2] real, allocatable, dimension(:,:,:) :: ebtr !< Amount of fluid entrained from the layer below within - !! one time step (m for Bouss, kg/m^2 for non-Bouss) + !! one time step [H ~> m or kg m-2] ! Fields at T-points on interfaces real, allocatable, dimension(:,:,:) :: Kd !< Vertical diffusivity real, allocatable, dimension(:,:,:) :: h_end !< Thicknesses at the end of offline timestep diff --git a/src/tracer/MOM_tracer_advect.F90 b/src/tracer/MOM_tracer_advect.F90 index 03fc01ab06..201f8aeb6f 100644 --- a/src/tracer/MOM_tracer_advect.F90 +++ b/src/tracer/MOM_tracer_advect.F90 @@ -350,12 +350,11 @@ subroutine advect_x(Tr, hprev, uhr, uh_neglect, OBC, domore_u, ntr, Idt, & !! for PPM interface values real, dimension(SZI_(G),ntr) :: & - slope_x ! The concentration slope per grid point in units of - ! concentration [nondim]. + slope_x ! The concentration slope per grid point [conc]. real, dimension(SZIB_(G),ntr) :: & - flux_x ! The tracer flux across a boundary in m3*conc or kg*conc. + flux_x ! The tracer flux across a boundary [H m2 conc ~> m3 conc or kg conc]. real :: maxslope ! The maximum concentration slope per grid point - ! consistent with monotonicity, in conc. (nondim.). + ! consistent with monotonicity [conc]. real :: hup, hlos ! hup is the upwind volume, hlos is the ! part of that volume that might be lost ! due to advection out the other side of @@ -363,8 +362,9 @@ subroutine advect_x(Tr, hprev, uhr, uh_neglect, OBC, domore_u, ntr, Idt, & real :: uhh(SZIB_(G)) ! The zonal flux that occurs during the ! current iteration [H m2 ~> m3 or kg]. real, dimension(SZIB_(G)) :: & - hlst, Ihnew, & ! Work variables with units of [H m2 ~> m3 or kg] and [H-1 m-2 ~> m-3 or kg-1]. - CFL ! A nondimensional work variable. + hlst, & ! Work variable [H m2 ~> m3 or kg]. + Ihnew, & ! Work variable [H-1 m-2 ~> m-3 or kg-1]. + CFL ! A nondimensional work variable [nondim]. real :: min_h ! The minimum thickness that can be realized during ! any of the passes [H ~> m or kg m-2]. real :: h_neglect ! A thickness that is so small it is usually lost @@ -678,12 +678,11 @@ subroutine advect_y(Tr, hprev, vhr, vh_neglect, OBC, domore_v, ntr, Idt, & !! for PPM interface values real, dimension(SZI_(G),ntr,SZJ_(G)) :: & - slope_y ! The concentration slope per grid point in units of - ! concentration (nondim.). + slope_y ! The concentration slope per grid point [conc]. real, dimension(SZI_(G),ntr,SZJB_(G)) :: & - flux_y ! The tracer flux across a boundary in m3 * conc or kg*conc. + flux_y ! The tracer flux across a boundary [H m2 conc ~> m3 conc or kg conc]. real :: maxslope ! The maximum concentration slope per grid point - ! consistent with monotonicity, in conc. (nondim.). + ! consistent with monotonicity [conc]. real :: vhh(SZI_(G),SZJB_(G)) ! The meridional flux that occurs during the ! current iteration [H m2 ~> m3 or kg]. real :: hup, hlos ! hup is the upwind volume, hlos is the @@ -691,7 +690,8 @@ subroutine advect_y(Tr, hprev, vhr, vh_neglect, OBC, domore_v, ntr, Idt, & ! due to advection out the other side of ! the grid box, both in [H m2 ~> m3 or kg]. real, dimension(SZIB_(G)) :: & - hlst, Ihnew, & ! Work variables with units of [H m2 ~> m3 or kg] and [H-1 m-2 ~> m-3 or kg-1]. + hlst, & ! Work variable [H m2 ~> m3 or kg]. + Ihnew, & ! Work variable [H-1 m-2 ~> m-3 or kg-1]. CFL ! A nondimensional work variable. real :: min_h ! The minimum thickness that can be realized during ! any of the passes [H ~> m or kg m-2]. diff --git a/src/tracer/MOM_tracer_diabatic.F90 b/src/tracer/MOM_tracer_diabatic.F90 index d7212ac8f0..f7f8028d91 100644 --- a/src/tracer/MOM_tracer_diabatic.F90 +++ b/src/tracer/MOM_tracer_diabatic.F90 @@ -231,7 +231,7 @@ subroutine applyTracerBoundaryFluxesInOut(G, GV, Tr, dt, fluxes, h, evap_CFL_lim real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(inout) :: h !< Layer thickness [H ~> m or kg m-2] real, intent(in ) :: evap_CFL_limit !< Limit on the fraction of the !! water that can be fluxed out of the top - !! layer in a timestep (nondim) + !! layer in a timestep [nondim] real, intent(in ) :: minimum_forcing_depth !< The smallest depth over !! which fluxes can be applied [m] real, dimension(SZI_(G),SZJ_(G)), optional, intent(in ) :: in_flux_optional !< The total time-integrated diff --git a/src/tracer/MOM_tracer_flow_control.F90 b/src/tracer/MOM_tracer_flow_control.F90 index eb33e423ec..a3c75bd7fd 100644 --- a/src/tracer/MOM_tracer_flow_control.F90 +++ b/src/tracer/MOM_tracer_flow_control.F90 @@ -430,7 +430,7 @@ subroutine call_tracer_column_fns(h_old, h_new, ea, eb, fluxes, Hml, dt, G, GV, logical, intent(in) :: debug !< If true calculate checksums real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of !! the water that can be fluxed out - !! of the top layer in a timestep (nondim) + !! of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over !! which fluxes can be applied [H ~> m or kg m-2] diff --git a/src/tracer/MOM_tracer_hor_diff.F90 b/src/tracer/MOM_tracer_hor_diff.F90 index c5f581e976..48ec698696 100644 --- a/src/tracer/MOM_tracer_hor_diff.F90 +++ b/src/tracer/MOM_tracer_hor_diff.F90 @@ -126,8 +126,7 @@ subroutine tracer_hordiff(h, dt, MEKE, VarMix, G, GV, CS, Reg, tv, do_online_fla ! grid cell [H-1 m-2 ~> m-3 or kg-1]. Kh_h, & ! The tracer diffusivity averaged to tracer points [m2 s-1]. CFL, & ! A diffusive CFL number for each cell [nondim]. - dTr ! The change in a tracer's concentration, in units of - ! concentration [Conc]. + dTr ! The change in a tracer's concentration, in units of concentration [Conc]. real, dimension(SZIB_(G),SZJ_(G)) :: & khdt_x, & ! The value of Khtr*dt times the open face width divided by diff --git a/src/tracer/MOM_tracer_registry.F90 b/src/tracer/MOM_tracer_registry.F90 index 6491006c7f..f5c7d65f03 100644 --- a/src/tracer/MOM_tracer_registry.F90 +++ b/src/tracer/MOM_tracer_registry.F90 @@ -37,42 +37,48 @@ module MOM_tracer_registry !> The tracer type type, public :: tracer_type - real, dimension(:,:,:), pointer :: t => NULL() !< tracer concentration array -! real :: OBC_inflow_conc= 0.0 !< tracer concentration for generic inflows + real, dimension(:,:,:), pointer :: t => NULL() !< tracer concentration array [conc] +! real :: OBC_inflow_conc= 0.0 !< tracer concentration for generic inflows [conc] ! real, dimension(:,:,:), pointer :: OBC_in_u => NULL() !< structured values for flow into the domain ! !! specified in OBCs through u-face of cell ! real, dimension(:,:,:), pointer :: OBC_in_v => NULL() !< structured values for flow into the domain ! !! specified in OBCs through v-face of cell real, dimension(:,:,:), pointer :: ad_x => NULL() !< diagnostic array for x-advective tracer flux + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:,:), pointer :: ad_y => NULL() !< diagnostic array for y-advective tracer flux + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:), pointer :: ad2d_x => NULL() !< diagnostic vertical sum x-advective tracer flux - !! in units of (conc * m3/s or conc * kg/s) + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:), pointer :: ad2d_y => NULL() !< diagnostic vertical sum y-advective tracer flux - !! in units of (conc * m3/s or conc * kg/s) + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:,:), pointer :: df_x => NULL() !< diagnostic array for x-diffusive tracer flux + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:,:), pointer :: df_y => NULL() !< diagnostic array for y-diffusive tracer flux + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:), pointer :: df2d_x => NULL() !< diagnostic vertical sum x-diffusive flux - !! in units of (conc * m3/s or conc * kg/s) + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:), pointer :: df2d_y => NULL() !< diagnostic vertical sum y-diffusive flux - !! in units of (conc * m3/s or conc * kg/s) + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:), pointer :: df2d_conc_x => NULL() !< diagnostic vertical sum x-diffusive content flux - !! in units of (conc * m3/s or conc * kg/s) + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:), pointer :: df2d_conc_y => NULL() !< diagnostic vertical sum y-diffusive content flux - !! in units of (conc * m3/s or conc * kg/s) + !! [conc H m2 s-1 ~> conc m3 s-1 or conc kg s-1] real, dimension(:,:,:), pointer :: advection_xy => NULL() !< convergence of lateral advective tracer fluxes + !! [conc H s-1 ~> conc m s-1 or conc kg m-2 s-1] real, dimension(:,:,:), pointer :: diff_cont_xy => NULL() !< convergence of lateral diffusive tracer fluxes + !! [conc H s-1 ~> conc m s-1 or conc kg m-2 s-1] real, dimension(:,:,:), pointer :: diff_conc_xy => NULL() !< convergence of lateral diffusive tracer fluxes - !! expressed as a change in concentration + !! expressed as a change in concentration [conc s-1] real, dimension(:,:,:), pointer :: t_prev => NULL() !< tracer concentration array at a previous - !! timestep used for diagnostics + !! timestep used for diagnostics [conc] real, dimension(:,:,:), pointer :: Trxh_prev => NULL() !< layer integrated tracer concentration array !! at a previous timestep used for diagnostics character(len=32) :: name !< tracer name used for diagnostics and error messages - character(len=64) :: units !< Physical dimensions of the variable + character(len=64) :: units !< Physical dimensions of the tracer concentration character(len=240) :: longname !< Long name of the variable ! type(vardesc), pointer :: vd => NULL() !< metadata describing the tracer logical :: registry_diags = .false. !< If true, use the registry to set up the diff --git a/src/tracer/advection_test_tracer.F90 b/src/tracer/advection_test_tracer.F90 index d235989885..34f788c952 100644 --- a/src/tracer/advection_test_tracer.F90 +++ b/src/tracer/advection_test_tracer.F90 @@ -282,7 +282,7 @@ subroutine advection_test_tracer_column_physics(h_old, h_new, ea, eb, fluxes, type(advection_test_tracer_CS), pointer :: CS !< The control structure returned by a previous !! call to register_advection_test_tracer. real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] ! This subroutine applies diapycnal diffusion and any other column diff --git a/src/tracer/boundary_impulse_tracer.F90 b/src/tracer/boundary_impulse_tracer.F90 index e874a9c9ec..fa95d8aa77 100644 --- a/src/tracer/boundary_impulse_tracer.F90 +++ b/src/tracer/boundary_impulse_tracer.F90 @@ -231,7 +231,7 @@ subroutine boundary_impulse_tracer_column_physics(h_old, h_new, ea, eb, fluxes, !! thermodynamic variables logical, intent(in) :: debug !< If true calculate checksums real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] @@ -285,17 +285,17 @@ end subroutine boundary_impulse_tracer_column_physics !> Calculate total inventory of tracer function boundary_impulse_stock(h, stocks, G, GV, CS, names, units, stock_index) - type(ocean_grid_type), intent(in ) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in ) :: GV !< The ocean's vertical grid structure - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in ) :: h !< Layer thicknesses [H ~> m or kg m-2] - real, dimension(:), intent( out) :: stocks !< the mass-weighted integrated amount of each - !! tracer, in kg times concentration units [kg conc]. - type(boundary_impulse_tracer_CS), pointer :: CS !< The control structure returned by a previous - !! call to register_boundary_impulse_tracer. - character(len=*), dimension(:), intent( out) :: names !< The names of the stocks calculated. - character(len=*), dimension(:), intent( out) :: units !< The units of the stocks calculated. - integer, optional, intent(in ) :: stock_index !< The coded index of a specific stock - !! being sought. + type(ocean_grid_type), intent(in ) :: G !< The ocean's grid structure + type(verticalGrid_type), intent(in ) :: GV !< The ocean's vertical grid structure + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in ) :: h !< Layer thicknesses [H ~> m or kg m-2] + real, dimension(:), intent( out) :: stocks !< the mass-weighted integrated amount of each + !! tracer, in kg times concentration units [kg conc]. + type(boundary_impulse_tracer_CS), pointer :: CS !< The control structure returned by a previous + !! call to register_boundary_impulse_tracer. + character(len=*), dimension(:), intent( out) :: names !< The names of the stocks calculated. + character(len=*), dimension(:), intent( out) :: units !< The units of the stocks calculated. + integer, optional, intent(in ) :: stock_index !< The coded index of a specific stock + !! being sought. integer :: boundary_impulse_stock !< Return value: the number of stocks calculated here. ! This function calculates the mass-weighted integral of all tracer stocks, diff --git a/src/tracer/dye_example.F90 b/src/tracer/dye_example.F90 index bc1df121ab..51b5ab6c08 100644 --- a/src/tracer/dye_example.F90 +++ b/src/tracer/dye_example.F90 @@ -269,7 +269,7 @@ subroutine dye_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, CS type(dye_tracer_CS), pointer :: CS !< The control structure returned by a previous !! call to register_dye_tracer. real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] diff --git a/src/tracer/dyed_obc_tracer.F90 b/src/tracer/dyed_obc_tracer.F90 index c8852687f2..7abbafa5fc 100644 --- a/src/tracer/dyed_obc_tracer.F90 +++ b/src/tracer/dyed_obc_tracer.F90 @@ -224,7 +224,7 @@ subroutine dyed_obc_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, type(dyed_obc_tracer_CS), pointer :: CS !< The control structure returned by a previous !! call to dyed_obc_register_tracer. real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] diff --git a/src/tracer/ideal_age_example.F90 b/src/tracer/ideal_age_example.F90 index d648a902eb..562947a011 100644 --- a/src/tracer/ideal_age_example.F90 +++ b/src/tracer/ideal_age_example.F90 @@ -304,7 +304,7 @@ subroutine ideal_age_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, type(ideal_age_tracer_CS), pointer :: CS !< The control structure returned by a previous !! call to register_ideal_age_tracer. real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] ! This subroutine applies diapycnal diffusion and any other column diff --git a/src/tracer/oil_tracer.F90 b/src/tracer/oil_tracer.F90 index e200d2c5a7..6156c20e24 100644 --- a/src/tracer/oil_tracer.F90 +++ b/src/tracer/oil_tracer.F90 @@ -46,7 +46,7 @@ module oil_tracer real :: oil_source_latitude !< Longitude of source location (geographic) integer :: oil_source_i=-999 !< Local i of source location (computational) integer :: oil_source_j=-999 !< Local j of source location (computational) - real :: oil_source_rate !< Rate of oil injection (kg/s) + real :: oil_source_rate !< Rate of oil injection [kg s-1] real :: oil_start_year !< The year in which tracers start aging, or at which the !! surface value equals young_val, in years. real :: oil_end_year !< The year in which tracers start aging, or at which the @@ -59,7 +59,7 @@ module oil_tracer real, dimension(NTR_MAX) :: land_val = -1.0 !< The value of tr used where land is masked out. real, dimension(NTR_MAX) :: sfc_growth_rate !< The exponential growth rate for the surface value [year-1]. real, dimension(NTR_MAX) :: oil_decay_days !< Decay time scale of oil [days] - real, dimension(NTR_MAX) :: oil_decay_rate !< Decay rate of oil (in s^-1) calculated from oil_decay_days + real, dimension(NTR_MAX) :: oil_decay_rate !< Decay rate of oil [s-1] calculated from oil_decay_days integer, dimension(NTR_MAX) :: oil_source_k !< Layer of source logical :: oil_may_reinit !< If true, oil tracers may be reset by the initialization code !! if they are not found in the restart files. @@ -321,7 +321,7 @@ subroutine oil_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, CS !! call to register_oil_tracer. type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m] ! This subroutine applies diapycnal diffusion and any other column diff --git a/src/tracer/pseudo_salt_tracer.F90 b/src/tracer/pseudo_salt_tracer.F90 index 9f39537cb4..1234e4a1b4 100644 --- a/src/tracer/pseudo_salt_tracer.F90 +++ b/src/tracer/pseudo_salt_tracer.F90 @@ -197,7 +197,7 @@ subroutine pseudo_salt_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables logical, intent(in) :: debug !< If true calculate checksums real, optional, intent(in) :: evap_CFL_limit !< Limit on the fraction of the water that can - !! be fluxed out of the top layer in a timestep (nondim) + !! be fluxed out of the top layer in a timestep [nondim] real, optional, intent(in) :: minimum_forcing_depth !< The smallest depth over which !! fluxes can be applied [m]