Commit 29eb2f47 authored by Florentie, Liesbeth's avatar Florentie, Liesbeth
Browse files

exclude observations that will not be assimilated; allow for mixed...

exclude observations that will not be assimilated; allow for mixed initialization uncertainty statevector
parent 699aef1a
......@@ -127,7 +127,7 @@ class ctsfTM5ObsOperator(TM5ObservationOperator):
timevec.append( (date-fluxmodel.refdate).days )
del date
self.timevec = np.array(timevec)
logging.info('Timevec = %s' % timevec)
logging.debug('Timevec = %s' % timevec)
# calculate and write fluxmap for ensemble
fluxmodel.calc_flux(self.timevec)
......@@ -152,7 +152,7 @@ class ctsfTM5ObsOperator(TM5ObservationOperator):
else:
date = dt.datetime(date.year+1,1,15)
logging.info('Datevec = %s' % datevec)
logging.debug('Datevec = %s' % datevec)
return datevec
......@@ -217,7 +217,6 @@ class ctsfTM5ObsOperator(TM5ObservationOperator):
"""
datadir = self.tm_settings['ct.params.input.dir']
logging.info('CT.PARAMS.INPUT.DIR = %s' %datadir)
if not os.path.exists(datadir):
msg = "The specified input directory for the TM5 model to read from does not exist (%s), exiting..." % datadir
......
......@@ -228,7 +228,7 @@ class ctsfFluxModel(ObservationOperator):
for t in range(len(timevec)):
foundindex = False
date = self.refdate + dt.timedelta(int(days=timevec[t]))
date = self.refdate + dt.timedelta(days=int(timevec[t]))
for tt in range(len(t_ano)):
date_input = self.refdate + dt.timedelta(days=int(t_ano[tt]))
if (date.year == date_input.year) and (date.month == date_input.month):
......@@ -344,7 +344,7 @@ class ctsfFluxModel(ObservationOperator):
for t in range(len(timevec)):
month = (self.refdate + dt.timedelta(days=timevec[t])).month - 1
month = (self.refdate + dt.timedelta(days=int(timevec[t]))).month - 1
if self.assimilatenans:
anoterm[t,:,:] = statemap[month,:,:] * np.nan_to_num(self.ano[t,:,:])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment