Changeset 73d2e4e in flex_extract.git


Ignore:
Timestamp:
Oct 20, 2022, 8:13:05 PM (18 months ago)
Author:
Anne Tipka <anne.tipka@…>
Branches:
dev
Children:
5cff464
Parents:
1e6cc1f
Message:

added a function to submit a batch job

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Source/Python/Mods/tools.py

    r01bd8aa r73d2e4e  
    3030#        - modified function put_file_to_ecserver to put the file automatically
    3131#          to $HOME directory, to avoid static path creation
     32#        - added function to submit a batch job
    3233#
    3334# @License:
     
    696697    return
    697698
     699def submit_sbatch_job(jobname):
     700    '''
     701    '''
     702
     703    job_id = subprocess.check_output(['sbatch', jobname])
     704    print('SUBMITTED SBATCH JOB ',jobname)
     705    return job_id.decode()
     706
    698707def submit_job_to_ecserver(target, jobname):
    699708    '''Uses ecaccess-job-submit command to submit a job to the ECMWF server.
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG