Skip to content

Commit

Permalink
minor modification to be consistent with GMD manuscript revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuaiqi Tang committed Mar 20, 2022
1 parent f49fd99 commit 05c070d
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/esmac_diags/plotting/calc_statistic_flight_CN.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import scipy.stats
from ..subroutines.read_aircraft import read_cpc, read_RF_NCAR
from ..subroutines.read_netcdf import read_merged_size,read_extractflight
from ..subroutines.quality_control import qc_cpc_air, qc_remove_neg, qc_mask_takeoff_landing
from ..subroutines.quality_control import qc_cpc_air, qc_remove_neg, qc_cn_max, qc_mask_takeoff_landing

def run_plot(settings):
#%% variables from settings
Expand Down Expand Up @@ -162,7 +162,10 @@ def run_plot(settings):
raise ValueError('find too many files: '+filename)

# some quality checks
uhsas100=qc_remove_neg(uhsas100)
cpc10 = qc_cn_max(cpc10, 10)
cpc10 = qc_remove_neg(cpc10)
uhsas100 = qc_cn_max(uhsas100, 100)
uhsas100 = qc_remove_neg(uhsas100)

# exclude 30min after takeoff and before landing
cpc10 = qc_mask_takeoff_landing(time_cpc,cpc10)
Expand Down
8 changes: 8 additions & 0 deletions src/esmac_diags/plotting/plot_flight_pdf_AerosolSize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import glob
import matplotlib.pyplot as plt
import matplotlib.ticker
import numpy as np
from ..subroutines.read_aircraft import read_RF_NCAR
from ..subroutines.specific_data_treatment import lwc2cflag
Expand Down Expand Up @@ -228,6 +229,13 @@ def run_plot(settings):
ax.set_xlim(0.67,4500)
ax.set_xlabel('Diameter (nm)',fontsize=13)
ax.set_ylabel('#/dlnDp (cm$^{-3}$)',fontsize=13)

y_major = matplotlib.ticker.LogLocator(base = 10.0, numticks = 5)
ax.yaxis.set_major_locator(y_major)
y_minor = matplotlib.ticker.LogLocator(base = 10.0, subs = np.arange(1.0, 10.0) * 0.1, numticks = 10)
ax.yaxis.set_minor_locator(y_minor)
ax.yaxis.set_minor_formatter(matplotlib.ticker.NullFormatter())
plt.grid(True,linestyle=':')

if campaign in ['HISCALE', 'ACEENA']:
ax.set_title(campaign+' '+IOP,fontsize=14)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import glob
import matplotlib.pyplot as plt
import matplotlib.ticker
import numpy as np
# from time_format_change import hhmmss2sec,yyyymmdd2cday
from ..subroutines.read_aircraft import read_cpc
Expand Down Expand Up @@ -325,6 +326,20 @@ def run_plot(settings):

ax1.set_title('size distribution for ACEENA '+IOP,fontsize=15)


y_major = matplotlib.ticker.LogLocator(base = 10.0, numticks = 5)
ax1.yaxis.set_major_locator(y_major)
ax2.yaxis.set_major_locator(y_major)
ax3.yaxis.set_major_locator(y_major)
y_minor = matplotlib.ticker.LogLocator(base = 10.0, subs = np.arange(1.0, 10.0) * 0.1, numticks = 10)
ax1.yaxis.set_minor_locator(y_minor)
ax1.yaxis.set_minor_formatter(matplotlib.ticker.NullFormatter())
ax2.yaxis.set_minor_locator(y_minor)
ax2.yaxis.set_minor_formatter(matplotlib.ticker.NullFormatter())
ax3.yaxis.set_minor_locator(y_minor)
ax3.yaxis.set_minor_formatter(matplotlib.ticker.NullFormatter())
plt.grid(True,linestyle=':')

