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 Nov 5, 2024
2 parents de3225f + 152bb45 commit e66c49d
Show file tree
Hide file tree
Showing 32 changed files with 262 additions and 133 deletions.
45 changes: 41 additions & 4 deletions .github/workflows/pw_aws_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request Number (use 0 for non-PR)'
description: 'PR Number (use 0 for non-PR)'
required: true
default: '0'
os:
Expand All @@ -31,24 +31,60 @@ env:
MACHINE_ID: noaacloud

jobs:

run-start-clusters:
runs-on: ubuntu-latest
env:
PW_PLATFORM_HOST: noaa.parallel.works
steps:
- name: Checkout pw-cluster-automation repository
uses: actions/checkout@v4
with:
repository: TerrenceMcGuinness-NOAA/pw-cluster-automation
path: pw-cluster-automation
ref: pw_cluster_noaa

- name: Run startClusters
run: |
mkdir -p ~/.ssh
echo "${{ secrets.ID_RSA_AWS }}" > ~/.ssh/id_rsa
echo "${{ secrets.PW_API_KEY }}" > ~/.ssh/pw_api.key
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/pw_api.key
if [ "${{ github.event.inputs.os }}" == "rocky" ]; then
clustername="globalworkflowciplatformrocky8"
elif [ "${{ github.event.inputs.os }}" == "centos" ]; then
clustername="awsemctmcgc7i48xlargeciplatform"
fi
python3 pw-cluster-automation/startClusters.py $clustername
fetch-branch:
needs: run-start-clusters
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUBTOKEN }}
outputs:
branch: ${{ steps.get-branch.outputs.branch }}
repo: ${{ steps.get-branch.outputs.repo }}
steps:
- name: Fetch branch name for PR
- name: Fetch branch name and repo for PR
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')
repo_name=$(gh pr view $pr_number --repo $repo --json headRepository --jq '.headRepository.name')
repo="$repo_owner/$repo_name"
fi
echo "::set-output name=branch::$branch"
{
echo "branch=$branch"
echo "repo=$repo"
} >> $GITHUB_OUTPUT
checkout:
needs: fetch-branch
Expand All @@ -64,6 +100,7 @@ jobs:
with:
path: ${{ github.run_id }}/HOMEgfs
submodules: 'recursive'
repository: ${{ needs.fetch-branch.outputs.repo }}
ref: ${{ needs.fetch-branch.outputs.branch }}

build-link:
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ ush/bufr2ioda_insitu*
versions/build.ver
versions/run.ver

# wxflow checkout and symlinks
ush/python/wxflow
workflow/wxflow
ci/scripts/wxflow

# jcb checkout and symlinks
ush/python/jcb
workflow/jcb
Expand Down
26 changes: 26 additions & 0 deletions ci/cases/pr/C48mx500_hybAOWCDA.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
experiment:
system: gfs
mode: cycled

arguments:
pslot: {{ 'pslot' | getenv }}
app: S2S
resdetatmos: 48
resdetocean: 5.0
resensatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20240610
idate: 2021032412
edate: 2021032418
nens: 3
interval: 0
start: warm
yaml: {{ HOMEgfs }}/ci/cases/yamls/soca_gfs_defaults_ci.yaml

skip_ci_on_hosts:
- wcoss2
- orion
- hercules
- hera
- gaea
1 change: 1 addition & 0 deletions ci/scripts/wxflow
6 changes: 3 additions & 3 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ elif [[ "${step}" = "ocnanalecen" ]]; then
export NTHREADS_OCNANALECEN=${NTHREADSmax}
export APRUN_OCNANALECEN="${APRUN_default} --cpus-per-task=${NTHREADS_OCNANALECEN}"

elif [[ "${step}" = "marineanalletkf" ]]; then
elif [[ "${step}" = "marineanlletkf" ]]; then

export NTHREADS_MARINEANALLETKF=${NTHREADSmax}
export APRUN_MARINEANALLETKF="${APRUN_default} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"
export NTHREADS_MARINEANLLETKF=${NTHREADSmax}
export APRUN_MARINEANLLETKF=${APRUN_default}

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then

Expand Down
6 changes: 3 additions & 3 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ elif [[ "${step}" = "ocnanalecen" ]]; then
export NTHREADS_OCNANALECEN=${NTHREADSmax}
export APRUN_OCNANALECEN="${APRUN_default} --cpus-per-task=${NTHREADS_OCNANALECEN}"

elif [[ "${step}" = "marineanalletkf" ]]; then
elif [[ "${step}" = "marineanlletkf" ]]; then

export NTHREADS_MARINEANALLETKF=${NTHREADSmax}
export APRUN_MARINEANALLETKF="${APRUN_default} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"
export NTHREADS_MARINEANLLETKF=${NTHREADSmax}
export APRUN_MARINEANLLETKF="${APRUN_default}"

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then

Expand Down
6 changes: 3 additions & 3 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ elif [[ "${step}" = "ocnanalecen" ]]; then
export NTHREADS_OCNANALECEN=${NTHREADSmax}
export APRUN_OCNANALECEN="${APRUN_default} --cpus-per-task=${NTHREADS_OCNANALECEN}"

elif [[ "${step}" = "marineanalletkf" ]]; then
elif [[ "${step}" = "marineanlletkf" ]]; then

export NTHREADS_MARINEANALLETKF=${NTHREADSmax}
export APRUN_MARINEANALLETKF="${APRUN_default} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"
export NTHREADS_MARINEANLLETKF=${NTHREADSmax}
export APRUN_MARINEANLLETKF="${APRUN_default}"

elif [[ "${step}" = "atmanlfv3inc" ]]; then

Expand Down
5 changes: 3 additions & 2 deletions jobs/JGDAS_ATMOS_ANALYSIS_DIAG
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ export OPREFIX="${RUN/enkf}.t${cyc}z."
export GPREFIX="${GDUMP}.t${gcyc}z."
export APREFIX="${RUN}.t${cyc}z."

YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_ANALYSIS
mkdir -m 775 -p "${COM_ATMOS_ANALYSIS}"
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMOUT_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL
mkdir -m 775 -p "${COMOUT_ATMOS_ANALYSIS}"

###############################################################
# Run relevant script
Expand Down
48 changes: 25 additions & 23 deletions jobs/JGDAS_ENKF_DIAG
Original file line number Diff line number Diff line change
Expand Up @@ -30,56 +30,58 @@ export APREFIX="${RUN}.t${cyc}z."
export GPREFIX="${GDUMP_ENS}.t${gcyc}z."
GPREFIX_DET="${GDUMP}.t${gcyc}z."

RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS
MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_ANALYSIS
RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OBS:COM_OBS_TMPL
MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMOUT_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL

RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COM_OBS_PREV:COM_OBS_TMPL \
COM_ATMOS_ANALYSIS_DET_PREV:COM_ATMOS_ANALYSIS_TMPL
COMIN_OBS_PREV:COM_OBS_TMPL \
COMIN_ATMOS_ANALYSIS_DET_PREV:COM_ATMOS_ANALYSIS_TMPL

MEMDIR="ensstat" RUN=${GDUMP_ENS} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COM_ATMOS_HISTORY_PREV:COM_ATMOS_HISTORY_TMPL
COMIN_ATMOS_HISTORY_PREV:COM_ATMOS_HISTORY_TMPL


export ATMGES_ENSMEAN="${COM_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006.ensmean.nc"
export ATMGES_ENSMEAN="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006.ensmean.nc"
if [ ! -f ${ATMGES_ENSMEAN} ]; then
echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}"
exit 1
fi

# Link observational data
export PREPQC="${COM_OBS}/${OPREFIX}prepbufr"
export PREPQC="${COMIN_OBS}/${OPREFIX}prepbufr"
if [[ ! -f ${PREPQC} ]]; then
echo "WARNING: Global PREPBUFR FILE ${PREPQC} MISSING"
fi
export TCVITL="${COM_OBS}/${OPREFIX}syndata.tcvitals.tm00"
export TCVITL="${COMIN_OBS}/${OPREFIX}syndata.tcvitals.tm00"
if [[ ${DONST} = "YES" ]]; then
export NSSTBF="${COM_OBS}/${OPREFIX}nsstbufr"
export NSSTBF="${COMIN_OBS}/${OPREFIX}nsstbufr"
fi
export PREPQCPF="${COM_OBS}/${OPREFIX}prepbufr.acft_profiles"
export PREPQCPF="${COMIN_OBS}/${OPREFIX}prepbufr.acft_profiles"

# Guess Bias correction coefficients related to control
export GBIAS=${COM_ATMOS_ANALYSIS_DET_PREV}/${GPREFIX_DET}abias
export GBIASPC=${COM_ATMOS_ANALYSIS_DET_PREV}/${GPREFIX_DET}abias_pc
export GBIASAIR=${COM_ATMOS_ANALYSIS_DET_PREV}/${GPREFIX_DET}abias_air
export GRADSTAT=${COM_ATMOS_ANALYSIS_DET_PREV}/${GPREFIX_DET}radstat
export GBIAS=${COMIN_ATMOS_ANALYSIS_DET_PREV}/${GPREFIX_DET}abias
export GBIASPC=${COMIN_ATMOS_ANALYSIS_DET_PREV}/${GPREFIX_DET}abias_pc
export GBIASAIR=${COMIN_ATMOS_ANALYSIS_DET_PREV}/${GPREFIX_DET}abias_air
export GRADSTAT=${COMIN_ATMOS_ANALYSIS_DET_PREV}/${GPREFIX_DET}radstat

# Bias correction coefficients related to ensemble mean
export ABIAS="${COM_ATMOS_ANALYSIS}/${APREFIX}abias.ensmean"
export ABIASPC="${COM_ATMOS_ANALYSIS}/${APREFIX}abias_pc.ensmean"
export ABIASAIR="${COM_ATMOS_ANALYSIS}/${APREFIX}abias_air.ensmean"
export ABIASe="${COM_ATMOS_ANALYSIS}/${APREFIX}abias_int.ensmean"
export ABIAS="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}abias.ensmean"
export ABIASPC="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}abias_pc.ensmean"
export ABIASAIR="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}abias_air.ensmean"
export ABIASe="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}abias_int.ensmean"

# Diagnostics related to ensemble mean
export GSISTAT="${COM_ATMOS_ANALYSIS}/${APREFIX}gsistat.ensmean"
export CNVSTAT="${COM_ATMOS_ANALYSIS}/${APREFIX}cnvstat.ensmean"
export OZNSTAT="${COM_ATMOS_ANALYSIS}/${APREFIX}oznstat.ensmean"
export RADSTAT="${COM_ATMOS_ANALYSIS}/${APREFIX}radstat.ensmean"
export GSISTAT="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}gsistat.ensmean"
export CNVSTAT="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}cnvstat.ensmean"
export OZNSTAT="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}oznstat.ensmean"
export RADSTAT="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}radstat.ensmean"

# Select observations based on ensemble mean
export RUN_SELECT="YES"
export USE_SELECT="NO"
export SELECT_OBS="${COM_ATMOS_ANALYSIS}/${APREFIX}obsinput.ensmean"
export SELECT_OBS="${COMOUT_ATMOS_ANALYSIS}/${APREFIX}obsinput.ensmean"

export DIAG_SUFFIX="_ensmean"
export DIAG_COMPRESS="NO"
Expand Down
25 changes: 19 additions & 6 deletions jobs/JGLOBAL_MARINE_ANALYSIS_LETKF
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/bin/bash
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "marineanalletkf" -c "base ocnanal marineanalletkf"

export DATAjob="${DATAROOT}/${RUN}marineanalysis.${PDY:-}${cyc}"
export DATA="${DATAjob}/${jobid}"
# Create the directory to hold ensemble perturbations
export DATAens="${DATAjob}/ensdata"
if [[ ! -d "${DATAens}" ]]; then mkdir -p "${DATAens}"; fi

source "${HOMEgfs}/ush/jjob_header.sh" -e "marineanlletkf" -c "base marineanl marineanlletkf"

##############################################
# Set variables used in the script
Expand All @@ -11,12 +18,18 @@ GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours")

gPDY=${GDATE:0:8}
gcyc=${GDATE:8:2}
export GDUMP="gdas"
export GDUMP_ENS="enkf${GDUMP}"
export OPREFIX="${RUN}.t${cyc}z."

YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COMIN_OCEAN_HISTORY_PREV:COM_OCEAN_HISTORY_TMPL \
COMIN_ICE_HISTORY_PREV:COM_ICE_HISTORY_TMPL
RUN="${GDUMP}" YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COMIN_OCEAN_HISTORY_PREV:COM_OCEAN_HISTORY_TMPL \
COMIN_ICE_HISTORY_PREV:COM_ICE_HISTORY_TMPL

YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_OBS:COM_OBS_TMPL
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OBS:COM_OBS_TMPL \
COMOUT_OCEAN_LETKF:COM_OCEAN_LETKF_TMPL \
COMOUT_ICE_LETKF:COM_ICE_LETKF_TMPL

##############################################
# Begin JOB SPECIFIC work
Expand All @@ -25,7 +38,7 @@ YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_OBS:COM_OBS_TMPL
###############################################################
# Run relevant script

EXSCRIPT=${GDASOCNLETKFPY:-${HOMEgfs}/scripts/exgdas_global_marine_analysis_letkf.py}
EXSCRIPT=${GDASOCNLETKFPY:-${HOMEgfs}/scripts/exglobal_marine_analysis_letkf.py}
${EXSCRIPT}
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source "${HOMEgfs}/ush/preamble.sh"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

export job="marineanalletkf"
export job="marineanlletkf"
export jobid="${job}.$$"

###############################################################
Expand Down
2 changes: 2 additions & 0 deletions parm/config/gfs/config.com
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ declare -rx COM_OCEAN_HISTORY_TMPL=${COM_BASE}'/model/ocean/history'
declare -rx COM_OCEAN_RESTART_TMPL=${COM_BASE}'/model/ocean/restart'
declare -rx COM_OCEAN_INPUT_TMPL=${COM_BASE}'/model/ocean/input'
declare -rx COM_OCEAN_ANALYSIS_TMPL=${COM_BASE}'/analysis/ocean'
declare -rx COM_OCEAN_LETKF_TMPL=${COM_BASE}'/analysis/ocean/letkf'
declare -rx COM_OCEAN_BMATRIX_TMPL=${COM_BASE}'/bmatrix/ocean'
declare -rx COM_OCEAN_NETCDF_TMPL=${COM_BASE}'/products/ocean/netcdf'
declare -rx COM_OCEAN_GRIB_TMPL=${COM_BASE}'/products/ocean/grib2'
declare -rx COM_OCEAN_GRIB_GRID_TMPL=${COM_OCEAN_GRIB_TMPL}'/${GRID}'

declare -rx COM_ICE_ANALYSIS_TMPL=${COM_BASE}'/analysis/ice'
declare -rx COM_ICE_LETKF_TMPL=${COM_BASE}'/analysis/ice/letkf'
declare -rx COM_ICE_BMATRIX_TMPL=${COM_BASE}'/bmatrix/ice'
declare -rx COM_ICE_INPUT_TMPL=${COM_BASE}'/model/ice/input'
declare -rx COM_ICE_HISTORY_TMPL=${COM_BASE}'/model/ice/history'
Expand Down
18 changes: 0 additions & 18 deletions parm/config/gfs/config.marineanalletkf

This file was deleted.

20 changes: 20 additions & 0 deletions parm/config/gfs/config.marineanlletkf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

########## config.marineanlletkf ##########
# Ocn Analysis specific

echo "BEGIN: config.marineanlletkf"

# Get task specific resources
. "${EXPDIR}/config.resources" marineanlletkf

export MARINE_LETKF_EXEC="${EXECgfs}/gdas.x"
export MARINE_LETKF_YAML_TMPL="${PARMgfs}/gdas/soca/letkf/letkf.yaml.j2"
export MARINE_LETKF_STAGE_YAML_TMPL="${PARMgfs}/gdas/soca/letkf/letkf_stage.yaml.j2"
export MARINE_LETKF_SAVE_YAML_TMPL="${PARMgfs}/gdas/soca/letkf/letkf_save.yaml.j2"

export GRIDGEN_EXEC="${EXECgfs}/gdas_soca_gridgen.x"
export GRIDGEN_YAML="${PARMgfs}/gdas/soca/gridgen/gridgen.yaml"
export DIST_HALO_SIZE=500000

echo "END: config.marineanlletkf"
2 changes: 1 addition & 1 deletion parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ case ${step} in
tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
;;

"marineanalletkf")
"marineanlletkf")
ntasks=16
case ${OCNRES} in
"025")
Expand Down
2 changes: 1 addition & 1 deletion parm/post/oceanice_products_gefs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ocean:
{% elif model_grid == 'mx500' %}
ocean_levels: [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 226, 241, 267]
{% endif %}
subset: ['SSH', 'SST', 'SSS', 'speed', 'MLD_003', 'latent', 'sensible', 'SW', 'LW', 'LwLatSens', 'Heat_PmE', 'SSU', 'SSV', 'taux', 'tauy', 'temp', 'so', 'uo', 'vo']
subset: ['SSH', 'SST', 'SSS', 'speed', 'MLD_003', 'latent', 'sensible', 'SW', 'LW', 'LwLatSens', 'Heat_PmE', 'SSU', 'SSV', 'taux', 'tauy', 'temp', 'tob', 'so', 'uo', 'vo']
data_in:
copy:
- ["{{ COM_OCEAN_HISTORY }}/{{ RUN }}.ocean.t{{ current_cycle | strftime('%H') }}z.{{ interval }}hr_avg.f{{ '%03d' % forecast_hour }}.nc", "{{ DATA }}/ocean.nc"]
Expand Down
1 change: 1 addition & 0 deletions parm/product/gefs.0p25.fFFF.paramlist.a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
:CIN:180-0 mb above ground:
:CIN:surface:
:HLCY:3000-0 m above ground:
:PEVPR:surface:
:TCDC:entire atmosphere (considered as a single layer):
:WEASD:surface:
:SNOD:surface:
Expand Down
Loading

0 comments on commit e66c49d

Please sign in to comment.