Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
f071994
change noaacloud NodeName
weihuang-jedi Feb 25, 2025
11accd8
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Feb 26, 2025
a4771df
add download fix subset data, also serve as a test PR to trigger CI t…
weihuang-jedi Feb 26, 2025
4f1e679
fix pynorm error
weihuang-jedi Feb 26, 2025
2241227
fix pynorm error 2
weihuang-jedi Feb 26, 2025
9679617
fix pynorm error3
weihuang-jedi Feb 26, 2025
fe88751
fix pynorm error 4
weihuang-jedi Feb 26, 2025
0284fb7
fix pynorm error 5
weihuang-jedi Feb 26, 2025
27ca2f1
fix pynorm error 6
weihuang-jedi Feb 26, 2025
f39bfd9
fix pynorm error 7
weihuang-jedi Feb 27, 2025
8f7fc23
fix pynorm error 8
weihuang-jedi Feb 27, 2025
c248e12
fix pynorm error 9
weihuang-jedi Feb 27, 2025
85120f3
fix pynorm error 10
weihuang-jedi Feb 27, 2025
2a7f1c9
fix a syntax error
weihuang-jedi Feb 27, 2025
9f8ee2d
use just /lutre/jenkins for CI testing work directory
weihuang-jedi Feb 27, 2025
fbeb220
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Feb 28, 2025
df4179c
using argparse and logging instead of getopt and print
weihuang-jedi Mar 3, 2025
6a168ae
using argparse and logging instead of getopt and print
weihuang-jedi Mar 3, 2025
a23662f
Updating with proper nomenclature.
kbooker79 Mar 3, 2025
3c223cf
Merge pull request #5 from NOAA-EPIC/download-subset-fix-data
kbooker79 Mar 3, 2025
6b60421
consist with Terry's code
weihuang-jedi Mar 3, 2025
35f35f2
add a ls command to make sure code in cloned
weihuang-jedi Mar 3, 2025
9e53aa4
try clone the code directly
weihuang-jedi Mar 3, 2025
98c50d9
use https to clone
weihuang-jedi Mar 3, 2025
b4c507f
Merge branch 'NOAA-EMC:develop' into develop
weihuang-jedi Mar 4, 2025
3089f00
add more debug ls
weihuang-jedi Mar 4, 2025
57b2a51
fix a typo
weihuang-jedi Mar 4, 2025
8fefe2a
remove 2 comments
weihuang-jedi Mar 4, 2025
8f6db95
reset HOMEgfs
weihuang-jedi Mar 4, 2025
1f05a51
compile for gfs only for now
weihuang-jedi Mar 4, 2025
4640b6a
comment gh pr eidt for now
weihuang-jedi Mar 5, 2025
c906547
skip CI on AWS
weihuang-jedi Mar 5, 2025
eac272e
trying to fix runtime bug
weihuang-jedi Mar 5, 2025
35a6cd0
still trying to figure out HOEgfs issue
weihuang-jedi Mar 5, 2025
b55f4a1
add compile gefs
weihuang-jedi Mar 5, 2025
e1724cb
add compile gefs
weihuang-jedi Mar 5, 2025
4264c15
add compile gefs
weihuang-jedi Mar 5, 2025
20c1211
switch back to 'checkout scm instead of git clone'
weihuang-jedi Mar 11, 2025
f8a6a6d
using checkout scm
weihuang-jedi Mar 12, 2025
c952a73
using checkout scm
weihuang-jedi Mar 12, 2025
12b09df
remove memory from resource if on AWS
weihuang-jedi Mar 13, 2025
98570b7
remove memory requirement for AWS
weihuang-jedi Mar 13, 2025
2039132
Merge branch 'NOAA-EMC:develop' into develop
weihuang-jedi Mar 16, 2025
e4fe644
sync
weihuang-jedi Mar 18, 2025
c83e940
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Apr 9, 2025
475b44f
add container
weihuang-jedi Apr 10, 2025
49b0a87
add container to link_workflow.sh
weihuang-jedi Apr 11, 2025
d862910
changes for container, module reset, and machine-id over-write
weihuang-jedi Apr 14, 2025
d493152
sync
weihuang-jedi May 2, 2025
83d48d7
sync
weihuang-jedi May 5, 2025
a95789e
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi May 5, 2025
94a4ffa
add more for container
weihuang-jedi May 6, 2025
668b3a8
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi May 6, 2025
cc2cb49
Merge branch 'use_container_stack-stack-1.6.0' of ssh://github.com/NO…
weihuang-jedi May 6, 2025
342d67d
sync
weihuang-jedi May 7, 2025
5281e0b
trying run in container
weihuang-jedi May 7, 2025
18e7fde
sync with use_container_stack-stack-1.6.0
weihuang-jedi May 7, 2025
12c95ad
use EPIC container branch
weihuang-jedi May 8, 2025
def6882
run on hera with container
weihuang-jedi May 14, 2025
0d04e51
add run_gfs_model.sh script
weihuang-jedi May 14, 2025
7feb8e0
sync
weihuang-jedi May 16, 2025
0fd25c0
use wgrib2 from container
weihuang-jedi May 20, 2025
c3866ac
using python for stage-ic
weihuang-jedi May 21, 2025
4773dcc
ursa changes
weihuang-jedi May 21, 2025
8d226ea
for ursa
weihuang-jedi May 22, 2025
b9ecb10
sync
weihuang-jedi May 27, 2025
60b7782
sync with container changes
weihuang-jedi May 28, 2025
b57bdb6
create bin dir
weihuang-jedi May 28, 2025
856fb2b
add run_python and run_wgrib2 to use python and wgrib2 from container
weihuang-jedi May 29, 2025
dd257aa
stage-ic ok on AWS
weihuang-jedi May 30, 2025
a7f8d13
ad-hoc work around to run container GW on Ursa to demo that only roco…
weihuang-jedi Jun 2, 2025
7402ec5
on gaea
weihuang-jedi Jun 2, 2025
37d0faa
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Jun 2, 2025
9a450a1
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Jun 2, 2025
1e218f9
prepare ursa demo
weihuang-jedi Jun 3, 2025
ca63cf1
working on demo
weihuang-jedi Jun 5, 2025
7b841cd
working on demo
weihuang-jedi Jun 5, 2025
e62a6a8
sync with develop
weihuang-jedi Jun 12, 2025
6ec552f
for GW run with container on gaeac6
weihuang-jedi Jun 14, 2025
ba9a01c
Merge branch 'NOAA-EMC:develop' into feature/container-on-ursa-readonly
weihuang-jedi Jun 15, 2025
fa132ab
generalize container setup on ursa
weihuang-jedi Jun 16, 2025
81ec75f
sync
weihuang-jedi Jun 16, 2025
11bce6d
create a directory dev/container to hold container code
weihuang-jedi Jun 20, 2025
11d1d98
pull ursa changes in
weihuang-jedi Jun 25, 2025
d6f5283
sync with ursa
weihuang-jedi Jun 25, 2025
ccbdb97
sync with ursa
weihuang-jedi Jun 25, 2025
8b27108
merge in ursa changes
weihuang-jedi Jun 25, 2025
4137587
gaea changes
weihuang-jedi Jun 26, 2025
52f4cb3
testing on AWS
weihuang-jedi Jun 27, 2025
2d0d808
sync with dev
weihuang-jedi Jun 27, 2025
958bb9c
add note for multiple nodes run on AWS
weihuang-jedi Jun 27, 2025
00bd88b
sync with dev
weihuang-jedi Jun 27, 2025
e6f437c
sync with aws changes
weihuang-jedi Jun 27, 2025
a7f4dff
wants to run with or without container on AWS
weihuang-jedi Jul 1, 2025
3664c84
Merge branch 'NOAA-EMC:develop' into feature/container-on-AWS
weihuang-jedi Jul 1, 2025
682b8d5
sync and remove extra code
weihuang-jedi Jul 1, 2025
92dedd2
retest
weihuang-jedi Jul 2, 2025
1f19ab7
before merge AWS changes
weihuang-jedi Jul 3, 2025
52774de
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Jul 3, 2025
c9c7f9f
sync with AWS
weihuang-jedi Jul 3, 2025
60039dc
change for atmos products on gaea
weihuang-jedi Jul 15, 2025
777ac7b
sync
weihuang-jedi Jul 15, 2025
e19a65e
add highmemory partition for atmos products
weihuang-jedi Jul 16, 2025
8141155
testing on gaezc6
weihuang-jedi Jul 17, 2025
1e07a0c
fix wgrib2 file location error
weihuang-jedi Jul 17, 2025
ca3d4ba
sync
weihuang-jedi Jul 23, 2025
12cf63f
sync
weihuang-jedi Jul 23, 2025
cbc380b
update to ss-1.9.1
weihuang-jedi Jul 24, 2025
c0dd64a
re-test
weihuang-jedi Jul 25, 2025
e51fbd2
re-test on AWS
weihuang-jedi Jul 25, 2025
a220369
update wgrib2 to 3.6.0 and make shell script executable
weihuang-jedi Jul 28, 2025
0a6dba3
update atmos_produts
weihuang-jedi Aug 4, 2025
d197f95
direct use interp_atmos_master[sflux]
weihuang-jedi Aug 20, 2025
769e042
sync 2 develop
weihuang-jedi Aug 20, 2025
d2f255f
trying to make ss192 container working on AWS
weihuang-jedi Aug 20, 2025
5814ef9
run check_land_input_orography.py using container python, if run with…
weihuang-jedi Aug 21, 2025
d797607
detect container
weihuang-jedi Aug 21, 2025
340aeae
resolve conflict for merge ursa to ss192
weihuang-jedi Aug 21, 2025
8545b9f
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Aug 21, 2025
1f5a539
Merge branch 'develop' into feature/use_container_spack-stack-1.9.2
weihuang-jedi Aug 22, 2025
4fc22a9
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Aug 22, 2025
7077d1a
testing on ursa
weihuang-jedi Aug 22, 2025
8bdcbe0
testing on ursa
weihuang-jedi Aug 22, 2025
bbb8e63
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Aug 25, 2025
dfd1efe
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Aug 25, 2025
3c1603a
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Aug 26, 2025
7ced447
sync with emc repo
weihuang-jedi Aug 26, 2025
629ef7d
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Aug 26, 2025
cec1523
remove duplicated scripts
weihuang-jedi Aug 26, 2025
5e351a5
ursa to ss192
weihuang-jedi Aug 30, 2025
3f99898
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Aug 30, 2025
98c1e12
testing on ursa
weihuang-jedi Sep 2, 2025
5c3a0f3
Merge branch 'feature/use_container_spack-stack-1.9.2' of github.com:…
weihuang-jedi Sep 2, 2025
38670a3
testing on ursa
weihuang-jedi Sep 2, 2025
74353f3
Merge branch 'develop' of github.com:NOAA-EPIC/global-workflow-cloud …
weihuang-jedi Sep 2, 2025
699a4d2
Merge branch 'feature/use_container_spack-stack-1.9.2' of github.com:…
weihuang-jedi Sep 3, 2025
79a3037
upper level need to detect machine as well
weihuang-jedi Sep 3, 2025
42f2580
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Sep 3, 2025
0bfa75b
Merge branch 'feature/use_container_spack-stack-1.9.2' of github.com:…
weihuang-jedi Sep 3, 2025
81a5a53
C48_ATM containerized GW worked on Ursa with ss192
weihuang-jedi Sep 3, 2025
b4580de
testing c48-s2sw on ursa
weihuang-jedi Sep 3, 2025
12ea104
sync with ursa
weihuang-jedi Sep 3, 2025
99c08a3
more test on ursa for gefs
weihuang-jedi Sep 4, 2025
f3ab33b
add machine-id to link_model.sh
weihuang-jedi Sep 4, 2025
9b69fc4
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Sep 4, 2025
003b39b
update CDMBWD to CDMBGWD
weihuang-jedi Sep 5, 2025
11ddfb2
WM using UFSATM instead of FV3
weihuang-jedi Sep 5, 2025
fd711e8
do not need use prod_util from home now
weihuang-jedi Sep 9, 2025
8a00789
add cpfs and cpreq to bash_utils
weihuang-jedi Sep 9, 2025
aab3b8a
remove redundent code
weihuang-jedi Sep 9, 2025
db7855c
remove redundent code
weihuang-jedi Sep 9, 2025
0f5e6b5
add 2 versions files for container
weihuang-jedi Sep 10, 2025
fde2ef2
sync
weihuang-jedi Sep 11, 2025
2e04b65
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Sep 11, 2025
6922c86
simplifying and sync
weihuang-jedi Sep 11, 2025
870a0ea
need to source gw_run env, not just preamble
weihuang-jedi Sep 11, 2025
7349461
change exit code to positive numbers
weihuang-jedi Sep 12, 2025
3e67ee2
Merge branch 'feature/use_container_spack-stack-1.9.2' of github.com:…
weihuang-jedi Sep 12, 2025
26bc3f7
reverse changes
weihuang-jedi Sep 12, 2025
0b8a029
remove wgrib2 from explicit wrapper, and remove commented echo
weihuang-jedi Sep 13, 2025
e39997d
Merge branch 'feature/use_container_spack-stack-1.9.2' of ssh://githu…
weihuang-jedi Sep 13, 2025
c617e8d
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Sep 13, 2025
a6a0ba9
fixing lint shell script check
weihuang-jedi Sep 16, 2025
e1099f6
fixing lint shell script check
weihuang-jedi Sep 16, 2025
9ff1c7e
fixing lint shell script check
weihuang-jedi Sep 16, 2025
6d6d76a
making lint complaint
weihuang-jedi Sep 16, 2025
d581da6
making lint compliant
weihuang-jedi Sep 16, 2025
c193688
making lint compliant
weihuang-jedi Sep 16, 2025
d96672a
update container forecast to use module in container
weihuang-jedi Sep 17, 2025
ff08841
re-test on ursa
weihuang-jedi Sep 17, 2025
66bb7ca
check on aws
weihuang-jedi Sep 18, 2025
fbb8250
sync
weihuang-jedi Sep 23, 2025
2e8c332
re-merge on aws
weihuang-jedi Sep 29, 2025
024f319
Merge remote-tracking branch 'origin/develop' into feature/use_contai…
weihuang-jedi Sep 29, 2025
8166dcf
sync
weihuang-jedi Sep 29, 2025
59c8897
save local change
weihuang-jedi Sep 29, 2025
04ebd5b
remove versions for container, and no host modules for container
weihuang-jedi Sep 30, 2025
66a448e
sync
weihuang-jedi Sep 30, 2025
d7bf8b8
sync
weihuang-jedi Sep 30, 2025
cfa9619
sync
weihuang-jedi Sep 30, 2025
4fc8265
add rocotorun to rocoto_parser
weihuang-jedi Sep 30, 2025
c0d0154
remove unused dir
weihuang-jedi Oct 1, 2025
3b65244
working on aws
weihuang-jedi Oct 1, 2025
2499b30
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Oct 1, 2025
6bb0373
testing on ursa
weihuang-jedi Oct 1, 2025
a8730ec
recover ursa.yaml
weihuang-jedi Oct 1, 2025
2823766
remove config.resources.URSA from sfs
weihuang-jedi Oct 1, 2025
335ae74
need run_mpmd.sh changes
weihuang-jedi Oct 2, 2025
3429ed8
only double quota varaibles
weihuang-jedi Oct 2, 2025
57b7337
only double quota varaibles
weihuang-jedi Oct 2, 2025
810d5d3
update gaeac6, ursa env
weihuang-jedi Oct 6, 2025
7ca20aa
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Oct 6, 2025
4d772f0
reverse to GW repo code, and new way to handle jobs scripts
weihuang-jedi Oct 7, 2025
a9c6644
combine few scripts to decrease numbers
weihuang-jedi Oct 8, 2025
39e6392
fix archive script
weihuang-jedi Oct 8, 2025
5ae3c67
using PYCMD
weihuang-jedi Oct 8, 2025
3132c9b
using PYCMD
weihuang-jedi Oct 8, 2025
7c204eb
sync
weihuang-jedi Oct 9, 2025
b79c4d1
merge develop change in
weihuang-jedi Oct 9, 2025
8d7c082
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Oct 10, 2025
73311d1
add PYCMD
weihuang-jedi Oct 10, 2025
e443224
no need to save to repo, as it is a link
weihuang-jedi Oct 10, 2025
d8678e2
testing on AWS
weihuang-jedi Oct 10, 2025
f86f639
remove env/*.container
weihuang-jedi Oct 13, 2025
55d7262
remove env/*.container
weihuang-jedi Oct 13, 2025
31a09d8
Merge branch 'NOAA-EMC:develop' into feature/use_container_spack-stac…
weihuang-jedi Oct 21, 2025
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ ush/bufr_snocvr_snomad.py
ush/atparse.bash
ush/run_bufr2ioda.py
ush/bufr2ioda_insitu*
ush/container
ush/python/ufsda
ush/python/soca
ush/python/gen_bufr2ioda_json.py
Expand Down
86 changes: 86 additions & 0 deletions dev/container/gen-run-cases.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/bin/bash

set -x

HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )"
source "${HOMEgfs}/ush/detect_machine.sh"

run_with_container="YES"
#run_with_container="NO"

casetype="pr"
#yamllist="C48_ATM"
yamllist="C48_S2SW"
#yamllist="C48_S2SWA_gefs"
#yamllist="C96mx100_S2S"

#casetype=hires
#yamllist="C768_S2SW"

HOMEDIR=${HOMEgfs}
img=ubuntu22.04-intel-ufs-env-v1.9.2.img
if [[ ${MACHINE_ID} = ursa* ]] ; then
container=/scratch3/NCEPDEV/nems/role.epic/containers/${img}
rundir=/scratch3/NAGAPE/epic/${USER}/run
bindings="-B /scratch3 -B /scratch4"
HPC_ACCOUNT=epic

module load rocoto/1.3.7
rocotocmd=$(command -v rocotorun)
elif [[ ${MACHINE_ID} = gaea* ]] ; then
container=/gpfs/f6/scratch/Wei.Huang/container/${img}
rundir=/gpfs/f6/scratch/${USER}/run
bindings="-B /gpfs/f6/scratch -B /ncrc/home1/${USER}"
HPC_ACCOUNT=bil-fire8

rocotocmd=/autofs/ncrc-svm1_home2/Christopher.W.Harrop/rocoto-1.3.7/bin/rocotorun
elif [[ ${MACHINE_ID} = noaacloud* ]] ; then
TOPICDIR=/bucket/global-workflow-shared-data/ICSDIR
container=/contrib/containers/${img}
rundir=/lustre/${USER}/run
bindings="--env \"I_MPI_FABRICS=shm:ofi,I_MPI_DEBUG=6\" -B /apps/slurm/default/lib/libpmi2.so -B /contrib -B /lustre -B /bucket"
#bindings="-B /apps/slurm/default/lib/libpmi2.so -B /contrib -B /lustre -B /bucket"
HPC_ACCOUNT=${USER}

module load rocoto/1.3.7
rocotocmd=$(command -v rocotorun)
fi

set -x

mkdir -p "${rundir}"
mkdir -p "${HOMEDIR}"/exec
mkdir -p "${HOMEDIR}"/ush/container

cd "${HOMEDIR}/dev/workflow" || exit 1

if [[ "${run_with_container}" == "YES" ]]; then
"${HOMEDIR}/dev/container/utils/gen-wrapper.sh" -H "${HOMEDIR}" -c "${container}" -b "${bindings}" -v

TOPICDIR=${TOPICDIR} \
RUNTESTS=${rundir} \
RUNDIRS=${rundir} \
./generate_workflows.sh \
-H "${HOMEDIR}" \
-y "${yamllist}" \
-Y "${HOMEDIR}/dev/ci/cases/${casetype}" \
-A "${HPC_ACCOUNT}" \
-e "${USER}@noaa.gov" \
-r "${rocotocmd}" \
-v -R

"${HOMEDIR}/dev/container/utils/create-atmos-products.sh" -H "${HOMEDIR}" -c "${container}" -b "${bindings}"
"${HOMEDIR}/dev/container/utils/create-container-links.sh" -H "${HOMEDIR}" -c "${container}" -b "${bindings}" -M "${MACHINE_ID}"
else
TOPICDIR=${TOPICDIR} \
RUNTESTS=${rundir} \
RUNDIRS=${rundir} \
./generate_workflows.sh \
-H "${HOMEDIR}" \
-y "${yamllist}" \
-Y "${HOMEDIR}/dev/ci/cases/${casetype}" \
-A "${HPC_ACCOUNT}" \
-e "${USER}@noaa.gov" \
-v
fi

21 changes: 21 additions & 0 deletions dev/container/shell-in-container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -x

HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )"
source "${HOMEgfs}/ush/detect_machine.sh"
sif=ubuntu22.04-intel-ufs-env-v1.9.2.img

if [[ ${MACHINE_ID} = ursa* ]] ; then
img=/scratch3/NCEPDEV/nems/role.epic/containers/${sif}
bindings="-B /scratch3 -B /scratch4"
elif [[ ${MACHINE_ID} = gaea* ]] ; then
img=/gpfs/f6/scratch/${USER}/container/${sif}
bindings="-B /gpfs/f6/scratch -B /ncrc/home1/${USER}"
elif [[ ${MACHINE_ID} = noaacloud* ]] ; then
img=/contrib/containers/${sif}
bindings="-B /contrib -B /lustre -B /bucket"
fi

singularity shell -e ${bindings} "${img}"

Comment thread
weihuang-jedi marked this conversation as resolved.
Dismissed
55 changes: 55 additions & 0 deletions dev/container/utils/create-atmos-products.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

verbose=false

while [[ "$#" -gt 0 ]]; do
case "$1" in
-H|--HOMEgfs)
HOMEgfs="$2"
shift 2
;;
-c|--container)
container="$2"
shift 2
;;
-b|--bindings)
bindings="$2"
shift 2
;;
-v|--verbose)
verbose=true
shift
;;
*)
echo "Unknown option: $1"
exit 1
;;
esac
done

if [[ ! -v HOMEgfs || ! -v container || ! -v bindings ]]; then
echo "Usage: create-container-links.sh -H/--HOMEgfs gw-home-dir -c/--container container-fullpath -b/--bindings list-of-binding-dirs [-v]"
exit 11
fi

if [[ "${verbose}" == "true" ]]; then
echo "Verbose: ${verbose}"
echo "HOMEgfs: ${HOMEgfs}"
echo "container: ${container}"
echo "bindings: ${bindings}"
fi

eap_script="${HOMEgfs}"/exec/exglobal_atmos_products.sh
cat > "${eap_script}" << EOF_ATMOS_PRODUCTS
#!/bin/bash
LD_LIBRARY_PATH=\$(dirname ${HOMEgfs})
export LD_LIBRARY_PATH

singularity exec \\
${bindings} \\
${container} \\
${HOMEgfs}/scripts/exglobal_atmos_products.sh "\$@"
EOF_ATMOS_PRODUCTS

chmod +x "${eap_script}"

56 changes: 56 additions & 0 deletions dev/container/utils/create-container-links.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

verbose=false

while [[ "$#" -gt 0 ]]; do
case "$1" in
-H|--HOMEgfs)
HOMEgfs="$2"
shift 2
;;
-c|--container)
container="$2"
shift 2
;;
-b|--bindings)
bindings="$2"
shift 2
;;
-v|--verbose)
verbose=true
shift
;;
-M|--MACHINE_ID)
machineid="$2"
shift 2
;;
*)
echo "Unknown option: $1"
exit 1
;;
esac
done

if [[ ! -v HOMEgfs || ! -v container || ! -v bindings || ! -v MACHINE_ID ]]; then
echo "Usage: create-container-links.sh -H/--HOMEgfs gw-home-dir -c/--container container-fullpath -b/--bindings -M|--MACHINE_ID list-of-binding-dirs [-v]"
exit 11
fi

if [[ "${verbose}" == "true" ]]; then
echo "HOMEgfs: ${HOMEgfs}"
echo "container: ${container}"
echo "bindings: ${bindings}"
echo "Verbose: ${verbose}"
fi

"${HOMEgfs}/dev/container/utils/link_ww3.sh" -H "${HOMEgfs}" -c "${container}" -b "${bindings}" -t gfs
"${HOMEgfs}/dev/container/utils/link_ww3.sh" -H "${HOMEgfs}" -c "${container}" -b "${bindings}" -t sfs
"${HOMEgfs}/dev/container/utils/link_ww3.sh" -H "${HOMEgfs}" -c "${container}" -b "${bindings}" -t gefs

"${HOMEgfs}/dev/container/utils/link_model.sh" -H "${HOMEgfs}" -c "${container}" -m gfs_model -b "${bindings}" -M "${machineid}"
"${HOMEgfs}/dev/container/utils/link_model.sh" -H "${HOMEgfs}" -c "${container}" -m sfs_model -b "${bindings}" -M "${machineid}"
"${HOMEgfs}/dev/container/utils/link_model.sh" -H "${HOMEgfs}" -c "${container}" -m gefs_model -b "${bindings}" -M "${machineid}"

"${HOMEgfs}/dev/container/utils/link_gfs_utils.sh" -H "${HOMEgfs}" -c "${container}" -b "${bindings}"
"${HOMEgfs}/dev/container/utils/link_ufs_utils.sh" -H "${HOMEgfs}" -c "${container}" -b "${bindings}"

103 changes: 103 additions & 0 deletions dev/container/utils/gen-wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#!/bin/bash

verbose=false

while [[ "$#" -gt 0 ]]; do
case "$1" in
-H|--HOMEgfs)
HOMEgfs="$2"
shift 2
;;
-b|--bindings)
bindings="$2"
shift 2
;;
-c|--container)
container="$2"
shift 2
;;
-v|--verbose)
verbose=true
shift
;;
*)
echo "Unknown option: $1"
exit 1
;;
esac
done

if [[ ! -v HOMEgfs || ! -v container ]]; then
echo "Usage: link_model.sh -H/-HOMEgfs gw-home-dir -c/--container full-path-container-image -b/--bindings -B dirname [-B dirname1 [...]] [-v]"
exit 11
fi

if [[ "${verbose}" == "true" ]]; then
set -x
fi

exec_python_script="${HOMEgfs}"/exec/run_python.sh

cat > "${exec_python_script}" << EOF_EXEC_PYTHON
#!/bin/bash
LD_LIBRARY_PATH=\$(dirname "${container}")
export LD_LIBRARY_PATH

singularity exec \\
${bindings} \\
${container} \\
${HOMEgfs}/ush/container/run_python.sh "\$@"
EOF_EXEC_PYTHON

run_python_script="${HOMEgfs}"/ush/container/run_python.sh

cat > "${run_python_script}" << EOF_RUN_PYTHON
#!/bin/bash

source /usr/lmod/lmod/init/bash
module purge
module use "${HOMEgfs}"/sorc/gfs_utils.fd/modulefiles
module load gfsutils_container.intel
module load python
module load py-netcdf4
module load py-xarray
module load py-f90nml
module load py-numpy
module load py-jinja2
module load py-pyyaml

wxflowPATH=${HOMEgfs}/ush/python:${HOMEgfs}/sorc/wxflow/src
export PYTHONPATH=\${PYTHONPATH:+\${PYTHONPATH}:}${HOMEgfs}/ush:\${wxflowPATH}

python "\$@"
EOF_RUN_PYTHON

sed -i 's/RUN_WITH_CONTAINER=NO/RUN_WITH_CONTAINER=YES/g' "${HOMEgfs}/ush/preamble.sh"
chmod +x "${exec_python_script}"
chmod +x "${run_python_script}"

for item in JGLOBAL_WAVE_INIT

Check warning

Code scanning / shellcheck

This loop will only ever run once. Bad quoting or missing glob/expansion? Warning

This loop will only ever run once. Bad quoting or missing glob/expansion?
do
exec_script="${HOMEgfs}"/exec/"${item}"

cat > "${exec_script}" << EOF_SCRIPT
#!/bin/bash
#Need these lines on AWS to run more than one node.
#export I_MPI_DEBUG=10
#export I_MPI_FABRICS=shm:ofi
#export I_MPI_OFI_PROVIDER=tcp
#export FI_PROVIDER=tcp
#export FI_TCP_IFACE=eth0

LD_LIBRARY_PATH=\$(dirname "${container}")
export LD_LIBRARY_PATH

singularity exec \\
${bindings} \\
${container} \\
${HOMEgfs}/jobs/${item}
EOF_SCRIPT

chmod +x "${exec_script}"
done

Loading
Loading