Skip to content

Commit

Permalink
Merge branch 'NOAA-EMC:develop' into feature/gmi_on
Browse files Browse the repository at this point in the history
  • Loading branch information
KateFriedman-NOAA authored Dec 5, 2024
2 parents e66c49d + bc61862 commit 253e0b5
Show file tree
Hide file tree
Showing 167 changed files with 3,454 additions and 1,947 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pw_aws_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ jobs:
id: get-branch
run: |
pr_number=${{ github.event.inputs.pr_number }}
repo=${{ github.repository }}
if [ "$pr_number" -eq "0" ]; then
branch=${{ github.event.inputs.ref }}
repo=${{ github.repository }}
else
branch=$(gh pr view $pr_number --repo $repo --json headRefName --jq '.headRefName')
repo_owner=$(gh pr view $pr_number --repo $repo --json headRepositoryOwner --jq '.headRepositoryOwner.login')
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ parm/post/params_grib2_tbl_new
parm/post/post_tag_gfs128
parm/post/gfs
parm/post/gefs
parm/post/sfs
parm/post/ocean.csv
parm/post/ice.csv
parm/post/ocnicepost.nml.jinja2
Expand Down
1 change: 0 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[submodule "sorc/ufs_model.fd"]
path = sorc/ufs_model.fd
url = https://github.com/ufs-community/ufs-weather-model
ignore = dirty
[submodule "sorc/wxflow"]
path = sorc/wxflow
url = https://github.com/NOAA-EMC/wxflow
Expand Down
1 change: 1 addition & 0 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ pipeline {
def build_system = yaml_case.experiment.system
try {
sh(script: "${HOMEgfs}/ci/scripts/run-check_ci.sh ${CUSTOM_WORKSPACE} ${pslot} ${build_system}")
sh(script: "${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh cleanup_experiment ${CUSTOM_WORKSPACE}/RUNTESTS/EXPDIR/${pslot}")
} catch (Exception error_experment) {
sh(script: "${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh cancel_batch_jobs ${pslot}")
ws(CUSTOM_WORKSPACE) {
Expand Down
1 change: 1 addition & 0 deletions ci/cases/gfsv17/ocnanal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ base:
DO_VRFY_OCEANDA: "NO"
FHMAX_GFS: 240
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
DO_TEST_MODE: "YES"

marineanl:
SOCA_INPUT_FIX_DIR: {{ HOMEgfs }}/fix/gdas/soca/1440x1080x75/soca
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C48mx500_3DVarAOWCDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ arguments:
resdetocean: 5.0
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20240610
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20241120
idate: 2021032412
edate: 2021032418
nens: 0
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C48mx500_hybAOWCDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ arguments:
resensatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20240610
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20241120
idate: 2021032412
edate: 2021032418
nens: 3
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C96C48_hybatmDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ arguments:
resensatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120
idate: 2021122018
edate: 2021122106
nens: 2
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C96C48_hybatmaerosnowDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ arguments:
resensatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120
idate: 2021122012
edate: 2021122100
nens: 2
Expand Down
4 changes: 2 additions & 2 deletions ci/cases/pr/C96C48_ufs_hybatmDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ arguments:
resensatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120
idate: 2024022318
edate: 2024022406
nens: 2
Expand All @@ -21,4 +21,4 @@ skip_ci_on_hosts:
- gaea
- orion
- hercules

- wcoss2
2 changes: 1 addition & 1 deletion ci/cases/pr/C96_atm3DVar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ arguments:
resdetatmos: 96
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120
idate: 2021122018
edate: 2021122106
nens: 0
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C96_atm3DVar_extended.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ arguments:
resdetatmos: 96
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120
idate: 2021122018
edate: 2021122118
nens: 0
Expand Down
19 changes: 19 additions & 0 deletions ci/cases/sfs/C96mx100_S2S.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
experiment:
system: gefs
mode: forecast-only

arguments:
idate: 1994050100
edate: 1994050100
pslot: {{ 'pslot' | getenv }}
app: S2S
resdetatmos: 96
resensatmos: 96
resdetocean: 1
start: 'cold'
nens: 10
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'TOPICDIR' | getenv }}/HR4/C96mx100
yaml: {{ HOMEgfs }}/ci/cases/yamls/sfs_defaults.yaml

2 changes: 1 addition & 1 deletion ci/cases/weekly/C384C192_hybatmda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ arguments:
resensatmos: 192
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C384C192
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C384C192/20240610
idate: 2023040118
edate: 2023040200
nens: 2
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/weekly/C384_atm3DVar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ arguments:
resensatmos: 192
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C384C192
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C384C192/20240610
idate: 2023040118
edate: 2023040200
nens: 0
Expand Down
1 change: 1 addition & 0 deletions ci/cases/yamls/atmaerosnowDA_defaults_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ defaults:
base:
DO_JEDISNOWDA: "YES"
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
DO_TEST_MODE: "YES"
8 changes: 8 additions & 0 deletions ci/cases/yamls/gefs_defaults_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@ defaults:
!INC {{ HOMEgfs }}/parm/config/gefs/yaml/defaults.yaml
base:
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
SFS_POST: "NO"
FHOUT_GFS: 6
stage_ic:
USE_OCN_ENS_PERTURB_FILES: "NO"
USE_ATM_ENS_PERTURB_FILES: "NO"
ocn:
MOM6_INTERP_ICS: "NO"

4 changes: 4 additions & 0 deletions ci/cases/yamls/gefs_replay_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ base:
FHOUT_OCN_GFS: 24
FHOUT_ICE_GFS: 24
HOMEDIR: {{ 'RUNTESTS' | getenv }}/GLOBAL
SFS_POST: "NO"
stage_ic:
USE_OCN_ENS_PERTURB_FILES: "YES"
USE_ATM_ENS_PERTURB_FILES: "YES"

1 change: 1 addition & 0 deletions ci/cases/yamls/gfs_defaults_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ defaults:
!INC {{ HOMEgfs }}/parm/config/gfs/yaml/defaults.yaml
base:
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
DO_TEST_MODE: "YES"
1 change: 1 addition & 0 deletions ci/cases/yamls/gfs_extended_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ base:
FCST_BREAKPOINTS: 192
FHMAX_GFS: 384
FHMAX_HF_GFS: 120
DO_TEST_MODE: "YES"
33 changes: 33 additions & 0 deletions ci/cases/yamls/sfs_defaults.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
base:
DO_JEDIATMVAR: "NO"
DO_JEDIATMENS: "NO"
DO_JEDIOCNVAR: "NO"
DO_JEDISNOWDA: "NO"
DO_MERGENSST: "NO"
DO_BUFRSND: "NO"
DO_GEMPAK: "NO"
DO_AWIPS: "NO"
KEEPDATA: "YES"
DO_EXTRACTVARS: "NO"
FHMAX_GFS: 2976
FHMAX_HF_GFS: 0
FHOUT_HF_GFS: 1
FHOUT_GFS: 24
FHOUT_OCN_GFS: 24
FHOUT_ICE_GFS: 24
FCST_BREAKPOINTS: ""
REPLAY_ICS: "NO"
HPSSARCH: "NO"
LOCALARCH: "NO"
SFS_POST: "YES"
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
fcst:
TYPE: "hydro"
MONO: "mono"
reforecast: "YES"
FHZER: 24
stage_ic:
USE_OCN_ENS_PERTURB_FILES: "YES"
USE_ATM_ENS_PERTURB_FILES: "YES"
ocn:
MOM6_INTERP_ICS: "YES"
1 change: 1 addition & 0 deletions ci/cases/yamls/soca_gfs_defaults_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ defaults:
base:
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
DO_JEDIOCNVAR: "YES"
DO_TEST_MODE: "YES"
1 change: 0 additions & 1 deletion ci/cases/yamls/ufs_hybatmDA_defaults.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ nsst:
NST_MODEL: "1"
sfcanl:
DONST: "NO"

3 changes: 1 addition & 2 deletions ci/scripts/check_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ for pr in ${pr_list}; do
fi
if [[ "${rocoto_state}" == "DONE" ]]; then
#Remove Experment cases that completed successfully
rm -Rf "${pslot_dir}"
rm -Rf "${pr_dir}/RUNTESTS/COMROOT/${pslot}"
"${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh" cleanup_experiment "${pslot_dir}"
rm -f "${output_ci_single}"
# echo "\`\`\`" > "${output_ci_single}"
DATE=$(date +'%D %r')
Expand Down
26 changes: 24 additions & 2 deletions ci/scripts/utils/ci_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ function create_experiment () {
source "${HOMEgfs}/ci/platforms/config.${MACHINE_ID}"
source "${HOMEgfs}/workflow/gw_setup.sh"

# Remove RUNDIRS dir incase this is a retry
# Remove RUNDIRS dir incase this is a retry (STMP now in host file)
STMP=$("${HOMEgfs}/ci/scripts/utils/parse_yaml.py" -y "${HOMEgfs}/workflow/hosts/${MACHINE_ID}.yaml" -k STMP -s)
echo "Removing ${STMP}/RUNDIRS/${pslot} directory incase this is a retry"
rm -Rf "${STMP}/RUNDIRS/${pslot}"

"${HOMEgfs}/${system}/workflow/create_experiment.py" --overwrite --yaml "${yaml_config}"
Expand All @@ -137,7 +139,6 @@ function publish_logs() {
local PR_header="$1"
local dir_path="$2"
local file="$3"

local full_paths=""
while IFS= read -r line; do
full_path="${dir_path}/${line}"
Expand All @@ -155,3 +156,24 @@ function publish_logs() {
fi
echo "${URL}"
}

function cleanup_experiment() {

local EXPDIR="$1"
local pslot
local ARCDIR
local ATARDIR
local COMROOT

EXPDIR="$1"
pslot=$(basename "${EXPDIR}")

# Use the Python utility to get the required variables
read -r ARCDIR ATARDIR STMP COMROOT < <("${HOMEgfs}/ci/scripts/utils/get_config_var.py" ARCDIR ATARDIR STMP COMROOT "${EXPDIR}") || true

rm -Rf "${ARCDIR:?}"
rm -Rf "${ATARDIR:?}"
rm -Rf "${COMROOT}/${pslot:?}"
rm -Rf "${EXPDIR}/${pslot:?}"
rm -Rf "${STMP}/RUNDIRS/${pslot:?}"
}
43 changes: 43 additions & 0 deletions ci/scripts/utils/get_config_var.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3

import os
import argparse
from wxflow import Configuration


def get_config_vars(var_names, config_path):
"""
GET_CONFIG_VARS Get configuration variables from a config file or directory.
Parameters:
var_names (list of str): The names of the configuration variables to retrieve.
config_path (str): The path to the configuration file or directory.
Returns:
list of str: The values of the specified configuration variables.
"""
if os.path.isfile(config_path):
config_dir = os.path.dirname(config_path)
config_file = os.path.basename(config_path)
elif os.path.isdir(config_path):
config_dir = config_path
config_file = 'config.base'
config = Configuration(config_dir)
config_data = config.parse_config(config_file)
return [config_data[var_name] for var_name in var_names]


if __name__ == "__main__":
"""
Main entry point for the script.
Parses command-line arguments and retrieves the specified configuration variables.
"""
parser = argparse.ArgumentParser(description="Get configuration variables from a config file or directory.")
parser.add_argument("var_names", nargs='+', help="The names of the configuration variables to retrieve.")
parser.add_argument("config_path", help="The path to the configuration file or directory.")

args = parser.parse_args()

var_names = args.var_names
config_path = args.config_path

values = get_config_vars(var_names, config_path)
print(" ".join(values))
Binary file removed docs/source/_static/noaacsp_cluster_1.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_cluster_2.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_cluster_3.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_cluster_4.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_cluster_5.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_cluster_6.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_instance_1.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_instance_2.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_instance_3.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_instance_4.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_login.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_using_1.png
Binary file not shown.
Binary file removed docs/source/_static/noaacsp_using_2.png
Binary file not shown.
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# The full version, including alpha/beta/rc tags
release = '0.1'

numfig = True

# -- General configuration ---------------------------------------------------

Expand All @@ -42,7 +43,7 @@
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon',
'sphinxcontrib.bibtex'
'sphinxcontrib.bibtex',
]

bibtex_bibfiles = ['references.bib']
Expand Down Expand Up @@ -120,3 +121,4 @@ def setup(app):

# Output file base name for HTML help builder.
htmlhelp_basename = 'Global-Workflow'

1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ Table of Contents
hpc.rst
output.rst
run.rst
wave.rst
noaa_csp.rst
errors_faq.rst
Loading

0 comments on commit 253e0b5

Please sign in to comment.