Skip to content
Snippets Groups Projects
Commit 4d3b0522 authored by Anne Philipp's avatar Anne Philipp
Browse files

introduced a new parameter which defines pure forcast mode

parent c274d9a5
No related branches found
No related tags found
No related merge requests found
......@@ -149,11 +149,13 @@ class ControlFile(object):
self.request = 0
self.public = 0
self.ecapi = None
self.purefc = 0
self.rrint = 0
self.logicals = ['gauss', 'omega', 'omegadiff', 'eta', 'etadiff',
'dpdeta', 'cwc', 'wrf', 'grib2flexpart', 'ecstorage',
'ectrans', 'debug', 'request', 'public', 'rrint']
'ectrans', 'debug', 'request', 'public', 'purefc',
'rrint']
self.__read_controlfile__()
......@@ -478,6 +480,8 @@ class ControlFile(object):
print('Use default value "12" for flux forecast!')
self.accmaxstep='12'
self.purefc = check_purefc(self.type)
self.grid = check_grid(self.grid)
self.area = check_area(self.grid, self.area, self.upper, self.lower,
......
......@@ -154,6 +154,29 @@ def check_ppid(c, ppid):
return
def check_purefc(type):
'''Check for a pure forecast mode.
Parameters
----------
type : :obj:`list` of :obj:`string`
List of field types.
Return
------
True or False:
True if pure forecasts are to be retrieved. False if there are
analysis fields in between.
'''
if 'AN' not in type and '4V' not in type:
# pure forecast
return True
return False
def check_():
'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment