Skip to content
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
aa7db2e
start of an ecflow def
CoryMartin-NOAA Nov 14, 2025
d370bba
touch a lot of empty ecflow scripts
CoryMartin-NOAA Nov 14, 2025
dbb6ceb
load modules in ecflow scripts
CoryMartin-NOAA Nov 14, 2025
e84b9f3
add prepare obs placeholder
CoryMartin-NOAA Nov 14, 2025
564fc2e
Add gcdas post and other cycles to suite definition file
CoryMartin-NOAA Nov 14, 2025
279030f
End of day commit
CoryMartin-NOAA Nov 14, 2025
48b8553
add gcdas post
CoryMartin-NOAA Nov 17, 2025
4c3ed57
Add in gcafs cycles
CoryMartin-NOAA Nov 17, 2025
c9d5fd8
fix bugs
CoryMartin-NOAA Nov 17, 2025
82ec40c
Merge remote-tracking branch 'origin/develop' into feature/gcafs-ecflow
CoryMartin-NOAA Nov 17, 2025
4171f5c
checkout release branch of gdas
CoryMartin-NOAA Nov 17, 2025
560774d
add obs processing stuff to workflow; still needs work
CoryMartin-NOAA Nov 17, 2025
8dba0c2
update hash
CoryMartin-NOAA Nov 18, 2025
187b63b
update to try on cactus
CoryMartin-NOAA Nov 18, 2025
913581b
fix link_workflow
CoryMartin-NOAA Nov 18, 2025
5383ed6
Add expdir
CoryMartin-NOAA Nov 18, 2025
ab5f856
Merge branch 'NOAA-EMC:develop' into release/gcafs.v0.0.1
CoryMartin-NOAA Nov 19, 2025
b1a9845
Merge branch 'NOAA-EMC:develop' into feature/gcafs-ecflow
CoryMartin-NOAA Nov 19, 2025
87e333f
add some things
CoryMartin-NOAA Nov 19, 2025
20d1501
Merge branch 'feature/gcafs-ecflow' into release/gcafs.v0.0.1
CoryMartin-NOAA Nov 19, 2025
27455f5
Add EOL
CoryMartin-NOAA Nov 19, 2025
40f8bd0
More ecflow changes
CoryMartin-NOAA Nov 21, 2025
f724aaa
more ecflow
CoryMartin-NOAA Nov 21, 2025
03fa9ed
Merge branch 'NOAA-EMC:develop' into feature/gcafs-ecflow
CoryMartin-NOAA Nov 21, 2025
0b89f40
More ecflow changes
CoryMartin-NOAA Nov 21, 2025
fc1624e
more ecflow
CoryMartin-NOAA Nov 21, 2025
c3a9fa4
Merge branch 'feature/gcafs-ecflow' of https://github.com/corymartin-…
CoryMartin-NOAA Nov 21, 2025
45014cb
Merge branch 'develop' into release/gcafs.v0.0.1
CoryMartin-NOAA Nov 21, 2025
e440de0
remove script with annoying code norms
CoryMartin-NOAA Nov 21, 2025
4b8013d
fix issues in suite def file
Nov 21, 2025
eb0da6c
fix issues in suite def file
Nov 21, 2025
2632a3f
update gdas hash
CoryMartin-NOAA Nov 24, 2025
72f403e
add start to setup script
CoryMartin-NOAA Nov 24, 2025
6c1bfa1
save before meetings
CoryMartin-NOAA Nov 24, 2025
955f4ed
commit progress
CoryMartin-NOAA Nov 25, 2025
a97531a
Merge branch 'develop' into feature/gcafs-ecflow
CoryMartin-NOAA Dec 1, 2025
639e7f1
Merge branch 'develop' into release/gcafs.v0.0.1
CoryMartin-NOAA Dec 1, 2025
c8c6e40
Merge branch 'feature/gcafs-ecflow' into release/gcafs.v0.0.1
CoryMartin-NOAA Dec 1, 2025
db4aa13
Merge branch 'develop' into feature/gcafs-ecflow
CoryMartin-NOAA Dec 9, 2025
6416270
Script copies jobs and scripts
CoryMartin-NOAA Dec 9, 2025
537d6ea
Save script
CoryMartin-NOAA Dec 9, 2025
95602fb
Merge branch 'feature/gcafs-ecflow' into release/gcafs.v0.0.1
CoryMartin-NOAA Dec 10, 2025
8c6a176
Merge branch 'dev/gcafs.v1' into release/gcafs.v0.0.1
CoryMartin-NOAA Jan 26, 2026
27bb94d
Update dev/jobs/JGCDAS_PREPARE_OBS
CoryMartin-NOAA Jan 26, 2026
8083a05
Update dev/jobs/JGCDAS_PREPARE_OBS
CoryMartin-NOAA Jan 26, 2026
5e892c7
Update dev/jobs/JGCDAS_PREPARE_OBS
CoryMartin-NOAA Jan 26, 2026
dcb20fb
remove module loads
CoryMartin-NOAA Jan 26, 2026
3e1c671
Merge branch 'feature/more-ecflow' of https://github.com/corymartin-n…
CoryMartin-NOAA Jan 26, 2026
c1bbb8b
remove modules from prepare obs
Jan 26, 2026
7b8ef54
modify ush directory
CoryMartin-NOAA Jan 26, 2026
e0d2bdf
smarter script
CoryMartin-NOAA Jan 26, 2026
862aff7
add support for new job
CoryMartin-NOAA Jan 26, 2026
52bb5f4
change parm config too
CoryMartin-NOAA Jan 26, 2026
5e80bd3
change dev scripts
CoryMartin-NOAA Jan 26, 2026
f201195
more changes
CoryMartin-NOAA Jan 26, 2026
e308073
add parm/config/gcafs
Jan 26, 2026
ba266af
update sdf
Jan 26, 2026
f4c117a
changes for ecf
CoryMartin-NOAA Jan 27, 2026
de1feb6
para not prod
Jan 27, 2026
90adcdc
commit some things
Jan 27, 2026
a95080a
copy ex script
CoryMartin-NOAA Jan 27, 2026
2aaa2fd
load python modules
CoryMartin-NOAA Jan 27, 2026
1dcf75a
more changes
CoryMartin-NOAA Jan 27, 2026
231c04e
more changes again
CoryMartin-NOAA Jan 27, 2026
e543ab7
modify ecf scripts
CoryMartin-NOAA Jan 27, 2026
ff140ee
more modulefile changes
Jan 27, 2026
79d8fc9
more replacements
CoryMartin-NOAA Jan 27, 2026
b1f7975
more fault tolerant on replacements
CoryMartin-NOAA Jan 27, 2026
86a516a
fix more modules
Jan 27, 2026
fcb76be
end of day commit
CoryMartin-NOAA Jan 27, 2026
07f2536
Add more functionality to the script
CoryMartin-NOAA Jan 28, 2026
d45bbfa
add EXPDIR
CoryMartin-NOAA Jan 28, 2026
2d3b8b2
sh to py
CoryMartin-NOAA Jan 28, 2026
cc5ae0c
update resources
CoryMartin-NOAA Jan 28, 2026
a281f63
add some scripts
Jan 28, 2026
c91a6ca
Merge branch 'feature/more-ecflow' of https://github.com/corymartin-n…
Jan 28, 2026
8e9e320
Merge branch 'feature/more-ecflow' of https://github.com/corymartin-n…
CoryMartin-NOAA Jan 28, 2026
73c5f18
more ecf module changes
CoryMartin-NOAA Jan 28, 2026
bdb8923
more hacks
CoryMartin-NOAA Jan 28, 2026
f07a7b2
rename j-job
CoryMartin-NOAA Jan 28, 2026
464dc14
rename back to gdas.cd
CoryMartin-NOAA Jan 29, 2026
54ff3d2
gcdas back to gdas
Jan 29, 2026
676c44c
update hash
CoryMartin-NOAA Jan 29, 2026
80478e1
Merge branch 'feature/more-ecflow' of https://github.com/corymartin-n…
CoryMartin-NOAA Jan 29, 2026
c7863e5
update setup script
CoryMartin-NOAA Jan 30, 2026
b5bc5b7
more small changes
CoryMartin-NOAA Jan 30, 2026
231d08c
some aod prep obs changes
CoryMartin-NOAA Jan 30, 2026
b7c96de
fix regex
CoryMartin-NOAA Jan 30, 2026
4046113
changes for more jobs to run
CoryMartin-NOAA Jan 30, 2026
5cc3b53
fix style
CoryMartin-NOAA Feb 2, 2026
a488fe1
actually fix style
CoryMartin-NOAA Feb 2, 2026
0f20d5c
Apply suggestions from code review
CoryMartin-NOAA Feb 2, 2026
ed62a68
change to using wxflow executable
CoryMartin-NOAA Feb 2, 2026
0e88c37
Merge branch 'feature/more-ecflow' of https://github.com/corymartin-n…
CoryMartin-NOAA Feb 2, 2026
27e4f4f
Addressed comments, STILL NEEDS TESTED, USER BEWARE
CoryMartin-NOAA Feb 3, 2026
9b94a19
Update dev/jobs/JGLOBAL_OFFLINE_ATMOS_ANALYSIS
CoryMartin-NOAA Feb 3, 2026
bbc0b75
fixed a typo
CoryMartin-NOAA Feb 3, 2026
bad8284
fixes for prep_emissions NRT (#12)
bbakernoaa Feb 3, 2026
076bc71
Fix typo in logger usage
CoryMartin-NOAA Feb 4, 2026
a9d52b5
Update GFS template path in config.com
CoryMartin-NOAA Feb 4, 2026
21cb379
Update environment variable declarations in JGLOBAL_OFFLINE_ATMOS_ANA…
CoryMartin-NOAA Feb 4, 2026
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
43 changes: 43 additions & 0 deletions dev/jobs/JGCDAS_PREPARE_OBS
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#! /usr/bin/env bash

source "${HOMEgcafs}/ush/preamble.sh"
source "${HOMEgcafs}/ush/jjob_header.sh" -e "prepareobs" -c "base prepareobs"

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

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

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

EXSCRIPT=${DUMPAODPY:-${HOMEgcafs}/scripts/exgcdas_prepare_obs.py}
${EXSCRIPT}
status=$?
if [[ ${status} -ne 0 ]]; then
exit "${status}"
fi

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

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

##########################################
# Remove the Temporary working directory
##########################################
cd "${DATAROOT}" || exit
if [[ "${KEEPDATA}" == "NO" ]]; then
rm -rf "${DATA}"
fi

exit 0
9 changes: 9 additions & 0 deletions dev/parm/config/gcafs/config.prepareobs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -x

########## config.prepareobs ##########

echo "BEGIN: config.prepareobs"

# Get task specific resources
source "${EXPDIR}/config.resources" prepareobs
echo "END: config.prepareobs"
10 changes: 10 additions & 0 deletions dev/parm/config/gcafs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ if (( $# != 1 )); then
echo "snowanl esnowanl"
echo "prep_emissions"
echo "aeroanlinit aeroanlvar aeroanlfinal aeroanlgenb"
echo "prepareobs"
echo "offlineanl"
echo "anal sfcanl analcalc analdiag anlstat fcst echgres"
echo "upp atmos_products"
Expand Down Expand Up @@ -363,6 +364,15 @@ case ${step} in
tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
;;

"prepareobs")
ntasks=80
walltime="00:20:00"
threads_per_task=1
tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
memory="3072M"
;;


"aeroanlinit")
# below lines are for creating JEDI YAML
case "${CASE}" in
Expand Down
27 changes: 27 additions & 0 deletions dev/scripts/exgcdas_prepare_obs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python3
# exgcdas_prepare_obs.py
# This script will collect and preprocess
# aerosol optical depth observations for
# global aerosol assimilation
import os

from wxflow import AttrDict, Logger, cast_strdict_as_dtypedict, parse_j2yaml
from pyobsforge.task.aero_prepobs import AerosolObsPrep

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


if __name__ == '__main__':

# Take configuration from environment and cast it as python dictionary
config_env = cast_strdict_as_dtypedict(os.environ)
# Take configuration from YAML file to augment/append config dict
config_yaml = parse_j2yaml(os.path.join(config_env['HOMEgcafs'], 'parm', 'chem', 'prepare_obs.yaml'), config_env)
# Combine configs together
config = AttrDict(**config_env, **config_yaml['aoddump'])

aeroObs = AerosolObsPrep(config)
aeroObs.initialize()
aeroObs.execute()
aeroObs.finalize()
38 changes: 38 additions & 0 deletions dev/ush/setup_gcafs_for_nco.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,44 @@ def setup_gcafs_for_nco():
num_replacements = replace_gfs_with_gcafs(file_path)
print(f"Modified {file_path}: {num_replacements} replacements made.")

# Go through the ush directory and replace FOOgfs with FOOgcafs in all scripts
ush_dir = os.path.join(global_workflow_dir, 'ush')
for root, _, files in os.walk(ush_dir):
for file in files:
# Only process .sh and .py files
if file.endswith(('.sh', '.py')):
file_path = os.path.join(root, file)
num_replacements = replace_gfs_with_gcafs(file_path)
if num_replacements > 0:
print(f"Modified {file_path}: {num_replacements} replacements made.")

# Go through the dev/ush and dev/workflow directories and replace FOOgfs with FOOgcafs in all scripts
# and YAMLs in dev/ci/cases
for subdir in ['dev/ush', 'dev/workflow', 'dev/ci/cases']:
dir_path = os.path.join(global_workflow_dir, subdir)
for root, _, files in os.walk(dir_path):
for file in files:
# Skip the current script to avoid self-modification
if file == 'setup_gcafs_for_nco.py':
continue
# Only process .sh and .py scripts and YAML files
if file.endswith(('.sh', '.py', '.yaml')):
file_path = os.path.join(root, file)
num_replacements = replace_gfs_with_gcafs(file_path)
if num_replacements > 0:
print(f"Modified {file_path}: {num_replacements} replacements made.")

# Go through the dev/parm/config/gcafs directory and replace FOOgfs with FOOgcafs in all config files
config_gcafs_dir = os.path.join(global_workflow_dir, 'dev', 'parm', 'config', 'gcafs')
for root, _, files in os.walk(config_gcafs_dir):
for file in files:
# Only process config files
if file.startswith('config.'):
file_path = os.path.join(root, file)
num_replacements = replace_gfs_with_gcafs(file_path)
if num_replacements > 0:
print(f"Modified {file_path}: {num_replacements} replacements made.")


if __name__ == "__main__":
setup_gcafs_for_nco()
8 changes: 6 additions & 2 deletions ecf/defs/gcafs_v1.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ suite gcafs_v1
edit QUEUE_ARCH 'dev_transfer'
edit PROJENVIR 'DEV'
edit MACHINE_SITE 'development'
edit ENVIR 'prod'
edit EXPDIR '%PACKAGEHOME%/dev/parm/config/gcafs'
edit ENVIR 'para'
edit EXPDIR '%PACKAGEHOME%/parm/config/gcafs'
edit COMROOT '/lfs/h2/emc/ptmp/cory.r.martin/gcafs/com'
edit DATAROOT '/lfs/h2/emc/ptmp/cory.r.martin/gcafs/dataroot'
edit ECF_INCLUDE '/lfs/h2/emc/da/noscrub/cory.r.martin/gcafs/git/release/gcafs.v1.0.0/ecf/include'
edit PDY '20260127'
family 00
edit CYC '00'
family gcafs
Expand Down
7 changes: 7 additions & 0 deletions ecf/include/head.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
echo "HELLO CRM"
date
hostname
set -xe # print commands as they are executed and enable signal trapping
Expand Down Expand Up @@ -59,6 +60,12 @@ if [ -d /apps/ops/prod ]; then # On WCOSS2
echo "Listing modules from head.h:"
module list
set -x
if [[ ! " ops.prod ops.para " =~ " $(whoami) " ]]; then
echo "Allow over-riding defaults for developers"
if [ -n "%COMROOT:%" ]; then export COMROOT="%COMROOT:%"; fi
if [ -n "%DATAROOT:%" ]; then export DATAROOT="%DATAROOT:%"; fi
if [ -n "%DCOMROOT:%" ]; then export DCOMROOT="%DCOMROOT:%"; fi
fi
fi

timeout 300 ecflow_client --init=${ECF_RID}
Expand Down
85 changes: 4 additions & 81 deletions ecf/scripts/gcdas/chem/analysis/jgcdas_prepare_obs.ecf
Original file line number Diff line number Diff line change
Expand Up @@ -32,91 +32,13 @@ module use /apps/ops/test/spack-stack-nco-1.9/modulefiles/Core
module load stack-oneapi/2024.2.1
module load stack-cray-mpich/8.1.29
module load stack-python/3.11.7
module load cmake/3.27.9
module load craype/2.7.17
module load cray-pals/1.3.2

module load git/2.47.0
module load git-lfs/3.5.1

module load zstd/1.5.6
module load pigz/2.8
module load tar/1.34
module load gettext/0.22.5
module load curl/8.10.1
module load hdf5/1.14.3
module load parallel-netcdf/1.12.3
module load netcdf-c/4.9.2
module load nccmp/1.9.0.1
module load netcdf-fortran/4.6.1
module load nco/5.2.4
module load parallelio/2.6.2
module load wget/1.21.1
module load boost/1.84.0
module load ecbuild/3.7.2
module load eccodes/2.33.0
module load eigen/3.4.0
module load openblas/0.3.24
module load eckit/1.28.3
module load fckit/0.13.2
module load fms/2024.02
module load python-venv/1.0
module load py-pyyaml/6.0.2
module load intel-oneapi-runtime/2024.2.1
module load glibc/2.31
module load esmf/8.8.0
module load atlas/0.40.0
module load sp/2.5.0
module load ip/5.1.0
module load gsl-lite/0.37.0
module load libjpeg/2.1.0
module load krb5/1.21.1-1
module load libtirpc/1.3.3
module load hdf/4.2.15
module load jedi-cmake/1.4.0
module load libpng/1.6.37
module load libxt/1.3.0
module load libxmu/1.2.1
module load libxpm/3.5.17
module load libxaw/1.0.16
module load udunits/2.2.28
module load ncview/2.1.9
module load netcdf-cxx4/4.3.1
module load json/3.11.3
#module load crtm/v2.4_jedi
module load prod_util/2.0.14
module load grib-util/1.4.0

module load py-numpy/1.26.4
module load bufr/12.1.0

module load py-markupsafe/2.1.3
module load py-jinja2/3.1.4
module load py-cftime/1.0.3.4
module load py-certifi/2023.7.22
module load py-netcdf4/1.7.1.post2
module load py-pybind11/2.13.5
module load py-setuptools/63.4.3
module load py-pycodestyle/2.11.0
module load py-pyyaml/6.0.2
module load py-scipy/1.14.1

module load py-setuptools/63.4.3
module load py-tzdata/2023.3
module load py-pytz/2023.3
module load py-six/1.16.0
module load py-python-dateutil/2.8.2
module load py-pandas/2.2.3
module load py-packaging/24.1
module load py-xarray/2024.7.0
module load py-f90nml/1.4.3
module load py-pip/23.1.2
module load py-click/8.1.7
module load py-wheel/0.41.2

ncdump=$(command -v ncdump)
NETCDF=$(echo "${ncdump}" | cut -d " " -f 3)
export NETCDF
#ncdump=$(command -v ncdump)
#NETCDF=$(echo "${ncdump}" | cut -d " " -f 3)
#export NETCDF

module list

Expand All @@ -125,6 +47,7 @@ module list
#############################################################
export cyc=%CYC%
export cycle=t%CYC%z
export EXPDIR=%EXPDIR%

if [[ -d "${HOMEgcafs}/sorc/wxflow/src" ]]; then
PYTHONPATH="${HOMEgcafs}/sorc/wxflow/src${PYTHONPATH:+:${PYTHONPATH}}"
Expand Down
9 changes: 9 additions & 0 deletions parm/chem/prepare_obs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
aoddump:
provider: VIIRSAOD
platforms: ['npp', 'j01', 'n21'] # note j01==n20
binning_stride: 33
binning_min_number_of_obs: 32
binning_cressman_radius: 25
thinning_threshold: 0
channel: 4
preqc: 0
Loading
Loading