Skip to content

Commit

Permalink
Merge remote-tracking branch 'upsteam/develop' into feature/rename_atm
Browse files Browse the repository at this point in the history
* upsteam/develop:
  Archiving cleanup (NOAA-EMC#2621)
  Switch to Rocky 9 built external packages on Hercules (NOAA-EMC#2608)
  Add the capability to use slurm reservation nodes (NOAA-EMC#2627)
  Update forecast job to use COMIN/COMOUT (NOAA-EMC#2622)
  Update to add 1-deg global wave grid (NOAA-EMC#2619)
  Add C384mx025_3DVarAOWCDA yamls (NOAA-EMC#2625)
  Script to keep Jenkins Agent persistent from cron (NOAA-EMC#2634)
  • Loading branch information
danholdaway committed Jun 4, 2024
2 parents 9436f4b + c92bf41 commit 97a63a7
Show file tree
Hide file tree
Showing 48 changed files with 754 additions and 358 deletions.
18 changes: 18 additions & 0 deletions ci/cases/gfsv17/C384mx025_3DVarAOWCDA.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
experiment:
system: gfs
mode: cycled

arguments:
pslot: {{ 'pslot' | getenv }}
app: S2S
resdetatmos: 384
resdetocean: 0.25
nens: 0
gfs_cyc: 4
start: cold
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
idate: 2021063000
edate: 2021070306
icsdir: /scratch1/NCEPDEV/climate/Jessica.Meixner/cycling/IC_2021063000_V2
yaml: {{ HOMEgfs }}/ci/cases/gfsv17/ocnanal.yaml
30 changes: 30 additions & 0 deletions ci/cases/gfsv17/ocnanal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
defaults:
!INC {{ HOMEgfs }}/parm/config/gfs/yaml/defaults.yaml

base:
DOIAU: "YES"
DO_JEDIATMVAR: "NO"
DO_JEDIATMENS: "NO"
DO_JEDIOCNVAR: "YES"
DO_JEDISNOWDA: "NO"
DO_MERGENSST: "NO"
DOHYBVAR: "NO"
DO_FIT2OBS: "YES"
DO_VERFOZN: "YES"
DO_VERFRAD: "YES"
DO_VRFY_OCEANDA: "NO"
FHMAX_GFS: 240

ocnanal:
SOCA_INPUT_FIX_DIR: /scratch2/NCEPDEV/ocean/Guillaume.Vernieres/data/static/1440x1080x75/soca
CASE_ANL: 'C24'
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
SOCA_NINNER: 100
SABER_BLOCKS_YAML: ''
NICAS_RESOL: 1
NICAS_GRID_SIZE: 15000

prepoceanobs:
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
OBSPREP_YAML: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obsprep/obsprep_config.yaml
DMPDIR: /scratch1/NCEPDEV/da/common/
3 changes: 3 additions & 0 deletions ci/platforms/config.hera
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ export ICSDIR_ROOT=/scratch1/NCEPDEV/global/glopara/data/ICSDIR
export HPC_ACCOUNT=nems
export max_concurrent_cases=5
export max_concurrent_pr=4

export JENKINS_AGENT_LANUCH_DIR=/scratch1/NCEPDEV/global/Terry.McGuinness/Jenkins
export JENKINS_WORK_DIR=/scratch1/NCEPDEV/global/Terry.McGuinness
3 changes: 3 additions & 0 deletions ci/platforms/config.hercules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR
export HPC_ACCOUNT=nems
export max_concurrent_cases=5
export max_concurrent_pr=4

export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry
export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS
3 changes: 3 additions & 0 deletions ci/platforms/config.orion
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR
export HPC_ACCOUNT=nems
export max_concurrent_cases=5
export max_concurrent_pr=4

export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry
export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS
77 changes: 77 additions & 0 deletions ci/scripts/utils/launch_java_agent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/env bash
set -e

controller_url="https://jenkins.epic.oarcloud.noaa.gov"
controller_user="terry.mcguinness"
HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." >/dev/null 2>&1 && pwd )"
host=$(hostname)

#########################################################################
# Set up runtime environment varibles for accounts on supproted machines
#########################################################################

source "${HOMEgfs}/ush/detect_machine.sh"
case ${MACHINE_ID} in
hera | orion | hercules | wcoss2)
echo "Launch Jenkins Java Controler on ${MACHINE_ID}"
;;
*)
echo "Unsupported platform. Exiting with error."
exit 1
;;
esac

LOG=lanuched_agent-$(date +%Y%m%d%M).log
rm -f "${LOG}"

source "${HOMEgfs}/ush/module-setup.sh"
module use "${HOMEgfs}/modulefiles"
module load "module_gwsetup.${MACHINE_ID}"
source "${HOMEgfs}/ci/platforms/config.${MACHINE_ID}"

JAVA_HOME="${JENKINS_AGENT_LANUCH_DIR}/JAVA/jdk-17.0.10"
if [[ ! -d "${JAVA_HOME}" ]]; then
JAVA_HOME=/usr/lib/jvm/jre-17
if [[ ! -d "${JAVA_HOME}" ]]; then
echo "ERROR: JAVA_HOME not found. Exiting with error."
exit 1
fi
fi

JAVA="${JAVA_HOME}/bin/java"
echo "JAVA VERSION: "
${JAVA} -version

export GH="${HOME}/bin/gh"
command -v "${GH}"
${GH} --version

if [[ -d "${JENKINS_AGENT_LANUCH_DIR}" ]]; then
echo "Jenkins Agent Lanuch Directory: ${JENKINS_AGENT_LANUCH_DIR}"
else
echo "ERROR: Jenkins Agent Lanuch Directory not found. Exiting with error."
exit 1
fi
cd "${JENKINS_AGENT_LANUCH_DIR}"

if ! [[ -f agent.jar ]]; then
curl -sO "${controller_url}/jnlpJars/agent.jar"
fi

JENKINS_TOKEN=$(cat jenkins_token)

#
offline=$(curl --silent -u "${controller_user}:${JENKINS_TOKEN}" "${controller_url}/computer/${MACHINE_ID^}-EMC/api/json?pretty=true" | grep '\"offline\"' | awk '{gsub(/,/,"");print $3}') || true
echo "Jenkins Agent offline setting: ${offline}"

if [[ "${offline}" == "true" ]]; then
echo "Jenkins Agent is offline. Lanuching Jenkins Agent on ${host}"
command="nohup ${JAVA} -jar agent.jar -jnlpUrl ${controller_url}/computer/${MACHINE_ID^}-EMC/jenkins-agent.jnlp -secret @jenkins-secret-file -workDir ${JENKINS_WORK_DIR}"
echo -e "Lanuching Jenkins Agent on ${host} with the command:\n${command}" >& "${LOG}"
${command} >> "${LOG}" 2>&1 &
nohup_PID=$!
echo "Java agent running on PID: ${nohup_PID}" >> "${LOG}" 2>&1
echo "Java agent running on PID: ${nohup_PID}"
else
echo "Jenkins Agent is online (nothing done)"
fi
4 changes: 4 additions & 0 deletions jobs/JGFS_ATMOS_CYCLONE_GENESIS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "genesis" -c "base genesis"

# Hack to temporary skip this as the tracker has not been build
# on Hercules Rocky 9 yet
# TODO: Remove this after tracker has been built for Rocky 9 #2639
if [[ "${machine}" == 'HERCULES' ]]; then exit 0; fi

##############################################
# Set variables used in the exglobal script
Expand Down
4 changes: 4 additions & 0 deletions jobs/JGFS_ATMOS_CYCLONE_TRACKER
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "tracker" -c "base tracker"

# Hack to temporary skip this as the tracker has not been build
# on Hercules Rocky 9 yet
# TODO: Remove this after tracker has been built for Rocky 9 #2639
if [[ "${machine}" == 'HERCULES' ]]; then exit 0; fi

export COMPONENT="atmos"

Expand Down
5 changes: 5 additions & 0 deletions jobs/JGFS_ATMOS_FSU_GENESIS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "genesis_fsu" -c "base genesis_fsu"

# Hack to temporary skip this as the tracker has not been build
# on Hercules Rocky 9 yet
# TODO: Remove this after tracker has been built for Rocky 9 #2639
if [[ "${machine}" == 'HERCULES' ]]; then exit 0; fi

export COMPONENT="atmos"


Expand Down
43 changes: 30 additions & 13 deletions jobs/JGLOBAL_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,51 @@ declare -rx gPDY="${GDATE:0:8}"
declare -rx gcyc="${GDATE:8:2}"

# Construct COM variables from templates (see config.com)
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_ATMOS_RESTART COM_ATMOS_INPUT COM_ATMOS_ANALYSIS \
COM_ICE_ANALYSIS COM_ATMOS_HISTORY COM_ATMOS_MASTER COM_TOP COM_CONF
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMIN_ATMOS_INPUT:COM_ATMOS_INPUT_TMPL \
COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL \
COMOUT_CONF:COM_CONF_TMPL \
COMOUT_ATMOS_RESTART:COM_ATMOS_RESTART_TMPL \
COMOUT_ATMOS_HISTORY:COM_ATMOS_HISTORY_TMPL \
COMOUT_ATMOS_MASTER:COM_ATMOS_MASTER_TMPL

RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL
COMIN_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL

if [[ "${DO_WAVE}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_WAVE_RESTART COM_WAVE_PREP COM_WAVE_HISTORY
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMIN_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMOUT_WAVE_RESTART:COM_WAVE_RESTART_TMPL \
COMOUT_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL
RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_WAVE_RESTART_PREV:COM_WAVE_RESTART_TMPL
COMIN_WAVE_RESTART_PREV:COM_WAVE_RESTART_TMPL
fi

if [[ "${DO_OCN}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_MED_RESTART COM_OCEAN_RESTART COM_OCEAN_INPUT \
COM_OCEAN_HISTORY COM_OCEAN_ANALYSIS
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMIN_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL \
COMIN_OCEAN_INPUT:COM_OCEAN_INPUT_TMPL \
COMOUT_MED_RESTART:COM_MED_RESTART_TMPL \
COMOUT_OCEAN_RESTART:COM_OCEAN_RESTART_TMPL \
COMOUT_OCEAN_HISTORY:COM_OCEAN_HISTORY_TMPL
RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL \
COM_MED_RESTART_PREV:COM_MED_RESTART_TMPL
COMIN_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL \
COMIN_MED_RESTART_PREV:COM_MED_RESTART_TMPL
fi

if [[ "${DO_ICE}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_ICE_HISTORY COM_ICE_INPUT COM_ICE_RESTART
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMIN_ICE_INPUT:COM_ICE_INPUT_TMPL \
COMIN_ICE_ANALYSIS:COM_ICE_ANALYSIS_TMPL \
COMOUT_ICE_RESTART:COM_ICE_RESTART_TMPL \
COMOUT_ICE_HISTORY:COM_ICE_HISTORY_TMPL
RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL
COMIN_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL
fi

if [[ "${DO_AERO}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_CHEM_HISTORY
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMOUT_CHEM_HISTORY:COM_CHEM_HISTORY_TMPL
fi


Expand All @@ -79,7 +96,7 @@ if [[ "${RUN}" =~ "enkf" ]] && [[ "${SENDDBN:-}" == YES ]]; then
for (( fhr = FHOUT; fhr <= FHMAX; fhr + FHOUT )); do
if (( fhr % 3 == 0 )); then
fhr3=$(printf %03i "${fhr}")
"${DBNROOT}/bin/dbn_alert" MODEL GFS_ENKF "${job}" "${COM_ATMOS_HISTORY}/${RUN}.t${cyc}z.sfcf${fhr3}.nc"
"${DBNROOT}/bin/dbn_alert" MODEL GFS_ENKF "${job}" "${COMOUT_ATMOS_HISTORY}/${RUN}.t${cyc}z.sfcf${fhr3}.nc"
fi
done
fi
Expand Down
Loading

0 comments on commit 97a63a7

Please sign in to comment.