Commit 2b70cb26 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

try making a package from the code

parent dd098b72
This diff is collapsed.
......@@ -222,7 +222,9 @@ def PrepareObs(CycleInfo,type='forecast'):
the observations will depend on the specific application, the final result of this step is an output
file called "observations.nc" which carries the x,y,z,t, dt information of each observation """
if CycleInfo.da_settings['da.system'] == 'CarbonTracker': import ct_tools as da_system
if CycleInfo.da_settings['da.system'] == 'CarbonTracker':
import ct_tools as da_system
import ct_observation_tools as obs
msg = "Using %s as DA system" % da_system.identifier ; logging.debug(msg)
......@@ -234,7 +236,7 @@ def PrepareObs(CycleInfo,type='forecast'):
CycleInfo.da_settings['da.system.info'] = rc_da_system
Samples = da_system.PrepareObs(CycleInfo,type=type)
Samples = obs.PrepareObs(CycleInfo,type=type)
return Samples
......@@ -247,7 +249,7 @@ def PrepareState(CycleInfo):
"""
if CycleInfo.da_settings['da.system'] == 'CarbonTracker': import ct_tools as da_system
if CycleInfo.da_settings['da.system'] == 'CarbonTracker': import ct_statevector_tools as da_system
StateVector = da_system.PrepareState(CycleInfo )
......@@ -334,11 +336,13 @@ def ReadModelSamples(StateVector):
def Optimize(CycleInfo, StateVector ):
""" Perform least-squares minimization"""
if CycleInfo.da_settings['da.system'] == 'CarbonTracker': import ct_tools as da_system
if CycleInfo.da_settings['da.system'] == 'CarbonTracker':
import ct_tools as da_system
import ct_optimizer_tools as opt
DaSystem = da_system.DaInfo(CycleInfo.da_settings['da.system.rc'])
optimizer = da_system.CtOptimizer(CycleInfo, DaSystem)
optimizer = opt.CtOptimizer(CycleInfo, DaSystem)
def CleanUpCycle(CycleInfo):
"""
......
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