Skip to content

Commit

Permalink
+Removed 31 meaningless get_param units
Browse files Browse the repository at this point in the history
  Removed meaningless units arguments from 31 get_param calls for integer,
character, or logical parameters.  All answers are bitwise identical, but some
entries in the various parameter_doc files are changed.
  • Loading branch information
Hallberg-NOAA authored and marshallward committed Nov 24, 2022
1 parent 6765e27 commit 321e0eb
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 33 deletions.
2 changes: 1 addition & 1 deletion config_src/drivers/solo_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
call get_param(param_file, mdl, "USTAR_FORCING_VAR", CS%ustar_var, &
"The name of the friction velocity variable in WIND_FILE "//&
"or blank to get ustar from the wind stresses plus the "//&
"gustiness.", default=" ", units="nondim")
"gustiness.", default=" ")
CS%wind_file = trim(CS%inputdir) // trim(CS%wind_file)
endif
if (trim(CS%wind_config) == "gyres") then
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_barotropic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4432,7 +4432,7 @@ subroutine barotropic_init(u, v, h, eta, Time, G, GV, US, param_file, diag, CS,
"If NONLINEAR_BT_CONTINUITY is true, this is the number "//&
"of barotropic time steps between updates to the face "//&
"areas, or 0 to update only before the barotropic stepping.", &
units="nondim", default=1, do_not_log=.not.CS%Nonlinear_continuity)
default=1, do_not_log=.not.CS%Nonlinear_continuity)

call get_param(param_file, mdl, "BT_PROJECT_VELOCITY", CS%BT_project_velocity,&
"If true, step the barotropic velocity first and project "//&
Expand Down
14 changes: 7 additions & 7 deletions src/framework/MOM_unit_scaling.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,31 +89,31 @@ subroutine unit_scaling_init( param_file, US )
call get_param(param_file, mdl, "Z_RESCALE_POWER", Z_power, &
"An integer power of 2 that is used to rescale the model's "//&
"internal units of depths and heights. Valid values range from -300 to 300.", &
units="nondim", default=0, debuggingParam=.true.)
default=0, debuggingParam=.true.)
call get_param(param_file, mdl, "L_RESCALE_POWER", L_power, &
"An integer power of 2 that is used to rescale the model's "//&
"internal units of lateral distances. Valid values range from -300 to 300.", &
units="nondim", default=0, debuggingParam=.true.)
default=0, debuggingParam=.true.)
call get_param(param_file, mdl, "T_RESCALE_POWER", T_power, &
"An integer power of 2 that is used to rescale the model's "//&
"internal units of time. Valid values range from -300 to 300.", &
units="nondim", default=0, debuggingParam=.true.)
default=0, debuggingParam=.true.)
call get_param(param_file, mdl, "R_RESCALE_POWER", R_power, &
"An integer power of 2 that is used to rescale the model's "//&
"internal units of density. Valid values range from -300 to 300.", &
units="nondim", default=0, debuggingParam=.true.)
default=0, debuggingParam=.true.)
call get_param(param_file, mdl, "Q_RESCALE_POWER", Q_power, &
"An integer power of 2 that is used to rescale the model's "//&
"internal units of heat content. Valid values range from -300 to 300.", &
units="nondim", default=0, debuggingParam=.true.)
default=0, debuggingParam=.true.)
call get_param(param_file, mdl, "C_RESCALE_POWER", C_power, &
"An integer power of 2 that is used to rescale the model's "//&
"internal units of temperature. Valid values range from -300 to 300.", &
units="nondim", default=0, debuggingParam=.true.)
default=0, debuggingParam=.true.)
call get_param(param_file, mdl, "S_RESCALE_POWER", S_power, &
"An integer power of 2 that is used to rescale the model's "//&
"internal units of salinity. Valid values range from -300 to 300.", &
units="nondim", default=0, debuggingParam=.true.)
default=0, debuggingParam=.true.)

if (abs(Z_power) > 300) call MOM_error(FATAL, "unit_scaling_init: "//&
"Z_RESCALE_POWER is outside of the valid range of -300 to 300.")
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/lateral/MOM_MEKE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ logical function MEKE_init(Time, G, US, param_file, diag, dbcomms_CS, CS, MEKE,
call get_param(param_file, mdl, "MEKE_RD_MAX_SCALE", CS%Rd_as_max_scale, &
"If true, the length scale used by MEKE is the minimum of "//&
"the deformation radius or grid-spacing. Only used if "//&
"MEKE_OLD_LSCALE=True", units="nondim", default=.false.)
"MEKE_OLD_LSCALE=True", default=.false.)
call get_param(param_file, mdl, "MEKE_VISCOSITY_COEFF_KU", CS%viscosity_coeff_Ku, &
"If non-zero, is the scaling coefficient in the expression for"//&
"viscosity used to parameterize harmonic lateral momentum mixing by"//&
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ subroutine hor_visc_init(Time, G, GV, US, param_file, diag, CS, ADp)
if (CS%use_GME) then
call get_param(param_file, mdl, "GME_NUM_SMOOTHINGS", CS%num_smooth_gme, &
"Number of smoothing passes for the GME fluxes.", &
units="nondim", default=1)
default=1)
call get_param(param_file, mdl, "GME_H0", CS%GME_h0, &
"The strength of GME tapers quadratically to zero when the bathymetric "//&
"depth is shallower than GME_H0.", &
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
"positive integer may be used, although even integers "//&
"are more efficient to calculate. Setting this greater "//&
"than 100 results in a step-function being used.", &
units="nondim", default=2)
default=2)
call get_param(param_file, mdl, "VISC_RES_SCALE_COEF", CS%Res_coef_visc, &
"A coefficient that determines how Kh is scaled away if "//&
"RESOLN_SCALED_... is true, as "//&
Expand All @@ -1363,7 +1363,7 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
"are more efficient to calculate. Setting this greater "//&
"than 100 results in a step-function being used. "//&
"This function affects lateral viscosity, Kh, and not KhTh.", &
units="nondim", default=CS%Res_fn_power_khth)
default=CS%Res_fn_power_khth)
call get_param(param_file, mdl, "INTERPOLATE_RES_FN", CS%interpolate_Res_fn, &
"If true, interpolate the resolution function to the "//&
"velocity points from the thickness points; otherwise "//&
Expand Down
6 changes: 3 additions & 3 deletions src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive)
!/ 1. Options related to enhancing the mixing coefficient
call get_param(paramFile, mdl, "USE_KPP_LT_K", CS%LT_K_Enhancement, &
'Flag for Langmuir turbulence enhancement of turbulent'//&
'mixing coefficient.', units="", Default=.false.)
'mixing coefficient.', Default=.false.)
call get_param(paramFile, mdl, "STOKES_MIXING", CS%Stokes_Mixing, &
'Flag for Langmuir turbulence enhancement of turbulent'//&
'mixing coefficient.', units="", Default=.false.)
'mixing coefficient.', Default=.false.)
if (CS%LT_K_Enhancement) then
call get_param(paramFile, mdl, 'KPP_LT_K_SHAPE', string, &
'Vertical dependence of LT enhancement of mixing. '// &
Expand Down Expand Up @@ -438,7 +438,7 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive)
!/ 2. Options related to enhancing the unresolved Vt2/entrainment in Rib
call get_param(paramFile, mdl, "USE_KPP_LT_VT2", CS%LT_Vt2_Enhancement, &
'Flag for Langmuir turbulence enhancement of Vt2'//&
'in Bulk Richardson Number.', units="", Default=.false.)
'in Bulk Richardson Number.', Default=.false.)
if (CS%LT_Vt2_Enhancement) then
call get_param(paramFile, mdl, "KPP_LT_VT2_METHOD",string , &
'Method to enhance Vt2 in KPP. '// &
Expand Down
5 changes: 2 additions & 3 deletions src/parameterizations/vertical/MOM_energetic_PBL.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2222,14 +2222,13 @@ subroutine energetic_PBL_init(Time, G, GV, US, param_file, diag, CS)
!/ Options related to Langmuir turbulence
call get_param(param_file, mdl, "USE_LA_LI2016", use_LA_Windsea, &
"A logical to use the Li et al. 2016 (submitted) formula to "//&
"determine the Langmuir number.", units="nondim", default=.false.)
"determine the Langmuir number.", default=.false.)
! Note this can be activated in other ways, but this preserves the old method.
if (use_LA_windsea) then
CS%use_LT = .true.
else
call get_param(param_file, mdl, "EPBL_LT", CS%use_LT, &
"A logical to use a LT parameterization.", &
units="nondim", default=.false.)
"A logical to use a LT parameterization.", default=.false.)
endif
if (CS%use_LT) then
call get_param(param_file, mdl, "EPBL_LANGMUIR_SCHEME", tmpstr, &
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/vertical/MOM_kappa_shear.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ function kappa_shear_init(Time, G, GV, US, param_file, diag, CS)
call get_param(param_file, mdl, "MAX_RINO_IT", CS%max_RiNo_it, &
"The maximum number of iterations that may be used to "//&
"estimate the Richardson number driven mixing.", &
units="nondim", default=50, do_not_log=just_read)
default=50, do_not_log=just_read)
call get_param(param_file, mdl, "KD", KD_normal, default=0.0, do_not_log=.true.)
call get_param(param_file, mdl, "KD_KAPPA_SHEAR_0", CS%kappa_0, &
"The background diffusivity that is used to smooth the "//&
Expand Down Expand Up @@ -1831,7 +1831,7 @@ function kappa_shear_init(Time, G, GV, US, param_file, diag, CS)
default=.true., do_not_log=just_read)
call get_param(param_file, mdl, "MAX_KAPPA_SHEAR_IT", CS%max_KS_it, &
"The maximum number of iterations that may be used to "//&
"estimate the time-averaged diffusivity.", units="nondim", &
"estimate the time-averaged diffusivity.", &
default=13, do_not_log=just_read)
call get_param(param_file, mdl, "PRANDTL_TURB", CS%Prandtl_turb, &
"The turbulent Prandtl number applied to shear instability.", &
Expand Down
12 changes: 6 additions & 6 deletions src/user/MOM_wave_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -317,22 +317,22 @@ subroutine MOM_wave_interface_init(time, G, GV, US, param_file, CS, diag, restar
endif

call get_param(param_file, mdl, "STOKES_VF", CS%Stokes_VF, &
"Flag to use Stokes vortex force", units="", &
"Flag to use Stokes vortex force", &
Default=.false.)
call get_param(param_file, mdl, "PASSIVE_STOKES_VF", CS%Passive_Stokes_VF, &
"Flag to make Stokes vortex force diagnostic only.", units="", &
"Flag to make Stokes vortex force diagnostic only.", &
Default=.false.)
call get_param(param_file, mdl, "STOKES_PGF", CS%Stokes_PGF, &
"Flag to use Stokes-induced pressure gradient anomaly", units="", &
"Flag to use Stokes-induced pressure gradient anomaly", &
Default=.false.)
call get_param(param_file, mdl, "PASSIVE_STOKES_PGF", CS%Passive_Stokes_PGF, &
"Flag to make Stokes-induced pressure gradient anomaly diagnostic only.", units="", &
"Flag to make Stokes-induced pressure gradient anomaly diagnostic only.", &
Default=.false.)
call get_param(param_file, mdl, "STOKES_DDT", CS%Stokes_DDT, &
"Flag to use Stokes d/dt", units="", &
"Flag to use Stokes d/dt", &
Default=.false.)
call get_param(param_file, mdl, "PASSIVE_STOKES_DDT", CS%Passive_Stokes_DDT, &
"Flag to make Stokes d/dt diagnostic only", units="", &
"Flag to make Stokes d/dt diagnostic only", &
Default=.false.)

! Get Wave Method and write to integer WaveMethod
Expand Down
10 changes: 5 additions & 5 deletions src/user/dumbbell_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ subroutine dumbbell_initialize_topography( D, G, param_file, max_depth )
units='nondim', default=0.5, do_not_log=.false.)
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
'Logical for rotation of dumbbell domain.', &
units='nondim', default=.false., do_not_log=.false.)
default=.false., do_not_log=.false.)

if (G%x_axis_units == 'm') then
dblen=dblen*1.e3
Expand Down Expand Up @@ -150,7 +150,7 @@ subroutine dumbbell_initialize_thickness ( h, depth_tot, G, GV, US, param_file,
case ( REGRIDDING_LAYER) ! Initial thicknesses for isopycnal coordinates
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
'Logical for rotation of dumbbell domain.', &
units='nondim', default=.false., do_not_log=just_read)
default=.false., do_not_log=just_read)
do j=js,je
do i=is,ie
! Compute normalized zonal coordinates (x,y=0 at center of domain)
Expand Down Expand Up @@ -293,7 +293,7 @@ subroutine dumbbell_initialize_temperature_salinity ( T, S, h, G, GV, US, param_
units='km', default=600., do_not_log=just_read)
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
'Logical for rotation of dumbbell domain.', &
units='nondim', default=.false., do_not_log=just_read)
default=.false., do_not_log=just_read)

if (G%x_axis_units == 'm') then
dblen = dblen*1.e3
Expand Down Expand Up @@ -361,7 +361,7 @@ subroutine dumbbell_initialize_sponges(G, GV, US, tv, h_in, depth_tot, param_fil
units='km', default=600., do_not_log=.true.)
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
'Logical for rotation of dumbbell domain.', &
units='nondim', default=.false., do_not_log=.true.)
default=.false., do_not_log=.true.)

if (G%x_axis_units == 'm') then
dblen=dblen*1.e3
Expand Down Expand Up @@ -470,4 +470,4 @@ subroutine dumbbell_initialize_sponges(G, GV, US, tv, h_in, depth_tot, param_fil

end subroutine dumbbell_initialize_sponges

end module dumbbell_initialization
end module dumbbell_initialization
2 changes: 1 addition & 1 deletion src/user/dumbbell_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ subroutine dumbbell_surface_forcing_init(Time, G, US, param_file, diag, CS)
units="days", default=1.0)
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
'Logical for rotation of dumbbell domain.',&
units='nondim', default=.false., do_not_log=.true.)
default=.false., do_not_log=.true.)
call get_param(param_file, mdl,"INITIAL_SSS", S_surf, &
"Initial surface salinity", &
units="1e-3", default=34.0, scale=US%ppt_to_S, do_not_log=.true.)
Expand Down

0 comments on commit 321e0eb

Please sign in to comment.