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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stefano Serafin
PE_CBL
Commits
b6e8427d
Commit
b6e8427d
authored
11 months ago
by
Stefano Serafin
Browse files
Options
Downloads
Patches
Plain Diff
Figures 7 and 8 revised
parent
e5c58d2b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
PE_CBL.py
+55
-32
55 additions, 32 deletions
PE_CBL.py
with
55 additions
and
32 deletions
PE_CBL.py
+
55
−
32
View file @
b6e8427d
...
@@ -97,12 +97,12 @@ if __name__ == '__main__':
...
@@ -97,12 +97,12 @@ if __name__ == '__main__':
# Decide what figures to plot
# Decide what figures to plot
fig01
=
False
fig01
=
False
fig02
=
Tru
e
fig02
=
Fals
e
fig03
=
Tru
e
fig03
=
Fals
e
fig04
=
Tru
e
fig04
=
Fals
e
fig05
=
Tru
e
fig05
=
Fals
e
fig06
=
Tru
e
fig06
=
Fals
e
fig07
=
Tru
e
fig07
=
Fals
e
fig08
=
True
fig08
=
True
# Other possible, optional, plots
# Other possible, optional, plots
...
@@ -509,17 +509,19 @@ if __name__ == '__main__':
...
@@ -509,17 +509,19 @@ if __name__ == '__main__':
if
fig02
:
if
fig02
:
exp_A
=
pickle
.
load
(
open
(
"
exp_A.pickle
"
,
"
rb
"
))
fig
,
[[
ax0
,
ax1
],
[
ax2
,
ax3
]]
=
p
.
subplots
(
2
,
2
,
constrained_layout
=
True
)
fig
,
[[
ax0
,
ax1
],
[
ax2
,
ax3
]]
=
p
.
subplots
(
2
,
2
,
constrained_layout
=
True
)
fig
.
set_size_inches
(
6
,
6
)
fig
.
set_size_inches
(
6
,
6
)
#
#
[
ax0
,
ax1
,
ax2
],
c0
,
c1
,
c2
=
plot_CBL_identifiability
(
exp_A
,
da_settings_A
[
'
obs_error_sdev_assimilate
'
][
0
],
None
,
ax
=
[
ax0
,
ax1
,
ax2
])
[
ax0
,
ax1
,
ax2
],
c0
,
c1
,
c2
=
plot_CBL_identifiability
(
exp_A
,
da_settings_A
[
'
obs_error_sdev_assimilate
'
][
0
],
ax
=
[
ax0
,
ax1
,
ax2
])
ax0
.
set_title
(
r
'
a) Exp. A, $\rho(p\prime\prime,y_b}$)
'
)
ax0
.
set_title
(
r
'
a) Exp. A, $\rho(p\prime\prime,y_b}$)
'
)
ax0
.
set_xlabel
(
'
Time (h)
'
)
ax0
.
set_xlabel
(
'
Time (h)
'
)
ax0
.
set_ylabel
(
'
Height (m)
'
)
ax0
.
set_ylabel
(
'
Height (m)
'
)
ax1
.
set_title
(
r
'
b) Exp. A, $\delta
y
\cdot(\sigma_{p\prime\prime}/\sigma_{y^b})$
'
)
ax1
.
set_title
(
r
'
b) Exp. A, $\delta
\overline{y}
\cdot(\sigma_{p\prime\prime}/\sigma_{y^b})$
'
)
ax1
.
set_xlabel
(
'
Time (h)
'
)
ax1
.
set_xlabel
(
'
Time (h)
'
)
ax1
.
set_ylabel
(
'
Height (m)
'
)
ax1
.
set_ylabel
(
'
Height (m)
'
)
ax2
.
set_title
(
r
'
c) Exp. A, $\delta
p
\prime\prime$
'
)
ax2
.
set_title
(
r
'
c) Exp. A, $\delta
\overline{p}
\prime\prime$
'
)
ax2
.
set_xlabel
(
'
Time (h)
'
)
ax2
.
set_xlabel
(
'
Time (h)
'
)
ax2
.
set_ylabel
(
'
Height (m)
'
)
ax2
.
set_ylabel
(
'
Height (m)
'
)
ax3
=
plot_CBL_PE
(
exp_A
,
None
,
ax
=
ax3
)
ax3
=
plot_CBL_PE
(
exp_A
,
None
,
ax
=
ax3
)
...
@@ -546,6 +548,11 @@ if __name__ == '__main__':
...
@@ -546,6 +548,11 @@ if __name__ == '__main__':
if
fig04
:
if
fig04
:
exp_B1
=
pickle
.
load
(
open
(
"
exp_B1.pickle
"
,
"
rb
"
))
exp_B2
=
pickle
.
load
(
open
(
"
exp_B2.pickle
"
,
"
rb
"
))
exp_B3
=
pickle
.
load
(
open
(
"
exp_B3.pickle
"
,
"
rb
"
))
exp_B4
=
pickle
.
load
(
open
(
"
exp_B4.pickle
"
,
"
rb
"
))
fig
,
[[
ax1
,
ax2
],
[
ax3
,
ax4
]]
=
p
.
subplots
(
2
,
2
,
constrained_layout
=
True
)
fig
,
[[
ax1
,
ax2
],
[
ax3
,
ax4
]]
=
p
.
subplots
(
2
,
2
,
constrained_layout
=
True
)
fig
.
set_size_inches
(
6
,
4
)
fig
.
set_size_inches
(
6
,
4
)
#
#
...
@@ -579,6 +586,9 @@ if __name__ == '__main__':
...
@@ -579,6 +586,9 @@ if __name__ == '__main__':
if
fig05
:
if
fig05
:
exp_C1
=
pickle
.
load
(
open
(
"
exp_C1.pickle
"
,
"
rb
"
))
exp_C2
=
pickle
.
load
(
open
(
"
exp_C2.pickle
"
,
"
rb
"
))
fig
,
[
ax1
,
ax2
]
=
p
.
subplots
(
1
,
2
,
constrained_layout
=
True
)
fig
,
[
ax1
,
ax2
]
=
p
.
subplots
(
1
,
2
,
constrained_layout
=
True
)
fig
.
set_size_inches
(
6
,
2
)
fig
.
set_size_inches
(
6
,
2
)
#
#
...
@@ -613,8 +623,10 @@ if __name__ == '__main__':
...
@@ -613,8 +623,10 @@ if __name__ == '__main__':
c1
=
ax1
.
pcolormesh
(
exp_C1
.
da
.
time
/
3600
,
exp_C1
.
nr
.
zt
,
updates_C1
,
vmin
=-
0.03
,
vmax
=
0.03
,
cmap
=
'
RdBu_r
'
)
c1
=
ax1
.
pcolormesh
(
exp_C1
.
da
.
time
/
3600
,
exp_C1
.
nr
.
zt
,
updates_C1
,
vmin
=-
0.03
,
vmax
=
0.03
,
cmap
=
'
RdBu_r
'
)
c2
=
ax2
.
pcolormesh
(
exp_C2
.
da
.
time
/
3600
,
exp_C2
.
nr
.
zt
,
updates_C2
,
vmin
=-
0.03
,
vmax
=
0.03
,
cmap
=
'
RdBu_r
'
)
c2
=
ax2
.
pcolormesh
(
exp_C2
.
da
.
time
/
3600
,
exp_C2
.
nr
.
zt
,
updates_C2
,
vmin
=-
0.03
,
vmax
=
0.03
,
cmap
=
'
RdBu_r
'
)
#
#
ax1
.
set_title
(
r
'
a) Exp. C$_1$, $\theta_a-\theta_b$
'
)
ax1
.
set_ylim
([
0
,
2000
])
ax2
.
set_title
(
r
'
b) Exp. C$_2$, $\theta_a-\theta_b$
'
)
ax2
.
set_ylim
([
0
,
2000
])
ax1
.
set_title
(
r
'
a) Exp. C$_1$, $\overline{\theta}_a-\overline{\theta}_b$
'
)
ax2
.
set_title
(
r
'
b) Exp. C$_2$, $\overline{\theta}_a-\overline{\theta}_b$
'
)
ax1
.
set_xlabel
(
'
Time (h)
'
)
ax1
.
set_xlabel
(
'
Time (h)
'
)
ax2
.
set_xlabel
(
'
Time (h)
'
)
ax2
.
set_xlabel
(
'
Time (h)
'
)
ax1
.
set_ylabel
(
'
Height (m)
'
)
ax1
.
set_ylabel
(
'
Height (m)
'
)
...
@@ -629,43 +641,54 @@ if __name__ == '__main__':
...
@@ -629,43 +641,54 @@ if __name__ == '__main__':
if
fig07
:
if
fig07
:
exp_D
=
pickle
.
load
(
open
(
"
exp_D.pickle
"
,
"
rb
"
))
fig
,
[
ax0
,
ax1
]
=
p
.
subplots
(
1
,
2
,
constrained_layout
=
True
)
fig
.
set_size_inches
(
6
,
3
)
#
ax0
,
c0
=
plot_CBL_identifiability
(
exp_D
,
da_settings_D
[
'
obs_error_sdev_assimilate
'
][
0
],
ax
=
ax0
)
ax0
.
set_title
(
r
'
a) Exp. D, $\rho(p\prime\prime,y_b}$)
'
)
ax0
.
set_xlabel
(
'
Time (h)
'
)
ax0
.
set_ylabel
(
'
Height (m)
'
)
ax1
=
plot_CBL_PE
(
exp_D
,
None
,
ax
=
ax1
)
ax1
.
set_title
(
r
'
b) Exp. D, evolution of $p$
'
)
ax1
.
set_xlabel
(
'
Time (h)
'
)
ax1
.
set_yticks
([
0
,
1
,
2
,
3
,
4
,
5
])
p
.
colorbar
(
c0
,
orientation
=
'
horizontal
'
)
#
fig
.
savefig
(
'
fig07.png
'
,
format
=
'
png
'
,
dpi
=
300
)
p
.
close
(
fig
)
if
fig08
:
exp_A
=
pickle
.
load
(
open
(
"
exp_A.pickle
"
,
"
rb
"
))
exp_D
=
pickle
.
load
(
open
(
"
exp_D.pickle
"
,
"
rb
"
))
fig
,
[[
ax0
,
ax1
],[
ax2
,
ax3
]]
=
p
.
subplots
(
2
,
2
,
constrained_layout
=
True
)
fig
,
[[
ax0
,
ax1
],[
ax2
,
ax3
]]
=
p
.
subplots
(
2
,
2
,
constrained_layout
=
True
)
fig
.
set_size_inches
(
6
,
6
)
fig
.
set_size_inches
(
6
,
6
)
#
#
[
ax0
,
ax1
,
ax
2
],
c0
,
c1
,
c2
=
plot_CBL_identifiability
(
exp_
D
,
da_settings_
D
[
'
obs_error_sdev_assimilate
'
][
0
],
None
,
ax
=
[
ax0
,
ax1
,
ax
2
])
[
ax1
,
ax
0
],
c0
,
c1
=
plot_CBL_identifiability
(
exp_
A
,
da_settings_
A
[
'
obs_error_sdev_assimilate
'
][
0
],
ax
=
[
ax1
,
ax
0
])
ax0
.
set_title
(
r
'
a) Exp.
D
, $\
rho(p\prime\prime,y_b
}$
)
'
)
ax0
.
set_title
(
r
'
a) Exp.
A
, $\
delta\overline{y
}$
'
)
ax0
.
set_xlabel
(
'
Time (h)
'
)
ax0
.
set_xlabel
(
'
Time (h)
'
)
ax0
.
set_ylabel
(
'
Height (m)
'
)
ax0
.
set_ylabel
(
'
Height (m)
'
)
ax1
.
set_title
(
r
'
b) Exp.
D
, $\
delta y\cdot(\
sigma_{p\prime\prime}/\sigma_{y^b}
)
$
'
)
ax1
.
set_title
(
r
'
b) Exp.
A
, $\sigma_{p\prime\prime}/\sigma_{y^b}$
'
)
ax1
.
set_xlabel
(
'
Time (h)
'
)
ax1
.
set_xlabel
(
'
Time (h)
'
)
ax1
.
set_ylabel
(
'
Height (m)
'
)
ax1
.
set_ylabel
(
'
Height (m)
'
)
ax2
.
set_title
(
r
'
c) Exp. D, $\delta p\prime\prime$
'
)
[
ax3
,
ax2
],
c2
,
c3
=
plot_CBL_identifiability
(
exp_D
,
da_settings_D
[
'
obs_error_sdev_assimilate
'
][
0
],
ax
=
[
ax3
,
ax2
])
ax2
.
set_title
(
r
'
c) Exp. D, $\delta\overline{y}$
'
)
ax2
.
set_xlabel
(
'
Time (h)
'
)
ax2
.
set_xlabel
(
'
Time (h)
'
)
ax2
.
set_ylabel
(
'
Height (m)
'
)
ax2
.
set_ylabel
(
'
Height (m)
'
)
ax3
=
plot_CBL_PE
(
exp_D
,
None
,
ax
=
ax3
)
ax3
.
set_title
(
r
'
d) Exp. D, $\sigma_{p\prime\prime}/\sigma_{y^b}$
'
)
ax3
.
set_title
(
r
'
d) Exp. D, evolution of $p$
'
)
ax3
.
set_xlabel
(
'
Time (h)
'
)
ax3
.
set_xlabel
(
'
Time (h)
'
)
ax3
.
set_y
ticks
([
0
,
1
,
2
,
3
,
4
,
5
]
)
ax3
.
set_y
label
(
'
Height (m)
'
)
p
.
colorbar
(
c0
,
orientation
=
'
horizontal
'
)
p
.
colorbar
(
c0
,
orientation
=
'
horizontal
'
)
p
.
colorbar
(
c1
,
orientation
=
'
horizontal
'
)
p
.
colorbar
(
c1
,
orientation
=
'
horizontal
'
)
p
.
colorbar
(
c2
,
orientation
=
'
horizontal
'
)
p
.
colorbar
(
c2
,
orientation
=
'
horizontal
'
)
p
.
colorbar
(
c3
,
orientation
=
'
horizontal
'
)
#
#
fig
.
savefig
(
'
fig08.png
'
,
format
=
'
png
'
,
dpi
=
300
)
fig
.
savefig
(
'
fig07.png
'
,
format
=
'
png
'
,
dpi
=
300
)
p
.
close
(
fig
)
p
.
close
(
fig
)
if
fig08
:
experiments_pe
=
[
exp_A
]
experiments_nope
=
[
exp_A_noPE
]
labels
=
[
"
Exp. A
"
]
plot_diagnostics
(
experiments_pe
,
experiments_nope
,
labels
,
'
fig08a.png
'
)
experiments_pe
=
[
exp_D
]
experiments_nope
=
[
exp_D_noPE
]
labels
=
[
"
Exp. D
"
]
plot_diagnostics
(
experiments_pe
,
experiments_nope
,
labels
,
'
fig08d.png
'
)
if
opt01
:
if
opt01
:
da_settings
=
{
'
cbl_settings
'
:
dict
(
default_cbl_settings
),
da_settings
=
{
'
cbl_settings
'
:
dict
(
default_cbl_settings
),
...
...
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