Skip to content

Additional fields in diag_table and turn off RESTART_CHECKSUMS_REQUIRED for non-test runs #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion param_templates/MOM_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3678,7 +3678,15 @@ Global:
Fraction of GM work that is added to backscatter rate."
datatype: real
value: 0.75

RESTART_CHECKSUMS_REQUIRED:
description: |
"[Boolean] default = True
If true, require the restart checksums to match and error out otherwise. Users
may want to avoid this comparison if for example the restarts are made from a
run with a different mask_table than the current run, in which case the
checksums will not match and cause crash.
datatype: logical
value: $TEST
KPP:
N_SMOOTH:
description: |
Expand Down
20 changes: 15 additions & 5 deletions param_templates/diag_table.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
###############################################################################
---
FieldLists:
- &prognostic ["uo", "vo", "h", "e", "thetao", "so", "KE", "MEKE", "rhopot0"]
- &prognostic ["uo", "vo", "h", "e", "thetao", "so", "KE", "MEKE", "rhopot0", "rhopot2", "difvho", "difvso", "Kv_u", "Kv_v", "taux_bot", "tauy_bot"]

- &prognostic_z ["uo", "vo", "h", "thetao", "so", "agessc", "rhopot0", "N2_int"]
- &prognostic_z ["uo", "vo", "h", "thetao", "so", "agessc", "rhopot0", "N2_int", "rhopot2", "difvho", "difvso", "Kv_u", "Kv_v"]

- &prognostic_rho2 ["thetao", "so", "agessc"]
- &prognostic_rho2 ["thetao", "so", "agessc", "e"]

- &hist_additional ["soga", "thetaoga", "uh", "vh", "vhbt", "uhbt", "rsdo"]

Expand Down Expand Up @@ -61,6 +61,10 @@ FieldLists:

- &geothermal ["Geo_heat"]

- &glc_terms ["frunoff_glc", "lrunoff_glc"]

- &kpp_test ["KPP_QminusSW", "KPP_netSalt", "KPP_NLT_dTdt", "KPP_NLT_dSdt", "KPP_NLT_temp_budget", "KPP_NLT_saln_budget"]

###############################################################################
# Section 2: File lists:
# List of files to be added in diag_table
Expand Down Expand Up @@ -128,6 +132,12 @@ Files:
lists3:
$USE_CFC_CAP == "True":
[ *cfc_2d ]
lists4:
$COMP_ATM == "cam":
[ *glc_terms ]
lists5:
$TEST == True:
[ *kpp_test ]

# essential variable mapped to z_space
hist_z_space:
Expand Down Expand Up @@ -158,7 +168,7 @@ Files:

surface_avg:
suffix:
$TEST == True: "h.sfc%4yr-%2mo-2dy"
$TEST == True: "h.sfc%4yr-%2mo-%2dy"
else: "h.sfc%4yr-%2mo"
output_freq:
$OCN_DIAG_MODE == "spinup": 5
Expand All @@ -172,7 +182,7 @@ Files:
reduction_method: "mean" # time average
regional_section: "none" # global
fields:
$OCN_DIAG_MODE != "none" and $TEST is not True :
$OCN_DIAG_MODE != "none":
module: "ocean_model" # native
packing: = 1 if $TEST else 2
lists: [ *surface_flds_common,
Expand Down
5 changes: 5 additions & 0 deletions param_templates/json/MOM_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2981,6 +2981,11 @@
"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",
"value": "$TEST"
}
},
"KPP": {
Expand Down
74 changes: 66 additions & 8 deletions param_templates/json/diag_table.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
"so",
"KE",
"MEKE",
"rhopot0"
"rhopot0",
"rhopot2",
"difvho",
"difvso",
"Kv_u",
"Kv_v",
"taux_bot",
"tauy_bot"
],
[
"uo",
Expand All @@ -19,12 +26,18 @@
"so",
"agessc",
"rhopot0",
"N2_int"
"N2_int",
"rhopot2",
"difvho",
"difvso",
"Kv_u",
"Kv_v"
],
[
"thetao",
"so",
"agessc"
"agessc",
"e"
],
[
"soga",
Expand Down Expand Up @@ -192,6 +205,18 @@
],
[
"Geo_heat"
],
[
"frunoff_glc",
"lrunoff_glc"
],
[
"KPP_QminusSW",
"KPP_netSalt",
"KPP_NLT_dTdt",
"KPP_NLT_dSdt",
"KPP_NLT_temp_budget",
"KPP_NLT_saln_budget"
]
],
"Files": {
Expand Down Expand Up @@ -230,7 +255,8 @@
[
"thetao",
"so",
"agessc"
"agessc",
"e"
]
],
"lists2": {
Expand Down Expand Up @@ -312,7 +338,14 @@
"so",
"KE",
"MEKE",
"rhopot0"
"rhopot0",
"rhopot2",
"difvho",
"difvso",
"Kv_u",
"Kv_v",
"taux_bot",
"tauy_bot"
],
[
"KPP_OBLdepth:oml",
Expand Down Expand Up @@ -387,6 +420,26 @@
"u10_sqr"
]
]
},
"lists4": {
"$COMP_ATM == \"cam\"": [
[
"frunoff_glc",
"lrunoff_glc"
]
]
},
"lists5": {
"$TEST == True": [
[
"KPP_QminusSW",
"KPP_netSalt",
"KPP_NLT_dTdt",
"KPP_NLT_dSdt",
"KPP_NLT_temp_budget",
"KPP_NLT_saln_budget"
]
]
}
}
}
Expand Down Expand Up @@ -422,7 +475,12 @@
"so",
"agessc",
"rhopot0",
"N2_int"
"N2_int",
"rhopot2",
"difvho",
"difvso",
"Kv_u",
"Kv_v"
],
[
"volcello",
Expand All @@ -447,7 +505,7 @@
},
"surface_avg": {
"suffix": {
"$TEST == True": "h.sfc%4yr-%2mo-2dy",
"$TEST == True": "h.sfc%4yr-%2mo-%2dy",
"else": "h.sfc%4yr-%2mo"
},
"output_freq": {
Expand All @@ -464,7 +522,7 @@
"reduction_method": "mean",
"regional_section": "none",
"fields": {
"$OCN_DIAG_MODE != \"none\" and $TEST is not True": {
"$OCN_DIAG_MODE != \"none\"": {
"module": "ocean_model",
"packing": "= 1 if $TEST else 2",
"lists": [
Expand Down