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

Cycling on native grid and create JEDI-based analysis calc job #2949

Draft
wants to merge 57 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
36d9e2a
Initial commit
DavidNew-NOAA Sep 8, 2024
3ac6a0e
Update gdas hash
DavidNew-NOAA Sep 8, 2024
e56126d
Update GDAS hash
DavidNew-NOAA Sep 8, 2024
5436a6b
Fix typo
DavidNew-NOAA Sep 9, 2024
b5e231a
Saving progress
DavidNew-NOAA Sep 9, 2024
777641a
Update
DavidNew-NOAA Sep 11, 2024
86b6ad4
Merge
DavidNew-NOAA Sep 11, 2024
42122d3
Initial commit
DavidNew-NOAA Sep 11, 2024
26d365b
Merge branch 'develop' into feature/calcanl
DavidNew-NOAA Sep 11, 2024
653453f
Update gdas hash
DavidNew-NOAA Sep 11, 2024
8333e32
Update GDAS hash and namelist to read increment on native grid
DavidNew-NOAA Sep 11, 2024
292b55a
Saving progress
DavidNew-NOAA Sep 11, 2024
bfc06c2
Update GDAS hash
DavidNew-NOAA Sep 11, 2024
dc59de4
Update GDAS hash
DavidNew-NOAA Sep 11, 2024
13e35d0
Update GDAS hash
DavidNew-NOAA Sep 11, 2024
ac8d31d
Update GDAS hash
DavidNew-NOAA Sep 11, 2024
84723c8
Update GDAS hash and update finalize jobs in atmanl and atmensanl
DavidNew-NOAA Sep 12, 2024
09bf586
Merge branch 'develop' into feature/cubeinc
DavidNew-NOAA Sep 12, 2024
61d201a
pynorms
DavidNew-NOAA Sep 12, 2024
1de0c62
Update GDAS hash
DavidNew-NOAA Sep 12, 2024
19e6f1c
Update GDAS hash
DavidNew-NOAA Sep 12, 2024
1a21af0
Merge branch 'develop' into feature/calcanl
DavidNew-NOAA Sep 12, 2024
89e8dd4
pynorms
DavidNew-NOAA Sep 12, 2024
f123d9a
Stage multifile (FMS) increments and update GDAS hash
DavidNew-NOAA Sep 13, 2024
0430bef
Update GDAS hash
DavidNew-NOAA Sep 13, 2024
ad27e15
Update GDAS hash
DavidNew-NOAA Sep 11, 2024
07d1fff
Update GDAS hash and update finalize jobs in atmanl and atmensanl
DavidNew-NOAA Sep 12, 2024
01166d7
Add new UPP links to .gitignore (#2904)
DavidHuber-NOAA Sep 12, 2024
3805262
pynorms
DavidNew-NOAA Sep 12, 2024
c9f40d3
Stage multifile (FMS) increments and update GDAS hash
DavidNew-NOAA Sep 13, 2024
dc4cf6e
Update GDAS hash
DavidNew-NOAA Sep 13, 2024
fa71bf4
Merge branch 'feature/cubeinc' of https://github.com/DavidNew-NOAA/gl…
DavidNew-NOAA Sep 13, 2024
7f2327b
Fix bug and update GDAS hash
DavidNew-NOAA Sep 13, 2024
2d9b9b6
Update gdas hash and update calcanl.py
DavidNew-NOAA Sep 13, 2024
e832805
Merge branch 'feature/cubeinc' into feature/calcanl
DavidNew-NOAA Sep 13, 2024
509742d
Merge branch 'develop' into feature/calcanl
DavidNew-NOAA Sep 13, 2024
9a95e54
Merge branch 'develop' into feature/calcanl
DavidNew-NOAA Sep 16, 2024
93076f5
Update UFS hash
DavidNew-NOAA Sep 16, 2024
eaaf1fd
Update
DavidNew-NOAA Sep 17, 2024
e99729e
Merge branch 'develop' into feature/calcanl
DavidNew-NOAA Sep 17, 2024
0f419a0
Update GDAS hash and save progress on calcanl.py
DavidNew-NOAA Sep 17, 2024
31cea06
Update
DavidNew-NOAA Sep 18, 2024
8af11f2
Update GDASApp hash
DavidNew-NOAA Sep 19, 2024
bd6afc2
Merge branch 'develop' into feature/calcanl
DavidNew-NOAA Sep 19, 2024
f3d3449
Update
DavidNew-NOAA Sep 23, 2024
4001249
Merge branch 'develop' into feature/calcanl
DavidNew-NOAA Sep 23, 2024
21b10da
pynorms
DavidNew-NOAA Sep 23, 2024
02b27b9
Add comment blocks to calcanl.py methods
DavidNew-NOAA Sep 23, 2024
dd6c182
pynorms
DavidNew-NOAA Sep 23, 2024
1b12887
Fix indentation error and allocate more appropriate resources for job
DavidNew-NOAA Sep 23, 2024
2932cc2
Shell norms
DavidNew-NOAA Sep 23, 2024
0eaa63d
Rename some stuff
DavidNew-NOAA Sep 23, 2024
693e6d1
Rename some stuff per comment from Rahul
DavidNew-NOAA Sep 23, 2024
dff1e59
Missed renaming of some things
DavidNew-NOAA Sep 23, 2024
24f5029
Update GDASApp hash
DavidNew-NOAA Sep 23, 2024
6aa3b96
Update analcalc name in two more corners of the GW
DavidNew-NOAA Sep 23, 2024
65f66f4
Shell norms and update UFS hash
DavidNew-NOAA Sep 23, 2024
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
5 changes: 5 additions & 0 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ elif [[ "${step}" = "marineanalletkf" ]]; then
export NTHREADS_MARINEANALLETKF=${NTHREADSmax}
export APRUN_MARINEANALLETKF="${APRUN_default} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"

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

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

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

export MKL_NUM_THREADS=4
Expand Down
7 changes: 6 additions & 1 deletion env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ case ${step} in

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN_default} --cpus-per-task=${NTHREADS_OCNANAL}"
;;
;;
"calcanl")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

export OMP_PLACES=cores
Expand Down
55 changes: 55 additions & 0 deletions jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_FV3JEDI
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#! /usr/bin/env bash

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

##############################################
# Set variables used in the script
##############################################

GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours")

Check notice

Code scanning / shellcheck

Possible misspelling: PDY may not be assigned. Did you mean gPDY? Note

Possible misspelling: PDY may not be assigned. Did you mean gPDY?
gPDY=${GDATE:0:8}
gcyc=${GDATE:8:2}
GDUMP="gdas"

##############################################
# Begin JOB SPECIFIC work
##############################################

# Generate COM variables from templates
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COM_ATMOS_ANALYSIS
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COM_ATMOS_HISTORY_PREV:COM_ATMOS_HISTORY_TMPL

##############################################
# Run relevant script
##############################################

EXSCRIPT=${GDASATMRUNSH:-${SCRgfs}/exglobal_atm_calc_analysis.py}
${EXSCRIPT}
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

##############################################
# End JOB SPECIFIC work
##############################################

##############################################
# Final processing
##############################################

if [[ -e "${pgmout}" ]] ; then
cat "${pgmout}"
fi

##############################################
# Remove the Temporary working directory
##############################################

cd "${DATAROOT}" || ( echo "FATAL ERROR: ${DATAROOT} does not exist, ABORT!"; exit 1 )
if [[ ${KEEPDATA} = "NO" ]]; then
rm -rf "${DATA}"
fi

exit 0
File renamed without changes.
18 changes: 18 additions & 0 deletions jobs/rocoto/analcalc_fv3jedi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source UFSDA workflow modules
. "${HOMEgfs}/ush/load_ufsda_modules.sh"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

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

###############################################################
# Execute the JJOB
"${HOMEgfs}/jobs/JGLOBAL_ATM_CALC_ANALYSIS"
status=$?
exit "${status}"
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
File renamed without changes.
26 changes: 26 additions & 0 deletions parm/config/gfs/config.analcalc_fv3jedi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! /usr/bin/env bash

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

echo "BEGIN: config.calcanl"

export layout_x_calcanl=2
export layout_y_calcanl=2

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

export JCB_BASE_YAML=${PARMgfs}/gdas/atm/jcb-base.yaml.j2
export JCB_ALGO=fv3jedi_calcanl
export JEDIEXE=${EXECgfs}/fv3jedi_calcanl.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?
else
export CASE_ANL=${CASE}
fi

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

echo "END: config.calcanl"
File renamed without changes.
13 changes: 12 additions & 1 deletion 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 analcalc analdiag fcst echgres"
echo "anal sfcanl calcanl analcalc 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,6 +700,17 @@ case ${step} in
export is_exclusive=True
;;

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

walltime="00:15:00"
ntasks=$(( layout_x * layout_y * 6 ))
threads_per_task=1
tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
export is_exclusive=True
;;

"analcalc")
walltime="00:15:00"
ntasks=127
Expand Down
31 changes: 31 additions & 0 deletions scripts/exglobal_atmos_analysis_calc_fv3jedi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env python3
# exglobal_atm_calc_analysis.py
# This script creates an CalcAnalysis 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

# Initialize root logger
logger = Logger(level='DEBUG', colored_log=True)


if __name__ == '__main__':

# 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')

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

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

# Finalize
CalcAnl.finalize()
2 changes: 1 addition & 1 deletion sorc/gdas.cd
Submodule gdas.cd updated 101 files
1 change: 1 addition & 0 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ if [[ -d "${HOMEgfs}/sorc/gdas.cd/build" ]]; then
"fv3jedi_plot_field.x" \
"gdasapp_chem_diagb.x" \
"fv3jedi_fv3inc.x" \
"fv3jedi_calcanl.x" \
"gdas_ens_handler.x" \
"gdas_incr_handler.x" \
"gdas_obsprovider2ioda.x" \
Expand Down
2 changes: 1 addition & 1 deletion sorc/ufs_model.fd
Submodule ufs_model.fd updated 73 files
+1 −1 CDEPS-interface/CDEPS
+0 −3 CDEPS-interface/cdeps_files.cmake
+1 −1 CMEPS-interface/CMEPS
+1 −1 FV3
+1 −1 MOM6-interface/MOM6
+5 −12 build.sh
+1 −1 tests/bl_date.conf
+8 −10 tests/ci/Jenkinsfile.combined
+2 −8 tests/compile.sh
+5 −4 tests/default_vars.sh
+3 −0 tests/error-test.conf
+2 −4 tests/fv3_conf/cpld_docn_dice.IN
+31 −31 tests/logs/OpnReqTests_control_p8_hera.log
+87 −79 tests/logs/OpnReqTests_cpld_control_nowave_noaero_p8_hera.log
+15 −15 tests/logs/OpnReqTests_regional_control_hera.log
+263 −340 tests/logs/RegressionTests_acorn.log
+278 −278 tests/logs/RegressionTests_derecho.log
+278 −278 tests/logs/RegressionTests_gaea.log
+367 −422 tests/logs/RegressionTests_hera.log
+371 −372 tests/logs/RegressionTests_hercules.log
+247 −247 tests/logs/RegressionTests_jet.log
+277 −277 tests/logs/RegressionTests_orion.log
+256 −254 tests/logs/RegressionTests_wcoss2.log
+1 −0 tests/parm/control.nml.IN
+1 −0 tests/parm/control_ca.nml.IN
+1 −0 tests/parm/control_csawmg.nml.IN
+1 −0 tests/parm/control_flake.nml.IN
+1 −1 tests/parm/control_gdas.nml.IN
+1 −0 tests/parm/control_gfsv17.nml.IN
+1 −0 tests/parm/control_noahmp.nml.IN
+1 −0 tests/parm/csawmg3shoc127.nml.IN
+1 −0 tests/parm/csawmgshoc.nml.IN
+1 −1 tests/parm/datm.streams.IN
+1 −0 tests/parm/global_control.nml.IN
+1 −0 tests/parm/input_global_hafs.nml.IN
+1 −0 tests/parm/input_global_nest.nml.IN
+1 −0 tests/parm/input_global_parent.nml.IN
+1 −0 tests/parm/input_nest02.nml.IN
+1 −0 tests/parm/input_nest_hafs.nml.IN
+1 −0 tests/parm/input_regional_hafs.nml.IN
+1 −0 tests/parm/rap.nml.IN
+1 −0 tests/parm/regional.nml.IN
+1 −0 tests/parm/regional_atmaq.nml.IN
+1 −0 tests/parm/regional_rrfs_a.nml.IN
+1 −0 tests/parm/regional_wofs.nml.IN
+1 −0 tests/parm/rrfs_conus13km_hrrr.nml.IN
+14 −4 tests/parm/ufs.configure.s2s_esmf.IN
+1 −0 tests/parm/wam_v17.nml.IN
+0 −5 tests/rt.conf
+1 −0 tests/rt.sh
+40 −161 tests/rt_utils.sh
+10 −1 tests/run_compile.sh
+128 −16 tests/run_test.sh
+1 −116 tests/test_changes.list
+4 −0 tests/tests/control_c48.v2.sfc_timeout
+2 −2 tests/tests/datm_cdeps_3072x1536_cfsr
+1 −1 tests/tests/datm_cdeps_bulk_cfsr
+3 −3 tests/tests/datm_cdeps_bulk_gefs
+1 −1 tests/tests/datm_cdeps_ciceC_cfsr
+1 −1 tests/tests/datm_cdeps_control_cfsr
+1 −1 tests/tests/datm_cdeps_control_cfsr_faster
+3 −3 tests/tests/datm_cdeps_control_gefs
+1 −1 tests/tests/datm_cdeps_debug_cfsr
+3 −3 tests/tests/datm_cdeps_gfs
+3 −3 tests/tests/datm_cdeps_iau_gefs
+1 −1 tests/tests/datm_cdeps_multiple_files_cfsr
+1 −1 tests/tests/datm_cdeps_mx025_cfsr
+3 −3 tests/tests/datm_cdeps_mx025_gefs
+1 −1 tests/tests/datm_cdeps_restart_cfsr
+3 −3 tests/tests/datm_cdeps_stochy_gefs
+0 −45 tests/tests/regional_ifi_2threads
+0 −45 tests/tests/regional_ifi_control
+0 −45 tests/tests/regional_ifi_decomp
13 changes: 11 additions & 2 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ FV3_postdet() {
read_increment=".true."
res_latlon_dynamics="atminc.nc"
fi
increment_file_on_native_grid=".false."
local increment_file
for inc_file in "${inc_files[@]}"; do
increment_file="${COMIN_ATMOS_INPUT}/${RUN}.t${cyc}z.${inc_file}"
Expand Down Expand Up @@ -158,9 +159,16 @@ EOF
delimiter=","
done
else # "${DOIAU}" == "NO"
inc_files=("atminc.nc")
read_increment=".true."
res_latlon_dynamics="atminc.nc"
if [[ "${DO_JEDIATMVAR:-NO}" == "YES" ]]; then
inc_files=("atminc.tile1.nc" "atminc.tile2.nc" "atminc.tile3.nc" "atminc.tile4.nc" "atminc.tile5.nc" "atminc.tile6.nc")
res_latlon_dynamics="atminc"
increment_file_on_native_grid=".true."
else
inc_files=("atminc.nc")
res_latlon_dynamics="atminc.nc"
increment_file_on_native_grid=".false."
fi
if [[ "${REPLAY_ICS:-NO}" == "YES" ]]; then
IAU_FHROT=${half_window} # Replay ICs start at the end of the assimilation window
# Control member has no perturbation
Expand All @@ -169,6 +177,7 @@ EOF
read_increment=".false."
res_latlon_dynamics='""'
fi
increment_file_on_native_grid=".false."
fi
fi

Expand Down
1 change: 1 addition & 0 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ FV3_predet(){
warm_start=".false."
read_increment=".false."
res_latlon_dynamics='""'
increment_file_on_native_grid=".true."

# Stochastic Physics Options
do_skeb=".false."
Expand Down
1 change: 1 addition & 0 deletions ush/parsing_namelists_FV3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ cat > input.nml <<EOF
agrid_vel_rst = ${agrid_vel_rst:-".true."}
read_increment = ${read_increment}
res_latlon_dynamics = ${res_latlon_dynamics}
increment_file_on_native_grid = ${increment_file_on_native_grid}
${fv_core_nml-}
/
Expand Down
1 change: 1 addition & 0 deletions ush/python/pygfs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .task.aero_bmatrix import AerosolBMatrix
from .task.atm_analysis import AtmAnalysis
from .task.atmens_analysis import AtmEnsAnalysis
from .task.calcanl import CalcAnalysis
from .task.marine_bmat import MarineBMat
from .task.snow_analysis import SnowAnalysis
from .task.snowens_analysis import SnowEnsAnalysis
Expand Down
Loading
Loading