diff --git a/scripts/exobsmon_plot.sh b/scripts/exobsmon_plot.sh index 36bf708..69d3116 100755 --- a/scripts/exobsmon_plot.sh +++ b/scripts/exobsmon_plot.sh @@ -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 @@ -53,7 +53,7 @@ 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 \ @@ -61,6 +61,7 @@ if compgen -G "${DATA}/*.yaml" > /dev/null; then ;; wcoss2) + chmod 775 ${cmdfile} mem=$((4*${ctr})) echo "submitting ${jobname} on wcoss2, ctr = $ctr, mem = $mem, cmdfile = ${cmdfile}" cp ${USHobsmon}/runWcoss.sh . diff --git a/ush/plotObsMon.py b/ush/plotObsMon.py index f9a3d02..40110c5 100755 --- a/ush/plotObsMon.py +++ b/ush/plotObsMon.py @@ -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 @@ -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 @@ -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) diff --git a/ush/runWcoss.sh b/ush/runWcoss.sh new file mode 100644 index 0000000..f8243dd --- /dev/null +++ b/ush/runWcoss.sh @@ -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}" diff --git a/ush/splitPlotYaml.py b/ush/splitPlotYaml.py index 7b305fa..b4d44a0 100644 --- a/ush/splitPlotYaml.py +++ b/ush/splitPlotYaml.py @@ -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: