Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
NearRealTimeCTDAS
CTDAS
Commits
bc2d93b3
Commit
bc2d93b3
authored
Mar 28, 2013
by
Peters, Wouter
Browse files
New forward pipeline introduced for running just transport + CTDAS framework
parent
c094f42e
Changes
1
Hide whitespace changes
Inline
Side-by-side
da/tools/pipeline.py
View file @
bc2d93b3
...
...
@@ -47,16 +47,23 @@ def ForwardPipeline(DaCycle, PlatForm, DaSystem, Samples, StateVector, ObsOperat
StateVector
.
Initialize
()
#LU w prepare state inicjalizujemy wektor stanu ktoremu dopiero co przypisalismy wartosci.
# Read from other simulation
# Read from other simulation
and write priors, then read posteriors and propagate
filename
=
os
.
path
.
join
(
DaCycle
[
'dir.forward.savestate'
],
DaCycle
[
'time.start'
].
strftime
(
'%Y%m%d'
),
'savestate.nc'
)
#LU teraz czytamy savestate.nc
StateVector
.
ReadFromFile
(
filename
)
# by default will read "opt"(imized) variables, and then propagate
StateVector
.
ReadFromLegacyFile
(
filename
,
'prior'
)
StateVector
.
isOptimized
=
False
# Write as prior fluxes to output dir
savedir
=
DaCycle
[
'dir.output'
]
filename
=
os
.
path
.
join
(
savedir
,
'savestate.nc'
)
#LU to jest state vector po zoptymalizowaniu.
StateVector
.
WriteToFile
(
filename
)
savefilename
=
os
.
path
.
join
(
savedir
,
'savestate.nc'
)
#LU to jest state vector po zoptymalizowaniu.
StateVector
.
WriteToFile
(
savefilename
)
# Now read optimized fluxes to propagate
StateVector
.
ReadFromLegacyFile
(
filename
)
# by default will read "opt"(imized) variables, and then propagate
StateVector
.
isOptimized
=
True
# Run forward with these parameters
...
...
@@ -119,6 +126,8 @@ def prepare_state(DaCycle, StateVector):
# Finally, also write the StateVector to a file so that we can always access the a-priori information
filename
=
os
.
path
.
join
(
DaCycle
[
'dir.forward.savestate'
],
DaCycle
[
'time.start'
].
strftime
(
'%Y%m%d'
),
'savestate.nc'
)
#LU teraz czytamy savestate.nc
StateVector
.
ReadFromLegacyFile
(
filename
,
'prior'
)
filename
=
os
.
path
.
join
(
DaCycle
[
'dir.output'
],
'savestate.nc'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment