Skip to content

Commit

Permalink
Rename some stuff per comment from Rahul
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNew-NOAA committed Sep 23, 2024
1 parent 0eaa63d commit 693e6d1
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 61 deletions.
8 changes: 4 additions & 4 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ elif [[ "${step}" = "marineanalletkf" ]]; then
export NTHREADS_MARINEANALLETKF=${NTHREADSmax}
export APRUN_MARINEANALLETKF="${APRUN_default} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"

elif [[ "${step}" = "calcanl" ]]; then
elif [[ "${step}" = "analcalc_fv3jedi" ]]; then

export NTHREADS_CALCANL=${NTHREADSmax}
export APRUN_CALCANL="${APRUN_default} --cpus-per-task=${NTHREADS_CALCANL}"
export NTHREADS_ANALCALC_FV3JEDI=${NTHREADSmax}
export APRUN_ANALCALC_FV3JEDI="${APRUN_default} --cpus-per-task=${NTHREADS_ANALCALC_FV3JEDI}"

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

export MKL_NUM_THREADS=4
export MKL_CBWR=AUTO
Expand Down
8 changes: 4 additions & 4 deletions env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ case ${step} in
export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN_default} --cpus-per-task=${NTHREADS_OCNANAL}"
;;
"calcanl")
"analcalc_fv3jedi")

export NTHREADS_CALCANL=${NTHREADSmax}
export APRUN_CALCANL="${APRUN_default} --cpus-per-task=${NTHREADS_CALCANL}"
export NTHREADS_ANALCALC_FV3JEDI=${NTHREADSmax}
export APRUN_ANALCALC_FV3JEDI="${APRUN_default} --cpus-per-task=${NTHREADS_ANALCALC_FV3JEDI}"
;;
"anal" | "analcalc")
"anal" | "analcalc_gsi")

export MKL_NUM_THREADS=4
export MKL_CBWR=AUTO
Expand Down
8 changes: 4 additions & 4 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ elif [[ "${step}" = "ocnanalrun" ]]; then
export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"
export APRUN_OCNANAL="${APRUN_default}"

elif [[ "${step}" = "calcanl" ]]; then
elif [[ "${step}" = "analcalc_fv3jedi" ]]; then

export NTHREADS_CALCANL=${NTHREADSmax}
export APRUN_CALCANL="${APRUN_default}"
export NTHREADS_ANALCALC_FV3JEDI=${NTHREADSmax}
export APRUN_ANALCALC_FV3JEDI="${APRUN_default}"

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

export MKL_NUM_THREADS=4
export MKL_CBWR=AUTO
Expand Down
8 changes: 4 additions & 4 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ elif [[ "${step}" = "marineanalletkf" ]]; then
export NTHREADS_MARINEANALLETKF=${NTHREADSmax}
export APRUN_MARINEANALLETKF="${APRUN_default} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"

elif [[ "${step}" = "calcanl" ]]; then
elif [[ "${step}" = "analcalc_fv3jedi" ]]; then

export NTHREADS_CALCANL=${NTHREADSmax}
export APRUN_CALCANL="${APRUN_default} --cpus-per-task=${NTHREADS_CALCANL}"
export NTHREADS_ANALCALC_FV3JEDI=${NTHREADSmax}
export APRUN_ANALCALC_FV3JEDI="${APRUN_default} --cpus-per-task=${NTHREADS_ANALCALC_FV3JEDI}"

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

export MKL_NUM_THREADS=4
export MKL_CBWR=AUTO
Expand Down
8 changes: 4 additions & 4 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ elif [[ "${step}" = "marinebmat" ]]; then
elif [[ "${step}" = "marinerun" ]]; then
echo "WARNING: ${step} is not enabled on S4!"

elif [[ "${step}" = "calcanl" ]]; then
elif [[ "${step}" = "analcalc_fv3jedi" ]]; then

export NTHREADS_CALCANL=${NTHREADSmax}
export APRUN_CALCANL="${APRUN_default}"
export NTHREADS_ANALCALC_FV3JEDI=${NTHREADSmax}
export APRUN_ANALCALC_FV3JEDI="${APRUN_default}"

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

export MKL_NUM_THREADS=4
export MKL_CBWR=AUTO
Expand Down
10 changes: 5 additions & 5 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,18 @@ elif [[ "${step}" = "atmanlfv3inc" ]]; then
export NTHREADS_ATMANLFV3INC=${NTHREADSmax}
export APRUN_ATMANLFV3INC="${APRUN_default}"

elif [[ "${step}" = "calcanl" ]]; then
elif [[ "${step}" = "analcalc_fv3jedi" ]]; then

export NTHREADS_CALCANL=${NTHREADSmax}
export APRUN_CALCANL="${APRUN_default}"
export NTHREADS_ANALCALC_FV3JEDI=${NTHREADSmax}
export APRUN_ANALCALC_FV3JEDI="${APRUN_default}"

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

export OMP_PLACES=cores
export OMP_STACKSIZE=1G
export FI_OFI_RXM_SAR_LIMIT=3145728

if [[ "${step}" = "analcalc" ]]; then
if [[ "${step}" = "analcalc_gsi" ]]; then
export MPICH_MPIIO_HINTS="*:romio_cb_write=disable"
fi

Expand Down
4 changes: 2 additions & 2 deletions jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_FV3JEDI
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "calcanl" -c "base calcanl"
source "${HOMEgfs}/ush/jjob_header.sh" -e "analcalc_fv3jedi" -c "base analcalc_fv3jedi"

##############################################
# Set variables used in the script
Expand All @@ -26,7 +26,7 @@ RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
# Run relevant script
##############################################

EXSCRIPT=${GDASATMRUNSH:-${SCRgfs}/exglobal_atm_calc_analysis.py}
EXSCRIPT=${GDASATMRUNSH:-${SCRgfs}/exglobal_atmos_analysis_calc_fv3jedi.py}
${EXSCRIPT}
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
Expand Down
4 changes: 2 additions & 2 deletions jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_GSI
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "analcalc" -c "base anal analcalc"
source "${HOMEgfs}/ush/jjob_header.sh" -e "analcalc_gsi" -c "base anal analcalc_gsi"


##############################################
Expand Down Expand Up @@ -56,7 +56,7 @@ export DOGAUSFCANL=${DOGAUSFCANL:-"YES"}
###############################################################
# Run relevant script

${ANALCALCSH:-${SCRgfs}/exglobal_atmos_analysis_calc.sh}
${ANALCALCSH:-${SCRgfs}/exglobal_atmos_analysis_calc_gsi.sh}
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

Expand Down
4 changes: 2 additions & 2 deletions jobs/rocoto/analcalc_fv3jedi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ source "${HOMEgfs}/ush/preamble.sh"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

export job="calcanl"
export job="analcalc_fv3jedi"
export jobid="${job}.$$"

###############################################################
# Execute the JJOB
"${HOMEgfs}/jobs/JGLOBAL_ATM_CALC_ANALYSIS"
"${HOMEgfs}/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_FV3JEDI

Check warning

Code scanning / shellcheck

Did you forget to close this double quoted string? Warning

Did you forget to close this double quoted string?

Check notice

Code scanning / shellcheck

The mentioned syntax error was in this simple command. Note

The mentioned syntax error was in this simple command.
status=$?
exit "${status}"

Check notice

Code scanning / shellcheck

This is actually an end quote, but due to next char it looks suspect. Note

This is actually an end quote, but due to next char it looks suspect.

Check failure

Code scanning / shellcheck

Couldn't parse this double quoted string. Fix to allow more checks. Error

Couldn't parse this double quoted string. Fix to allow more checks.
4 changes: 2 additions & 2 deletions jobs/rocoto/analcalc_gsi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ source "${HOMEgfs}/ush/preamble.sh"
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

export job="analcalc"
export job="analcalc_gsi"
export jobid="${job}.$$"

###############################################################
# Execute the JJOB
${HOMEgfs}/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC
${HOMEgfs}/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_GSI

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.
status=$?


Expand Down
16 changes: 8 additions & 8 deletions parm/config/gfs/config.analcalc_fv3jedi
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#! /usr/bin/env bash

########## config.calcanl ##########
########## config.analcalc_fv3jedi ##########
# Diagnostic amospheric analysis calculation specific

echo "BEGIN: config.calcanl"
echo "BEGIN: config.analcalc_fv3jedi"

export layout_x_calcanl=2
export layout_y_calcanl=2
export layout_x_analcalc_fv3jedi=2
export layout_y_analcalc_fv3jedi=2

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

export JCB_BASE_YAML=${PARMgfs}/gdas/atm/jcb-base.yaml.j2
export JCB_ALGO=fv3jedi_calcanl
export JEDIEXE=${EXECgfs}/fv3jedi_calcanl.x
export JCB_ALGO=fv3jedi_analcalc
export JEDIEXE=${EXECgfs}/fv3jedi_analcalc.x

if [[ ${DOHYBVAR} = "YES" ]]; then
export CASE_ANL=${CASE_ENS}

Check notice

Code scanning / shellcheck

Possible misspelling: CASE_ENS may not be assigned. Did you mean CASE_ANL? Note

Possible misspelling: CASE_ENS may not be assigned. Did you mean CASE_ANL?
Expand All @@ -23,4 +23,4 @@ fi

export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2"

echo "END: config.calcanl"
echo "END: config.analcalc_fv3jedi"
8 changes: 4 additions & 4 deletions parm/config/gfs/config.analcalc_gsi
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#! /usr/bin/env bash

########## config.analcalc ##########
########## config.analcalc_gsi ##########
# GFS post-anal specific (non-diag)

echo "BEGIN: config.analcalc"
echo "BEGIN: config.analcalc_gsi"

# Get task specific resources
. ${EXPDIR}/config.resources analcalc
. ${EXPDIR}/config.resources analcalc_gsi

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.

echo "END: config.analcalc"
echo "END: config.analcalc_gsi"
10 changes: 5 additions & 5 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (( $# != 1 )); then
echo "atmensanlinit atmensanlobs atmensanlsol atmensanlletkf atmensanlfv3inc atmensanlfinal"
echo "snowanl esnowrecen"
echo "prepobsaero aeroanlinit aeroanlvar aeroanlfinal aeroanlgenb"
echo "anal sfcanl calcanl analcalc analdiag fcst echgres"
echo "anal sfcanl analcalc_fv3jedi analcalc_gsi analdiag fcst echgres"
echo "upp atmos_products"
echo "tracker genesis genesis_fsu"
echo "verfozn verfrad vminmon fit2obs metp arch cleanup"
Expand Down Expand Up @@ -700,9 +700,9 @@ case ${step} in
export is_exclusive=True
;;

"calcanl")
export layout_x=${layout_x_calcanl}
export layout_y=${layout_y_calcanl}
"analcalc_fv3jedi")
export layout_x=${layout_x_analcalc_fv3jedi}
export layout_y=${layout_y_analcalc_fv3jedi}

walltime="00:15:00"
ntasks=$(( layout_x * layout_y * 6 ))
Expand All @@ -711,7 +711,7 @@ case ${step} in
export is_exclusive=True
;;

"analcalc")
"analcalc_gsi")
walltime="00:15:00"
ntasks=127
export ntasks_calcanl="${ntasks}"
Expand Down
16 changes: 8 additions & 8 deletions scripts/exglobal_atmos_analysis_calc_fv3jedi.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python3
# exglobal_atm_calc_analysis.py
# This script creates an CalcAnalysis object
# This script creates an AnalysisCalc object
# and runs the execute method which executes
# the diagnostic global analysis calculation
import os

from wxflow import Logger, cast_strdict_as_dtypedict
from pygfs.task.calcanl import CalcAnalysis
from pygfs.task.analcalc_fv3jedi import AnalysisCalc

# Initialize root logger
logger = Logger(level='DEBUG', colored_log=True)
Expand All @@ -17,15 +17,15 @@
# Take configuration from environment and cast it as python dictionary
config = cast_strdict_as_dtypedict(os.environ)

# Instantiate the CalcAnalysis task
CalcAnl = CalcAnalysis(config, 'calcanl')
# Instantiate the AnalysisCalc task
AnalCalc = AnalysisCalc(config, 'fv3jedi_analcalc')

# Initialize
CalcAnl.initialize_jedi()
CalcAnl.initialize()
AnalCalc.initialize_jedi()
AnalCalc.initialize()

# Execute JEDI application
CalcAnl.execute(config.APRUN_CALCANL)
AnalCalc.execute(config.APRUN_ANALCALC_FV3JEDI)

# Finalize
CalcAnl.finalize()
AnalCalc.finalize()
2 changes: 1 addition & 1 deletion sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ if [[ -d "${HOMEgfs}/sorc/gdas.cd/build" ]]; then
"fv3jedi_plot_field.x" \
"gdasapp_chem_diagb.x" \
"fv3jedi_fv3inc.x" \
"fv3jedi_calcanl.x" \
"fv3jedi_analcalc.x" \
"gdas_ens_handler.x" \
"gdas_incr_handler.x" \
"gdas_obsprovider2ioda.x" \
Expand Down
4 changes: 2 additions & 2 deletions ush/python/pygfs/task/analcalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
logger = getLogger(__name__.split('.')[-1])


class CalcAnalysis(Task):
class AnalysisCalc(Task):
"""
Class for JEDI-based analysis calculation
"""
@logit(logger, name="CalcAnalysis")
@logit(logger, name="AnalysisCalc")
def __init__(self, config, yaml_name=None):
"""Constructor diagnostic atmospheric analysis calculation task
Expand Down

0 comments on commit 693e6d1

Please sign in to comment.