Commit 6da331f4 authored by brunner's avatar brunner
Browse files

No commit message

No commit message
parent 2d786c43
......@@ -120,7 +120,8 @@ class ObservationOperator(object):
# UNCOMMENT FROM HERE
for dt in rrule.rrule(rrule.HOURLY, dtstart=dacycle['time.start']+timedelta(hours=lag*168), until=dacycle['time.start']+timedelta(hours=lag*168+168)):
for dt in rrule.rrule(rrule.HOURLY, dtstart=dacycle['time.start']+timedelta(hours=24*lag*int(dacycle['time.cycle'])), until=dacycle['time.start']+timedelta(hours=(lag+1)*24*int(dacycle['time.cycle']))):
print('time time',lag,dt.strftime('%Y%m%d%H'))
for ens in range(0,self.forecast_nmembers):
ens = str(ens).zfill(3)
cdo.setunit("'kg m-2 s-1' -expr,GPP_"+ens+"_F=CO2_GPP_F*parametermap -merge "+os.path.join(dacycle['da.bio.input'], 'gpp_%s.nc' % dt.strftime('%Y%m%d%H')), input = os.path.join(dacycle['restartmap.dir'],"parameters_lag"+str(lag)+"."+ens+".nc"), output = os.path.join(dacycle['da.bio.input'], 'ensemble', "gpp_"+ens+"_%s.nc" % dt.strftime('%Y%m%d%H')))
......@@ -129,9 +130,6 @@ class ObservationOperator(object):
cdo.merge(input = os.path.join(dacycle['da.bio.input'], 'ensemble', "ra_???_%s.nc" % dt.strftime('%Y%m%d%H')), output = os.path.join(dacycle['da.bio.input'], 'ensemble', "ra_%s.nc" % dt.strftime('%Y%m%d%H')))
os.chdir(dacycle['da.obsoperator.home'])
# cycle_start = dacycle['abs.time.start']-dacycle['time.start']
# print(cycle_start)
# sys.exit()
os.system('python run_chain.py ctdas '+absolute_start_time+' '+str(lag*168)+' '+str(lag*168+168)+' -j meteo icbc emissions biofluxes int2lm post_int2lm cosmo')
os.chdir(dacycle['dir.da_run'])
......@@ -140,7 +138,6 @@ class ObservationOperator(object):
for dacycle, (hstart, hstop), self.forecast_nmembers
in zip(repeat(dacycle),
[(168*lag,168*lag+167)],
# [(0,167),(168,335),(336,503)],
repeat(self.forecast_nmembers))
]
......
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