FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit d0b848bc authored by Dr T. Mona's avatar Dr T. Mona
Browse files

Add copy_past_job and bug fix plotting EWSPlottingOutputGlobs list.

parent 4c0fd6c9
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ import os
import glob
import json
import shutil
from distutils.dir_util import copy_tree
import logging
import logging.config
......@@ -402,6 +403,29 @@ def process_pre_job(input_args):
return
def process_copy_past_job_env2_0(jobPath,config):
'''For when we want to skip process_in_job() to test the other components of
this script. Currently hard-wired.'''
# TODO: remove this hard-wired assumption
jobPath_to_copy = f"{jobPath}/../{startstring}_bak/"
assert os.path.exists(jobPath_to_copy)
dir_src = f"{jobPath_to_copy}/processed/"
dir_dst = f"{jobPath}/processed/"
logger.info(f"Copying from {dir_src}")
logger.info(f"to {dir_dst}")
copy_tree(dir_src,dir_dst)
logger.info('Copying complete')
return
def process_in_job(jobPath,config):
logger.info('started process_in_job()')
......@@ -535,7 +559,7 @@ def process_EWS_plotting_env2_0(jobPath,config):
# # weekly plots
# f"{EWSPlottingOutputDir}Weekly/suitability_{region.lower()}_*_rust_total_20*.png"]
EWSPlottingOutputGlobs = [f"{EWSPlottingOutputDir}*"]
EWSPlottingOutputGlobs += [f"{EWSPlottingOutputDir}*"]
# check the output
EWSPlottingOutputGlobs = get_only_existing_globs(EWSPlottingOutputGlobs,inplace=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment