Skip to content
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

Update NWA12 example, xml, and refactor NWA12-ci [WIP] #25

Merged
merged 6 commits into from
Apr 24, 2024
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: NWA12-ci
name: CEFI-MOM6-ci

on:
# Triggers this workflow on pull request event with "NWA12_RT_gaea_c5" label
# Triggers this workflow on pull request event with "CEFI_MOM6_RT_gaea_c5" label
pull_request:
branches: [ "main" ]
types: [ labeled ]
Expand All @@ -14,7 +14,7 @@ env:
#
jobs:
checkout-build:
if: ${{ github.event.label.name == 'NWA12_RT_gaea_c5' }}
if: ${{ github.event.label.name == 'CEFI_MOM6_RT_gaea_c5' }}
runs-on: self-hosted
timeout-minutes: 600
strategy:
Expand All @@ -24,12 +24,12 @@ jobs:
- name: Checkout CEFI-regional-MOM6
uses: actions/checkout@v4
with:
path: ${{ github.run_id }}/NWA12_CHECK
path: ${{ github.run_id }}/CEFI_MOM6_CHECK
submodules: recursive

- name: Build MOM6SIS2
run: |
cd ${{ env.TEST_DIR }}/NWA12_CHECK/builds
cd ${{ env.TEST_DIR }}/CEFI_MOM6_CHECK/builds
jobid=$(sbatch --parsable ci_build_driver.sh | awk -F';' '{print $1}' | cut -f1)
#
sleep 1
Expand All @@ -45,25 +45,25 @@ jobs:
sleep 60 # Adjust the sleep duration as needed
done
#
check_file="${{ env.TEST_DIR }}/NWA12_CHECK/builds/build/gaea-ncrc5.intel23/ocean_ice/repro/MOM6SIS2"
check_file="${{ env.TEST_DIR }}/CEFI_MOM6_CHECK/builds/build/gaea-ncrc5.intel23/ocean_ice/repro/MOM6SIS2"
if [ -f "$check_file" ]; then
echo "PASSED: $check_file"
else
echo "FAILED: $check_file"
exit 1
fi

run-NWA12-ci:
run-CEFI_MOM6-ci:
needs: checkout-build
runs-on: self-hosted
strategy:
max-parallel: 2
matrix:
case: ["NWA12.CFC"] #, "NWA12.COBALT"]
case: ["NWA12.COBALT"] #, "NWA12.CFC"]
steps:
- name: Run Experiment ${{ matrix.case }}
run: |
cd ${{ env.TEST_DIR }}/NWA12_CHECK/exps/${{ matrix.case }}
cd ${{ env.TEST_DIR }}/CEFI_MOM6_CHECK/exps/${{ matrix.case }}
jobid=$(sbatch --parsable driver.sh | awk -F';' '{print $1}' | cut -f1)
#
sleep 1
Expand All @@ -80,7 +80,7 @@ jobs:
done
#
expected_string="All restart files are identical, PASS"
check_file="${{ env.TEST_DIR }}/NWA12_CHECK/exps/${{ matrix.case }}/${{ matrix.case }}_o.$jobid"
check_file="${{ env.TEST_DIR }}/CEFI_MOM6_CHECK/exps/${{ matrix.case }}/${{ matrix.case }}_o.$jobid"
if [ -f "$check_file" ]; then
if grep -qF "$expected_string" $check_file; then
echo "PASSED: ${{ matrix.case }}"
Expand All @@ -93,29 +93,29 @@ jobs:
exit 10
fi

- name: Add "pass_NWA12_RT" label on success
if: success() && contains(github.event.label.name, 'NWA12_RT_gaea_c5')
- name: Add "pass_CEFI_MOM6_RT" label on success
if: success() && contains(github.event.label.name, 'CEFI_MOM6_RT_gaea_c5')
run: |
TOKEN=${{ secrets.GITHUB_TOKEN }}
RT_TEST_LABEL="NWA12_RT_gaea_c5"
PASS_LABEL="pass_NWA12_RT"
RT_TEST_LABEL="CEFI_MOM6_RT_gaea_c5"
PASS_LABEL="pass_CEFI_MOM6_RT"

# Remove the "NWA12_RT_gaea_c5" label
# Remove the "CEFI_MOM6_RT_gaea_c5" label
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ env.PR_NUMBER }}/labels/$RT_TEST_LABEL"


# Add the "pass_NWA12_RT" label
# Add the "pass_CEFI_MOM6_RT" label
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ env.PR_NUMBER }}/labels" \
-d "{\"labels\":[\"$PASS_LABEL\"]}"

clean-up:
needs: run-NWA12-ci
needs: run-CEFI_MOM6-ci
runs-on: self-hosted
strategy:
max-parallel: 1
Expand Down
14 changes: 10 additions & 4 deletions exps/NWA12.COBALT/INPUT/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ TIDE_MF = True ! [Boolean] default = False
TIDE_MM = True ! [Boolean] default = False
! If true, apply tidal momentum forcing at the MM frequency. This is only used
! if TIDES is true.
TIDE_SAL_SCALAR_VALUE = 0.010 ! [m m-1]
TIDE_SAL_SCALAR_VALUE = 0.01 ! [m m-1]
! The constant of proportionality between sea surface height (really it should
! be bottom pressure) anomalies and bottom geopotential anomalies. This is only
! used if TIDES and TIDE_USE_SAL_SCALAR are true.
Expand All @@ -430,12 +430,17 @@ MASS_WEIGHT_IN_PRESSURE_GRADIENT = True ! [Boolean] default = False
! bathymetry in FV pressure gradient calculations.

! === module MOM_hor_visc ===
LAPLACIAN = False
LAPLACIAN = True
KH = 0
SMAGORINSKY_KH = True
SMAG_LAP_CONST = 0.05
KH_VEL_SCALE = 0.0
RESOLN_SCALED_KH = False

BIHARMONIC = True
AH = 0.0
AH_VEL_SCALE = 0.010 ! [m s-1] default = 0.0
SMAGORINSKY_AH = True
SMAG_BI_CONST = 0.015
SMAGORINSKY_AH = False


! === module MOM_vert_friction ===
Expand Down Expand Up @@ -675,5 +680,6 @@ SEA_ICE_RIGID_MASS = 100.0 ! [kg m-2] default = 1000.0
! Misc
DO_GEOTHERMAL = False
EPBL_MLD_BISECTION = True
EPBL_MLD_MAX_ITS = 40
BBL_USE_EOS = True
AGGREGATE_FW_FORCING = True
3 changes: 3 additions & 0 deletions exps/NWA12.COBALT/INPUT/MOM_layout_20
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#override IO_LAYOUT = 1,1
#override LAYOUT = 20,20
#override MASKTABLE = MOM_mask_table
3 changes: 3 additions & 0 deletions exps/NWA12.COBALT/INPUT/MOM_layout_25
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#override IO_LAYOUT = 1,1
#override LAYOUT = 25,25
#override MASKTABLE = MOM_mask_table
8 changes: 7 additions & 1 deletion exps/NWA12.COBALT/INPUT/MOM_override
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#override USE_generic_tracer = True
#override MAX_FIELDS=500
#override OBC_TIDE_NODAL_REF_DATE = 1993,7,2
!#override DT_OBC_SEG_UPDATE_OBGC = 3600
!#override DT_OBC_SEG_UPDATE_OBGC = 1200
#override CHL_FROM_FILE = False
#override DO_GEOTHERMAL = True
#override GENERIC_TRACER_IC_FILE = "NWA12_COBALT_2023_10_spinup_2003.nc"
#override EPBL_ANSWER_DATE = 20231231
#override DT_THERM = 1200.0
#override DT = 400.0
#override MLD_ITERATION_GUESS = False
#override REMAP_AUXILIARY_VARS = True
#override DIABATIC_FIRST = False
#override EQN_OF_STATE = "WRIGHT_FULL"
Loading