Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'feature/wcoss2-32' of https://github.com/EdwardSafford-NOAA/obs-monitor into feature/wcoss2-32
Fix pycodestyle issues.
  • Loading branch information
EdwardSafford-NOAA committed Jun 24, 2024
2 parents 95e8521 + 64ec897 commit 2726724
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 8 deletions.
7 changes: 4 additions & 3 deletions scripts/exobsmon_plot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ fi
#
${APRUN_PY} ${USHobsmon}/splitPlotYaml.py -i ${plot_yaml} -c ${chan_yaml}

#-------------------------------------------------------
# Submit OM_plots job if split yielded any *.yaml files
#--------------------------------------------------------------
# Submit OM_plots job if split yields any *.yaml files
#
if compgen -G "${DATA}/*.yaml" > /dev/null; then

Expand All @@ -53,14 +53,15 @@ if compgen -G "${DATA}/*.yaml" > /dev/null; then
done


if [[ ${ctr} > 0 ]]; then
if (( ${ctr} > 0 )); then
case ${MACHINE_ID} in
hera)
${SUB} --account ${ACCOUNT} -n ${ctr} -o ${logfile} -D . -J ${jobname} --time=1:00:00 \
--mem=80000M --wrap "srun -l --multi-prog ${cmdfile}"
;;

wcoss2)
chmod 775 ${cmdfile}
mem=$((4*${ctr}))
echo "submitting ${jobname} on wcoss2, ctr = $ctr, mem = $mem, cmdfile = ${cmdfile}"
cp ${USHobsmon}/runWcoss.sh .
Expand Down
8 changes: 4 additions & 4 deletions ush/plotObsMon.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ def loadConfig(satname, instrument, obstype, plot, cycle_tm, cycle_interval,

idx = os.environ.get('PBS_ARRAY_INDEX', 'nada')
eva(plot_yaml)
# os.remove(plot_yaml)
os.remove(plot_yaml)

if 'minimization' in mon_dict.keys():
cwd = os.getcwd()

satname = None
instrument = None
obstype = None
Expand All @@ -216,7 +216,7 @@ def loadConfig(satname, instrument, obstype, plot, cycle_tm, cycle_interval,

genYaml(plot_template, plot_yaml, config)
eva(plot_yaml)
# os.remove(plot_yaml)
os.remove(plot_yaml)

if 'observations' in mon_dict.keys():
satname = None
Expand Down Expand Up @@ -252,4 +252,4 @@ def loadConfig(satname, instrument, obstype, plot, cycle_tm, cycle_interval,

genYaml(plot_template, plot_yaml, config)
eva(plot_yaml)
# os.remove(plot_yaml)
os.remove(plot_yaml)
25 changes: 25 additions & 0 deletions ush/runWcoss.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

st=`date`

module reset

module load libfabric/1.11.0.0.
module load PrgEnv-intel/8.3.3
module load craype
module load cray-pals
module load git/2.29.0
module load intel/19.1.3.304
module load python/3.10.4
module load ve/evs/1.0

export PATH=${PATH}:/lfs/h2/emc/da/noscrub/edward.safford/eva/opt/bin
export PYTHONPATH=${PYTHONPATH}:/lfs/h2/emc/da/noscrub/edward.safford/eva/opt/

if [ ! -z ${PBS_O_WORKDIR} ]; then cd ${PBS_O_WORKDIR}; fi

./${cmdfile}

end=`date`
echo "start: ${st}"
echo "end: ${end}"
2 changes: 1 addition & 1 deletion ush/splitPlotYaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def removeKey(d, keys):
parser.add_argument('-c', '--chan', type=str,
help='Input YAML instrument channel file', required=True)
args = parser.parse_args()

try:
mon_sources = args.input
with open(mon_sources, 'r') as mon_sources_opened:
Expand Down

0 comments on commit 2726724

Please sign in to comment.