ax3.text(200,3000,'Near Surface ('+str(pdf_sfc_obs.shape[1])+' legs)',fontsize=12)
ax2.text(200,3000,'Near Clouds ('+str(pdf_near_obs.shape[1])+' legs)',fontsize=12)
ax1.text(200,3000,'Above Clouds ('+str(pdf_above_obs.shape[1])+' legs)',fontsize=12)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import glob
import matplotlib.pyplot as plt
import matplotlib.ticker
import numpy as np
from ..subroutines.time_format_change import hhmmss2sec,yyyymmdd2cday
from ..subroutines.read_ARMdata import read_pblhtmpl1
Expand Down Expand Up @@ -314,6 +315,17 @@ def run_plot(settings):
ax0.set_title('size distribution for Hi-Scale '+IOP,fontsize=15)
fig.text(.65,.83,'Above PBL ('+str(n_above)+' legs)',fontsize=12)
fig.text(.65,.43,'Below PBL ('+str(n_below)+' legs)',fontsize=12)

y_major = matplotlib.ticker.LogLocator(base = 10.0, numticks = 5)
ax0.yaxis.set_major_locator(y_major)
ax1.yaxis.set_major_locator(y_major)
y_minor = matplotlib.ticker.LogLocator(base = 10.0, subs = np.arange(1.0, 10.0) * 0.1, numticks = 10)
ax0.yaxis.set_minor_locator(y_minor)
ax0.yaxis.set_minor_formatter(matplotlib.ticker.NullFormatter())
ax1.yaxis.set_minor_locator(y_minor)
ax1.yaxis.set_minor_formatter(matplotlib.ticker.NullFormatter())
plt.grid(True,linestyle=':')

# fig.text(.68,.83,'Above PBL ('+format(n_above/n_total*100,'.1f')+'%)',fontsize=12)
# fig.text(.68,.43,'Below PBL ('+format(n_below/n_total*100,'.1f')+'%)',fontsize=12)
fig.savefig(figname,dpi=fig.dpi,bbox_inches='tight', pad_inches=1)
Expand Down
8 changes: 8 additions & 0 deletions src/esmac_diags/plotting/plot_sfc_pdf_AerosolSize.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import glob
import matplotlib.pyplot as plt
import matplotlib.ticker
import numpy as np
from ..subroutines.time_format_change import yyyymmdd2cday, cday2mmdd
from ..subroutines.read_surface import read_smpsb_pnnl,read_smps_bin
Expand Down Expand Up @@ -220,5 +221,12 @@ def run_plot(settings):
ax.set_ylabel('#/dlnDp (cm$^{-3}$)',fontsize=13)
ax.set_title(campaign+' '+IOP,fontsize=14)

y_major = matplotlib.ticker.LogLocator(base = 10.0, numticks = 5)
ax.yaxis.set_major_locator(y_major)
y_minor = matplotlib.ticker.LogLocator(base = 10.0, subs = np.arange(1.0, 10.0) * 0.1, numticks = 10)
ax.yaxis.set_minor_locator(y_minor)
ax.yaxis.set_minor_formatter(matplotlib.ticker.NullFormatter())
plt.grid(True,linestyle=':')

fig.savefig(figname,dpi=fig.dpi,bbox_inches='tight', pad_inches=1)
# plt.close()
8 changes: 8 additions & 0 deletions src/esmac_diags/plotting/plot_ship_pdf_AerosolSize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import glob
import matplotlib.pyplot as plt
import matplotlib.ticker
import numpy as np
from ..subroutines.read_ARMdata import read_uhsas
from ..subroutines.read_netcdf import read_E3SM, read_ship_exhaustfree
Expand Down Expand Up @@ -183,5 +184,12 @@ def run_plot(settings):
ax.set_ylabel('#/dlnDp (cm$^{-3}$)',fontsize=13)
ax.set_title(campaign,fontsize=14)

y_major = matplotlib.ticker.LogLocator(base = 10.0, numticks = 5)
ax.yaxis.set_major_locator(y_major)
y_minor = matplotlib.ticker.LogLocator(base = 10.0, subs = np.arange(1.0, 10.0) * 0.1, numticks = 10)
ax.yaxis.set_minor_locator(y_minor)
ax.yaxis.set_minor_formatter(matplotlib.ticker.NullFormatter())
plt.grid(True,linestyle=':')

fig.savefig(figname,dpi=fig.dpi,bbox_inches='tight', pad_inches=1)

0 comments on commit 05c070d

Please sign in to comment.