Skip to content

Commit

Permalink
Merge branch 'dev/gfdl' into fix_iceshelf_problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Hallberg-NOAA committed Apr 2, 2020
2 parents 7cdffb1 + 03bc97a commit bcc3f5e
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 49 deletions.
2 changes: 1 addition & 1 deletion config_src/coupled_driver/MOM_surface_forcing_gfdl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS)
call get_param(param_file, mdl, "WIND_STRESS_MULTIPLIER", CS%wind_stress_multiplier, &
"A factor multiplying the wind-stress given to the ocean by the "//&
"coupler. This is used for testing and should be =1.0 for any "//&
"production runs.", default=1.0)
"production runs.", units="nondim", default=1.0)

if (CS%restore_salt) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
Expand Down
2 changes: 1 addition & 1 deletion src/ALE/MOM_regridding.F90
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ subroutine initialize_regridding(CS, GV, US, max_depth, param_file, mdl, coord_m
call get_param(param_file, mdl, "REGRID_COMPRESSIBILITY_FRACTION", tmpReal, &
"When interpolating potential density profiles we can add "//&
"some artificial compressibility solely to make homogeneous "//&
"regions appear stratified.", default=0.)
"regions appear stratified.", units="nondim", default=0.)
call set_regrid_params(CS, compress_fraction=tmpReal)
endif

Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
if (use_temperature) then
call get_param(param_file, "MOM", "FRAZIL", use_frazil, &
"If true, water freezes if it gets too cold, and the "//&
"the accumulated heat deficit is returned in the "//&
"accumulated heat deficit is returned in the "//&
"surface state. FRAZIL is only used if "//&
"ENABLE_THERMODYNAMICS is true.", default=.false.)
call get_param(param_file, "MOM", "DO_GEOTHERMAL", use_geothermal, &
Expand Down Expand Up @@ -1888,7 +1888,7 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
call get_param(param_file, "MOM", "SURFACE_2018_ANSWERS", CS%answers_2018, &
"If true, use expressions for the surface properties that recover the answers "//&
"from the end of 2018. Otherwise, use more appropriate expressions that differ "//&
"at roundoff for non-Boussinsq cases.", default=default_2018_answers)
"at roundoff for non-Boussinesq cases.", default=default_2018_answers)

call get_param(param_file, "MOM", "SAVE_INITIAL_CONDS", save_IC, &
"If true, write the initial conditions to a file given "//&
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/lateral/MOM_thickness_diffuse.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ subroutine thickness_diffuse_init(Time, G, GV, US, param_file, diag, CDp, CS)
call get_param(param_file, mdl, "KD_SMOOTH", CS%kappa_smooth, &
"A diapycnal diffusivity that is used to interpolate "//&
"more sensible values of T & S into thin layers.", &
default=1.0e-6, scale=US%m_to_Z**2*US%T_to_s)
units="m2 s-1", default=1.0e-6, scale=US%m_to_Z**2*US%T_to_s)
call get_param(param_file, mdl, "KHTH_USE_FGNV_STREAMFUNCTION", CS%use_FGNV_streamfn, &
"If true, use the streamfunction formulation of "//&
"Ferrari et al., 2010, which effectively emphasizes "//&
Expand All @@ -1849,7 +1849,7 @@ subroutine thickness_diffuse_init(Time, G, GV, US, param_file, diag, CDp, CS)
call get_param(param_file, mdl, "FGNV_FILTER_SCALE", CS%FGNV_scale, &
"A coefficient scaling the vertical smoothing term in the "//&
"Ferrari et al., 2010, streamfunction formulation.", &
default=1., do_not_log=.not.CS%use_FGNV_streamfn)
units="nondim", default=1., do_not_log=.not.CS%use_FGNV_streamfn)
call get_param(param_file, mdl, "FGNV_C_MIN", CS%FGNV_c_min, &
"A minium wave speed used in the Ferrari et al., 2010, "//&
"streamfunction formulation.", &
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_internal_tide_input.F90
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ subroutine int_tide_input_init(Time, G, GV, US, param_file, diag, CS, itide)
call get_param(param_file, mdl, "KD_SMOOTH", CS%kappa_fill, &
"A diapycnal diffusivity that is used to interpolate "//&
"more sensible values of T & S into thin layers.", &
default=1.0e-6, scale=US%m2_s_to_Z2_T)
units="m2 s-1", default=1.0e-6, scale=US%m2_s_to_Z2_T)

call get_param(param_file, mdl, "UTIDE", utide, &
"The constant tidal amplitude used with INT_TIDE_DISSIPATION.", &
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 @@ -2096,9 +2096,9 @@ function kappa_shear_init(Time, G, GV, US, param_file, diag, CS)
"be used in single-column mode!", &
default=.false., debuggingParam=.true.)
call get_param(param_file, mdl, "KAPPA_SHEAR_ITER_BUG", CS%dKdQ_iteration_bug, &
"If true. use an older, dimensionally inconsistent estimate of the "//&
"If true, use an older, dimensionally inconsistent estimate of the "//&
"derivative of diffusivity with energy in the Newton's method iteration. "//&
"The bug causes undercorrections when dz > 1m.", default=.true.)
"The bug causes undercorrections when dz > 1 m.", default=.true.)
call get_param(param_file, mdl, "KAPPA_SHEAR_ALL_LAYER_TKE_BUG", CS%all_layer_TKE_bug, &
"If true, report back the latest estimate of TKE instead of the time average "//&
"TKE when there is mass in all layers. Otherwise always report the time "//&
Expand Down
46 changes: 17 additions & 29 deletions src/parameterizations/vertical/MOM_set_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1930,10 +1930,9 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
"The flux Richardson number where the stratification is "//&
"large enough that N2 > omega2. The full expression for "//&
"the Flux Richardson number is usually "//&
"FLUX_RI_MAX*N2/(N2+OMEGA2).", default=0.2)
"FLUX_RI_MAX*N2/(N2+OMEGA2).", units="nondim", default=0.2)
call get_param(param_file, mdl, "OMEGA", CS%omega, &
"The rotation rate of the earth.", units="s-1", &
default=7.2921e-5, scale=US%T_to_s)
"The rotation rate of the earth.", units="s-1", default=7.2921e-5, scale=US%T_to_s)

call get_param(param_file, mdl, "DEFAULT_2018_ANSWERS", default_2018_answers, &
"This sets the default value for the various _2018_ANSWERS parameters.", &
Expand All @@ -1956,8 +1955,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
call get_param(param_file, mdl, "ML_RAD_EFOLD_COEFF", CS%ML_rad_efold_coeff, &
"A coefficient that is used to scale the penetration "//&
"depth for turbulence below the base of the mixed layer. "//&
"This is only used if ML_RADIATION is true.", units="nondim", &
default=0.2)
"This is only used if ML_RADIATION is true.", units="nondim", default=0.2)
call get_param(param_file, mdl, "ML_RAD_BUG", CS%ML_rad_bug, &
"If true use code with a bug that reduces the energy available "//&
"in the transition layer by a factor of the inverse of the energy "//&
Expand All @@ -1966,8 +1964,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
"The maximum diapycnal diffusivity due to turbulence "//&
"radiated from the base of the mixed layer. "//&
"This is only used if ML_RADIATION is true.", &
units="m2 s-1", default=1.0e-3, &
scale=US%m2_s_to_Z2_T)
units="m2 s-1", default=1.0e-3, scale=US%m2_s_to_Z2_T)
call get_param(param_file, mdl, "ML_RAD_COEFF", CS%ML_rad_coeff, &
"The coefficient which scales MSTAR*USTAR^3 to obtain "//&
"the energy available for mixing below the base of the "//&
Expand All @@ -1976,8 +1973,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
call get_param(param_file, mdl, "ML_RAD_APPLY_TKE_DECAY", CS%ML_rad_TKE_decay, &
"If true, apply the same exponential decay to ML_rad as "//&
"is applied to the other surface sources of TKE in the "//&
"mixed layer code. This is only used if ML_RADIATION is true.", &
default=.true.)
"mixed layer code. This is only used if ML_RADIATION is true.", default=.true.)
call get_param(param_file, mdl, "MSTAR", CS%mstar, &
"The ratio of the friction velocity cubed to the TKE "//&
"input to the mixed layer.", "units=nondim", default=1.2)
Expand All @@ -2003,9 +1999,8 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
call get_param(param_file, mdl, "BOTTOMDRAGLAW", CS%bottomdraglaw, &
"If true, the bottom stress is calculated with a drag "//&
"law of the form c_drag*|u|*u. The velocity magnitude "//&
"may be an assumed value or it may be based on the "//&
"actual velocity in the bottommost HBBL, depending on "//&
"LINEAR_DRAG.", default=.true.)
"may be an assumed value or it may be based on the actual "//&
"velocity in the bottommost HBBL, depending on LINEAR_DRAG.", default=.true.)
if (CS%bottomdraglaw) then
call get_param(param_file, mdl, "CDRAG", CS%cdrag, &
"The drag coefficient relating the magnitude of the "//&
Expand Down Expand Up @@ -2046,17 +2041,15 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
"If true, uses a simple estimate of Kd/TKE that will "//&
"work for arbitrary vertical coordinates. If false, "//&
"calculates Kd/TKE and bounds based on exact energetics "//&
"for an isopycnal layer-formulation.", &
default=.false.)
"for an isopycnal layer-formulation.", default=.false.)

! set params releted to the background mixing
call bkgnd_mixing_init(Time, G, GV, US, param_file, CS%diag, CS%bkgnd_mixing_csp)

call get_param(param_file, mdl, "KV", CS%Kv, &
"The background kinematic viscosity in the interior. "//&
"The molecular value, ~1e-6 m2 s-1, may be used.", &
units="m2 s-1", scale=US%m2_s_to_Z2_T, &
fail_if_missing=.true.)
units="m2 s-1", scale=US%m2_s_to_Z2_T, fail_if_missing=.true.)

call get_param(param_file, mdl, "KD", CS%Kd, &
"The background diapycnal diffusivity of density in the "//&
Expand All @@ -2065,13 +2058,11 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
fail_if_missing=.true.)
call get_param(param_file, mdl, "KD_MIN", CS%Kd_min, &
"The minimum diapycnal diffusivity.", &
units="m2 s-1", default=0.01*CS%Kd*US%Z2_T_to_m2_s, &
scale=US%m2_s_to_Z2_T)
units="m2 s-1", default=0.01*CS%Kd*US%Z2_T_to_m2_s, scale=US%m2_s_to_Z2_T)
call get_param(param_file, mdl, "KD_MAX", CS%Kd_max, &
"The maximum permitted increment for the diapycnal "//&
"diffusivity from TKE-based parameterizations, or a "//&
"negative value for no limit.", units="m2 s-1", default=-1.0, &
scale=US%m2_s_to_Z2_T)
"diffusivity from TKE-based parameterizations, or a negative "//&
"value for no limit.", units="m2 s-1", default=-1.0, scale=US%m2_s_to_Z2_T)
if (CS%simple_TKE_to_Kd .and. CS%Kd_max<=0.) call MOM_error(FATAL, &
"set_diffusivity_init: To use SIMPLE_TKE_TO_KD, KD_MAX must be set to >0.")
call get_param(param_file, mdl, "KD_ADD", CS%Kd_add, &
Expand All @@ -2084,15 +2075,14 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
call get_param(param_file, mdl, "KD_SMOOTH", CS%Kd_smooth, &
"A diapycnal diffusivity that is used to interpolate "//&
"more sensible values of T & S into thin layers.", &
default=1.0e-6, scale=US%m_to_Z**2*US%T_to_s)
units="m2 s-1", default=1.0e-6, scale=US%m_to_Z**2*US%T_to_s)

call get_param(param_file, mdl, "DEBUG", CS%debug, &
"If true, write out verbose debugging data.", &
default=.false., debuggingParam=.true.)

call get_param(param_file, mdl, "USER_CHANGE_DIFFUSIVITY", CS%user_change_diff, &
"If true, call user-defined code to change the diffusivity.", &
default=.false.)
"If true, call user-defined code to change the diffusivity.", default=.false.)

call get_param(param_file, mdl, "DISSIPATION_MIN", CS%dissip_min, &
"The minimum dissipation by which to determine a lower "//&
Expand All @@ -2102,8 +2092,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
"The intercept when N=0 of the N-dependent expression "//&
"used to set a minimum dissipation by which to determine "//&
"a lower bound of Kd (a floor): A in eps_min = A + B*N.", &
units="W m-3", default=0.0, &
scale=US%kg_m3_to_R*US%m2_s_to_Z2_T*(US%T_to_s**2))
units="W m-3", default=0.0, scale=US%kg_m3_to_R*US%m2_s_to_Z2_T*(US%T_to_s**2))
call get_param(param_file, mdl, "DISSIPATION_N1", CS%dissip_N1, &
"The coefficient multiplying N, following Gargett, used to "//&
"set a minimum dissipation by which to determine a lower "//&
Expand Down Expand Up @@ -2155,9 +2144,8 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
"Maximum salt diffusivity for salt fingering regime.", &
default=1.e-4, units="m2 s-1", scale=US%m2_s_to_Z2_T)
call get_param(param_file, mdl, "KV_MOLECULAR", CS%Kv_molecular, &
"Molecular viscosity for calculation of fluxes under "//&
"double-diffusive convection.", default=1.5e-6, units="m2 s-1", &
scale=US%m2_s_to_Z2_T)
"Molecular viscosity for calculation of fluxes under double-diffusive "//&
"convection.", default=1.5e-6, units="m2 s-1", scale=US%m2_s_to_Z2_T)
! The default molecular viscosity follows the CCSM4.0 and MOM4p1 defaults.

CS%id_KT_extra = register_diag_field('ocean_model', 'KT_extra', diag%axesTi, Time, &
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/vertical/MOM_vert_friction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1573,8 +1573,8 @@ subroutine vertvisc_init(MIS, Time, G, GV, US, param_file, diag, ADp, dirs, &
default=.true.)
call get_param(param_file, mdl, "VERT_FRICTION_2018_ANSWERS", CS%answers_2018, &
"If true, use the order of arithmetic and expressions that recover the answers "//&
"from the end of 2018. Otherwise, use expressions that do not use an arbitary "//&
"and hard-coded maximum viscous coupling coefficient between layers.", &
"from the end of 2018. Otherwise, use expressions that do not use an arbitrary "//&
"hard-coded maximum viscous coupling coefficient between layers.", &
default=default_2018_answers)
call get_param(param_file, mdl, "BOTTOMDRAGLAW", CS%bottomdraglaw, &
"If true, the bottom stress is calculated with a drag "//&
Expand Down
3 changes: 1 addition & 2 deletions src/tracer/MOM_neutral_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ logical function neutral_diffusion_init(Time, G, param_file, diag, EOS, CS)
call get_param(param_file, mdl, "NDIFF_REF_PRES", CS%ref_pres, &
"The reference pressure (Pa) used for the derivatives of "//&
"the equation of state. If negative (default), local "//&
"pressure is used.", &
default = -1.)
"pressure is used.", units="Pa", default = -1.)
! Initialize and configure remapping
if ( .not.CS%continuous_reconstruction ) then
call get_param(param_file, mdl, "NDIFF_BOUNDARY_EXTRAP", boundary_extrap, &
Expand Down
8 changes: 4 additions & 4 deletions src/tracer/advection_test_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ function register_advection_test_tracer(HI, GV, param_file, CS, tr_Reg, restart_
call log_version(param_file, mdl, version, "")

call get_param(param_file, mdl, "ADVECTION_TEST_X_ORIGIN", CS%x_origin, &
"The x-coorindate of the center of the test-functions.", default=0.)
"The x-coordinate of the center of the test-functions.", units="same as geoLon", default=0.)
call get_param(param_file, mdl, "ADVECTION_TEST_Y_ORIGIN", CS%y_origin, &
"The y-coorindate of the center of the test-functions.", default=0.)
"The y-coordinate of the center of the test-functions.", units="same as geoLat", default=0.)
call get_param(param_file, mdl, "ADVECTION_TEST_X_WIDTH", CS%x_width, &
"The x-width of the test-functions.", default=0.)
"The x-width of the test-functions.", units="same as geoLon", default=0.)
call get_param(param_file, mdl, "ADVECTION_TEST_Y_WIDTH", CS%y_width, &
"The y-width of the test-functions.", default=0.)
"The y-width of the test-functions.", units="same as geoLat", default=0.)
call get_param(param_file, mdl, "ADVECTION_TEST_TRACER_IC_FILE", CS%tracer_IC_file, &
"The name of a file from which to read the initial "//&
"conditions for the tracers, or blank to initialize "//&
Expand Down
6 changes: 3 additions & 3 deletions src/user/adjustment_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ subroutine adjustment_initialize_thickness ( h, G, GV, US, param_file, just_read
units="1e-3", fail_if_missing=.not.just_read, do_not_log=just_read)
call get_param(param_file, mdl,"FRONT_WAVE_AMP",front_wave_amp, &
"Amplitude of trans-frontal wave perturbation", &
units="same as x,y",default=0., do_not_log=just_read)
units="same as x,y", default=0., do_not_log=just_read)
call get_param(param_file, mdl,"FRONT_WAVE_LENGTH",front_wave_length, &
"Wave-length of trans-frontal wave perturbation", &
units="same as x,y",default=0., do_not_log=just_read)
units="same as x,y", default=0., do_not_log=just_read)
call get_param(param_file, mdl,"FRONT_WAVE_ASYM",front_wave_asym, &
"Amplitude of frontal asymmetric perturbation", &
default=0., do_not_log=just_read)
units="same as x,y", default=0., do_not_log=just_read)

if (just_read) return ! All run-time parameters have been read, so return.

Expand Down

0 comments on commit bcc3f5e

Please sign in to comment.