Skip to content

Commit ac5654f

Browse files
committed
Merge tag 'mi_250210' into update_MARBL_FeForcing
2 parents ea8013e + 84cfd0b commit ac5654f

15 files changed

Lines changed: 699 additions & 522 deletions

.github/workflows/general-ci-tests.yml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: General MOM_interface CI
2-
3-
# This CI workflow tests against the following questions:
4-
# 1. Does standalone mom build and run?
5-
# 2. Does it pass the tests/check_default_params.py test?
6-
# 3. Do the scripts in cime_config pass the black formatter?
7-
# Please see Issue #138 for more information
2+
3+
# Please see Issue #138 for more information on this CI workflow
84

95
# Controls when the workflow will run
106
on:
@@ -52,15 +48,23 @@ jobs:
5248
cd $GITHUB_WORKSPACE/CESM/components/mom/
5349
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }}
5450
git checkout pr-${{ github.event.pull_request.number }}
51+
git submodule update --init --recursive
5552
5653
- name: Checkout initial event (Push)
5754
if: ${{ github.event_name == 'push' }}
5855
run: |
5956
echo "Handling push"
6057
cd $GITHUB_WORKSPACE/CESM/components/mom/
6158
git checkout ${{ github.sha }}
59+
git submodule update --init --recursive
60+
61+
- name: Check submodule hash consistency
62+
run: |
63+
echo "Checking if .gitmodules and external hashes are consistent"
64+
cd $GITHUB_WORKSPACE/CESM/components/mom/
65+
../../bin/git-fleximod test
6266
63-
# Build the standalone mom using the macos script. build_examples-ncar doesn't work.
67+
# Build the standalone mom using the ubuntu script.
6468
- name: Build Standalone MOM
6569
run: |
6670
cd $GITHUB_WORKSPACE/CESM/components/mom/standalone/build
@@ -89,7 +93,36 @@ jobs:
8993
# Run the test
9094
- name: Run the check_default_params script
9195
run: python tests/check_default_params.py
92-
96+
97+
# Job to run check_input_data_list script
98+
check_input_data_list:
99+
100+
runs-on: ubuntu-latest
101+
102+
steps:
103+
# Checkout the repo
104+
- uses: actions/checkout@v4
105+
106+
# Run the test
107+
- name: Run the check_input_data_list script
108+
run: python tests/check_input_data_list.py
109+
110+
# Job to run check_input_data_repo script
111+
check_input_data_repo:
112+
113+
runs-on: ubuntu-latest
114+
115+
steps:
116+
# Checkout the repo
117+
- uses: actions/checkout@v4
118+
119+
# Run the test
120+
- name: Run the check_input_data_repo script
121+
run: |
122+
sudo apt-get update && sudo apt-get install -y subversion
123+
pip install 'svn>=1,<1.1'
124+
python tests/check_input_data_repo.py
125+
93126
# Job to run the black formatter for cime_config, see black documentation for more info
94127
check_black_format_for_cime_config:
95128

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
path = MOM6
33
url = https://github.com/NCAR/MOM6.git
44
fxDONOTUSEurl = https://github.com/NCAR/MOM6.git
5-
fxtag = dev/ncar_241101
5+
fxtag = dev/ncar_250128
66
fxrequired = AlwaysRequired
77

88
[submodule "stochastic_physics"]

MOM6

Submodule MOM6 updated 174 files

cime_config/MOM_RPS/FType_diag_table.py

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -159,55 +159,44 @@ def expand_func(varname):
159159
packing = field_block["packing"]
160160
field_list_1d = get_all_fields(field_block)
161161

162-
# seperate field_name and output_name:
162+
# seperate field_name, alias, and reduction method
163+
# (the latter two are optional)
163164
field_list_1d_seperated = []
164165
for field in field_list_1d:
165166
field_split = field.split(":")
166-
if len(field_split) == 2:
167-
field = field_split[0], field_split[1]
168-
elif len(field_split) == 1:
169-
field = field_split[0], field_split[0]
170-
else:
171-
raise RuntimeError(
172-
"Cannot infer field name and output name for " + field
173-
)
174-
field_list_1d_seperated.append(field)
167+
field_name = field_split[0]
168+
alias = field_name
169+
reduction = file_block["reduction_method"]
170+
assert 1 <= len(field_split) <= 3, (
171+
"Invalid field format: " + field
172+
)
173+
if len(field_split) >= 2:
174+
alias = field_split[1]
175+
if len(field_split) >= 3:
176+
reduction = field_split[2]
177+
178+
field_list_1d_seperated.append((field_name, alias, reduction))
175179

176180
# check if there are any duplicate fields in the same file:
177-
for field_name, output_name in field_list_1d_seperated:
178-
assert field_name not in all_fields, (
179-
'Field "'
180-
+ field_name
181-
+ '" is listed more than once'
182-
+ " in file: "
183-
+ file_block["suffix"]
184-
)
185-
all_fields.append(field_name)
181+
field_set = set()
182+
for field_name, alias, reduction in field_list_1d_seperated:
183+
if alias in field_set:
184+
raise ValueError(
185+
'Field "'
186+
+ alias
187+
+ '" is listed more than once'
188+
+ " in file: "
189+
+ file_block["suffix"]
190+
)
191+
field_set.add(alias)
186192

187193
mfnl = max([len(field) for field in field_list_1d]) + 3
188194
mfnl = min(16, mfnl) # limit to 16
189-
for field_name, output_name in field_list_1d_seperated:
195+
w = lambda s: f'"{s}",' # wrap string in quotes and add comma
196+
for field_name, alias, reduction in field_list_1d_seperated:
190197
diag_table.write(
191-
(
192-
"{module_name:14s} {field_name:"
193-
+ str(mfnl)
194-
+ "}{output_name:"
195-
+ str(mfnl)
196-
+ "}"
197-
'{fname} "all", {reduction_method} {regional_section} {packing}\n'
198-
).format(
199-
module_name='"' + module + '",',
200-
field_name='"' + field_name + '",',
201-
output_name='"' + output_name + '",',
202-
fname=fname + ",",
203-
reduction_method='"'
204-
+ str(file_block["reduction_method"])
205-
+ '",',
206-
regional_section='"'
207-
+ str(file_block["regional_section"])
208-
+ '",',
209-
packing=str(packing),
210-
)
198+
f'{w(module)} {w(field_name):{mfnl}}{w(alias):{mfnl}}{fname}, "all", '
199+
f'{w(reduction)} {w(file_block["regional_section"])} {packing}\n'
211200
)
212201

213202
diag_table.write("\n")

cime_config/config_component.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,26 @@
8383
</desc>
8484
</entry>
8585

86+
<entry id="MOM6_WW3_CPL_METHOD">
87+
<type>char</type>
88+
<valid_values>none,legacy,most</valid_values>
89+
<default_value>most</default_value>
90+
<values>
91+
<value grid="w%ww3a">legacy</value>
92+
<value compset="_SWAV|_DWAV">none</value>
93+
</values>
94+
<group>run_component_mom</group>
95+
<file>env_run.xml</file>
96+
<desc> This variable determines the method used to couple MOM6 to WW3.
97+
The method "most" corresponds to the newest coupling method
98+
that turns on FPMix parameterization, Stokes_Bands coupling,
99+
and Stokes similarity package. The method "legacy" corresponds to
100+
the older coupling method based on receiving a Langmuir number from
101+
WW3 and passing it to CVMix. When set to "none", no wave
102+
parameterization is used.
103+
</desc>
104+
</entry>
105+
86106
<entry id="OCN_DIAG_MODE">
87107
<type>char</type>
88108
<valid_values>spinup,production,development,none</valid_values>

0 commit comments

Comments
 (0)