diff --git a/Source/Python/Mods/tools.py b/Source/Python/Mods/tools.py index a6f745d5d12444f7d41e88bfe553fc30b3d5e5b4..203dcbe069c50bd7f226ec4e7f6ebf033ce789e2 100644 --- a/Source/Python/Mods/tools.py +++ b/Source/Python/Mods/tools.py @@ -29,6 +29,7 @@ # July 2022 - Anne Tipka (formerly Philipp) # - modified function put_file_to_ecserver to put the file automatically # to $HOME directory, to avoid static path creation +# - added function to submit a batch job # # @License: # (C) Copyright 2014-2020. @@ -695,6 +696,14 @@ def put_file_to_ecserver(ecd, filename): return +def submit_sbatch_job(jobname): + ''' + ''' + + job_id = subprocess.check_output(['sbatch', jobname]) + print('SUBMITTED SBATCH JOB ',jobname) + return job_id.decode() + def submit_job_to_ecserver(target, jobname): '''Uses ecaccess-job-submit command to submit a job to the ECMWF server.