Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PE_CBL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stefano Serafin
PE_CBL
Commits
9c5b013a
Commit
9c5b013a
authored
2 months ago
by
Stefano Serafin
Browse files
Options
Downloads
Patches
Plain Diff
fixed a bug for no-PE runs
parent
14d2581f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models.py
+11
-8
11 additions, 8 deletions
models.py
with
11 additions
and
8 deletions
models.py
+
11
−
8
View file @
9c5b013a
...
...
@@ -42,15 +42,18 @@ class CBL:
self
.
parameter_true
=
np
.
array
([
self
.
parameter_true
])
self
.
parameter_ensemble_min
=
np
.
array
([
self
.
parameter_ensemble_min
])
self
.
parameter_ensemble_max
=
np
.
array
([
self
.
parameter_ensemble_max
])
self
.
parameter_inflation_rtps_alpha
=
np
.
array
([
self
.
parameter_inflation_rtps_alpha
])
if
self
.
parameter_transform
==
'
pit
'
:
self
.
parameter_transform
=
[
transform_pit
]
elif
self
.
parameter_transform
==
'
log
'
:
self
.
parameter_transform
=
[
transform_log
]
elif
self
.
parameter_transform
==
'
none
'
:
self
.
parameter_transform
=
[
transform_none
]
#self.parameter_inflation_rtps_alpha = np.array([self.parameter_inflation_rtps_alpha])
if
not
hasattr
(
self
,
'
do_parameter_estimation
'
):
self
.
do_parameter_estimation
==
False
if
self
.
do_parameter_estimation
:
if
self
.
parameter_transform
==
'
pit
'
:
self
.
parameter_transform
=
[
transform_pit
]
elif
self
.
parameter_transform
==
'
log
'
:
self
.
parameter_transform
=
[
transform_log
]
elif
self
.
parameter_transform
==
'
none
'
:
self
.
parameter_transform
=
[
transform_none
]
else
:
self
.
parameter_transform
=
[
transform_none
]
def
initialize
(
self
,
argin
,
coordinates
=
None
):
...
...
@@ -154,7 +157,7 @@ class CBL:
assert
(
self
.
parameter_ensemble_min
[
k
]
<=
self
.
parameter_ensemble_max
[
k
]),
\
f
'
parameter min must be less or equal to max,
\
got
{
self
.
parameter_ensemble_min
[
k
],
self
.
parameter_ensemble_max
[
k
]
}
'
x0
[
-
self
.
parameter_number
:,:]
=
self
.
initial_perturbed_parameters
x0
[
-
self
.
parameter_number
:,:]
=
self
.
initial_perturbed_parameters
# Squeeze ensemble dimension if needed
if
self
.
nens
==
1
:
...
...
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