Commit 2016b9a7 authored by Leonie Pick's avatar Leonie Pick

Changes to Kp G-scale in plots

parent 9b9225ce
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -52,11 +52,16 @@ def Selection(Time,Date,HMC,Index_thres1,StormIndices,IndexMin1,IndexMin2,Kp,KpH
Kp_step = 0.333333
ax3b = ax[3].twinx()
ax3b.bar(Time[start:end,4][::3],Kp[startKP:endKP+1],3/(24*365),align='edge',edgecolor=Dst_color,color=Dst_color,zorder=1)
G1 = Rectangle((Time[start,4],5-1.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='yellow',facecolor='yellow',zorder=0,alpha=0.3,label='G1')
G2 = Rectangle((Time[start,4],6-1.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='gold',facecolor='gold',zorder=0,alpha=0.3,label='G2')
G3 = Rectangle((Time[start,4],7-1.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='orange',facecolor='orange',zorder=0,alpha=0.3,label='G3')
G4 = Rectangle((Time[start,4],8-1.5*Kp_step),len(Time[start:end,4]),4*Kp_step,edgecolor='red',facecolor='red',zorder=0,alpha=0.3,label='G4')
G5 = Rectangle((Time[start,4],9-0.5*Kp_step),len(Time[start:end,4]),1*Kp_step,edgecolor='maroon',facecolor='maroon',zorder=0,alpha=0.3,label='G5')
#G1 = Rectangle((Time[start,4],5-1.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='yellow',facecolor='yellow',zorder=0,alpha=0.3,label='G1')
G1 = Rectangle((Time[start,4],5-.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='yellow',facecolor='yellow',zorder=0,alpha=0.3,label='G1')
#G2 = Rectangle((Time[start,4],6-1.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='gold',facecolor='gold',zorder=0,alpha=0.3,label='G2')
G2 = Rectangle((Time[start,4],6-.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='gold',facecolor='gold',zorder=0,alpha=0.3,label='G2')
#G3 = Rectangle((Time[start,4],7-1.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='orange',facecolor='orange',zorder=0,alpha=0.3,label='G3')
G3 = Rectangle((Time[start,4],7-.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='orange',facecolor='orange',zorder=0,alpha=0.3,label='G3')
#G4 = Rectangle((Time[start,4],8-1.5*Kp_step),len(Time[start:end,4]),4*Kp_step,edgecolor='red',facecolor='red',zorder=0,alpha=0.3,label='G4')
G4 = Rectangle((Time[start,4],8-.5*Kp_step),len(Time[start:end,4]),3*Kp_step,edgecolor='red',facecolor='red',zorder=0,alpha=0.3,label='G4')
#G5 = Rectangle((Time[start,4],9-0.5*Kp_step),len(Time[start:end,4]),1*Kp_step,edgecolor='maroon',facecolor='maroon',zorder=0,alpha=0.3,label='G5')
G5 = Rectangle((Time[start,4],9-.5*Kp_step),len(Time[start:end,4]),1*Kp_step,edgecolor='maroon',facecolor='maroon',zorder=0,alpha=0.3,label='G5')
ax3b.add_patch(G1);ax3b.add_patch(G2);ax3b.add_patch(G3);ax3b.add_patch(G4);ax3b.add_patch(G5);
ax[3].set_zorder(ax3b.get_zorder()+1)
ax[3].patch.set_visible(False)
......@@ -96,8 +101,8 @@ def Selection(Time,Date,HMC,Index_thres1,StormIndices,IndexMin1,IndexMin2,Kp,KpH
ax[2].text(0.02,0.9,'Step 3',transform=ax[2].transAxes)
if Save == True:
fig.savefig('./Dump/Fig/development/EventSelection.pdf',format='pdf',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/development/EventSelection.png',format='png',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/development/EventSelection_2.pdf',format='pdf',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/development/EventSelection_2.png',format='png',dpi=200,transparent=True)
plt.show()
####################################################################
......@@ -270,10 +275,15 @@ def IndexDist(Time,YearsIndex,Storms,RefStorms,Kp_all,KpHours_all,HMC,Dst,mode,S
G5Dst = Rectangle(((350-Index_range[0])/step,0),600/step,100,edgecolor='maroon',facecolor='maroon',zorder=0,alpha=0.3)#,label='great')
# NOAA G-scale
G1 = Rectangle(((5-1.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='yellow',facecolor='yellow',zorder=0,alpha=0.3,label='G1')
G2 = Rectangle(((6-1.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='gold',facecolor='gold',zorder=0,alpha=0.3,label='G2')
G3 = Rectangle(((7-1.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='orange',facecolor='orange',zorder=0,alpha=0.3,label='G3')
G4 = Rectangle(((8-1.5*step-Index_range[0])/step-.5,0),4,100,edgecolor='red',facecolor='red',zorder=0,alpha=0.3,label='G4')
#G1 = Rectangle(((5-1.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='yellow',facecolor='yellow',zorder=0,alpha=0.3,label='G1')
G1 = Rectangle(((5-.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='yellow',facecolor='yellow',zorder=0,alpha=0.3,label='G1')
#G2 = Rectangle(((6-1.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='gold',facecolor='gold',zorder=0,alpha=0.3,label='G2')
G2 = Rectangle(((6-.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='gold',facecolor='gold',zorder=0,alpha=0.3,label='G2')
#G3 = Rectangle(((7-1.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='orange',facecolor='orange',zorder=0,alpha=0.3,label='G3')
G3 = Rectangle(((7-.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='orange',facecolor='orange',zorder=0,alpha=0.3,label='G3')
#G4 = Rectangle(((8-1.5*step-Index_range[0])/step-.5,0),4,100,edgecolor='red',facecolor='red',zorder=0,alpha=0.3,label='G4')
G4 = Rectangle(((8-.5*step-Index_range[0])/step-.5,0),3,100,edgecolor='red',facecolor='red',zorder=0,alpha=0.3,label='G4')
#G5 = Rectangle(((9-0.5*step-Index_range[0])/step-.5,0),1,100,edgecolor='maroon',facecolor='maroon',zorder=0,alpha=0.3,label='G5')
G5 = Rectangle(((9-0.5*step-Index_range[0])/step-.5,0),1,100,edgecolor='maroon',facecolor='maroon',zorder=0,alpha=0.3,label='G5')
if mode == 'HMC' or mode == 'Dst':
......@@ -314,8 +324,8 @@ def IndexDist(Time,YearsIndex,Storms,RefStorms,Kp_all,KpHours_all,HMC,Dst,mode,S
ax2.set_ylabel('Occurrence [%]')
if Save == True:
fig.savefig('./Dump/Fig/development/'+mode+'Dist.pdf',format='pdf',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/development/'+mode+'Dist.png',format='png',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/development/'+mode+'Dist_2.pdf',format='pdf',dpi=200,transparent=True)
fig.savefig('./Dump/Fig/development/'+mode+'Dist_2.png',format='png',dpi=200,transparent=True)
plt.show()
###
###
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment