Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tsurata, Aki
CTDAS
Commits
9f784d79
Commit
9f784d79
authored
13 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
fixed bug where mean was left out of param values
parent
b96af699
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/ctgridded/statevector.py
+4
-3
4 additions, 3 deletions
da/ctgridded/statevector.py
with
4 additions
and
3 deletions
da/ctgridded/statevector.py
+
4
−
3
View file @
9f784d79
...
...
@@ -80,7 +80,7 @@ class CtGriddedStateVector(StateVector):
cov
=
cov_ocn
else
:
cov
=
f
.
GetVariable
(
'
covariance
'
)
cov_sf
=
0.
75
/
np
.
sqrt
(
cov
.
diagonal
().
sum
())
# this scaling factor makes the total variance close to the value of a single ecoregion
cov_sf
=
1
0.
0
/
np
.
sqrt
(
cov
.
diagonal
().
sum
())
# this scaling factor makes the total variance close to the value of a single ecoregion
cov
=
cov
*
cov_sf
dummy
=
f
.
close
()
...
...
@@ -121,7 +121,8 @@ class CtGriddedStateVector(StateVector):
dims
=
1
# start from 1.0 to account for the last parameter that scales Ice+Non-optimized, we have no covariance matrix for this though
for
matrix
in
covariancematrixlist
:
dims
+=
matrix
.
shape
[
0
]
for
matrix
in
covariancematrixlist
:
dims
+=
matrix
.
shape
[
0
]
if
dims
!=
self
.
nparams
:
msg
=
"
The total dimension of the covariance matrices passed (%d) does not add up to the prescribed nparams (%d), exiting...
"
%
(
dims
,
self
.
nparams
)
;
logging
.
error
(
msg
)
...
...
@@ -196,7 +197,7 @@ class CtGriddedStateVector(StateVector):
for
member
in
range
(
1
,
self
.
nmembers
):
NewMember
=
self
.
GetNewMember
(
member
)
NewMember
.
ParameterValues
=
dev_matrix
[:,
member
-
1
]
NewMember
.
ParameterValues
=
dev_matrix
[:,
member
-
1
]
+
NewMean
dummy
=
self
.
EnsembleMembers
[
lag
-
1
].
append
(
NewMember
)
msg
=
'
%d new ensemble members were added to the state vector # %d
'
%
(
self
.
nmembers
,
lag
)
;
logging
.
debug
(
msg
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment