From de9177bf6cdb895cb0ae01a70c17b85895d24ebf Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 13:53:47 -0600 Subject: [PATCH 01/24] Use refactored remapping scheme (C_PPM_CW) --- param_templates/MOM_input.yaml | 2 +- param_templates/json/MOM_input.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index ccb92443..3174df0f 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -614,7 +614,7 @@ Global: PQM_IH4IH3 (4th-order accurate) PQM_IH6IH5 (5th-order accurate)" datatype: string - value: "PPM_CW" + value: "C_PPM_CW" REMAP_VEL_CONSERVE_KE: description: | "[Boolean] default = False diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 66a68259..6f177323 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -468,7 +468,7 @@ "REMAPPING_SCHEME": { "description": "\"default = 'PLM'\nThis sets the reconstruction scheme used\nfor vertical remapping for all variables.\nIt can be one of the following schemes:\nPCM (1st-order accurate)\nPLM (2nd-order accurate)\nPPM_H4 (3rd-order accurate)\nPPM_IH4 (3rd-order accurate)\nPQM_IH4IH3 (4th-order accurate)\nPQM_IH6IH5 (5th-order accurate)\"\n", "datatype": "string", - "value": "PPM_CW" + "value": "C_PPM_CW" }, "REMAP_VEL_CONSERVE_KE": { "description": "\"[Boolean] default = False\nIf true, a correction is applied to the baroclinic component of velocity after\nremapping so that total KE is conserved. KE may not be conserved when\n(CS%BBL_h_vel_mask > 0.0) .and. (CS%h_vel_mask > 0.0)\"\n", From 4dfc32cbfae349e75e4e17f2e53066fefb41f250 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 13:58:39 -0600 Subject: [PATCH 02/24] Add stochastic backscatter diagnostics --- param_templates/diag_table.yaml | 6 +++++- param_templates/json/diag_table.json | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/param_templates/diag_table.yaml b/param_templates/diag_table.yaml index 82a0773b..cc10f228 100644 --- a/param_templates/diag_table.yaml +++ b/param_templates/diag_table.yaml @@ -26,6 +26,8 @@ FieldLists: - &kpp_diags ["KPP_OBLdepth:oml", "KPP_OBLdepth:oml_min:min", "KPP_OBLdepth:oml_max:max"] + - &stochastic_diags ["skeb_amp"] + - &forcing_flds ["tauuo", "tauvo", "friver", "prsn", "prlq", "evs", "hfsso", "rlntds", "hfsnthermds", "sfdsi", "rsntds", "hfds", "ustar", "hfsifrazil", "wfo", "vprec", "ficeberg", "fsitherm", @@ -47,7 +49,8 @@ FieldLists: - &static_flds ["geolon", "geolat", "geolon_c", "geolat_c", "geolon_u", "geolat_u", "geolon_v", "geolat_v", "deptho", "wet", "wet_c", "wet_u", "wet_v", "Coriolis", "areacello", "areacello_cu", "areacello_cv", - "areacello_bu", "sin_rot", "cos_rot", "C_P", "Rho_0"] + "areacello_bu", "sin_rot", "cos_rot", "C_P", "Rho_0", "skeb_taper_v", + "skeb_taper_u"] - &transports ["volcello", "vmo", "vhGM", "vhml", "umo", "uhGM", "uhml"] @@ -125,6 +128,7 @@ Files: $OCN_DIAG_MODE not in ["spinup", "none"]: [ *prognostic, *kpp_diags, + *stochastic_diags, *forcing_flds, *enthalpy_flds, *surface_flds_common, diff --git a/param_templates/json/diag_table.json b/param_templates/json/diag_table.json index eb0149b5..6dd945d6 100644 --- a/param_templates/json/diag_table.json +++ b/param_templates/json/diag_table.json @@ -89,6 +89,9 @@ "KPP_OBLdepth:oml_min:min", "KPP_OBLdepth:oml_max:max" ], + [ + "skeb_amp" + ], [ "tauuo", "tauvo", @@ -168,7 +171,9 @@ "sin_rot", "cos_rot", "C_P", - "Rho_0" + "Rho_0", + "skeb_taper_v", + "skeb_taper_u" ], [ "volcello", @@ -352,6 +357,9 @@ "KPP_OBLdepth:oml_min:min", "KPP_OBLdepth:oml_max:max" ], + [ + "skeb_amp" + ], [ "tauuo", "tauvo", @@ -691,7 +699,9 @@ "sin_rot", "cos_rot", "C_P", - "Rho_0" + "Rho_0", + "skeb_taper_v", + "skeb_taper_u" ] ], "lists2": { From 6e5b8d0079d35b11096f95da78c966708fc9e250 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:01:59 -0600 Subject: [PATCH 03/24] Use pressure gradient force bugfix --- param_templates/MOM_input.yaml | 10 ++++++++++ param_templates/json/MOM_input.json | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 3174df0f..33ccfe37 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -987,6 +987,16 @@ Global: datatype: logical units: Boolean value: True + RHO_PGF_REF_BUG: + description: | + "[Boolean] default = True + If true, recover a bug that RHO_0 (the mean seawater density in Boussinesq + mode) and RHO_PGF_REF (the subtracted reference density in finite volume + pressure gradient forces) are incorrectly interchanged in several instances in + Boussinesq mode." + datatype: logical + units: Boolean + value: False MASS_WEIGHT_IN_PRESSURE_GRADIENT: description: | "[Boolean] default = False diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 6f177323..8c0684ae 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -745,6 +745,12 @@ "units": "Boolean", "value": true }, + "RHO_PGF_REF_BUG": { + "description": "\"[Boolean] default = True\nIf true, recover a bug that RHO_0 (the mean seawater density in Boussinesq\nmode) and RHO_PGF_REF (the subtracted reference density in finite volume\npressure gradient forces) are incorrectly interchanged in several instances in\nBoussinesq mode.\"\n", + "datatype": "logical", + "units": "Boolean", + "value": false + }, "MASS_WEIGHT_IN_PRESSURE_GRADIENT": { "description": "\"[Boolean] default = False\nIf true, use mass weighting when interpolation T/S for\ntop/bottom integrals in AFV pressure gradient calculation.\"\n", "datatype": "logical", From 9bb16e82da465f889421286476b50f6c84a068f7 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:03:00 -0600 Subject: [PATCH 04/24] Turn off Stochastic EOS (aka Stanley parameterization) in GM/Redi --- param_templates/MOM_input.yaml | 4 ++-- param_templates/json/MOM_input.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 33ccfe37..c2b6687d 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -810,7 +810,7 @@ Global: datatype: logical units: Boolean value: - $OCN_GRID == "tx2_3v2": True + $OCN_GRID == "tx2_3v2": False ETA_TOLERANCE: description: | "[m] default = 3.15E-09 @@ -1515,7 +1515,7 @@ Global: datatype: logical units: Boolean value: - $OCN_GRID == "tx2_3v2": True + $OCN_GRID == "tx2_3v2": False MIXEDLAYER_RESTRAT: description: | "[Boolean] default = False diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 8c0684ae..72b43cc1 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -628,7 +628,7 @@ "datatype": "logical", "units": "Boolean", "value": { - "$OCN_GRID == \"tx2_3v2\"": true + "$OCN_GRID == \"tx2_3v2\"": false } }, "ETA_TOLERANCE": { @@ -1146,7 +1146,7 @@ "datatype": "logical", "units": "Boolean", "value": { - "$OCN_GRID == \"tx2_3v2\"": true + "$OCN_GRID == \"tx2_3v2\"": false } }, "MIXEDLAYER_RESTRAT": { From 1757114b22c019257376fb209e12386c1921aa0b Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:11:24 -0600 Subject: [PATCH 05/24] Set WIND_STAGGER = "A" --- param_templates/MOM_input.yaml | 9 +++++++-- param_templates/json/MOM_input.json | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index c2b6687d..7c46a86a 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -2234,7 +2234,13 @@ Global: value: $OCN_GRID == "tx2_3v2" and $COMP_ATM == "datm": True # for C and G compsets on tx2_3v2 else: False - + WIND_STAGGER: + description: | + "default = 'C' + A case-insensitive character string to indicate the staggering of the input + wind stress field. Valid values are 'A', 'B', or 'C'." + datatype: string + value: "A" ENTHALPY_FROM_COUPLER: description: | "[Boolean] default = False @@ -2243,7 +2249,6 @@ Global: datatype: logical units: Boolean value: True - FLUXCONST: description: | "[m day-1] diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 72b43cc1..95f300e9 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -1752,6 +1752,11 @@ "else": false } }, + "WIND_STAGGER": { + "description": "\"default = 'C'\nA case-insensitive character string to indicate the staggering of the input\nwind stress field. Valid values are 'A', 'B', or 'C'.\"\n", + "datatype": "string", + "value": "A" + }, "ENTHALPY_FROM_COUPLER": { "description": "\"[Boolean] default = False\nIf True, the heat (enthalpy) associated with mass entering/leaving\nthe ocean is provided via coupler.\"\n", "datatype": "logical", From dc71db298c3bc74184a537128aad270e2e04c6a6 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:12:39 -0600 Subject: [PATCH 06/24] Set OCNSKEB_LSCALE = 300e3 --- param_templates/input_nml.yaml | 2 +- param_templates/json/input_nml.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/param_templates/input_nml.yaml b/param_templates/input_nml.yaml index 17c374fa..3e19c066 100644 --- a/param_templates/input_nml.yaml +++ b/param_templates/input_nml.yaml @@ -67,7 +67,7 @@ nam_stochy: OCNSKEB: values: 1.0 OCNSKEB_LSCALE: - values: 200e3 + values: 300e3 OCNSKEB_TAU: values: 21600 ISEED_OCNSKEB: diff --git a/param_templates/json/input_nml.json b/param_templates/json/input_nml.json index 18882363..f60a09b3 100644 --- a/param_templates/json/input_nml.json +++ b/param_templates/json/input_nml.json @@ -83,7 +83,7 @@ "values": 1.0 }, "OCNSKEB_LSCALE": { - "values": "200e3" + "values": "300e3" }, "OCNSKEB_TAU": { "values": 21600 From 24977597fb1a3845b37f3adf243a41aa17945a97 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:16:54 -0600 Subject: [PATCH 07/24] Enable Smagorinsky Laplacian in the workhorse configuration --- param_templates/MOM_input.yaml | 16 ++++++++++++++++ param_templates/json/MOM_input.json | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 7c46a86a..89cf51f2 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -1020,6 +1020,22 @@ Global: datatype: logical units: Boolean value: True + SMAGORINSKY_KH: + description: | + "[Boolean] default = False + If true, use a Smagorinsky nonlinear eddy viscosity." + datatype: logical + units: Boolean + value: + $OCN_GRID == "tx2_3v2": True + SMAG_LAP_CONST: + description: | + "[nondim] default = 0.0 + The nondimensional Laplacian Smagorinsky constant, often 0.15." + datatype: real + units: nondim + value: + $OCN_GRID == "tx2_3v2": 0.15 KH: description: | "[m2 s-1] default = 0.0 diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 95f300e9..08987da3 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -771,6 +771,22 @@ "units": "Boolean", "value": true }, + "SMAGORINSKY_KH": { + "description": "\"[Boolean] default = False\nIf true, use a Smagorinsky nonlinear eddy viscosity.\"\n", + "datatype": "logical", + "units": "Boolean", + "value": { + "$OCN_GRID == \"tx2_3v2\"": true + } + }, + "SMAG_LAP_CONST": { + "description": "\"[nondim] default = 0.0\nThe nondimensional Laplacian Smagorinsky constant, often 0.15.\"\n", + "datatype": "real", + "units": "nondim", + "value": { + "$OCN_GRID == \"tx2_3v2\"": 0.15 + } + }, "KH": { "description": "\"[m2 s-1] default = 0.0\nThe background Laplacian horizontal viscosity.\"\n", "datatype": "real", From bc139c4cb91c31e54e6b7fea574727bda98f2f8d Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:17:45 -0600 Subject: [PATCH 08/24] Set DEPTH_SCALED_KHTH_H0 = 500 in the workhorse --- param_templates/MOM_input.yaml | 2 +- param_templates/json/MOM_input.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 89cf51f2..15755e54 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -745,7 +745,7 @@ Global: datatype: real units: nondim value: - $OCN_GRID == "tx2_3v2": 250.0 + $OCN_GRID == "tx2_3v2": 500.0 KHTR_SLOPE_CFF: description: | "[nondim] default = 0.0 diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 08987da3..67bf3a5d 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -572,7 +572,7 @@ "datatype": "real", "units": "nondim", "value": { - "$OCN_GRID == \"tx2_3v2\"": 250.0 + "$OCN_GRID == \"tx2_3v2\"": 500.0 } }, "KHTR_SLOPE_CFF": { From c51777ef6fd3afc989e2622a92648628c9b1c491 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:20:24 -0600 Subject: [PATCH 09/24] Set ntrunc = 192 in input_nml --- param_templates/input_nml.yaml | 2 ++ param_templates/json/input_nml.json | 3 +++ 2 files changed, 5 insertions(+) diff --git a/param_templates/input_nml.yaml b/param_templates/input_nml.yaml index 3e19c066..d5a950bf 100644 --- a/param_templates/input_nml.yaml +++ b/param_templates/input_nml.yaml @@ -72,4 +72,6 @@ nam_stochy: values: 21600 ISEED_OCNSKEB: values: 20 + ntrunc: + values: 192 ... diff --git a/param_templates/json/input_nml.json b/param_templates/json/input_nml.json index f60a09b3..fe795a5e 100644 --- a/param_templates/json/input_nml.json +++ b/param_templates/json/input_nml.json @@ -90,6 +90,9 @@ }, "ISEED_OCNSKEB": { "values": 20 + }, + "ntrunc": { + "values": 192 } } } \ No newline at end of file From 363d94dfbb7200dffe64f8f9edb242179fb8a677 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:30:17 -0600 Subject: [PATCH 10/24] Set RAD_EARTH to be the same as in shr_const_mod.F90 --- param_templates/MOM_input.yaml | 7 +++++++ param_templates/json/MOM_input.json | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 15755e54..6d9a21a7 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -529,6 +529,13 @@ Global: value: $OCN_GRID == "tx2_3v2": False $OCN_GRID == "tx0.25v1": False + RAD_EARTH: + description: | + "[m] default = 6.378E+06 + The radius of the Earth." + datatype: real + units: m + value: 6.37122E+06 TOPO_CONFIG: description: | "This specifies how bathymetry is specified: diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 67bf3a5d..a7e43e39 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -413,6 +413,12 @@ "$OCN_GRID == \"tx0.25v1\"": false } }, + "RAD_EARTH": { + "description": "\"[m] default = 6.378E+06\nThe radius of the Earth.\"\n", + "datatype": "real", + "units": "m", + "value": 6371220.0 + }, "TOPO_CONFIG": { "description": "\"This specifies how bathymetry is specified:\nfile - read bathymetric information from the file\nspecified by (TOPO_FILE).\nflat - flat bottom set to MAXIMUM_DEPTH.\nbowl - an analytically specified bowl-shaped basin\nranging between MAXIMUM_DEPTH and MINIMUM_DEPTH.\nspoon - a similar shape to 'bowl', but with an vertical\nwall at the southern face.\nhalfpipe - a zonally uniform channel with a half-sine\nprofile in the meridional direction.\nbenchmark - use the benchmark test case topography.\nDOME - use a slope and channel configuration for the\nDOME sill-overflow test case.\nDOME2D - use a shelf and slope configuration for the\nDOME2D gravity current/overflow test case.\nseamount - Gaussian bump for spontaneous motion test case.\nUSER - call a user modified routine.\"\n", "datatype": "string", From a9a2b45f60d0c794e3c50b640dd49bfacec459dd Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 1 Oct 2025 14:39:11 -0600 Subject: [PATCH 11/24] Update reference depth used to calculate MLD --- param_templates/MOM_input.yaml | 9 +++++++++ param_templates/json/MOM_input.json | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 6d9a21a7..374c6ba1 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -115,6 +115,15 @@ Global: units: Boolean value: $OCN_GRID == "tx2_3v2": False + HREF_FOR_MLD: + description: | + "[m] default = 0.0 + Reference depth used to calculate the potential density used to find the mixed + layer depth based on a delta rho = 0.03 kg/m3." + datatype: real + units: m + value: + $OCN_GRID == "tx2_3v2": 10.0 USE_REGRIDDING: description: | "[Boolean] default = False diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index a7e43e39..d5d817b1 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -68,6 +68,14 @@ "$OCN_GRID == \"tx2_3v2\"": false } }, + "HREF_FOR_MLD": { + "description": "\"[m] default = 0.0\nReference depth used to calculate the potential density used to find the mixed\nlayer depth based on a delta rho = 0.03 kg/m3.\"\n", + "datatype": "real", + "units": "m", + "value": { + "$OCN_GRID == \"tx2_3v2\"": 10.0 + } + }, "USE_REGRIDDING": { "description": "\"[Boolean] default = False\nIf True, use the ALE algorithm (regridding/remapping).\nIf False, use the layered isopycnal algorithm.\"\n", "datatype": "logical", From c4a91da13b1514da97e5f962e7ddf1c501bc8142 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 7 Oct 2025 13:05:44 -0600 Subject: [PATCH 12/24] Enable SKEB in the workhorse configuration --- param_templates/MOM_input.yaml | 61 +++++++++++++++++++++-------- param_templates/json/MOM_input.json | 54 +++++++++++++++++++------ 2 files changed, 85 insertions(+), 30 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 374c6ba1..bb5a97c1 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -2406,7 +2406,7 @@ Global: units: nondim value: $OCN_GRID == "tx0.25v1": 1.0 - $OCN_GRID == "tx2_3v2": 1.0 + $OCN_GRID == "tx2_3v2": 0.25 MEKE_BGSRC: description: | "[W kg-1] default = 0.0 @@ -3736,18 +3736,6 @@ Global: datatype: string value: "${CASE}.mom6.h.ocean_geometry.nc" - SKEB_NPASS: - description: | - "default = 3 - number of passes of a 9-point smoother of the dissipation estimate." - datatype: integer - value: 10 - SKEB_GM_COEF: - description: | - "[nondim] default = 0.0 - Fraction of GM work that is added to backscatter rate." - datatype: real - value: 0.75 RESTART_CHECKSUMS_REQUIRED: description: | "[Boolean] default = True @@ -3850,15 +3838,15 @@ KPP: $OCN_GRID == "tx2_3v2": 1.0 STOKES_MOST: description: | - default = False - If True, use Stokes Similarity package. + "default = False + If True, use Stokes Similarity package." datatype: logical value: $COMP_WAV == "ww3" and $MOM6_WW3_CPL_METHOD == "most": True COMPUTE_MONIN_OBUKHOV: description: | - default = False - If True, limit the OBL depth to be no deeper than Monin-Obukhov depth. + "default = False + If True, limit the OBL depth to be no deeper than Monin-Obukhov depth." datatype: logical units: Boolean value: @@ -3871,6 +3859,45 @@ KPP: datatype: real value: $OCN_GRID == "tx2_3v2": 5.0 + DO_SKEB: + description: | + "default = False + If true, then stochastically perturb the currents using the stochastic kinetic + energy backscatter scheme." + datatype: logical + units: Boolean + value: + $OCN_GRID == "tx2_3v2": True + SKEB_USE_FRICT: + description: | + "default = False + If true, adds horizontal friction dissipation rate to the SKEBS amplitude." + datatype: logical + units: Boolean + value: + $OCN_GRID == "tx2_3v2": True + SKEB_USE_GM: + description: | + "default = False + If true, adds GM work rate to the SKEBS amplitude." + datatype: logical + units: Boolean + value: + $OCN_GRID == "tx2_3v2": True + SKEB_NPASS: + description: | + "[nondim] default = 0 + number of passes of a 9-point smoother of the dissipation estimate." + datatype: integer + value: + $OCN_GRID == "tx2_3v2": 8 + SKEB_GM_COEF: + description: | + "[nondim] default = 0.0 + Fraction of GM work that is added to backscatter rate." + datatype: real + value: + $OCN_GRID == "tx2_3v2": 0.75 MLE: USE_BODNER23: description: | diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index d5d817b1..2d6156e8 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -1896,7 +1896,7 @@ "units": "nondim", "value": { "$OCN_GRID == \"tx0.25v1\"": 1.0, - "$OCN_GRID == \"tx2_3v2\"": 1.0 + "$OCN_GRID == \"tx2_3v2\"": 0.25 } }, "MEKE_BGSRC": { @@ -3031,16 +3031,6 @@ "datatype": "string", "value": "${CASE}.mom6.h.ocean_geometry.nc" }, - "SKEB_NPASS": { - "description": "\"default = 3\nnumber of passes of a 9-point smoother of the dissipation estimate.\"\n", - "datatype": "integer", - "value": 10 - }, - "SKEB_GM_COEF": { - "description": "\"[nondim] default = 0.0\nFraction of GM work that is added to backscatter rate.\"\n", - "datatype": "real", - "value": 0.75 - }, "RESTART_CHECKSUMS_REQUIRED": { "description": "\"[Boolean] default = True\nIf true, require the restart checksums to match and error out otherwise. Users\nmay want to avoid this comparison if for example the restarts are made from a\nrun with a different mask_table than the current run, in which case the\nchecksums will not match and cause crash.\n", "datatype": "logical", @@ -3121,14 +3111,14 @@ } }, "STOKES_MOST": { - "description": "default = False\nIf True, use Stokes Similarity package.\n", + "description": "\"default = False\nIf True, use Stokes Similarity package.\"\n", "datatype": "logical", "value": { "$COMP_WAV == \"ww3\" and $MOM6_WW3_CPL_METHOD == \"most\"": true } }, "COMPUTE_MONIN_OBUKHOV": { - "description": "default = False\nIf True, limit the OBL depth to be no deeper than Monin-Obukhov depth.\n", + "description": "\"default = False\nIf True, limit the OBL depth to be no deeper than Monin-Obukhov depth.\"\n", "datatype": "logical", "units": "Boolean", "value": { @@ -3141,6 +3131,44 @@ "value": { "$OCN_GRID == \"tx2_3v2\"": 5.0 } + }, + "DO_SKEB": { + "description": "\"default = False\nIf true, then stochastically perturb the currents using the stochastic kinetic\nenergy backscatter scheme.\"\n", + "datatype": "logical", + "units": "Boolean", + "value": { + "$OCN_GRID == \"tx2_3v2\"": true + } + }, + "SKEB_USE_FRICT": { + "description": "\"default = False\nIf true, adds horizontal friction dissipation rate to the SKEBS amplitude.\"\n", + "datatype": "logical", + "units": "Boolean", + "value": { + "$OCN_GRID == \"tx2_3v2\"": true + } + }, + "SKEB_USE_GM": { + "description": "\"default = False\nIf true, adds GM work rate to the SKEBS amplitude.\"\n", + "datatype": "logical", + "units": "Boolean", + "value": { + "$OCN_GRID == \"tx2_3v2\"": true + } + }, + "SKEB_NPASS": { + "description": "\"[nondim] default = 0\n number of passes of a 9-point smoother of the dissipation estimate.\"\n", + "datatype": "integer", + "value": { + "$OCN_GRID == \"tx2_3v2\"": 8 + } + }, + "SKEB_GM_COEF": { + "description": "\"[nondim] default = 0.0\nFraction of GM work that is added to backscatter rate.\"\n", + "datatype": "real", + "value": { + "$OCN_GRID == \"tx2_3v2\"": 0.75 + } } }, "MLE": { From 4b9a370eff71cfb5c29092266c2699b245424001 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 7 Oct 2025 13:10:10 -0600 Subject: [PATCH 13/24] Update KPP settings for the workhorse --- param_templates/MOM_input.yaml | 11 +++++++++-- param_templates/json/MOM_input.json | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index bb5a97c1..524b87c8 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -2842,7 +2842,7 @@ Global: datatype: real units: nondim value: - $COMP_WAV == "ww3" and $MOM6_WW3_CPL_METHOD == "most": 2.0 + $COMP_WAV == "ww3" and $MOM6_WW3_CPL_METHOD == "most": 3.5 VISC_REM_BUG: description: | "[Boolean] default = True @@ -3835,7 +3835,14 @@ KPP: datatype: real units: nondim value: - $OCN_GRID == "tx2_3v2": 1.0 + $OCN_GRID == "tx2_3v2": 1.8 + ENHANCE_DIFFUSION: + description: | + "default = True + If True, adds enhanced diffusion at the based of the boundary layer." + datatype: logical + value: + $OCN_GRID == "tx2_3v2": False STOKES_MOST: description: | "default = False diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 2d6156e8..a9293a4e 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -2264,7 +2264,7 @@ "datatype": "real", "units": "nondim", "value": { - "$COMP_WAV == \"ww3\" and $MOM6_WW3_CPL_METHOD == \"most\"": 2.0 + "$COMP_WAV == \"ww3\" and $MOM6_WW3_CPL_METHOD == \"most\"": 3.5 } }, "VISC_REM_BUG": { @@ -3107,7 +3107,14 @@ "datatype": "real", "units": "nondim", "value": { - "$OCN_GRID == \"tx2_3v2\"": 1.0 + "$OCN_GRID == \"tx2_3v2\"": 1.8 + } + }, + "ENHANCE_DIFFUSION": { + "description": "\"default = True\nIf True, adds enhanced diffusion at the based of the boundary layer.\"\n", + "datatype": "logical", + "value": { + "$OCN_GRID == \"tx2_3v2\"": false } }, "STOKES_MOST": { From 3aa8ac88f5c811d4d034502d8566ae5aa14667a3 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 7 Oct 2025 13:24:32 -0600 Subject: [PATCH 14/24] Update MLE settings for the workhorse --- param_templates/MOM_input.yaml | 18 +++++++++++++++++- param_templates/json/MOM_input.json | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 524b87c8..22844a05 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -3915,6 +3915,14 @@ MLE: units: Boolean value: $OCN_GRID == "tx2_3v2": True + CR: + description: | + "[nondim] default = 0.0 + The efficiency coefficient in eq 27 of Bodner et al., 2023." + datatype: real + units: nondim + value: + $OCN_GRID == "tx2_3v2": 0.01 USE_CR_GRID: description: | "[Boolean] default = False @@ -3928,7 +3936,15 @@ MLE: "The path to the file containing the Cr fields." datatype: string value: - $OCN_GRID == "tx2_3v2": "mle-cr-tx2_3v2-v10_20250426.nc" + $OCN_GRID == "tx2_3v2": "mle-cr-mask_20250627.nc" + WAVE_ENHANCED_USTAR: + description: | + "default = False + If true, enhance ustar using surface waves, following Eq. 28 in Bodner23." + datatype: logical + units: Boolean + value: + $OCN_GRID == "tx2_3v2": True MIN_WSTAR2: description: | "[m2 s-2] default = 1.0E-24 diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index a9293a4e..a56fe58a 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -3187,6 +3187,14 @@ "$OCN_GRID == \"tx2_3v2\"": true } }, + "CR": { + "description": "\"[nondim] default = 0.0\nThe efficiency coefficient in eq 27 of Bodner et al., 2023.\"\n", + "datatype": "real", + "units": "nondim", + "value": { + "$OCN_GRID == \"tx2_3v2\"": 0.01 + } + }, "USE_CR_GRID": { "description": "\"[Boolean] default = False\ntrue, read in a spatially varying Cr field.\"\n", "datatype": "logical", @@ -3199,7 +3207,15 @@ "description": "\"The path to the file containing the Cr fields.\"\n", "datatype": "string", "value": { - "$OCN_GRID == \"tx2_3v2\"": "mle-cr-tx2_3v2-v10_20250426.nc" + "$OCN_GRID == \"tx2_3v2\"": "mle-cr-mask_20250627.nc" + } + }, + "WAVE_ENHANCED_USTAR": { + "description": "\"default = False\nIf true, enhance ustar using surface waves, following Eq. 28 in Bodner23.\"\n", + "datatype": "logical", + "units": "Boolean", + "value": { + "$OCN_GRID == \"tx2_3v2\"": true } }, "MIN_WSTAR2": { From 42cd0dcb0ac513d137e46733061105d365dce03b Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 7 Oct 2025 13:28:51 -0600 Subject: [PATCH 15/24] Update convection settings for the workhorse --- param_templates/MOM_input.yaml | 10 ++++++++++ param_templates/json/MOM_input.json | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 22844a05..95632410 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -3754,6 +3754,16 @@ Global: added to the end of the file name. This parameter is ignored for non-ensemble runs." datatype: string value: ".mom6" +CVMix_CONVECTION: + BV_SQR_CONV: + description: | + "[1/s^2] default = 0.0 + Threshold for squared buoyancy frequency needed to trigger Brunt-Vaisala + parameterization." + datatype: real + units: 1/s^2 + value: + $OCN_GRID == "tx2_3v2": -1.0E-08 KPP: N_SMOOTH: description: | diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index a56fe58a..eaf2c7c6 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -3042,6 +3042,16 @@ "value": ".mom6" } }, + "CVMix_CONVECTION": { + "BV_SQR_CONV": { + "description": "\"[1/s^2] default = 0.0\nThreshold for squared buoyancy frequency needed to trigger Brunt-Vaisala\nparameterization.\"\n", + "datatype": "real", + "units": "1/s^2", + "value": { + "$OCN_GRID == \"tx2_3v2\"": -1e-08 + } + } + }, "KPP": { "N_SMOOTH": { "description": "\"default = 0\nThe number of times the 1-1-4-1-1 Laplacian filter is applied on\nOBL depth purely for diagnostic purposes.\"\n", From 1ac5421fb6a6fbd778fa38c26be861f69df98e8b Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 7 Oct 2025 13:34:33 -0600 Subject: [PATCH 16/24] Update interior mixing settings for the workhose --- param_templates/MOM_input.yaml | 17 +++++++++++++++++ param_templates/json/MOM_input.json | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 95632410..39d205be 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -1858,6 +1858,23 @@ Global: units: Boolean value: $OCN_GRID == "tx2_3v2": True + NU_ZERO: + description: | + "[m2 s-1] default = 0.005 + Leading coefficient in KPP shear mixing." + datatype: real + units: m2 s-1 + value: + $OCN_GRID == "tx2_3v2": 0.0025 + RI_ZERO: + description: | + "[nondim] default = 0.8 + Critical Richardson for KPP shear mixing, NOTE this the internal mixing and + this is not for setting the boundary layer depth." + datatype: real + units: nondim + value: + $OCN_GRID == "tx2_3v2": 0.5 N_SMOOTH_RI: description: | "default = 0 diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index eaf2c7c6..f05f675e 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -1435,6 +1435,22 @@ "$OCN_GRID == \"tx2_3v2\"": true } }, + "NU_ZERO": { + "description": "\"[m2 s-1] default = 0.005\nLeading coefficient in KPP shear mixing.\"\n", + "datatype": "real", + "units": "m2 s-1", + "value": { + "$OCN_GRID == \"tx2_3v2\"": 0.0025 + } + }, + "RI_ZERO": { + "description": "\"[nondim] default = 0.8\nCritical Richardson for KPP shear mixing, NOTE this the internal mixing and\nthis is not for setting the boundary layer depth.\"\n", + "datatype": "real", + "units": "nondim", + "value": { + "$OCN_GRID == \"tx2_3v2\"": 0.5 + } + }, "N_SMOOTH_RI": { "description": "\"default = 0\nIf > 0, vertically smooth the Richardson number by applying a 1-2-1 filter\nN_SMOOTH_RI times.\"\n", "datatype": "integer", From 5d9aee5a0ce6e629de0a342aca056c9eba7d9a8f Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 7 Oct 2025 13:37:56 -0600 Subject: [PATCH 17/24] Update MEKE_GEOMETRIC_ALPHA for the workhose Setting MEKE_GEOMETRIC_ALPHA = 0.06 significantly improves the Southern Ocean MLD biases while keeping a good ACC transport. We will use this value in alpha07g, but it will be revisited during the tuning phase. --- param_templates/MOM_input.yaml | 2 +- param_templates/json/MOM_input.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 39d205be..2b04633f 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -2560,7 +2560,7 @@ Global: datatype: real units: nondim value: - $OCN_GRID == "tx2_3v2": 0.09 + $OCN_GRID == "tx2_3v2": 0.06 MEKE_KHTH_FAC: description: | "[nondim] default = 0.0 diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index f05f675e..3564ed1b 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -2034,7 +2034,7 @@ "datatype": "real", "units": "nondim", "value": { - "$OCN_GRID == \"tx2_3v2\"": 0.09 + "$OCN_GRID == \"tx2_3v2\"": 0.06 } }, "MEKE_KHTH_FAC": { From 3f095f7309dc396711287b5eea5ec89deace42c6 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 7 Oct 2025 13:42:25 -0600 Subject: [PATCH 18/24] Set EQN_OF_STATE = "WRIGHT_FULL" The new default for EQN_OF_STATE is "WRIGHT_FULL" and that's what we want in alpha07g. We will explicitly set this in MOM_interface to 1) document this change, and 2) keep control of which EQN_OF_STATE is being used, in case the default changes again in the future. I did a clean timing comparison between EQN_OF_STATE = "WRIGHT" (simplified version) and EQN_OF_STATE = "WRIGHT_FULL". The differences are within machine uncertainty, so we will proceed with using WRIGHT_FULL in the next tag. EQN_OF_STATE = "WRIGHT_FULL" Model Throughput: 13.84 simulated_years/day EQN_OF_STATE = "WRIGHT" Model Throughput: 13.63 simulated_years/day --- param_templates/MOM_input.yaml | 6 ++++++ param_templates/json/MOM_input.json | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index 2b04633f..ef9c4968 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -290,6 +290,12 @@ Global: value: $OCN_GRID == "tx2_3v2": False $OCN_GRID == "tx0.25v1": False + EQN_OF_STATE: + description: | + "default = WRIGHT_FULL + EQN_OF_STATE determines which ocean equation of state should be used." + datatype: string + value: "WRIGHT_FULL" DTFREEZE_DP: description: | "[deg C Pa-1] default = 0.0 diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 3564ed1b..baf728d0 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -199,6 +199,13 @@ "$OCN_GRID == \"tx0.25v1\"": false } }, + "EQN_OF_STATE": { + "description": "\"default = 'WRIGHT'\nEQN_OF_STATE determines which ocean equation of state\nshould be used. Currently, the valid choices are\n'LINEAR', 'UNESCO', and 'WRIGHT'.\nThis is only used if USE_EOS is true.\"\n", + "datatype": "string", + "value": { + "$OCN_GRID == \"MISOMIP\"": "LINEAR" + } + }, "DTFREEZE_DP": { "description": "\"[deg C Pa-1] default = 0.0\nWhen TFREEZE_FORM=LINEAR,\nthis is the derivative of the freezing potential\ntemperature with pressure.\"\n", "datatype": "real", @@ -2350,13 +2357,6 @@ "$OCN_GRID == \"MISOMIP\"": 1.0 } }, - "EQN_OF_STATE": { - "description": "\"default = 'WRIGHT'\nEQN_OF_STATE determines which ocean equation of state\nshould be used. Currently, the valid choices are\n'LINEAR', 'UNESCO', and 'WRIGHT'.\nThis is only used if USE_EOS is true.\"\n", - "datatype": "string", - "value": { - "$OCN_GRID == \"MISOMIP\"": "LINEAR" - } - }, "RHO_T0_S0": { "description": "\"[kg m-3] default = 1000.0\nWhen EQN_OF_STATE=LINEAR,\nthis is the density at T=0, S=0.\"\n", "datatype": "real", From cd8c143b1ac0a843a5d6e4897ce0f106c3941936 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 7 Oct 2025 14:06:17 -0600 Subject: [PATCH 19/24] Set new defaults for HYCOM1 files in the workhorse --- param_templates/MOM_input.yaml | 8 +++++--- param_templates/json/MOM_input.json | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index ef9c4968..b6eb5d49 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -954,7 +954,7 @@ Global: value: $MOM6_VERTICAL_GRID == "zstar_75L": '"FILE:zstar_75layer_2.5m_248.4m-2024-03-29.nc,dz"' $MOM6_VERTICAL_GRID == "zstar_65L": '"FILE:vgrid_65L_20200626.nc,dz"' - $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID != "tx0.25v1": '"HYBRID:hybrid_75layer_zstar2.50m-2020-11-23.nc,sigma2,dz"' + $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID != "tx0.25v1": '"HYBRID:hybrid_75layer_zstar_2.50m-2025-09-12.nc,sigma2,dz"' $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID == "tx0.25v1": '"HYBRID:hycom1_75_800m.nc,sigma2,FNC1:2,4000,4.5,.01"' REGRID_COMPRESSIBILITY_FRACTION: description: | @@ -980,7 +980,9 @@ Global: The list of maximum depths for each interface." datatype: string value: - $MOM6_VERTICAL_GRID == "hycom1": '"FNC1:5,8000.0,1.0,.01"' + $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID in ["tx2_3v2"]: | + '"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/lev-2025-09-12.nc,Z"' + $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID == "tx0.25v1": '"FNC1:5,8000.0,1.0,.01"' MAX_LAYER_THICKNESS_CONFIG: description: | "default = 'NONE' @@ -996,7 +998,7 @@ Global: datatype: string value: $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID in ["tx2_3v2"]: | - '"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max_90th_quantile.nc,dz"' + '"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max-2025-09-12.nc,dz"' else: '"FNC1:400,31000.0,0.1,.01"' BOUND_CORIOLIS: description: | diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index baf728d0..5ba3dbe8 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -733,7 +733,7 @@ "value": { "$MOM6_VERTICAL_GRID == \"zstar_75L\"": "\"FILE:zstar_75layer_2.5m_248.4m-2024-03-29.nc,dz\"", "$MOM6_VERTICAL_GRID == \"zstar_65L\"": "\"FILE:vgrid_65L_20200626.nc,dz\"", - "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID != \"tx0.25v1\"": "\"HYBRID:hybrid_75layer_zstar2.50m-2020-11-23.nc,sigma2,dz\"", + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID != \"tx0.25v1\"": "\"HYBRID:hybrid_75layer_zstar_2.50m-2025-09-12.nc,sigma2,dz\"", "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID == \"tx0.25v1\"": "\"HYBRID:hycom1_75_800m.nc,sigma2,FNC1:2,4000,4.5,.01\"" } }, @@ -749,14 +749,15 @@ "description": "\"default = 'NONE'\nDetermines how to specify the maximum interface depths.\nValid options are:\nNONE - there are no maximum interface depths\nPARAM - use the vector-parameter MAXIMUM_INTERFACE_DEPTHS\nFILE:string - read from a file. The string specifies\nthe filename and variable name, separated\nby a comma or space, e.g. FILE:lev.nc,Z\nFNC1:string - FNC1:dz_min,H_total,power,precision\nThe list of maximum depths for each interface.\"\n", "datatype": "string", "value": { - "$MOM6_VERTICAL_GRID == \"hycom1\"": "\"FNC1:5,8000.0,1.0,.01\"" + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "'\"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/lev-2025-09-12.nc,Z\"'\n", + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID == \"tx0.25v1\"": "\"FNC1:5,8000.0,1.0,.01\"" } }, "MAX_LAYER_THICKNESS_CONFIG": { "description": "\"default = 'NONE'\nDetermines how to specify the maximum layer thicknesses.\nValid options are:\nNONE - there are no maximum layer thicknesses\nPARAM - use the vector-parameter MAX_LAYER_THICKNESS\nFILE:string - read from a file. The string specifies\nthe filename and variable name, separated\nby a comma or space, e.g. FILE:lev.nc,Z\nFNC1:string - FNC1:dz_min,H_total,power,precision\nThe list of maximum thickness for each layer.\"\n", "datatype": "string", "value": { - "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "'\"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max_90th_quantile.nc,dz\"'\n", + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "'\"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max-2025-09-12.nc,dz\"'\n", "else": "\"FNC1:400,31000.0,0.1,.01\"" } }, From 4820d266bb89e54db3490fc8b0caa927c2bac03d Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 8 Oct 2025 12:54:54 -0600 Subject: [PATCH 20/24] Add new files in the input_data_list --- param_templates/input_data_list.yaml | 8 ++++++-- param_templates/json/input_data_list.json | 13 ++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/param_templates/input_data_list.yaml b/param_templates/input_data_list.yaml index 1095bfdf..11ddefe3 100644 --- a/param_templates/input_data_list.yaml +++ b/param_templates/input_data_list.yaml @@ -7,9 +7,13 @@ mom.input_data_list: ALE_COORDINATE_CONFIG: $MOM6_VERTICAL_GRID == "zstar_75L": "${INPUTDIR}/zstar_75layer_2.5m_248.4m-2024-03-29.nc" $MOM6_VERTICAL_GRID == "zstar_65L": "${INPUTDIR}/vgrid_65L_20200626.nc" - $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID != "tx0.25v1": "${INPUTDIR}/hybrid_75layer_zstar2.50m-2020-11-23.nc" + $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID != "tx0.25v1": "${INPUTDIR}/hybrid_75layer_zstar_2.50m-2025-09-12.nc" $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID == "tx0.25v1": "${INPUTDIR}/hycom1_75_800m.nc" $OCN_GRID == "tx0.25v1": "${INPUTDIR}/hycom1_75_800m.nc" + MAXIMUM_INT_DEPTH_CONFIG: + $OCN_GRID == "tx2_3v2": "${INPUTDIR}/lev-2025-09-12.nc" + MAX_LAYER_THICKNESS_CONFIG: + $OCN_GRID == "tx2_3v2": "${INPUTDIR}/dz_max-2025-09-12.nc" DIAG_COORD_DEF_Z: $OCN_GRID == "tx0.25v1": "${INPUTDIR}/interpolate_zgrid_40L.nc" COORD_FILE: @@ -44,7 +48,7 @@ mom.input_data_list: $OCN_GRID == "tx0.25v1": "${INPUTDIR}/seawifs-clim-1997-2010.1440x1080.v20180328.nc" $OCN_GRID == "tx2_3v2": "${INPUTDIR}/seawifs-clim-1997-2010-tx2_3v2.230416.nc" CR_FILE: - $OCN_GRID == "tx2_3v2": "${INPUTDIR}/mle-cr-tx2_3v2-v10_20250426.nc" + $OCN_GRID == "tx2_3v2": "${INPUTDIR}/mle-cr-mask_20250627.nc" CFC_BC_FILE: "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/cfc_atm_20230310.nc" DIAG_COORD_DEF_RHO2: $OCN_GRID == "tx2_3v2": "${INPUTDIR}/ocean_rho2_190917.nc" diff --git a/param_templates/json/input_data_list.json b/param_templates/json/input_data_list.json index ccee78c0..2d21971e 100644 --- a/param_templates/json/input_data_list.json +++ b/param_templates/json/input_data_list.json @@ -7,10 +7,16 @@ "ALE_COORDINATE_CONFIG": { "$MOM6_VERTICAL_GRID == \"zstar_75L\"": "${INPUTDIR}/zstar_75layer_2.5m_248.4m-2024-03-29.nc", "$MOM6_VERTICAL_GRID == \"zstar_65L\"": "${INPUTDIR}/vgrid_65L_20200626.nc", - "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID != \"tx0.25v1\"": "${INPUTDIR}/hybrid_75layer_zstar2.50m-2020-11-23.nc", + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID != \"tx0.25v1\"": "${INPUTDIR}/hybrid_75layer_zstar_2.50m-2025-09-12.nc", "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/hycom1_75_800m.nc", "$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/hycom1_75_800m.nc" }, + "MAXIMUM_INT_DEPTH_CONFIG": { + "$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/lev-2025-09-12.nc" + }, + "MAX_LAYER_THICKNESS_CONFIG": { + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max_90th_quantile.nc" + }, "DIAG_COORD_DEF_Z": { "$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/interpolate_zgrid_40L.nc" }, @@ -30,9 +36,6 @@ "$INIT_LAYERS_FROM_Z_FILE == \"True\"": "${INPUTDIR}/${TEMP_SALT_Z_INIT_FILE}" } }, - "MAX_LAYER_THICKNESS_CONFIG": { - "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max_90th_quantile.nc" - }, "SURFACE_PRESSURE_FILE": { "$OCN_GRID == \"MISOMIP\"": "${INPUTDIR}/MISOMIP_181108.nc" }, @@ -56,7 +59,7 @@ "$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/seawifs-clim-1997-2010-tx2_3v2.230416.nc" }, "CR_FILE": { - "$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/mle-cr-tx2_3v2-v10_20250426.nc" + "$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/mle-cr-mask_20250627.nc" }, "CFC_BC_FILE": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/cfc_atm_20230310.nc", "DIAG_COORD_DEF_RHO2": { From 7b0d1b56b19c285fa5928c0d7e73670cb5271b11 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Mon, 13 Oct 2025 14:09:34 -0600 Subject: [PATCH 21/24] Update server and error message --- tests/check_input_data_repo.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/check_input_data_repo.py b/tests/check_input_data_repo.py index 2b2529ce..fb5774f8 100755 --- a/tests/check_input_data_repo.py +++ b/tests/check_input_data_repo.py @@ -21,13 +21,13 @@ input_data_list_yaml, MOM_input_files ) - # all mom input file names in svn inputdata repository + # all mom input file names in gdex inputdata repository r = sr.RemoteClient( - "https://svn-ccsm-inputdata.cgd.ucar.edu/trunk/inputdata/ocn/mom/" + "https://osdf-data.gdex.ucar.edu/ncar/gdex/d651077/cesmdata/inputdata/ocn/mom/" ) repo_files = {f["name"] for relpath, f in r.list_recursive() if f["kind"] == "file"} - # File names missing in the svn repository + # File names missing in the repository missing_files = ( set( filename @@ -39,10 +39,10 @@ if missing_files: raise ValueError( "Below file names are listed in input_data_list.yaml but are missing " - "in the svn inputdata repository. If these files are not needed, " + "in the inputdata repository. If these files are not needed, " "please remove them from input_data_list.yaml. If they are needed, " - "please import them to the svn repository.\n\n " + "please import them to the gdex repository.\n\n " + "\n ".join(missing_files) ) else: - print("All files in input_data_list.yaml are present in the svn repository.") + print("All files in input_data_list.yaml are present in the gdex repository.") From cc45b4154acdbe3250e71921f1ec2ab4df4da742 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Mon, 20 Oct 2025 12:49:06 -0600 Subject: [PATCH 22/24] correct max layer thickness file path and add it to input_data_list --- param_templates/MOM_input.yaml | 2 +- param_templates/input_data_list.yaml | 2 +- param_templates/json/MOM_input.json | 2 +- param_templates/json/input_data_list.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index b6eb5d49..d153d43b 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -998,7 +998,7 @@ Global: datatype: string value: $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID in ["tx2_3v2"]: | - '"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max-2025-09-12.nc,dz"' + '"FILE:${DIN_LOC_ROOT}/ocn/mom/tx2_3v2/dz_max-2025-09-12.nc,dz"' else: '"FNC1:400,31000.0,0.1,.01"' BOUND_CORIOLIS: description: | diff --git a/param_templates/input_data_list.yaml b/param_templates/input_data_list.yaml index 11ddefe3..569db308 100644 --- a/param_templates/input_data_list.yaml +++ b/param_templates/input_data_list.yaml @@ -30,7 +30,7 @@ mom.input_data_list: "${INPUTDIR}/${TEMP_SALT_Z_INIT_FILE}" MAX_LAYER_THICKNESS_CONFIG: $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID in ["tx2_3v2"]: - "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max_90th_quantile.nc" + "${DIN_LOC_ROOT}/ocn/mom/tx2_3v2/dz_max-2025-09-12.nc" SURFACE_PRESSURE_FILE: $OCN_GRID == "MISOMIP": "${INPUTDIR}/MISOMIP_181108.nc" SALT_RESTORE_FILE: diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 5ba3dbe8..6d3effba 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -757,7 +757,7 @@ "description": "\"default = 'NONE'\nDetermines how to specify the maximum layer thicknesses.\nValid options are:\nNONE - there are no maximum layer thicknesses\nPARAM - use the vector-parameter MAX_LAYER_THICKNESS\nFILE:string - read from a file. The string specifies\nthe filename and variable name, separated\nby a comma or space, e.g. FILE:lev.nc,Z\nFNC1:string - FNC1:dz_min,H_total,power,precision\nThe list of maximum thickness for each layer.\"\n", "datatype": "string", "value": { - "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "'\"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max-2025-09-12.nc,dz\"'\n", + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "'\"FILE:${DIN_LOC_ROOT}/ocn/mom/tx2_3v2/dz_max-2025-09-12.nc,dz\"'\n", "else": "\"FNC1:400,31000.0,0.1,.01\"" } }, diff --git a/param_templates/json/input_data_list.json b/param_templates/json/input_data_list.json index 2d21971e..f8494ef4 100644 --- a/param_templates/json/input_data_list.json +++ b/param_templates/json/input_data_list.json @@ -15,7 +15,7 @@ "$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/lev-2025-09-12.nc" }, "MAX_LAYER_THICKNESS_CONFIG": { - "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max_90th_quantile.nc" + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "${DIN_LOC_ROOT}/ocn/mom/tx2_3v2/dz_max-2025-09-12.nc" }, "DIAG_COORD_DEF_Z": { "$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/interpolate_zgrid_40L.nc" From 9e48c7c5e68324d546897d4606c667ecb5729797 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Mon, 20 Oct 2025 19:32:22 -0600 Subject: [PATCH 23/24] revert REMAPPING_SCHEME change and correct MAXIMUM_INT_DEPTH_CONFIG file path --- param_templates/MOM_input.yaml | 4 ++-- param_templates/json/MOM_input.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/param_templates/MOM_input.yaml b/param_templates/MOM_input.yaml index d153d43b..0126e379 100644 --- a/param_templates/MOM_input.yaml +++ b/param_templates/MOM_input.yaml @@ -636,7 +636,7 @@ Global: PQM_IH4IH3 (4th-order accurate) PQM_IH6IH5 (5th-order accurate)" datatype: string - value: "C_PPM_CW" + value: "PPM_CW" REMAP_VEL_CONSERVE_KE: description: | "[Boolean] default = False @@ -981,7 +981,7 @@ Global: datatype: string value: $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID in ["tx2_3v2"]: | - '"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/lev-2025-09-12.nc,Z"' + '"FILE:${DIN_LOC_ROOT}/ocn/mom/tx2_3v2/lev-2025-09-12.nc,Z"' $MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID == "tx0.25v1": '"FNC1:5,8000.0,1.0,.01"' MAX_LAYER_THICKNESS_CONFIG: description: | diff --git a/param_templates/json/MOM_input.json b/param_templates/json/MOM_input.json index 6d3effba..c637b054 100644 --- a/param_templates/json/MOM_input.json +++ b/param_templates/json/MOM_input.json @@ -489,7 +489,7 @@ "REMAPPING_SCHEME": { "description": "\"default = 'PLM'\nThis sets the reconstruction scheme used\nfor vertical remapping for all variables.\nIt can be one of the following schemes:\nPCM (1st-order accurate)\nPLM (2nd-order accurate)\nPPM_H4 (3rd-order accurate)\nPPM_IH4 (3rd-order accurate)\nPQM_IH4IH3 (4th-order accurate)\nPQM_IH6IH5 (5th-order accurate)\"\n", "datatype": "string", - "value": "C_PPM_CW" + "value": "PPM_CW" }, "REMAP_VEL_CONSERVE_KE": { "description": "\"[Boolean] default = False\nIf true, a correction is applied to the baroclinic component of velocity after\nremapping so that total KE is conserved. KE may not be conserved when\n(CS%BBL_h_vel_mask > 0.0) .and. (CS%h_vel_mask > 0.0)\"\n", @@ -749,7 +749,7 @@ "description": "\"default = 'NONE'\nDetermines how to specify the maximum interface depths.\nValid options are:\nNONE - there are no maximum interface depths\nPARAM - use the vector-parameter MAXIMUM_INTERFACE_DEPTHS\nFILE:string - read from a file. The string specifies\nthe filename and variable name, separated\nby a comma or space, e.g. FILE:lev.nc,Z\nFNC1:string - FNC1:dz_min,H_total,power,precision\nThe list of maximum depths for each interface.\"\n", "datatype": "string", "value": { - "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "'\"FILE:${DIN_LOC_ROOT}/ocn/mom/grid_indpt/lev-2025-09-12.nc,Z\"'\n", + "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "'\"FILE:${DIN_LOC_ROOT}/ocn/mom/tx2_3v2/lev-2025-09-12.nc,Z\"'\n", "$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID == \"tx0.25v1\"": "\"FNC1:5,8000.0,1.0,.01\"" } }, From e29acc2c14f93c4e3a738f1d6cffad89cf55ef26 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Mon, 20 Oct 2025 20:38:08 -0600 Subject: [PATCH 24/24] attempt to fix check_input_data_repo --- .github/workflows/general-ci-tests.yml | 5 +- tests/check_input_data_repo.py | 118 +++++++++++++++++++++++-- 2 files changed, 114 insertions(+), 9 deletions(-) diff --git a/.github/workflows/general-ci-tests.yml b/.github/workflows/general-ci-tests.yml index 474ba587..ebdd8d16 100644 --- a/.github/workflows/general-ci-tests.yml +++ b/.github/workflows/general-ci-tests.yml @@ -118,10 +118,7 @@ jobs: # Run the test - name: Run the check_input_data_repo script - run: | - sudo apt-get update && sudo apt-get install -y subversion - pip install 'svn>=1,<1.1' - python tests/check_input_data_repo.py + run: python tests/check_input_data_repo.py # Job to run the black formatter for cime_config, see black documentation for more info check_black_format_for_cime_config: diff --git a/tests/check_input_data_repo.py b/tests/check_input_data_repo.py index fb5774f8..be8d7d42 100755 --- a/tests/check_input_data_repo.py +++ b/tests/check_input_data_repo.py @@ -1,12 +1,116 @@ #!/usr/bin/env python import yaml -import svn.remote as sr +import subprocess from check_input_data_list import ( get_input_files_in_MOM_input, get_input_data_list_files, ) + +def get_repo_files_with_curl(base_url): + """ + Get file list from repository using curl and HTML parsing instead of SVN. + + The server provides HTML directory listings that we can parse to find files. + This function recursively traverses directories to find all files. + + Parameters + ---------- + base_url : str + The base URL of the repository + + Returns + ------- + set + Set of file names found in the repository + """ + import re + + def parse_html_directory_listing(html_content, current_url): + """Parse HTML directory listing to find files and directories.""" + files = [] + directories = [] + + # Look for href links in the HTML + href_pattern = r']*>([^<]+)' + matches = re.findall(href_pattern, html_content) + + for href, text in matches: + # Skip parent directory links and external URLs + if href.startswith('..') or href.startswith('http'): + continue + + if href.endswith('/'): + # This is a directory + directories.append(href.rstrip('/')) + else: + # This is a file - include ALL files (no filtering) + files.append(href) + + return files, directories + + def get_directory_content(url): + """Get HTML content from a directory URL.""" + try: + result = subprocess.run( + ["curl", "-s", "-L", url], + capture_output=True, + text=True, + timeout=20 + ) + if result.returncode == 0: + return result.stdout + else: + print(f"Error fetching {url}: {result.stderr}") + return None + except Exception as e: + print(f"Error fetching {url}: {e}") + return None + + try: + all_files = set() + directories_to_visit = [base_url.rstrip('/')] + visited_dirs = set() + + # Process directories with full recursive discovery + while directories_to_visit: + current_dir = directories_to_visit.pop(0) + if current_dir in visited_dirs: + continue + + visited_dirs.add(current_dir) + html_content = get_directory_content(current_dir) + if not html_content: + continue + + files, subdirs = parse_html_directory_listing(html_content, current_dir) + + # Add ALL files to our collection (no filtering) + for file in files: + filename = file.split('/')[-1] # Extract just the filename + all_files.add(filename) + + # Add all discovered subdirectories to visit list + for subdir in subdirs: + if subdir.startswith('/'): + # Absolute path - construct full URL + full_subdir_url = f"https://osdf-director.osg-htc.org{subdir}/" + else: + # Relative path + full_subdir_url = f"{current_dir.rstrip('/')}/{subdir}/" + + if full_subdir_url not in visited_dirs: + directories_to_visit.append(full_subdir_url) + + print(f"Found {len(all_files)} files total in repository") + return all_files + + except Exception as e: + print(f"Unexpected error getting repository files: {e}") + return set() + + if __name__ == "__main__": # Read in the MOM_input.yaml file and extract all input file names @@ -22,10 +126,14 @@ ) # all mom input file names in gdex inputdata repository - r = sr.RemoteClient( - "https://osdf-data.gdex.ucar.edu/ncar/gdex/d651077/cesmdata/inputdata/ocn/mom/" - ) - repo_files = {f["name"] for relpath, f in r.list_recursive() if f["kind"] == "file"} + repo_url = "https://osdf-data.gdex.ucar.edu/ncar/gdex/d651077/cesmdata/inputdata/ocn/mom/" + repo_files = get_repo_files_with_curl(repo_url) + + if not repo_files: + print("WARNING: Could not retrieve file list from repository.") + print("This may be due to connectivity issues or changes in repository structure.") + print("Repository validation will be skipped.") + exit(0) # Exit successfully since this is likely an infrastructure issue # File names missing in the repository missing_files = (