Skip to content

Commit

Permalink
Update CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed May 21, 2024
1 parent d7772b3 commit b6fb86e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/cmp_rt2bl.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,32 +127,32 @@ def plot_results(file_BL,file_RT):

# Comppute differences and determine valid plot range(s).
dz = z1-z2
if np.min(z1) != np.max(z1):
clev = np.arange(np.min(z1),np.max(z1),(np.max(z1)-np.min(z1))*0.05)
if np.count_nonzero(dz) > 0:
clevd = np.arange(np.min(dz),np.max(dz),(np.max(dz)-np.min(dz))*0.05)
else:
clevd = 0
# end if
else:
clev = 0
clevd = 0
# end if
#if np.min(z1) != np.max(z1):
# clev = np.arange(np.min(z1),np.max(z1),(np.max(z1)-np.min(z1))*0.05)
# if np.count_nonzero(dz) > 0:
# clevd = np.arange(np.min(dz),np.max(dz),(np.max(dz)-np.min(dz))*0.05)
# else:
# clevd = 0
# # end if
#else:
# clev = 0
# clevd = 0
## end if

# Finally, make figure.
if (np.size(x1) > 1):
fig = plt.figure(figsize=(13,10))
# Baselines
plt.subplot(3,1,1)
plt.title(SCM_BL[var].description, fontsize=12)
plt.contourf(x1, y1, z1, clev, cmap='YlGnBu')
plt.contourf(x1, y1, z1, 20, cmap='YlGnBu')
plt.ylim(1000,200)
plt.ylabel('(Pa)')
cbr = plt.colorbar()
cbr.set_label('('+SCM_RT[var].units+')')
# SCM RTs
plt.subplot(3,1,2)
plt.contourf(x2, y2, z2, clev, cmap='YlGnBu')
plt.contourf(x2, y2, z2, 20, cmap='YlGnBu')
plt.ylim(1000,200)
plt.ylabel('(Pa)')
plt.xlabel('(hours)')
Expand All @@ -162,7 +162,7 @@ def plot_results(file_BL,file_RT):
if np.count_nonzero(dz) > 0:
plt.subplot(3,1,3)
plt.title("Difference (top - middle)", fontsize=8)
plt.contourf(x2, y2, dz, clevd, cmap='bwr')
plt.contourf(x2, y2, dz, 20, cmap='bwr')
plt.ylim(1000,200)
plt.ylabel('(Pa)')
plt.xlabel('(hours)')
Expand Down

0 comments on commit b6fb86e

Please sign in to comment.