Commit 396d84ac authored by Espen Sollum's avatar Espen Sollum
Browse files

Added lusekerneloutput to parameter files. Added option to select different tmp dir.

parent 7cdabba6
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -57,7 +57,7 @@ module par_mod
! Set to T to disable use of kernel for concentrations/deposition
!****************************************************************
logical, parameter :: lnokernel=.false.
logical, parameter :: lusekerneloutput=.true.
!*********************************************************************
! Set to T to change output units to number of particles per grid cell
......
......@@ -133,7 +133,22 @@ parser.add_argument("-c", "--checkmet",
help="Perform a met data check, then exit",
action="store_true")
parser.add_argument(
"--tmp_dir",
help=("This is where lots of temporary directories are going to be created."
"User needs to make sure it is OK to put them in here. Note that there "
"is currently no clean up of these directories if a test fails. "
"The logic is that users "
"might want to go back and look at the test directories, so auto-cleanup "
"prevents that."),
dest="SCRATCH_DIR",
default="/tmp")
args = parser.parse_args()
SCRATCH_DIR=args.SCRATCH_DIR
#print 'args.xml_file: ', args.xml_file
#print 'args.cmdline_makefile_path: ', args.cmdline_makefile_path
......@@ -179,13 +194,6 @@ XML_FILE = [xml_file]
# This is where lots of temporary directories are going to be created.
# User needs to make sure it is OK to put them in here. Note that there
# is currently no clean up of these directories if a test fails.
# The logic is that users
# might want to go back and look at the test directories, so auto-cleanup
# prevents that.
SCRATCH_DIR = '/tmp'
t = TS.TestSuite(xml_files=XML_FILE)
......
......@@ -61,13 +61,20 @@ def main():
name_makefile_path = None # Initial value for the makefile from command line
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--makefile",
help="Full path to makefile",
action="store", dest="cmdline_makefile_path")
help="Full path to makefile",
action="store", dest="cmdline_makefile_path")
parser.add_argument("-f", "--filelist",
help="file list of a name of xml cases",
action="store", dest="cases_filelist")
help="file list of a name of xml cases",
action="store", dest="cases_filelist")
parser.add_argument(
"--tmp_dir",
help=("Where temporary files are stored."),
dest='SCRATCH_DIR',
default='/tmp')
args = parser.parse_args()
SCRATCH_DIR=args.SCRATCH_DIR
# Get the command line arguments after parsing. Some might be "None"
cmdline_makefile_path = args.cmdline_makefile_path
......@@ -97,7 +104,8 @@ def main():
for xml_file in LIST_OF_XML_FILES:
print 'Checking for met data availability: ', xml_file
try:
process=subprocess.check_call(['./check.py','-c', xml_file ])
process=subprocess.check_call(['./check.py','-c', xml_file,
'--tmp_dir', SCRATCH_DIR])
except subprocess.CalledProcessError:
print
print 'Problem checking xml file for met data presence: ', xml_file
......@@ -125,7 +133,7 @@ def main():
for xml_case in LIST_OF_XML_FILES:
print '\n EXECUTING TEST : ', xml_case, '\n'
if cmdline_makefile_path != None:
process=subprocess.Popen(['./check.py','-m', cmdline_makefile_path, xml_case ],
process=subprocess.Popen(['./check.py','-m', cmdline_makefile_path, xml_case, '--tmp_dir', SCRATCH_DIR],
stdout=subprocess.PIPE,stderr=subprocess.PIPE)
# print the output of the process
for line in process.stdout:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment