Commit e4fde471 authored by Auke van de Woude's avatar Auke van de Woude
Browse files

Merge branch 'master' of https://git.wur.nl/ctdas/CTDAS

parents 969b2682 ef5de84c
...@@ -56,7 +56,7 @@ class CO2GriddedDaSystem(DaSystem): ...@@ -56,7 +56,7 @@ class CO2GriddedDaSystem(DaSystem):
'regtype'] 'regtype']
for k, v in self.iteritems(): for k, v in self.items():
if v == 'True' : self[k] = True if v == 'True' : self[k] = True
if v == 'False': self[k] = False if v == 'False': self[k] = False
......
...@@ -145,7 +145,7 @@ class CO2GriddedStateVector(StateVector): ...@@ -145,7 +145,7 @@ class CO2GriddedStateVector(StateVector):
dof += np.sum(s) ** 2 / sum(s ** 2) dof += np.sum(s) ** 2 / sum(s ** 2)
try: try:
C = np.linalg.cholesky(matrix) C = np.linalg.cholesky(matrix)
except np.linalg.linalg.LinAlgError, err: except np.linalg.linalg.LinAlgError as err:
logging.error('Cholesky decomposition has failed ') logging.error('Cholesky decomposition has failed ')
logging.error('For a matrix of dimensions: %d' % matrix.shape[0]) logging.error('For a matrix of dimensions: %d' % matrix.shape[0])
logging.debug(err) logging.debug(err)
......
...@@ -89,7 +89,7 @@ class CO2GriddedStateVector(StateVector): ...@@ -89,7 +89,7 @@ class CO2GriddedStateVector(StateVector):
if 'pco2' in file or 'cov_ocean' in file: if 'pco2' in file or 'cov_ocean' in file:
cov_ocn = f.get_variable('CORMAT') cov_ocn = f.get_variable('CORMAT')
parnr = range(9805,9835) parnr = list(range(9805,9835))
cov = cov_ocn cov = cov_ocn
elif 'tropic' in file: elif 'tropic' in file:
cov = f.get_variable('covariance') cov = f.get_variable('covariance')
...@@ -157,7 +157,7 @@ class CO2GriddedStateVector(StateVector): ...@@ -157,7 +157,7 @@ class CO2GriddedStateVector(StateVector):
dof += np.sum(s) ** 2 / sum(s ** 2) dof += np.sum(s) ** 2 / sum(s ** 2)
try: try:
C = np.linalg.cholesky(matrix) C = np.linalg.cholesky(matrix)
except np.linalg.linalg.LinAlgError, err: except np.linalg.linalg.LinAlgError as err:
logging.error('Cholesky decomposition has failed ') logging.error('Cholesky decomposition has failed ')
logging.error('For a matrix of dimensions: %d' % matrix.shape[0]) logging.error('For a matrix of dimensions: %d' % matrix.shape[0])
logging.debug(err) logging.debug(err)
......
...@@ -13,31 +13,28 @@ ...@@ -13,31 +13,28 @@
!!! Info for the CarbonTracker data assimilation system !!! Info for the CarbonTracker data assimilation system
datadir : /store/empa/em05/parsenov/ datadir : /Storage/CO2/carbontracker/input/ctdas_2016/
! For ObsPack ! For ObsPack
obspack.input.id : obspack obspack.input.id : obspack_co2_1_GLOBALVIEWplus_v2.1_2016-09-02
obspack.input.dir : ${datadir} obspack.input.dir : ${datadir}/obspacks/${obspack.input.id}
!/obspack !/${obspack.input.id} obs.sites.rc : ${obspack.input.dir}/summary/sites_weights_Dec2016.rc
obs.sites.rc : ${obspack.input.dir}/summary/sites_weights_ctdas.rc
! Using a second ObsPack (from 1 January 2016) ! Using a second ObsPack (from 1 January 2016)
!obspack.input.id2 : obspack_co2_1_NRT_v3.0_2016-06-06 !obspack.input.id2 : obspack_co2_1_NRT_v3.0_2016-06-06
!obspack.input.dir2 : ${datadir}/obspacks/${obspack.input.id2} !obspack.input.dir2 : ${datadir}/obspacks/${obspack.input.id2}
!obs.sites.rc2 : ${obspack.input.dir2}/summary/sites_weights_Dec2016.rc !obs.sites.rc2 : ${obspack.input.dir2}/summary/sites_weights_Dec2016.rc
!ocn.covariance : ${datadir}/oceans/oif/cov_ocean.2000.01.nc ocn.covariance : ${datadir}/oceans/oif/cov_ocean.2000.01.nc
!deltaco2.prefix : oif_p3_era40.dpco2 deltaco2.prefix : oif_p3_era40.dpco2
!bio.cov.dir : ${datadir}/covariances/gridded_NH/ bio.cov.dir : ${datadir}/covariances/gridded_NH/
!bio.cov.prefix : cov_ecoregion bio.cov.prefix : cov_ecoregion
!regtype : gridded_oif30 regtype : gridded_oif30
nparameters : 11 nparameters : 9835
!random.seed : 4385 random.seed : 4385
regionsfile : /store/empa/em05/parsenov/CTDAS/ctdas-py3/da/analysis/regions_ok.nc regionsfile : ${datadir}/covariances/gridded_NH/griddedNHparameters.nc
!extendedregionsfile : /store/empa/em05/parsenov/CTDAS/ctdas-py3/da/analysis/regions_ok.nc
!regionsfile : ${datadir}/covariances/gridded_NH/griddedNHparameters.nc
!random.seed.init: ${datadir}/randomseedinit.pickle !random.seed.init: ${datadir}/randomseedinit.pickle
! Include a naming scheme for the variables ! Include a naming scheme for the variables
......
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
#$ 06:30:00 #$ 06:30:00
#$ /bin/sh #$ /bin/sh
echo "All output piped to file template.log" echo "All output piped to file ct_base_test.log"
source /usr/local/Modules/3.2.8/init/sh export HOST='capegrim'
source /opt/intel/bin/ifortvars.sh intel64 export icycle_in_job=1
export HOST='daint' python --version
module load python
export icycle_in_job=999
python template.py rc=template.rc -v $1 >& template.log & python template.py rc=template.rc -v $1 >& template.log &
...@@ -27,14 +27,13 @@ sys.path.append(os.getcwd()) ...@@ -27,14 +27,13 @@ sys.path.append(os.getcwd())
from da.tools.initexit import start_logger, validate_opts_args, parse_options, CycleControl from da.tools.initexit import start_logger, validate_opts_args, parse_options, CycleControl
from da.tools.pipeline import ensemble_smoother_pipeline, header, footer from da.tools.pipeline import ensemble_smoother_pipeline, header, footer
from da.platform.capegrim import CapeGrimPlatform from da.platform.capegrim import CapeGrimPlatform
from da.baseclasses.dasystem import DaSystem from da.baseclasses.dasystem import DaSystem
from da.baseclasses.statevector import StateVector from da.co2gridded.statevector import CO2GriddedStateVector
from da.carbondioxide.obspack_globalviewplus2 import ObsPackObservations from da.carbondioxide.obspack_globalviewplus2 import ObsPackObservations
from da.carbondioxide.optimizer import CO2Optimizer from da.baseclasses.optimizer import Optimizer
from da.baseclasses.observationoperator import ObservationOperator from da.baseclasses.observationoperator import RandomizerObservationOperator
#from da.analysis.expand_fluxes import save_weekly_avg_1x1_data, save_weekly_avg_state_data, save_weekly_avg_tc_data, save_weekly_avg_ext_tc_data
#from da.analysis.expand_molefractions import write_mole_fractions
################################################################################################# #################################################################################################
...@@ -51,13 +50,12 @@ opts, args = validate_opts_args(opts, args) ...@@ -51,13 +50,12 @@ opts, args = validate_opts_args(opts, args)
dacycle = CycleControl(opts, args) dacycle = CycleControl(opts, args)
platform = CapeGrimPlatform()
platform = MaunaloaPlatform()
dasystem = DaSystem(dacycle['da.system.rc']) dasystem = DaSystem(dacycle['da.system.rc'])
obsoperator = ObservationOperator(dacycle['da.obsoperator.rc']) obsoperator = RandomizerObservationOperator(dacycle['da.obsoperator.rc'])
samples = ObsPackObservations() samples = ObsPackObservations()
statevector = StateVector() statevector = CO2GriddedStateVector()
optimizer = CO2Optimizer() optimizer = Optimizer()
########################################################################################## ##########################################################################################
################### ENTER THE PIPELINE WITH THE OBJECTS PASSED BY THE USER ############### ################### ENTER THE PIPELINE WITH THE OBJECTS PASSED BY THE USER ###############
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
! !
! The time for which to start and end the data assimilation experiment in format YYYY-MM-DD HH:MM:SS ! 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.start : 2012-01-01 00:00:00
time.finish : 2016-02-01 00:00:00 time.finish : 2012-02-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 ! 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
...@@ -37,16 +37,16 @@ time.restart : False ...@@ -37,16 +37,16 @@ time.restart : False
! The length of a cycle is given in days, such that the integer 7 denotes the typically used weekly cycle. Valid entries are integers > 1 ! The length of a cycle is given in days, such that the integer 7 denotes the typically used weekly cycle. Valid entries are integers > 1
time.cycle : 7 time.cycle : 1
! The number of cycles of lag to use for a smoother version of CTDAS. CarbonTracker CO2 typically uses 5 weeks of lag. Valid entries are integers > 0 ! The number of cycles of lag to use for a smoother version of CTDAS. CarbonTracker CO2 typically uses 5 weeks of lag. Valid entries are integers > 0
time.nlag : 3 time.nlag : 2
! The directory under which the code, input, and output will be stored. This is the base directory for a run. The word ! The directory under which the code, input, and output will be stored. This is the base directory for a run. The word
! '/' will be replaced through the start_ctdas.sh script by a user-specified folder name. DO NOT REPLACE ! '/' will be replaced through the start_ctdas.sh script by a user-specified folder name. DO NOT REPLACE
dir.da_run : /scratch/snx3000/parsenov/projname dir.da_run : template
! The resources used to complete the data assimilation experiment. This depends on your computing platform. ! The resources used to complete the data assimilation experiment. This depends on your computing platform.
! The number of cycles per job denotes how many cycles should be completed before starting a new process or job, this ! The number of cycles per job denotes how many cycles should be completed before starting a new process or job, this
......
Markdown is supported
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