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 7699051 commit d7772b3
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions test/cmp_rt2bl.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,27 @@ def plot_results(file_BL,file_RT):
# endif

# Make figure
fig = plt.figure(figsize=(13,10))
# Baselines and SCM RTs on same plot
plt.subplot(2,1,1)
plt.title(SCM_BL[var].description)
plt.plot(x1, y1, color='blue')
plt.plot(x2, y2, color='black')
plt.ylabel('('+SCM_BL[var].units+')')
plt.xlabel('(hours)')
# Difference (Baseline-SCMRT)
plt.subplot(2,1,2)
plt.title("Difference (blue - black)")
plt.plot(x1, y1 - y2, color='red')
plt.plot(x1, np.zeros(len(y1)), color='grey',linestyle='dashed')
plt.ylabel('('+SCM_RT[var].units+')')
plt.xlabel('(hours)')
#
fileOUT = 'scm.' + var +'.png'
plt.savefig(fileOUT)
#
plot_files.append(fileOUT)
if (np.size(x1) > 1):
fig = plt.figure(figsize=(13,10))
# Baselines and SCM RTs on same plot
plt.subplot(2,1,1)
plt.title(SCM_BL[var].description)
plt.plot(x1, y1, color='blue')
plt.plot(x2, y2, color='black')
plt.ylabel('('+SCM_BL[var].units+')')
plt.xlabel('(hours)')
# Difference (Baseline-SCMRT)
plt.subplot(2,1,2)
plt.title("Difference (blue - black)")
plt.plot(x1, y1 - y2, color='red')
plt.plot(x1, np.zeros(len(y1)), color='grey',linestyle='dashed')
plt.ylabel('('+SCM_RT[var].units+')')
plt.xlabel('(hours)')
#
fileOUT = 'scm.' + var +'.png'
plt.savefig(fileOUT)
#
plot_files.append(fileOUT)
# three-dimensional variables
elif len(SCM_BL[var].shape) == 3:
z1 = np.transpose(SCM_BL[var][:,:,0]).squeeze()
Expand Down

0 comments on commit d7772b3

Please sign in to comment.