Newer
Older
#!/usr/bin/env python
#################################################################################################
# First order of business is always to make all other python modules accessible through the path
#################################################################################################
#################################################################################################
Peters, Wouter
committed
# Next, import the tools needed to initialize a data assimilation cycle
#################################################################################################
from da.tools.initexit import ValidateOptsArgs
from da.tools.initexit import ParseOptions
#################################################################################################
Peters, Wouter
committed
# Parse and validate the command line options, start logging
#################################################################################################
dummy = StartLogger()
opts, args = ParseOptions()
opts,args = ValidateOptsArgs(opts,args)
#################################################################################################
# Create the Cycle Control object for this job
#################################################################################################
from da.tools.initexit import CycleControl
DaCycle = CycleControl(opts,args)
###########################################################################################
### IMPORT THE APPLICATION SPECIFIC MODULES HERE, TO BE PASSED INTO THE MAIN PIPELINE!!! ##
###########################################################################################
Peters, Wouter
committed
from da.tools.pipeline import EnsembleSmootherPipeline
from da.platform.maunaloa import MaunaloaPlatForm
from da.ct.dasystem import CtDaSystem
from da.ct.statevector import CtStateVector
from da.ct.obs import CtObservations
from da.tm5.observationoperator import TM5ObservationOperator
from da.ct.optimizer import CtOptimizer
DaSystem = CtDaSystem('da/rc/carbontracker.rc')
ObsOperator = TM5ObservationOperator('/Users/peters/Modeling/TM5/tm5-ctdas-inv-ei-6x4.rc')
##########################################################################################
################### ENTER THE PIPELINE WITH THE OBJECTS PASSED BY THE USER ###############
##########################################################################################
from da.tools.pipeline import header,footer
msg = header+"Entering Pipeline "+footer ; logging.info(msg)
Peters, Wouter
committed
EnsembleSmootherPipeline(DaCycle,PlatForm, DaSystem, Samples,StateVector,ObsOperator,Optimizer)
##########################################################################################
################### All done
##########################################################################################