Skip to content

Commit 077c1b8

Browse files
Clean up archiving options
1 parent 7527fe6 commit 077c1b8

File tree

3 files changed

+38
-8
lines changed

3 files changed

+38
-8
lines changed

parm/config/gefs/config.base

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,17 +334,24 @@ export DO_METP="NO" # Run METPLUS jobs - set METPLUS settings in config.
334334
export DO_FIT2OBS="NO" # Run fit to observations package
335335

336336
# Archiving options
337-
export VRFYARCH="@VRFYARCH@" # save verification data locally
338337
export HPSSARCH="@HPSSARCH@" # save data to HPSS archive
339-
export LOCALARCH="@LOCALARCH@" # save data to local archive
340-
if [[ ${HPSSARCH} = "YES" ]] && [[ ${LOCALARCH} = "YES" ]]; then
341-
echo "Both HPSS and local archiving selected. Please choose one or the other."
342-
exit 3
343-
elif [[ ${HPSSARCH} = "YES" ]] || [[ ${LOCALARCH} = "YES" ]]; then
338+
export LOCALARCH="@LOCALARCH@" # save data to local archive
339+
export GLOBUSARCH="NO" # send data to HPSS via globus xfers to Niagara (intended for MSU)
340+
count_arch_opts=0
341+
for arch_opt in "${HPSSARCH}" "${LOCALARCH}" "${GLOBUSARCH}"; do
342+
if [[ "${arch_opt}" == "YES" ]]; then
343+
(( count_arch_opts += 1 ));
344+
fi
345+
done
346+
if [[ ${count_arch_opts} -gt 1 ]]; then
347+
echo "FATAL ERROR: More than one archiving option selected. Please choose no more than one."
348+
exit 4
349+
elif [[ ${HPSSARCH} = "YES" ]] || [[ ${LOCALARCH} = "YES" ]] || [[ ${GLOBUSARCH} = "YES" ]]; then
344350
export DO_ARCHTAR="YES"
345351
else
346352
export DO_ARCHTAR="NO"
347353
fi
354+
348355
export ARCH_CYC=00 # Archive data at this cycle for warm start and/or forecast-only capabilities
349356
export ARCH_WARMICFREQ=4 # Archive frequency in days for warm start capability
350357
export ARCH_FCSTICFREQ=1 # Archive frequency in days for gdas and gfs forecast-only capability

parm/config/gfs/config.base

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ export DO_FETCH_LOCAL="NO" # Copy from local disk onto COM
482482
# Archiving options
483483
export HPSSARCH="@HPSSARCH@" # save data to HPSS archive
484484
export LOCALARCH="@LOCALARCH@" # save data to local archive
485-
export GLOBUSARCH="@GLOBUSARCH@" # send data to HPSS via globus xfers to Niagara
485+
export GLOBUSARCH="NO" # send data to HPSS via globus xfers to Niagara (intended for MSU)
486486
count_arch_opts=0
487487
for arch_opt in "${HPSSARCH}" "${LOCALARCH}" "${GLOBUSARCH}"; do
488488
if [[ "${arch_opt}" == "YES" ]]; then
@@ -492,7 +492,7 @@ done
492492
if [[ ${count_arch_opts} -gt 1 ]]; then
493493
echo "FATAL ERROR: More than one archiving option selected. Please choose no more than one."
494494
exit 4
495-
elif [[ ${HPSSARCH} = "YES" ]] || [[ ${LOCALARCH} = "YES" ]]; then
495+
elif [[ ${HPSSARCH} = "YES" ]] || [[ ${LOCALARCH} = "YES" ]] || [[ ${GLOBUSARCH} = "YES" ]]; then
496496
export DO_ARCHTAR="YES"
497497
else
498498
export DO_ARCHTAR="NO"

parm/globus/init_xfer.sh.j2

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
# This script prepares the server directory and launches the doorman scripts for {{pslot}} on {{server}}
3+
mkdir -p "{{server_home}}/doorman" || exit 2
4+
date > "{{server_home}}/{{pslot}}_crontab_active.log"
5+
6+
# Look for mkdir requests
7+
for mkdir_req_fl in "{{server_home}}"/req_mkdir.*; do
8+
dir=$(cat "${mkdir_req_fl}")
9+
mkdir -p "${dir}" || exit 2
10+
rm -f "${mkdir_req_fl}"
11+
done
12+
13+
# Look for executable scripts
14+
for dir in "{{server_home}}"/doorman/globus.*; do
15+
flist=$(find "${dir}" -executable -name "run_doorman.sh")
16+
for script in ${flist}; do
17+
# Check if the corresponding log has already been written
18+
log="${script/.sh/.log}"
19+
if [[ ! -f "${log}" ]]; then
20+
"${script}"
21+
fi
22+
done
23+
done

0 commit comments

Comments
 (0)