Changeset f2616a3 in flex_extract.git for source/python/mods


Ignore:
Timestamp:
Dec 14, 2018, 1:03:35 PM (5 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
0629ba8
Parents:
1eca806
Message:

implemented a job split with a new parameter 'job_chunk' so that huge time periods can automatically be splitted

Location:
source/python/mods
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/python/mods/checks.py

    r45fc9b4 rf2616a3  
    796796    return addpar
    797797
     798
     799def check_job_chunk(job_chunk):
     800    '''Checks that the job chunk number is positive and non zero.
     801
     802    Parameters
     803    ----------
     804    job_chunk : :obj:`integer`
     805        The number of days for a single job script.
     806
     807    Return
     808    ------
     809    job_chunk : :obj:`integer`
     810        The number of days for a single job script.
     811    '''
     812    if job_chunk < 0:
     813        raise ValueError('ERROR: The number of job chunk is negative!\n'
     814                         'It has to be a positive number!')
     815    elif job_chunk == 0:
     816        job_chunk = None
     817    else:
     818        pass
     819
     820    return job_chunk
  • source/python/mods/tools.py

    rbf48c8a rf2616a3  
    128128                        type=none_or_int, default=None,
    129129                        help="# of days to be retrieved at once")
     130    parser.add_argument("--job_chunk", dest="job_chunk",
     131                        type=none_or_int, default=None,
     132                        help="# of days to be retrieved within a single job")
    130133    parser.add_argument("--controlfile", dest="controlfile",
    131134                        type=none_or_str, default='CONTROL.temp',
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG