Skip to content
Snippets Groups Projects
Commit bc2d93b3 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

New forward pipeline introduced for running just transport + CTDAS framework

parent c094f42e
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment