Changeset 4d3b052 in flex_extract.git


Ignore:
Timestamp:
Dec 7, 2018, 3:33:46 PM (6 months ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
dev
Children:
a4531f1
Parents:
c274d9a
Message:

introduced a new parameter which defines pure forcast mode

Location:
source/python
Files:
2 edited

Legend:

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

    rc274d9a r4d3b052  
    150150        self.public = 0
    151151        self.ecapi = None
     152        self.purefc = 0
    152153        self.rrint = 0
    153154
    154155        self.logicals = ['gauss', 'omega', 'omegadiff', 'eta', 'etadiff',
    155156                         'dpdeta', 'cwc', 'wrf', 'grib2flexpart', 'ecstorage',
    156                          'ectrans', 'debug', 'request', 'public', 'rrint']
     157                         'ectrans', 'debug', 'request', 'public', 'purefc',
     158                         'rrint']
    157159
    158160        self.__read_controlfile__()
     
    479481            self.accmaxstep='12'
    480482
     483        self.purefc = check_purefc(self.type)
     484
    481485        self.grid = check_grid(self.grid)
    482486
  • source/python/mods/checks.py

    rd2febd4 r4d3b052  
    155155    return
    156156
     157
     158def check_purefc(type):
     159    '''Check for a pure forecast mode.
     160
     161    Parameters
     162    ----------
     163    type : :obj:`list` of :obj:`string`
     164        List of field types.
     165
     166    Return
     167    ------
     168    True or False:
     169        True if pure forecasts are to be retrieved. False if there are
     170        analysis fields in between.
     171    '''
     172
     173    if 'AN' not in type and '4V' not in type:
     174        # pure forecast
     175        return True
     176
     177    return False
     178
     179
    157180def check_():
    158181    '''
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG