Changeset ca867de in flex_extract.git for source/python/classes/ControlFile.py


Ignore:
Timestamp:
Oct 5, 2018, 3:35:18 PM (6 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
5bad6ec
Parents:
27fe969
Message:

refactored functions in EcFlexpart? and did some minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/python/classes/ControlFile.py

    r4971f63 rca867de  
    5757import inspect
    5858
     59# software specific classes and modules from flex_extract
     60sys.path.append('../')
    5961import _config
     62from mods.tools import my_error
    6063
    6164# ------------------------------------------------------------------------------
     
    144147        self.ectrans = 0
    145148        self.inputdir = _config.PATH_INPUT_DIR
    146         self.outputdir = self.inputdir
     149        self.outputdir = None
    147150        self.ecmwfdatadir = _config.PATH_FLEXEXTRACT_DIR
    148151        self.exedir = _config.PATH_FORTRAN_SRC
     
    177180            <nothing>
    178181        '''
    179         from mods.tools import my_error
    180 
    181         # read whole CONTROL file
    182182
    183183        try:
     
    355355            self.end_date = self.start_date
    356356
     357        # basetime has only two possible values
     358        if self.basetime:
     359            if int(self.basetime) != 0 and int(self.basetime) != 12:
     360                print('Basetime has an invalid value!')
     361                print('Basetime = ' + str(self.basetime))
     362                sys.exit(1)
     363
    357364        # assure consistency of levelist and level
    358365        if self.levelist is None and self.level is None:
     
    407414            self.flexpart_root_scripts = self.ecmwfdatadir
    408415
     416        if not self.outputdir:
     417            self.outputdir = self.inputdir
     418
    409419        if not isinstance(self.mailfail, list):
    410420            if ',' in self.mailfail:
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG