Changeset f20af73 in flex_extract.git for source/python/submit.py


Ignore:
Timestamp:
Mar 8, 2019, 10:05:20 AM (5 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
82c2959
Parents:
b4a4777
Message:

added CDS API support for ERA5 instead of ECMWFAPI / refactored setup of CONTROL parameter because for local version it wanted to use not installed ECMWF_ENV file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/python/submit.py

    rfc05fbd rf20af73  
    6767# software specific classes and modules from flex_extract
    6868import _config
    69 from mods.tools import (normal_exit, get_cmdline_args,
     69from mods.tools import (setup_controldata, normal_exit, get_cmdline_args,
    7070                        submit_job_to_ecserver, read_ecenv)
    7171from mods.get_mars_data import get_mars_data
     
    9191    '''
    9292
    93     args = get_cmdline_args()
    94     c = ControlFile(args.controlfile)
    95 
    96     env_parameter = read_ecenv(_config.PATH_ECMWF_ENV)
    97     c.assign_args_to_control(args)
    98     c.assign_envs_to_control(env_parameter)
    99     c.check_conditions(args.queue)
     93    c, ppid, queue, job_template = setup_controldata()
    10094
    10195    # on local side
    102     # on ECMWF server this would also be the local side
     96    # starting from an ECMWF server this would also be the local side
    10397    called_from_dir = os.getcwd()
    104     if args.queue is None:
     98    if queue is None:
    10599        if c.inputdir[0] != '/':
    106100            c.inputdir = os.path.join(called_from_dir, c.inputdir)
     
    109103        get_mars_data(c)
    110104        if c.request == 0 or c.request == 2:
    111             prepare_flexpart(args.ppid, c)
     105            prepare_flexpart(ppid, c)
    112106            exit_message = 'FLEX_EXTRACT IS DONE!'
    113107        else:
     
    115109    # send files to ECMWF server
    116110    else:
    117         submit(args.job_template, c, args.queue)
     111        submit(job_template, c, queue)
    118112        exit_message = 'FLEX_EXTRACT JOB SCRIPT IS SUBMITED!'
    119113
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG