Skip to content
Snippets Groups Projects
Commit b6e8427d authored by Stefano Serafin's avatar Stefano Serafin
Browse files

Figures 7 and 8 revised

parent e5c58d2b
Branches
No related tags found
No related merge requests found
...@@ -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 = True fig02 = False
fig03 = True fig03 = False
fig04 = True fig04 = False
fig05 = True fig05 = False
fig06 = True fig06 = False
fig07 = True fig07 = False
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,ax2],c0,c1,c2 = plot_CBL_identifiability(exp_D,da_settings_D['obs_error_sdev_assimilate'][0],None,ax=[ax0,ax1,ax2]) [ax1,ax0],c0,c1 = plot_CBL_identifiability(exp_A,da_settings_A['obs_error_sdev_assimilate'][0],ax=[ax1,ax0])
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_yticks([0,1,2,3,4,5]) ax3.set_ylabel('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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment