Commit 6263f54c authored by brunner's avatar brunner
Browse files

No commit message

No commit message
parent 30555120
......@@ -27,7 +27,7 @@ import datetime as dtm
#from string import strip
from numpy import array, logical_and, sqrt, empty, squeeze, array2string, split, append
from da.baseclasses.obs import Observations
import da.tools.io4 as io
import da.cosmo.io4 as io
import da.tools.rc as rc
sys.path.append(os.getcwd())
sys.path.append('../../')
......
......@@ -5,7 +5,7 @@ import logging
import os
import sys
import subprocess
import da.tools.io4 as io
import da.cosmo.io4 as io
import numpy as np
from netCDF4 import Dataset
from datetime import datetime, timedelta
......@@ -119,16 +119,19 @@ class ObservationOperator(object):
# for ncfile in ncfilelist:
# infile = os.path.join(ncfile + '.nc')
for ens in range(1,self.forecast_nmembers+1):
ens = str(ens).zfill(3)
for dt in rrule.rrule(rrule.HOURLY, dtstart=dacycle['time.start'], until=dacycle['time.start']+timedelta(hours=672)):
cdo.mul("parameters."+ens+".nc", input = os.path.join(dacycle['da.bio.input'], 'gpp_%s.nc' % dt.strftime('%Y%m%d%H')), output = os.path.join(dacycle['da.bio.input'], 'ensemble', "gpp_%s.nc" % dt.strftime('%Y%m%d%H')))
for dt in rrule.rrule(rrule.HOURLY, dtstart=dacycle['time.start'], until=dacycle['time.start']+timedelta(hours=168)):
for ens in range(0,self.forecast_nmembers):
ens = str(ens).zfill(3)
cdo.expr("CO2_GPP_"+ens+"_F=parametermap*CO2_GPP_F -merge /scratch/snx3000/parsenov/projname/input/parameters."+ens+".nc", input = os.path.join(dacycle['da.bio.input'], 'gpp_%s.nc' % dt.strftime('%Y%m%d%H')), output = os.path.join(dacycle['da.bio.input'], 'ensemble', "gpp_"+ens+"_%s.nc" % dt.strftime('%Y%m%d%H')))
cdo.expr("CO2_RESP_"+ens+"_F=parametermap*CO2_RESP_F -merge /scratch/snx3000/parsenov/projname/input/parameters."+ens+".nc", input = os.path.join(dacycle['da.bio.input'], 'ra_%s.nc' % dt.strftime('%Y%m%d%H')), output = os.path.join(dacycle['da.bio.input'], 'ensemble', "ra_"+ens+"_%s.nc" % dt.strftime('%Y%m%d%H')))
cdo.merge(input = os.path.join(dacycle['da.bio.input'], 'ensemble', "gpp_???_%s.nc" % dt.strftime('%Y%m%d%H')), output = os.path.join(dacycle['da.bio.input'], 'ensemble', "gpp_%s.nc" % dt.strftime('%Y%m%d%H')))
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.system('python '+dacycle['da.obsoperator.home']+' ctdas '+dacycle['time.start'].strftime('%Y-%m-%d')+' 0 672 -j meteo icbc emissions biofluxes int2lm post_int2lm')
os.system('python '+dacycle['da.obsoperator.home']+' ctdas '+dacycle['time.start'].strftime('%Y-%m-%d')+' 0 168 -j meteo icbc emissions biofluxes int2lm post_int2lm')
# here comes COSMO
sys.exit()
os.system('python '+cosmo+' ctdas '+self['time.start'].strftime('%Y-%m-%d')+' 0 672 -j cosmo')
extract_model_data(self.forecast_nmembers)
# os.system('python '+cosmo+' ctdas '+self['time.start'].strftime('%Y-%m-%d')+' 0 672 -j cosmo')
# extract_model_data(self.forecast_nmembers)
sys.exit()
for i in range(0,self.forecast_nmembers):
idx=str(i+1)
......
......@@ -35,10 +35,10 @@ obs.sites.rc : ${obspack.input.dir}/sites_weights_ctdas.rc
!bio.cov.prefix : cov_ecoregion
!regtype : gridded_oif30
nparameters : 11
nparameters : 11
!random.seed : 4385
regionsfile : /store/empa/em05/parsenov/CTDAS/ctdas-py3/da/analysis/regions_ok.nc
extendedregionsfile : /store/empa/em05/parsenov/CTDAS/ctdas-py3/da/analysis/regions_ok.nc
regionsfile : /store/empa/em05/parsenov/CTDAS/ctdas-cosmo/da/analysis/regions_cosmo.nc
extendedregionsfile : /store/empa/em05/parsenov/CTDAS/ctdas-cosmo/da/analysis/regions_cosmo.nc
!regionsfile : ${datadir}/covariances/gridded_NH/griddedNHparameters.nc
!random.seed.init: ${datadir}/randomseedinit.pickle
......
......@@ -29,7 +29,7 @@ from da.tools.initexit import start_logger, validate_opts_args, parse_options, C
from da.cosmo.pipeline import ensemble_smoother_pipeline, header, footer
from da.platform.maunaloa import MaunaloaPlatform
from da.baseclasses.dasystem import DaSystem
from da.baseclasses.statevector import StateVector
from da.cosmo.statevector import StateVector
from da.carbondioxide.obspack_globalviewplus2 import ObsPackObservations
#from da.cosmo.obs import Obs
from da.carbondioxide.optimizer import CO2Optimizer
......
......@@ -28,8 +28,8 @@
!
! The time for which to start and end the data assimilation experiment in format YYYY-MM-DD HH:MM:SS
time.start : 2016-01-01 00:00:00
time.finish : 2016-02-01 00:00:00
time.start : 2013-04-01 00:00:00
time.finish : 2013-05-01 00:00:00
! Whether to restart the CTDAS system from a previous cycle, or to start the sequence fresh. Valid entries are T/F/True/False/TRUE/FALSE
......@@ -100,7 +100,7 @@ da.obsoperator.rc : ${da.obsoperator.home}/tm5-ctdas-ei-zoom.rc
! The number of ensemble members used in the experiment. Valid entries are integers > 2
!
da.optimizer.nmembers : 20
da.optimizer.nmembers : 4
! Finally, info on the archive task, if any. Archive tasks are run after each cycle to ensure that the results of each cycle are
! preserved, even if you run on scratch space or a temporary disk. Since an experiment can take multiple weeks to complete, moving
......
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