Skip to content

Commit

Permalink
Merge pull request NOAA-EMC#59 from NOAA-GFDL/dev/gfdl
Browse files Browse the repository at this point in the history
Merge in dev/gfdl updates
  • Loading branch information
wrongkindofdoctor authored Jun 9, 2020
2 parents b8eee45 + 2179c88 commit cea55fe
Show file tree
Hide file tree
Showing 68 changed files with 988 additions and 924 deletions.
7 changes: 7 additions & 0 deletions .testing/tc0/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,10 @@ ENERGYSAVEDAYS = 1.0

DIAG_AS_CHKSUM = True
DEBUG = True
DEFAULT_2018_ANSWERS = True ! [Boolean] default = True
GRID_ROTATION_ANGLE_BUGS = True ! [Boolean] default = True
USE_GM_WORK_BUG = True ! [Boolean] default = True
FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False
1 change: 1 addition & 0 deletions .testing/tc1.a/MOM_tc_variant
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#override SPLIT=False
#override FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
1 change: 1 addition & 0 deletions .testing/tc1.b/MOM_tc_variant
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#override SPLIT=False
#override USE_RK2=True
#override FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
13 changes: 13 additions & 0 deletions .testing/tc1/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -574,3 +574,16 @@ ENERGYSAVEDAYS = 0.125 ! [days] default = 3600.0
! energies of the run and other globally summed diagnostics.
DIAG_AS_CHKSUM = True
DEBUG = True
USE_PSURF_IN_EOS = False ! [Boolean] default = False
DEFAULT_2018_ANSWERS = True ! [Boolean] default = True
GRID_ROTATION_ANGLE_BUGS = True ! [Boolean] default = True
INTERPOLATE_RES_FN = True ! [Boolean] default = True
GILL_EQUATORIAL_LD = False ! [Boolean] default = False
USE_GM_WORK_BUG = True ! [Boolean] default = True
USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False
KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True
KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True
BULKML_CONV_MOMENTUM_BUG = True ! [Boolean] default = True
PEN_SW_ABSORB_MINTHICK = 0.001 ! [m] default = 0.001
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False
11 changes: 11 additions & 0 deletions .testing/tc2/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,14 @@ ENERGYSAVEDAYS = 0.5 ! [days] default = 3600.0
DIAG_AS_CHKSUM = True
DEBUG = True
USE_GM_WORK_BUG = False
USE_PSURF_IN_EOS = False ! [Boolean] default = False
DEFAULT_2018_ANSWERS = True ! [Boolean] default = True
GRID_ROTATION_ANGLE_BUGS = True ! [Boolean] default = True
REMAP_UV_USING_OLD_ALG = True ! [Boolean] default = True
USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False
KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True
KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True
USE_MLD_ITERATION = False ! [Boolean] default = False
PEN_SW_ABSORB_MINTHICK = 0.001 ! [m] default = 0.001
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False
9 changes: 9 additions & 0 deletions .testing/tc3/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -469,3 +469,12 @@ ENERGYSAVEDAYS = 3.0 ! [hours] default = 1.44E+04
! energies of the run and other globally summed diagnostics.
DIAG_AS_CHKSUM = True
DEBUG = True
DEFAULT_2018_ANSWERS = True ! [Boolean] default = True
OBC_RADIATION_MAX = 10.0 ! [nondim] default = 10.0
GRID_ROTATION_ANGLE_BUGS = True ! [Boolean] default = True
USE_GM_WORK_BUG = True ! [Boolean] default = True
USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False
KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True
KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False
20 changes: 17 additions & 3 deletions .testing/tc4/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,6 @@ DTBT = 10.0 ! [s or nondim] default = -0.98
! Parameterization of enhanced mixing due to convection via CVMix

! === module MOM_entrain_diffusive ===
CORRECT_DENSITY = False ! [Boolean] default = True
! If true, and USE_EOS is true, the layer densities are restored toward their
! target values by the diapycnal mixing, as described in Hallberg (MWR, 2000).

! === module MOM_set_diffusivity ===
BBL_EFFIC = 0.0 ! [nondim] default = 0.2
Expand Down Expand Up @@ -410,3 +407,20 @@ MAXCPU = 2.88E+04 ! [wall-clock seconds] default = -1.0

DIAG_AS_CHKSUM = True
DEBUG = True

USE_PSURF_IN_EOS = False ! [Boolean] default = False
DEFAULT_2018_ANSWERS = True ! [Boolean] default = True
GRID_ROTATION_ANGLE_BUGS = True ! [Boolean] default = True
INTERPOLATE_RES_FN = True ! [Boolean] default = True
GILL_EQUATORIAL_LD = False ! [Boolean] default = False
USE_GM_WORK_BUG = True ! [Boolean] default = True
FIX_UNSPLIT_DT_VISC_BUG = False ! [Boolean] default = False
REMAP_UV_USING_OLD_ALG = True ! [Boolean] default = True
USE_LAND_MASK_FOR_HVISC = False ! [Boolean] default = False
KAPPA_SHEAR_ITER_BUG = True ! [Boolean] default = True
KAPPA_SHEAR_ALL_LAYER_TKE_BUG = True ! [Boolean] default = True
USE_MLD_ITERATION = False ! [Boolean] default = False
PEN_SW_ABSORB_MINTHICK = 0.001 ! [m] default = 0.001
GUST_CONST = 0.02 ! [Pa] default = 0.02
FIX_USTAR_GUSTLESS_BUG = False ! [Boolean] default = False

30 changes: 14 additions & 16 deletions config_src/coupled_driver/MOM_surface_forcing_gfdl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS)
call get_param(param_file, mdl, "USE_NET_FW_ADJUSTMENT_SIGN_BUG", &
CS%use_net_FW_adjustment_sign_bug, &
"If true, use the wrong sign for the adjustment to "//&
"the net fresh-water.", default=.true.)
"the net fresh-water.", default=.false.)
call get_param(param_file, mdl, "ADJUST_NET_FRESH_WATER_BY_SCALING", &
CS%adjust_net_fresh_water_by_scaling, &
"If true, adjustments to net fresh water to achieve zero net are "//&
Expand Down Expand Up @@ -1363,19 +1363,18 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS)

if (CS%restore_salt) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", &
units="m day-1", scale=US%m_to_Z*US%T_to_s, fail_if_missing=.true.)
"The constant that relates the restoring surface fluxes to the relative "//&
"surface anomalies (akin to a piston velocity). Note the non-MKS units.", &
default=0.0, units="m day-1", scale=US%m_to_Z*US%T_to_s)
! Convert CS%Flux_const from m day-1 to m s-1.
CS%Flux_const = CS%Flux_const / 86400.0
call get_param(param_file, mdl, "SALT_RESTORE_FILE", CS%salt_restore_file, &
"A file in which to find the surface salinity to use for restoring.", &
default="salt_restore.nc")
call get_param(param_file, mdl, "SALT_RESTORE_VARIABLE", CS%salt_restore_var_name, &
"The name of the surface salinity variable to read from "//&
"SALT_RESTORE_FILE for restoring salinity.", &
default="salt")
! Convert CS%Flux_const from m day-1 to m s-1.
CS%Flux_const = CS%Flux_const / 86400.0

call get_param(param_file, mdl, "SRESTORE_AS_SFLUX", CS%salt_restore_as_sflux, &
"If true, the restoring of salinity is applied as a salt "//&
Expand Down Expand Up @@ -1411,19 +1410,18 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS)

if (CS%restore_temp) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", &
units="m day-1", scale=US%m_to_Z*US%T_to_s, fail_if_missing=.true.)
"The constant that relates the restoring surface fluxes to the relative "//&
"surface anomalies (akin to a piston velocity). Note the non-MKS units.", &
default=0.0, units="m day-1", scale=US%m_to_Z*US%T_to_s)
! Convert CS%Flux_const from m day-1 to m s-1.
CS%Flux_const = CS%Flux_const / 86400.0
call get_param(param_file, mdl, "SST_RESTORE_FILE", CS%temp_restore_file, &
"A file in which to find the surface temperature to use for restoring.", &
default="temp_restore.nc")
call get_param(param_file, mdl, "SST_RESTORE_VARIABLE", CS%temp_restore_var_name, &
"The name of the surface temperature variable to read from "//&
"SST_RESTORE_FILE for restoring sst.", &
default="temp")
! Convert CS%Flux_const from m day-1 to m s-1.
CS%Flux_const = CS%Flux_const / 86400.0

call get_param(param_file, mdl, "MAX_DELTA_TRESTORE", CS%max_delta_trestore, &
"The maximum sst difference used in restoring terms.", &
Expand Down Expand Up @@ -1483,7 +1481,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS)
"an input file", default=.false.)
call get_param(param_file, mdl, "GUST_CONST", CS%gust_const, &
"The background gustiness in the winds.", &
units="Pa", default=0.02, scale=US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z)
units="Pa", default=0.0, scale=US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z)
if (CS%read_gust_2d) then
call get_param(param_file, mdl, "GUST_2D_FILE", gust_file, &
"The file in which the wind gustiness is found in "//&
Expand All @@ -1496,14 +1494,14 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS)
endif
call get_param(param_file, mdl, "DEFAULT_2018_ANSWERS", default_2018_answers, &
"This sets the default value for the various _2018_ANSWERS parameters.", &
default=.true.)
default=.false.)
call get_param(param_file, mdl, "SURFACE_FORCING_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 a simpler expression to calculate gustiness.", &
default=default_2018_answers)
call get_param(param_file, mdl, "FIX_USTAR_GUSTLESS_BUG", CS%fix_ustar_gustless_bug, &
"If true correct a bug in the time-averaging of the gustless wind friction velocity", &
default=.false.)
default=.true.)

! See whether sufficiently thick sea ice should be treated as rigid.
call get_param(param_file, mdl, "USE_RIGID_SEA_ICE", CS%rigid_sea_ice, &
Expand Down
17 changes: 8 additions & 9 deletions config_src/ice_solo_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
call get_param(param_file, mdl, "BUOY_CONFIG", CS%buoy_config, &
"The character string that indicates how buoyancy forcing "//&
"is specified. Valid options include (file), (zero), "//&
"(linear), (USER), and (NONE).", fail_if_missing=.true.)
"(linear), (USER), and (NONE).", default="zero")
if (trim(CS%buoy_config) == "file") then
call get_param(param_file, mdl, "LONGWAVEDOWN_FILE", CS%longwavedown_file, &
"The file with the downward longwave heat flux, in "//&
Expand Down Expand Up @@ -1046,7 +1046,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
call get_param(param_file, mdl, "WIND_CONFIG", CS%wind_config, &
"The character string that indicates how wind forcing "//&
"is specified. Valid options include (file), (2gyre), "//&
"(1gyre), (gyres), (zero), and (USER).", fail_if_missing=.true.)
"(1gyre), (gyres), (zero), and (USER).", default="zero")
if (trim(CS%wind_config) == "file") then
call get_param(param_file, mdl, "WIND_FILE", CS%wind_file, &
"The file in which the wind stresses are found in "//&
Expand All @@ -1057,10 +1057,10 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
call get_param(param_file, mdl, "WINDSTRESS_Y_VAR", CS%stress_y_var, &
"The name of the y-wind stress variable in WIND_FILE.", &
default="STRESS_Y")
call get_param(param_file, mdl, "WINDSTRESS_STAGGER",CS%wind_stagger, &
call get_param(param_file, mdl, "WIND_STAGGER",CS%wind_stagger, &
"A character indicating how the wind stress components "//&
"are staggered in WIND_FILE. This may be A or C for now.", &
default="A")
default="C")
call get_param(param_file, mdl, "WINDSTRESS_SCALE", CS%wind_scale, &
"A value by which the wind stresses in WIND_FILE are rescaled.", &
default=1.0, units="nondim")
Expand Down Expand Up @@ -1110,10 +1110,9 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
"The latent heat of fusion.", default=hlv, units="J/kg", scale=US%J_kg_to_Q)
if (CS%restorebuoy) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", &
units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0, fail_if_missing=.true.)
"The constant that relates the restoring surface fluxes to the relative "//&
"surface anomalies (akin to a piston velocity). Note the non-MKS units.", &
default=0.0, units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0)
if (trim(CS%buoy_config) == "linear") then
call get_param(param_file, mdl, "SST_NORTH", CS%T_north, &
"With buoy_config linear, the sea surface temperature "//&
Expand All @@ -1139,7 +1138,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C

call get_param(param_file, mdl, "GUST_CONST", CS%gust_const, &
"The background gustiness in the winds.", &
units="Pa", default=0.02, scale=US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z)
units="Pa", default=0.0, scale=US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z)
call get_param(param_file, mdl, "READ_GUST_2D", CS%read_gust_2d, &
"If true, use a 2-dimensional gustiness supplied from "//&
"an input file", default=.false.)
Expand Down
9 changes: 4 additions & 5 deletions config_src/ice_solo_driver/user_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,17 @@ subroutine USER_surface_forcing_init(Time, G, US, param_file, diag, CS)
units="kg m-3", default=1035.0, scale=US%R_to_kg_m3)
call get_param(param_file, mdl, "GUST_CONST", CS%gust_const, &
"The background gustiness in the winds.", &
units="Pa", default=0.02, scale=US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z)
units="Pa", default=0.0, scale=US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z)

call get_param(param_file, mdl, "RESTOREBUOY", CS%restorebuoy, &
"If true, the buoyancy fluxes drive the model back "//&
"toward some specified surface state with a rate "//&
"given by FLUXCONST.", default= .false.)
if (CS%restorebuoy) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", &
units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0, fail_if_missing=.true.)
"The constant that relates the restoring surface fluxes to the relative "//&
"surface anomalies (akin to a piston velocity). Note the non-MKS units.", &
default=0.0, units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0)
endif

end subroutine USER_surface_forcing_init
Expand Down
21 changes: 9 additions & 12 deletions config_src/mct_driver/mom_surface_forcing_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
call get_param(param_file, mdl, "USE_NET_FW_ADJUSTMENT_SIGN_BUG", &
CS%use_net_FW_adjustment_sign_bug, &
"If true, use the wrong sign for the adjustment to "//&
"the net fresh-water.", default=.false.)
"the net fresh-water.", default=.true.)
call get_param(param_file, mdl, "ADJUST_NET_FRESH_WATER_BY_SCALING", &
CS%adjust_net_fresh_water_by_scaling, &
"If true, adjustments to net fresh water to achieve zero net are "//&
Expand Down Expand Up @@ -1128,10 +1128,9 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,

if (restore_salt) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0, &
fail_if_missing=.true.)
"The constant that relates the restoring surface fluxes to the relative "//&
"surface anomalies (akin to a piston velocity). Note the non-MKS units.", &
default=0.0, units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0)
call get_param(param_file, mdl, "SALT_RESTORE_FILE", CS%salt_restore_file, &
"A file in which to find the surface salinity to use for restoring.", &
default="salt_restore.nc")
Expand Down Expand Up @@ -1174,10 +1173,9 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,

if (restore_temp) then
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", units="m day-1", scale=US%m_to_Z*US%T_to_s / 86400.0, &
fail_if_missing=.true.)
"The constant that relates the restoring surface fluxes to the relative "//&
"surface anomalies (akin to a piston velocity). Note the non-MKS units.", &
default=0.0, units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0)
call get_param(param_file, mdl, "SST_RESTORE_FILE", CS%temp_restore_file, &
"A file in which to find the surface temperature to use for restoring.", &
default="temp_restore.nc")
Expand Down Expand Up @@ -1245,8 +1243,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
"If true, use a 2-dimensional gustiness supplied from "//&
"an input file", default=.false.)
call get_param(param_file, mdl, "GUST_CONST", CS%gust_const, &
"The background gustiness in the winds.", units="Pa", &
default=0.02)
"The background gustiness in the winds.", units="Pa", default=0.0)
if (CS%read_gust_2d) then
call get_param(param_file, mdl, "GUST_2D_FILE", gust_file, &
"The file in which the wind gustiness is found in "//&
Expand All @@ -1259,7 +1256,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
endif
call get_param(param_file, mdl, "FIX_USTAR_GUSTLESS_BUG", CS%fix_ustar_gustless_bug, &
"If true correct a bug in the time-averaging of the gustless wind friction velocity", &
default=.false.)
default=.true.)

! See whether sufficiently thick sea ice should be treated as rigid.
call get_param(param_file, mdl, "USE_RIGID_SEA_ICE", CS%rigid_sea_ice, &
Expand Down
Loading

0 comments on commit cea55fe

Please sign in to comment.