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
fa8726cd
Commit
fa8726cd
authored
May 09, 2019
by
brunner
Browse files
No commit message
No commit message
parent
f5d50b22
Changes
2
Show whitespace changes
Inline
Side-by-side
da/cosmo/observationoperator_octe.py
View file @
fa8726cd
...
...
@@ -114,7 +114,7 @@ class ObservationOperator(object):
l
=
ofile
.
createVariable
(
'lambda'
,
np
.
float32
,
(
'nensembles'
,
'nparam'
),
fill_value
=-
999.99
)
co2
=
np
.
empty
(
shape
=
(
self
.
forecast_nmembers
,
self
.
nparams
))
for
m
in
range
(
0
,
20
):
for
m
in
range
(
0
,
self
.
forecast_nmembers
):
co2
[
m
,:]
=
members
[
m
].
param_values
l
[:]
=
co2
ofile
.
close
()
...
...
da/cosmo/statevector.py
View file @
fa8726cd
...
...
@@ -149,9 +149,7 @@ class StateVector(object):
self
.
nlag
=
int
(
dacycle
[
'time.nlag'
])
self
.
nmembers
=
int
(
dacycle
[
'da.optimizer.nmembers'
])
# self.nparams = int(dacycle.dasystem['nparameters'])
self
.
nparams
=
181
#self.nparams = 198
self
.
nparameters
=
int
(
dacycle
[
'nparameters'
])
self
.
nobs
=
0
self
.
obs_to_assimilate
=
()
# empty containter to hold observations to assimilate later on
...
...
@@ -164,7 +162,6 @@ class StateVector(object):
for
n
in
range
(
self
.
nlag
):
self
.
ensemble_members
[
n
]
=
[]
# This specifies the file to read with the gridded mask at 1x1 degrees. Each gridbox holds a number that specifies the parametermember
# that maps onto it. From this map, a dictionary is created that allows a reverse look-up so that we can map parameters to a grid.
...
...
@@ -181,8 +178,7 @@ class StateVector(object):
# Create a dictionary for state <-> gridded map conversions
# nparams = 198
nparams
=
181
nparams
=
self
.
nparameters
self
.
griddict
=
{}
for
pft
in
range
(
1
,
18
):
for
r
in
range
(
1
,
11
):
...
...
@@ -291,7 +287,7 @@ class StateVector(object):
self
.
ensemble_members
[
lag
].
append
(
newmember
)
# Create members 1:nmembers and add to ensemble_members list
for
member
in
range
(
1
,
self
.
nmembers
+
1
):
for
member
in
range
(
1
,
self
.
nmembers
):
# rands = np.random.uniform(low=-1., high=1., size=self.nparams-1)
# rands_bg = np.random.uniform(low=-0.05, high=0.05, size=1)
# rands = np.random.randn(self.nparams-1)
...
...
Write
Preview
Markdown
is supported
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