In [2]:
import warnings
warnings.filterwarnings("ignore",category=FutureWarning)
import xarray as xr
import numpy as np
from matplotlib import pyplot as plt
import os
import csv

warnings.filterwarnings("ignore",message='invalid value encountered in less_equal')

%matplotlib inline

In [3]:
flight = '20150620'

In [6]:
u4s1 = {'tempC': [],'rh': [],'Nt': [],'twc': [],'Dmm': [],'ar': [],'lmda': []}
u4s2 = {'tempC': [],'rh': [],'Nt': [],'twc': [],'Dmm': [],'ar': [],'lmda': []}
u4s3 = {'tempC': [],'rh': [],'Nt': [],'twc': [],'Dmm': [],'ar': [],'lmda': []}
u4s4 = {'tempC': [],'rh': [],'Nt': [],'twc': [],'Dmm': [],'ar': [],'lmda': []}
u4s5 = {'tempC': [],'rh': [],'Nt': [],'twc': [],'Dmm': [],'ar': [],'lmda': []}
u4s6 = {'tempC': [],'rh': [],'Nt': [],'twc': [],'Dmm': [],'ar': [],'lmda': []}
u4s7 = {'tempC': [],'rh': [],'Nt': [],'twc': [],'Dmm': [],'ar': [],'lmda': []}

cipFile = '/Users/danstechman/GoogleDrive/PECAN-Data/mp-data/' + flight + '/' + flight + '_CIPfit-spirals-10s1sAvg.nc'

# Pull out any global variables/attributes from the netcdf file
cipData_root = xr.open_dataset(cipFile)
sprlZone = str(cipData_root.sprlZone.data,'utf-8')
mcsType = str(cipData_root.mcsType.data,'utf-8')
numSprls = len(sprlZone)

# Loop over each spiral for the current flight
for ix in np.arange(0,numSprls):
    # Open the group associated with the current spiral
    cipData = xr.open_dataset(cipFile,group='spiral_' + str(ix+1))

    if ix == 0:
        u4s1['tempC'] = cipData.tempC_10s.data
        u4s1['rh'] = cipData.rh_10s.data
        u4s1['Nt'] = cipData.cipNt_hybrid_igf.data
        u4s1['twc'] = cipData.cipTWC_hybrid_igf_mlr.data
        u4s1['Dmm'] = cipData.cipDmm_hybrid_igf_mlr.data
        u4s1['ar'] = cipData.areaRatio_10s.data
        u4s1['lmda'] = cipData.cipLmda_10s.data
    
    if ix == 1:
        u4s2['tempC'] = cipData.tempC_10s.data
        u4s2['rh'] = cipData.rh_10s.data
        u4s2['Nt'] = cipData.cipNt_hybrid_igf.data
        u4s2['twc'] = cipData.cipTWC_hybrid_igf_mlr.data
        u4s2['Dmm'] = cipData.cipDmm_hybrid_igf_mlr.data
        u4s2['ar'] = cipData.areaRatio_10s.data
        u4s2['lmda'] = cipData.cipLmda_10s.data
        
    if ix == 2:
        u4s3['tempC'] = cipData.tempC_10s.data
        u4s3['rh'] = cipData.rh_10s.data
        u4s3['Nt'] = cipData.cipNt_hybrid_igf.data
        u4s3['twc'] = cipData.cipTWC_hybrid_igf_mlr.data
        u4s3['Dmm'] = cipData.cipDmm_hybrid_igf_mlr.data
        u4s3['ar'] = cipData.areaRatio_10s.data
        u4s3['lmda'] = cipData.cipLmda_10s.data
        
    if ix == 3:
        u4s4['tempC'] = cipData.tempC_10s.data
        u4s4['rh'] = cipData.rh_10s.data
        u4s4['Nt'] = cipData.cipNt_hybrid_igf.data
        u4s4['twc'] = cipData.cipTWC_hybrid_igf_mlr.data
        u4s4['Dmm'] = cipData.cipDmm_hybrid_igf_mlr.data
        u4s4['ar'] = cipData.areaRatio_10s.data
        u4s4['lmda'] = cipData.cipLmda_10s.data
        
    if ix == 4:
        u4s5['tempC'] = cipData.tempC_10s.data
        u4s5['rh'] = cipData.rh_10s.data
        u4s5['Nt'] = cipData.cipNt_hybrid_igf.data
        u4s5['twc'] = cipData.cipTWC_hybrid_igf_mlr.data
        u4s5['Dmm'] = cipData.cipDmm_hybrid_igf_mlr.data
        u4s5['ar'] = cipData.areaRatio_10s.data
        u4s5['lmda'] = cipData.cipLmda_10s.data
        
    if ix == 5:
        u4s6['tempC'] = cipData.tempC_10s.data
        u4s6['rh'] = cipData.rh_10s.data
        u4s6['Nt'] = cipData.cipNt_hybrid_igf.data
        u4s6['twc'] = cipData.cipTWC_hybrid_igf_mlr.data
        u4s6['Dmm'] = cipData.cipDmm_hybrid_igf_mlr.data
        u4s6['ar'] = cipData.areaRatio_10s.data
        u4s6['lmda'] = cipData.cipLmda_10s.data
        
    if ix == 6:
        u4s7['tempC'] = cipData.tempC_10s.data
        u4s7['rh'] = cipData.rh_10s.data
        u4s7['Nt'] = cipData.cipNt_hybrid_igf.data
        u4s7['twc'] = cipData.cipTWC_hybrid_igf_mlr.data
        u4s7['Dmm'] = cipData.cipDmm_hybrid_igf_mlr.data
        u4s7['ar'] = cipData.areaRatio_10s.data
        u4s7['lmda'] = cipData.cipLmda_10s.data



u4s1['Dmm'][u4s1['Dmm'] == 0] = np.nan
u4s2['Dmm'][u4s2['Dmm'] == 0] = np.nan
u4s3['Dmm'][u4s3['Dmm'] == 0] = np.nan
u4s4['Dmm'][u4s4['Dmm'] == 0] = np.nan
u4s5['Dmm'][u4s5['Dmm'] == 0] = np.nan
u4s6['Dmm'][u4s6['Dmm'] == 0] = np.nan
u4s7['Dmm'][u4s7['Dmm'] == 0] = np.nan


u4s1['Nt'][u4s1['Nt'] == 0] = np.nan
u4s2['Nt'][u4s2['Nt'] == 0] = np.nan
u4s3['Nt'][u4s3['Nt'] == 0] = np.nan
u4s4['Nt'][u4s4['Nt'] == 0] = np.nan
u4s5['Nt'][u4s5['Nt'] == 0] = np.nan
u4s6['Nt'][u4s6['Nt'] == 0] = np.nan
u4s7['Nt'][u4s7['Nt'] == 0] = np.nan


u4s1['twc'][u4s1['twc'] == 0] = np.nan
u4s2['twc'][u4s2['twc'] == 0] = np.nan
u4s3['twc'][u4s3['twc'] == 0] = np.nan
u4s4['twc'][u4s4['twc'] == 0] = np.nan
u4s5['twc'][u4s5['twc'] == 0] = np.nan
u4s6['twc'][u4s6['twc'] == 0] = np.nan
u4s7['twc'][u4s7['twc'] == 0] = np.nan

u4s1_lte0 = np.where(u4s1['tempC'] <= 0)
u4s2_lte0 = np.where(u4s2['tempC'] <= 0)
u4s3_lte0 = np.where(u4s3['tempC'] <= 0)
u4s4_lte0 = np.where(u4s4['tempC'] <= 0)
u4s5_lte0 = np.where(u4s5['tempC'] <= 0)
u4s6_lte0 = np.where(u4s6['tempC'] <= 0)
u4s7_lte0 = np.where(u4s7['tempC'] <= 0)


u4s2_gte5 = np.where(u4s2['tempC'] >= 5)
u4s3_gte5 = np.where(u4s3['tempC'] >= 5)
u4s4_gte5 = np.where(u4s4['tempC'] >= 5)
u4s5_gte5 = np.where(u4s5['tempC'] >= 5)
u4s6_gte5 = np.where(u4s6['tempC'] >= 5)
u4s7_gte5 = np.where(u4s7['tempC'] >= 5)


u4s1_lte_n9 = np.where(u4s1['tempC'] <= -9)
u4s2_lte_n9 = np.where(u4s2['tempC'] <= -9)

u4s6_lte2gte_n4 = np.where((u4s6['tempC'] <= 1.5) & (u4s6['tempC'] >= -4))

u4s2_gt0lte7 = np.where((u4s2['tempC'] <= 7) & (u4s2['tempC'] > 0))

u4s2_lte0gte_n10 = np.where((u4s2['tempC'] <= 0) & (u4s2['tempC'] >= -10))
u4s2_gt0 = np.where(u4s2['tempC'] > 0)

Mean $RH$ for $T \leq 0^{\circ}C$


In [ ]:
print(np.nanmean(u4s1['rh'][u4s1_lte0]))
print(np.nanmean(u4s2['rh'][u4s2_lte0]))
print(np.nanmean(u4s3['rh'][u4s3_lte0]))
print(np.nanmean(u4s4['rh'][u4s4_lte0]))
print(np.nanmean(u4s5['rh'][u4s5_lte0]))
print(np.nanmean(u4s6['rh'][u4s6_lte0]))
print(np.nanmean(u4s7['rh'][u4s7_lte0]))

In [ ]:
print(np.nanmean(u4s1['rh'][u4s1_lte_n9]))
print(np.nanmean(u4s2['rh'][u4s2_lte_n9]))

In [7]:
print(np.nanmean(u4s2['rh'][u4s2_gt0]))


40.93532856505565

Mean $𝒜$ for $T \leq 0^{\circ}C$


In [ ]:
print(np.nanmean(u4s1['ar'][u4s1_lte0]))
print(np.nanmean(u4s2['ar'][u4s2_lte0]))
print(np.nanmean(u4s3['ar'][u4s3_lte0]))
print(np.nanmean(u4s4['ar'][u4s4_lte0]))
print(np.nanmean(u4s5['ar'][u4s5_lte0]))
print(np.nanmean(u4s6['ar'][u4s6_lte0]))
print(np.nanmean(u4s7['ar'][u4s7_lte0]))

In [ ]:
print(np.nanmean(u4s1['ar'][u4s1_lte_n9]))
print(np.nanmean(u4s2['ar'][u4s2_lte_n9]))

Mean $D_{mm}$ for $T \leq 0^{\circ}C$


In [ ]:
print(np.nanmean(u4s1['Dmm'][u4s1_lte0]))
print(np.nanmean(u4s2['Dmm'][u4s2_lte0]))
print(np.nanmean(u4s3['Dmm'][u4s3_lte0]))
print(np.nanmean(u4s4['Dmm'][u4s4_lte0]))
print(np.nanmean(u4s5['Dmm'][u4s5_lte0]))
print(np.nanmean(u4s6['Dmm'][u4s6_lte0]))
print(np.nanmean(u4s7['Dmm'][u4s7_lte0]))

In [ ]:
print(np.nanmean(u4s1['Dmm'][u4s1_lte_n9]))
print(np.nanmean(u4s2['Dmm'][u4s2_lte_n9]))

In [ ]:
print(np.nanmean(u4s6['Dmm'][u4s6_lte2gte_n4]))

Mean $N_t$ for $T \leq 0^{\circ}C$


In [ ]:
print(np.nanmean(u4s1['Nt'][u4s1_lte0]))
print(np.nanmean(u4s2['Nt'][u4s2_lte0]))
print(np.nanmean(u4s3['Nt'][u4s3_lte0]))
print(np.nanmean(u4s4['Nt'][u4s4_lte0]))
print(np.nanmean(u4s5['Nt'][u4s5_lte0]))
print(np.nanmean(u4s6['Nt'][u4s6_lte0]))
print(np.nanmean(u4s7['Nt'][u4s7_lte0]))

In [ ]:
print(np.nanmean(u4s1['Nt'][u4s1_lte_n9]))
print(np.nanmean(u4s2['Nt'][u4s2_lte_n9]))

In [ ]:
u4s6['twc'][u4s6_lte0]

In [ ]:
u4s3['twc'][u4s3_lte0]

In [ ]:
np.nanmedian(u4s3['Nt'][u4s3_lte0])

In [ ]:
np.nanmedian(u4s6['Nt'][u4s6_lte0])

Mean TWC for $T \leq 0^{\circ}C$


In [ ]:
print(np.nanmean(u4s1['twc'][u4s1_lte0]))
print(np.nanmean(u4s2['twc'][u4s2_lte0]))
print(np.nanmean(u4s3['twc'][u4s3_lte0]))
print(np.nanmean(u4s4['twc'][u4s4_lte0]))
print(np.nanmean(u4s5['twc'][u4s5_lte0]))
print(np.nanmean(u4s6['twc'][u4s6_lte0]))
print(np.nanmean(u4s7['twc'][u4s7_lte0]))

In [ ]:
print(np.nanmean(u4s1['twc'][u4s1_lte_n9]))
print(np.nanmean(u4s2['twc'][u4s2_lte_n9]))

Mean $\lambda$ for $T \leq 0^{\circ}C$


In [ ]:
print(np.nanmean(u4s1['lmda'][u4s1_lte0]))
print(np.nanmean(u4s2['lmda'][u4s2_lte0]))
print(np.nanmean(u4s3['lmda'][u4s3_lte0]))
print(np.nanmean(u4s4['lmda'][u4s4_lte0]))
print(np.nanmean(u4s5['lmda'][u4s5_lte0]))
print(np.nanmean(u4s6['lmda'][u4s6_lte0]))
print(np.nanmean(u4s7['lmda'][u4s7_lte0]))

$dRH/dT$ for $T \leq 0^{\circ}C$


In [ ]:
u4s1_temp = u4s1['tempC'][u4s1_lte0]
rh_u4s1 = u4s1['rh'][u4s1_lte0]
finiteIx_u4s1 = np.isfinite(rh_u4s1)
pf_rh_u4s1 = np.poly1d(np.polyfit(u4s1_temp[finiteIx_u4s1],rh_u4s1[finiteIx_u4s1],  1))
rh_u4s1_dT = pf_rh_u4s1(-5) - pf_rh_u4s1(-6)    
print(rh_u4s1_dT)

u4s2_temp = u4s2['tempC'][u4s2_lte0]
rh_u4s2 = u4s2['rh'][u4s2_lte0]
finiteIx_u4s2 = np.isfinite(rh_u4s2)
pf_rh_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],rh_u4s2[finiteIx_u4s2],  1))
rh_u4s2_dT = pf_rh_u4s2(-5) - pf_rh_u4s2(-6)    
print(rh_u4s2_dT)

u4s3_temp = u4s3['tempC'][u4s3_lte0]
rh_u4s3 = u4s3['rh'][u4s3_lte0]
finiteIx_u4s3 = np.isfinite(rh_u4s3)
pf_rh_u4s3 = np.poly1d(np.polyfit(u4s3_temp[finiteIx_u4s3],rh_u4s3[finiteIx_u4s3],  1))
rh_u4s3_dT = pf_rh_u4s3(-5) - pf_rh_u4s3(-6)    
print(rh_u4s3_dT)

u4s4_temp = u4s4['tempC'][u4s4_lte0]
rh_u4s4 = u4s4['rh'][u4s4_lte0]
finiteIx_u4s4 = np.isfinite(rh_u4s4)
pf_rh_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],rh_u4s4[finiteIx_u4s4],  1))
rh_u4s4_dT = pf_rh_u4s4(-5) - pf_rh_u4s4(-6)    
print(rh_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_lte0]
rh_u4s5 = u4s5['rh'][u4s5_lte0]
finiteIx_u4s5 = np.isfinite(rh_u4s5)
pf_rh_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],rh_u4s5[finiteIx_u4s5],  1))
rh_u4s5_dT = pf_rh_u4s5(-5) - pf_rh_u4s5(-6)    
print(rh_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_lte0]
rh_u4s6 = u4s6['rh'][u4s6_lte0]
finiteIx_u4s6 = np.isfinite(rh_u4s6)
pf_rh_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],rh_u4s6[finiteIx_u4s6],  1))
rh_u4s6_dT = pf_rh_u4s6(-5) - pf_rh_u4s6(-6)    
print(rh_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_lte0]
rh_u4s7 = u4s7['rh'][u4s7_lte0]
finiteIx_u4s7 = np.isfinite(rh_u4s7)
pf_rh_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],rh_u4s7[finiteIx_u4s7],  1))
rh_u4s7_dT = pf_rh_u4s7(-5) - pf_rh_u4s7(-6)    
print(rh_u4s7_dT)

$d𝒜/dT$ for $T \leq 0^{\circ}C$


In [ ]:
u4s1_temp = u4s1['tempC'][u4s1_lte0]
ar_u4s1 = u4s1['ar'][u4s1_lte0]
finiteIx_u4s1 = np.isfinite(ar_u4s1)
pf_ar_u4s1 = np.poly1d(np.polyfit(u4s1_temp[finiteIx_u4s1],ar_u4s1[finiteIx_u4s1],  1))
ar_u4s1_dT = pf_ar_u4s1(-5) - pf_ar_u4s1(-6)    
print(ar_u4s1_dT)

u4s2_temp = u4s2['tempC'][u4s2_lte0]
ar_u4s2 = u4s2['ar'][u4s2_lte0]
finiteIx_u4s2 = np.isfinite(ar_u4s2)
pf_ar_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],ar_u4s2[finiteIx_u4s2],  1))
ar_u4s2_dT = pf_ar_u4s2(-5) - pf_ar_u4s2(-6)    
print(ar_u4s2_dT)

u4s3_temp = u4s3['tempC'][u4s3_lte0]
ar_u4s3 = u4s3['ar'][u4s3_lte0]
finiteIx_u4s3 = np.isfinite(ar_u4s3)
pf_ar_u4s3 = np.poly1d(np.polyfit(u4s3_temp[finiteIx_u4s3],ar_u4s3[finiteIx_u4s3],  1))
ar_u4s3_dT = pf_ar_u4s3(-5) - pf_ar_u4s3(-6)    
print(ar_u4s3_dT)

u4s4_temp = u4s4['tempC'][u4s4_lte0]
ar_u4s4 = u4s4['ar'][u4s4_lte0]
finiteIx_u4s4 = np.isfinite(ar_u4s4)
pf_ar_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],ar_u4s4[finiteIx_u4s4],  1))
ar_u4s4_dT = pf_ar_u4s4(-5) - pf_ar_u4s4(-6)    
print(ar_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_lte0]
ar_u4s5 = u4s5['ar'][u4s5_lte0]
finiteIx_u4s5 = np.isfinite(ar_u4s5)
pf_ar_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],ar_u4s5[finiteIx_u4s5],  1))
ar_u4s5_dT = pf_ar_u4s5(-5) - pf_ar_u4s5(-6)    
print(ar_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_lte0]
ar_u4s6 = u4s6['ar'][u4s6_lte0]
finiteIx_u4s6 = np.isfinite(ar_u4s6)
pf_ar_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],ar_u4s6[finiteIx_u4s6],  1))
ar_u4s6_dT = pf_ar_u4s6(-5) - pf_ar_u4s6(-6)    
print(ar_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_lte0]
ar_u4s7 = u4s7['ar'][u4s7_lte0]
finiteIx_u4s7 = np.isfinite(ar_u4s7)
pf_ar_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],ar_u4s7[finiteIx_u4s7],  1))
ar_u4s7_dT = pf_ar_u4s7(-5) - pf_ar_u4s7(-6)    
print(ar_u4s7_dT)

$dD_{mm}/dT$ for $T \leq 0^{\circ}C$


In [ ]:
u4s1_temp = u4s1['tempC'][u4s1_lte0]
Dmm_u4s1 = u4s1['Dmm'][u4s1_lte0]
finiteIx_u4s1 = np.isfinite(Dmm_u4s1)
pf_Dmm_u4s1 = np.poly1d(np.polyfit(u4s1_temp[finiteIx_u4s1],Dmm_u4s1[finiteIx_u4s1],  1))
Dmm_u4s1_dT = pf_Dmm_u4s1(-5) - pf_Dmm_u4s1(-6)    
print(Dmm_u4s1_dT*1000)

u4s2_temp = u4s2['tempC'][u4s2_lte0]
Dmm_u4s2 = u4s2['Dmm'][u4s2_lte0]
finiteIx_u4s2 = np.isfinite(Dmm_u4s2)
pf_Dmm_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],Dmm_u4s2[finiteIx_u4s2],  1))
Dmm_u4s2_dT = pf_Dmm_u4s2(-5) - pf_Dmm_u4s2(-6)    
print(Dmm_u4s2_dT*1000)

u4s3_temp = u4s3['tempC'][u4s3_lte0]
Dmm_u4s3 = u4s3['Dmm'][u4s3_lte0]
finiteIx_u4s3 = np.isfinite(Dmm_u4s3)
pf_Dmm_u4s3 = np.poly1d(np.polyfit(u4s3_temp[finiteIx_u4s3],Dmm_u4s3[finiteIx_u4s3],  1))
Dmm_u4s3_dT = pf_Dmm_u4s3(-5) - pf_Dmm_u4s3(-6)    
print(Dmm_u4s3_dT*1000)

u4s4_temp = u4s4['tempC'][u4s4_lte0]
Dmm_u4s4 = u4s4['Dmm'][u4s4_lte0]
finiteIx_u4s4 = np.isfinite(Dmm_u4s4)
pf_Dmm_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],Dmm_u4s4[finiteIx_u4s4],  1))
Dmm_u4s4_dT = pf_Dmm_u4s4(-5) - pf_Dmm_u4s4(-6)    
print(Dmm_u4s4_dT*1000)

u4s5_temp = u4s5['tempC'][u4s5_lte0]
Dmm_u4s5 = u4s5['Dmm'][u4s5_lte0]
finiteIx_u4s5 = np.isfinite(Dmm_u4s5)
pf_Dmm_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],Dmm_u4s5[finiteIx_u4s5],  1))
Dmm_u4s5_dT = pf_Dmm_u4s5(-5) - pf_Dmm_u4s5(-6)    
print(Dmm_u4s5_dT*1000)

u4s6_temp = u4s6['tempC'][u4s6_lte0]
Dmm_u4s6 = u4s6['Dmm'][u4s6_lte0]
finiteIx_u4s6 = np.isfinite(Dmm_u4s6)
pf_Dmm_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],Dmm_u4s6[finiteIx_u4s6],  1))
Dmm_u4s6_dT = pf_Dmm_u4s6(-5) - pf_Dmm_u4s6(-6)    
print(Dmm_u4s6_dT*1000)

u4s7_temp = u4s7['tempC'][u4s7_lte0]
Dmm_u4s7 = u4s7['Dmm'][u4s7_lte0]
finiteIx_u4s7 = np.isfinite(Dmm_u4s7)
pf_Dmm_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],Dmm_u4s7[finiteIx_u4s7],  1))
Dmm_u4s7_dT = pf_Dmm_u4s7(-5) - pf_Dmm_u4s7(-6)    
print(Dmm_u4s7_dT*1000)

In [ ]:
u4s6_temp = u4s6['tempC'][u4s6_lte2gte_n4]
Dmm_u4s6 = u4s6['Dmm'][u4s6_lte2gte_n4]
finiteIx_u4s6 = np.isfinite(Dmm_u4s6)
pf_Dmm_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],Dmm_u4s6[finiteIx_u4s6],  1))
Dmm_u4s6_dT = pf_Dmm_u4s6(-5) - pf_Dmm_u4s6(-6)    
print(Dmm_u4s6_dT*1000)

$dN_t/dT$ for $T \leq 0^{\circ}C$


In [ ]:
u4s1_temp = u4s1['tempC'][u4s1_lte0]
Nt_u4s1 = u4s1['Nt'][u4s1_lte0]
finiteIx_u4s1 = np.isfinite(np.log10(Nt_u4s1))
pf_Nt_u4s1 = np.poly1d(np.polyfit(u4s1_temp[finiteIx_u4s1],np.log10(Nt_u4s1[finiteIx_u4s1]),  1))
Nt_u4s1_dT = 1 - (10**pf_Nt_u4s1(-6)/10**pf_Nt_u4s1(-5))  
print(Nt_u4s1_dT)

u4s2_temp = u4s2['tempC'][u4s2_lte0]
Nt_u4s2 = u4s2['Nt'][u4s2_lte0]
finiteIx_u4s2 = np.isfinite(np.log10(Nt_u4s2))
pf_Nt_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],np.log10(Nt_u4s2[finiteIx_u4s2]),  1))
Nt_u4s2_dT = 1 - (10**pf_Nt_u4s2(-6)/10**pf_Nt_u4s2(-5))  
print(Nt_u4s2_dT)

u4s3_temp = u4s3['tempC'][u4s3_lte0]
Nt_u4s3 = u4s3['Nt'][u4s3_lte0]
finiteIx_u4s3 = np.isfinite(np.log10(Nt_u4s3))
pf_Nt_u4s3 = np.poly1d(np.polyfit(u4s3_temp[finiteIx_u4s3],np.log10(Nt_u4s3[finiteIx_u4s3]),  1))
Nt_u4s3_dT = 1 - (10**pf_Nt_u4s3(-6)/10**pf_Nt_u4s3(-5))  
print(Nt_u4s3_dT)

u4s4_temp = u4s4['tempC'][u4s4_lte0]
Nt_u4s4 = u4s4['Nt'][u4s4_lte0]
finiteIx_u4s4 = np.isfinite(np.log10(Nt_u4s4))
pf_Nt_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],np.log10(Nt_u4s4[finiteIx_u4s4]),  1))
Nt_u4s4_dT = 1 - (10**pf_Nt_u4s4(-6)/10**pf_Nt_u4s4(-5))  
print(Nt_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_lte0]
Nt_u4s5 = u4s5['Nt'][u4s5_lte0]
finiteIx_u4s5 = np.isfinite(np.log10(Nt_u4s5))
pf_Nt_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],np.log10(Nt_u4s5[finiteIx_u4s5]),  1))
Nt_u4s5_dT = 1 - (10**pf_Nt_u4s5(-6)/10**pf_Nt_u4s5(-5))  
print(Nt_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_lte0]
Nt_u4s6 = u4s6['Nt'][u4s6_lte0]
finiteIx_u4s6 = np.isfinite(np.log10(Nt_u4s6))
pf_Nt_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],np.log10(Nt_u4s6[finiteIx_u4s6]),  1))
Nt_u4s6_dT = 1 - (10**pf_Nt_u4s6(-6)/10**pf_Nt_u4s6(-5))  
print(Nt_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_lte0]
Nt_u4s7 = u4s7['Nt'][u4s7_lte0]
finiteIx_u4s7 = np.isfinite(np.log10(Nt_u4s7))
pf_Nt_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],np.log10(Nt_u4s7[finiteIx_u4s7]),  1))
Nt_u4s7_dT = 1 - (10**pf_Nt_u4s7(-6)/10**pf_Nt_u4s7(-5))  
print(Nt_u4s7_dT)

$dTWC/dT$ for $T \leq 0^{\circ}C$


In [ ]:
u4s1_temp = u4s1['tempC'][u4s1_lte0]
twc_u4s1 = u4s1['twc'][u4s1_lte0]
finiteIx_u4s1 = np.isfinite(np.log10(twc_u4s1))
pf_twc_u4s1 = np.poly1d(np.polyfit(u4s1_temp[finiteIx_u4s1],np.log10(twc_u4s1[finiteIx_u4s1]),  1))
twc_u4s1_dT = 1 - (10**pf_twc_u4s1(-6)/10**pf_twc_u4s1(-5))  
print(twc_u4s1_dT)

u4s2_temp = u4s2['tempC'][u4s2_lte0]
twc_u4s2 = u4s2['twc'][u4s2_lte0]
finiteIx_u4s2 = np.isfinite(np.log10(twc_u4s2))
pf_twc_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],np.log10(twc_u4s2[finiteIx_u4s2]),  1))
twc_u4s2_dT = 1 - (10**pf_twc_u4s2(-6)/10**pf_twc_u4s2(-5))  
print(twc_u4s2_dT)

u4s3_temp = u4s3['tempC'][u4s3_lte0]
twc_u4s3 = u4s3['twc'][u4s3_lte0]
finiteIx_u4s3 = np.isfinite(np.log10(twc_u4s3))
pf_twc_u4s3 = np.poly1d(np.polyfit(u4s3_temp[finiteIx_u4s3],np.log10(twc_u4s3[finiteIx_u4s3]),  1))
twc_u4s3_dT = 1 - (10**pf_twc_u4s3(-6)/10**pf_twc_u4s3(-5))  
print(twc_u4s3_dT)

u4s4_temp = u4s4['tempC'][u4s4_lte0]
twc_u4s4 = u4s4['twc'][u4s4_lte0]
finiteIx_u4s4 = np.isfinite(np.log10(twc_u4s4))
pf_twc_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],np.log10(twc_u4s4[finiteIx_u4s4]),  1))
twc_u4s4_dT = 1 - (10**pf_twc_u4s4(-6)/10**pf_twc_u4s4(-5))  
print(twc_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_lte0]
twc_u4s5 = u4s5['twc'][u4s5_lte0]
finiteIx_u4s5 = np.isfinite(np.log10(twc_u4s5))
pf_twc_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],np.log10(twc_u4s5[finiteIx_u4s5]),  1))
twc_u4s5_dT = 1 - (10**pf_twc_u4s5(-6)/10**pf_twc_u4s5(-5))  
print(twc_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_lte0]
twc_u4s6 = u4s6['twc'][u4s6_lte0]
finiteIx_u4s6 = np.isfinite(np.log10(twc_u4s6))
pf_twc_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],np.log10(twc_u4s6[finiteIx_u4s6]),  1))
twc_u4s6_dT = 1 - (10**pf_twc_u4s6(-6)/10**pf_twc_u4s6(-5))  
print(twc_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_lte0]
twc_u4s7 = u4s7['twc'][u4s7_lte0]
finiteIx_u4s7 = np.isfinite(np.log10(twc_u4s7))
pf_twc_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],np.log10(twc_u4s7[finiteIx_u4s7]),  1))
twc_u4s7_dT = 1 - (10**pf_twc_u4s7(-6)/10**pf_twc_u4s7(-5))  
print(twc_u4s7_dT)

$d\lambda/dT$ for $T \leq 0^{\circ}C$


In [ ]:
u4s1_temp = u4s1['tempC'][u4s1_lte0]
lmda_u4s1 = u4s1['lmda'][u4s1_lte0]
finiteIx_u4s1 = np.isfinite(lmda_u4s1)
pf_lmda_u4s1 = np.poly1d(np.polyfit(u4s1_temp[finiteIx_u4s1],lmda_u4s1[finiteIx_u4s1],  1))
lmda_u4s1_dT = pf_lmda_u4s1(-5) - pf_lmda_u4s1(-6)    
print(lmda_u4s1_dT)

u4s2_temp = u4s2['tempC'][u4s2_lte0]
lmda_u4s2 = u4s2['lmda'][u4s2_lte0]
finiteIx_u4s2 = np.isfinite(lmda_u4s2)
pf_lmda_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],lmda_u4s2[finiteIx_u4s2],  1))
lmda_u4s2_dT = pf_lmda_u4s2(-5) - pf_lmda_u4s2(-6)    
print(lmda_u4s2_dT)

u4s3_temp = u4s3['tempC'][u4s3_lte0]
lmda_u4s3 = u4s3['lmda'][u4s3_lte0]
finiteIx_u4s3 = np.isfinite(lmda_u4s3)
pf_lmda_u4s3 = np.poly1d(np.polyfit(u4s3_temp[finiteIx_u4s3],lmda_u4s3[finiteIx_u4s3],  1))
lmda_u4s3_dT = pf_lmda_u4s3(-5) - pf_lmda_u4s3(-6)    
print(lmda_u4s3_dT)

u4s4_temp = u4s4['tempC'][u4s4_lte0]
lmda_u4s4 = u4s4['lmda'][u4s4_lte0]
finiteIx_u4s4 = np.isfinite(lmda_u4s4)
pf_lmda_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],lmda_u4s4[finiteIx_u4s4],  1))
lmda_u4s4_dT = pf_lmda_u4s4(-5) - pf_lmda_u4s4(-6)    
print(lmda_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_lte0]
lmda_u4s5 = u4s5['lmda'][u4s5_lte0]
finiteIx_u4s5 = np.isfinite(lmda_u4s5)
pf_lmda_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],lmda_u4s5[finiteIx_u4s5],  1))
lmda_u4s5_dT = pf_lmda_u4s5(-5) - pf_lmda_u4s5(-6)    
print(lmda_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_lte0]
lmda_u4s6 = u4s6['lmda'][u4s6_lte0]
finiteIx_u4s6 = np.isfinite(lmda_u4s6)
pf_lmda_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],lmda_u4s6[finiteIx_u4s6],  1))
lmda_u4s6_dT = pf_lmda_u4s6(-5) - pf_lmda_u4s6(-6)    
print(lmda_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_lte0]
lmda_u4s7 = u4s7['lmda'][u4s7_lte0]
finiteIx_u4s7 = np.isfinite(lmda_u4s7)
pf_lmda_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],lmda_u4s7[finiteIx_u4s7],  1))
lmda_u4s7_dT = pf_lmda_u4s7(-5) - pf_lmda_u4s7(-6)    
print(lmda_u4s7_dT)

Mean $RH$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)
print(np.nanmean(u4s2['rh'][u4s2_gte5]))
print(np.nanmean(u4s3['rh'][u4s3_gte5]))
print(np.nanmean(u4s4['rh'][u4s4_gte5]))
print(np.nanmean(u4s5['rh'][u4s5_gte5]))
print(np.nanmean(u4s6['rh'][u4s6_gte5]))
print(np.nanmean(u4s7['rh'][u4s7_gte5]))

Mean $𝒜$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)
print(np.nanmean(u4s2['ar'][u4s2_gte5]))
print(np.nan)
print(np.nanmean(u4s4['ar'][u4s4_gte5]))
print(np.nanmean(u4s5['ar'][u4s5_gte5]))
print(np.nanmean(u4s6['ar'][u4s6_gte5]))
print(np.nanmean(u4s7['ar'][u4s7_gte5]))

Mean $D_{mm}$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)
print(np.nanmean(u4s2['Dmm'][u4s2_gte5]))
print(np.nan)
print(np.nanmean(u4s4['Dmm'][u4s4_gte5]))
print(np.nanmean(u4s5['Dmm'][u4s5_gte5]))
print(np.nanmean(u4s6['Dmm'][u4s6_gte5]))
print(np.nanmean(u4s7['Dmm'][u4s7_gte5]))

Mean $N_t$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)
print(np.nanmean(u4s2['Nt'][u4s2_gte5]))
print(np.nan)
print(np.nanmean(u4s4['Nt'][u4s4_gte5]))
print(np.nanmean(u4s5['Nt'][u4s5_gte5]))
print(np.nanmean(u4s6['Nt'][u4s6_gte5]))
print(np.nanmean(u4s7['Nt'][u4s7_gte5]))

Mean TWC for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)
print(np.nanmean(u4s2['twc'][u4s2_gte5]))
print(np.nan)
print(np.nanmean(u4s4['twc'][u4s4_gte5]))
print(np.nanmean(u4s5['twc'][u4s5_gte5]))
print(np.nanmean(u4s6['twc'][u4s6_gte5]))
print(np.nanmean(u4s7['twc'][u4s7_gte5]))

Mean $\lambda$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)
print(np.nanmean(u4s2['lmda'][u4s2_gte5]))
print(np.nan)
print(np.nanmean(u4s4['lmda'][u4s4_gte5]))
print(np.nanmean(u4s5['lmda'][u4s5_gte5]))
print(np.nanmean(u4s6['lmda'][u4s6_gte5]))
print(np.nanmean(u4s7['lmda'][u4s7_gte5]))

$dRH/dT$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)

u4s2_temp = u4s2['tempC'][u4s2_gte5]
rh_u4s2 = u4s2['rh'][u4s2_gte5]
finiteIx_u4s2 = np.isfinite(rh_u4s2)
pf_rh_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],rh_u4s2[finiteIx_u4s2],  1))
rh_u4s2_dT = pf_rh_u4s2(-5) - pf_rh_u4s2(-6)    
print(rh_u4s2_dT)

u4s3_temp = u4s3['tempC'][u4s3_gte5]
rh_u4s3 = u4s3['rh'][u4s3_gte5]
finiteIx_u4s3 = np.isfinite(rh_u4s3)
pf_rh_u4s3 = np.poly1d(np.polyfit(u4s3_temp[finiteIx_u4s3],rh_u4s3[finiteIx_u4s3],  1))
rh_u4s3_dT = pf_rh_u4s3(-5) - pf_rh_u4s3(-6)    
print(rh_u4s3_dT)

u4s4_temp = u4s4['tempC'][u4s4_gte5]
rh_u4s4 = u4s4['rh'][u4s4_gte5]
finiteIx_u4s4 = np.isfinite(rh_u4s4)
pf_rh_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],rh_u4s4[finiteIx_u4s4],  1))
rh_u4s4_dT = pf_rh_u4s4(-5) - pf_rh_u4s4(-6)    
print(rh_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_gte5]
rh_u4s5 = u4s5['rh'][u4s5_gte5]
finiteIx_u4s5 = np.isfinite(rh_u4s5)
pf_rh_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],rh_u4s5[finiteIx_u4s5],  1))
rh_u4s5_dT = pf_rh_u4s5(-5) - pf_rh_u4s5(-6)    
print(rh_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_gte5]
rh_u4s6 = u4s6['rh'][u4s6_gte5]
finiteIx_u4s6 = np.isfinite(rh_u4s6)
pf_rh_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],rh_u4s6[finiteIx_u4s6],  1))
rh_u4s6_dT = pf_rh_u4s6(-5) - pf_rh_u4s6(-6)    
print(rh_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_gte5]
rh_u4s7 = u4s7['rh'][u4s7_gte5]
finiteIx_u4s7 = np.isfinite(rh_u4s7)
pf_rh_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],rh_u4s7[finiteIx_u4s7],  1))
rh_u4s7_dT = pf_rh_u4s7(-5) - pf_rh_u4s7(-6)    
print(rh_u4s7_dT)

$d𝒜/dT$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)

u4s2_temp = u4s2['tempC'][u4s2_gte5]
ar_u4s2 = u4s2['ar'][u4s2_gte5]
finiteIx_u4s2 = np.isfinite(ar_u4s2)
pf_ar_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],ar_u4s2[finiteIx_u4s2],  1))
ar_u4s2_dT = pf_ar_u4s2(-5) - pf_ar_u4s2(-6)    
print(ar_u4s2_dT)

print(np.nan)

u4s4_temp = u4s4['tempC'][u4s4_gte5]
ar_u4s4 = u4s4['ar'][u4s4_gte5]
finiteIx_u4s4 = np.isfinite(ar_u4s4)
pf_ar_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],ar_u4s4[finiteIx_u4s4],  1))
ar_u4s4_dT = pf_ar_u4s4(-5) - pf_ar_u4s4(-6)    
print(ar_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_gte5]
ar_u4s5 = u4s5['ar'][u4s5_gte5]
finiteIx_u4s5 = np.isfinite(ar_u4s5)
pf_ar_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],ar_u4s5[finiteIx_u4s5],  1))
ar_u4s5_dT = pf_ar_u4s5(-5) - pf_ar_u4s5(-6)    
print(ar_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_gte5]
ar_u4s6 = u4s6['ar'][u4s6_gte5]
finiteIx_u4s6 = np.isfinite(ar_u4s6)
pf_ar_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],ar_u4s6[finiteIx_u4s6],  1))
ar_u4s6_dT = pf_ar_u4s6(-5) - pf_ar_u4s6(-6)    
print(ar_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_gte5]
ar_u4s7 = u4s7['ar'][u4s7_gte5]
finiteIx_u4s7 = np.isfinite(ar_u4s7)
pf_ar_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],ar_u4s7[finiteIx_u4s7],  1))
ar_u4s7_dT = pf_ar_u4s7(-5) - pf_ar_u4s7(-6)    
print(ar_u4s7_dT)

$dD_{mm}/dT$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)

u4s2_temp = u4s2['tempC'][u4s2_gte5]
Dmm_u4s2 = u4s2['Dmm'][u4s2_gte5]
finiteIx_u4s2 = np.isfinite(Dmm_u4s2)
pf_Dmm_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],Dmm_u4s2[finiteIx_u4s2],  1))
Dmm_u4s2_dT = pf_Dmm_u4s2(-5) - pf_Dmm_u4s2(-6)    
print(Dmm_u4s2_dT*1000)
   
print(np.nan)

u4s4_temp = u4s4['tempC'][u4s4_gte5]
Dmm_u4s4 = u4s4['Dmm'][u4s4_gte5]
finiteIx_u4s4 = np.isfinite(Dmm_u4s4)
pf_Dmm_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],Dmm_u4s4[finiteIx_u4s4],  1))
Dmm_u4s4_dT = pf_Dmm_u4s4(-5) - pf_Dmm_u4s4(-6)    
print(Dmm_u4s4_dT*1000)

u4s5_temp = u4s5['tempC'][u4s5_gte5]
Dmm_u4s5 = u4s5['Dmm'][u4s5_gte5]
finiteIx_u4s5 = np.isfinite(Dmm_u4s5)
pf_Dmm_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],Dmm_u4s5[finiteIx_u4s5],  1))
Dmm_u4s5_dT = pf_Dmm_u4s5(-5) - pf_Dmm_u4s5(-6)    
print(Dmm_u4s5_dT*1000)

u4s6_temp = u4s6['tempC'][u4s6_gte5]
Dmm_u4s6 = u4s6['Dmm'][u4s6_gte5]
finiteIx_u4s6 = np.isfinite(Dmm_u4s6)
pf_Dmm_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],Dmm_u4s6[finiteIx_u4s6],  1))
Dmm_u4s6_dT = pf_Dmm_u4s6(-5) - pf_Dmm_u4s6(-6)    
print(Dmm_u4s6_dT*1000)

u4s7_temp = u4s7['tempC'][u4s7_gte5]
Dmm_u4s7 = u4s7['Dmm'][u4s7_gte5]
finiteIx_u4s7 = np.isfinite(Dmm_u4s7)
pf_Dmm_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],Dmm_u4s7[finiteIx_u4s7],  1))
Dmm_u4s7_dT = pf_Dmm_u4s7(-5) - pf_Dmm_u4s7(-6)    
print(Dmm_u4s7_dT*1000)

$dN_t/dT$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)

u4s2_temp = u4s2['tempC'][u4s2_gte5]
Nt_u4s2 = u4s2['Nt'][u4s2_gte5]
finiteIx_u4s2 = np.isfinite(np.log10(Nt_u4s2))
pf_Nt_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],np.log10(Nt_u4s2[finiteIx_u4s2]),  1))
Nt_u4s2_dT = 1 - (10**pf_Nt_u4s2(-6)/10**pf_Nt_u4s2(-5))  
print(Nt_u4s2_dT)

print(np.nan)

u4s4_temp = u4s4['tempC'][u4s4_gte5]
Nt_u4s4 = u4s4['Nt'][u4s4_gte5]
finiteIx_u4s4 = np.isfinite(np.log10(Nt_u4s4))
pf_Nt_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],np.log10(Nt_u4s4[finiteIx_u4s4]),  1))
Nt_u4s4_dT = 1 - (10**pf_Nt_u4s4(-6)/10**pf_Nt_u4s4(-5))  
print(Nt_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_gte5]
Nt_u4s5 = u4s5['Nt'][u4s5_gte5]
finiteIx_u4s5 = np.isfinite(np.log10(Nt_u4s5))
pf_Nt_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],np.log10(Nt_u4s5[finiteIx_u4s5]),  1))
Nt_u4s5_dT = 1 - (10**pf_Nt_u4s5(-6)/10**pf_Nt_u4s5(-5))  
print(Nt_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_gte5]
Nt_u4s6 = u4s6['Nt'][u4s6_gte5]
finiteIx_u4s6 = np.isfinite(np.log10(Nt_u4s6))
pf_Nt_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],np.log10(Nt_u4s6[finiteIx_u4s6]),  1))
Nt_u4s6_dT = 1 - (10**pf_Nt_u4s6(-6)/10**pf_Nt_u4s6(-5))  
print(Nt_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_gte5]
Nt_u4s7 = u4s7['Nt'][u4s7_gte5]
finiteIx_u4s7 = np.isfinite(np.log10(Nt_u4s7))
pf_Nt_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],np.log10(Nt_u4s7[finiteIx_u4s7]),  1))
Nt_u4s7_dT = 1 - (10**pf_Nt_u4s7(-6)/10**pf_Nt_u4s7(-5))  
print(Nt_u4s7_dT)

$dTWC/dT$ for $T \geq 5^{\circ}C$


In [ ]:
print(np.nan)

u4s2_temp = u4s2['tempC'][u4s2_gte5]
twc_u4s2 = u4s2['twc'][u4s2_gte5]
finiteIx_u4s2 = np.isfinite(np.log10(twc_u4s2))
pf_twc_u4s2 = np.poly1d(np.polyfit(u4s2_temp[finiteIx_u4s2],np.log10(twc_u4s2[finiteIx_u4s2]),  1))
twc_u4s2_dT = 1 - (10**pf_twc_u4s2(-6)/10**pf_twc_u4s2(-5))  
print(twc_u4s2_dT)

print(np.nan)

u4s4_temp = u4s4['tempC'][u4s4_gte5]
twc_u4s4 = u4s4['twc'][u4s4_gte5]
finiteIx_u4s4 = np.isfinite(np.log10(twc_u4s4))
pf_twc_u4s4 = np.poly1d(np.polyfit(u4s4_temp[finiteIx_u4s4],np.log10(twc_u4s4[finiteIx_u4s4]),  1))
twc_u4s4_dT = 1 - (10**pf_twc_u4s4(-6)/10**pf_twc_u4s4(-5))  
print(twc_u4s4_dT)

u4s5_temp = u4s5['tempC'][u4s5_gte5]
twc_u4s5 = u4s5['twc'][u4s5_gte5]
finiteIx_u4s5 = np.isfinite(np.log10(twc_u4s5))
pf_twc_u4s5 = np.poly1d(np.polyfit(u4s5_temp[finiteIx_u4s5],np.log10(twc_u4s5[finiteIx_u4s5]),  1))
twc_u4s5_dT = 1 - (10**pf_twc_u4s5(-6)/10**pf_twc_u4s5(-5))  
print(twc_u4s5_dT)

u4s6_temp = u4s6['tempC'][u4s6_gte5]
twc_u4s6 = u4s6['twc'][u4s6_gte5]
finiteIx_u4s6 = np.isfinite(np.log10(twc_u4s6))
pf_twc_u4s6 = np.poly1d(np.polyfit(u4s6_temp[finiteIx_u4s6],np.log10(twc_u4s6[finiteIx_u4s6]),  1))
twc_u4s6_dT = 1 - (10**pf_twc_u4s6(-6)/10**pf_twc_u4s6(-5))  
print(twc_u4s6_dT)

u4s7_temp = u4s7['tempC'][u4s7_gte5]
twc_u4s7 = u4s7['twc'][u4s7_gte5]
finiteIx_u4s7 = np.isfinite(np.log10(twc_u4s7))
pf_twc_u4s7 = np.poly1d(np.polyfit(u4s7_temp[finiteIx_u4s7],np.log10(twc_u4s7[finiteIx_u4s7]),  1))
twc_u4s7_dT = 1 - (10**pf_twc_u4s7(-6)/10**pf_twc_u4s7(-5))  
print(twc_u4s7_dT)

In [ ]:
# fig, ax = plt.subplots(figsize=(8,10))
# ax.plot(Dmm_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'b-')
# ax.plot(Dmm_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'bo',markeredgecolor='white',markeredgewidth=1,markersize=12)
# ax.plot(pf_Dmm_u4s7(u4s7_temp[finiteIx_u4s7]),u4s7_temp[finiteIx_u4s7],'r-')
# ax.set_ylim(-15,0)
# ax.invert_yaxis()
# ax.set_ylabel('Temperature ($^{\circ}$C)',fontsize=18)
# ax.tick_params(axis='both', which='major', labelsize=16)
# ax.grid(which='both')

# fig, ax = plt.subplots(figsize=(8,10))
# ax.plot(Nt_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'b-')
# ax.plot(Nt_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'bo',markeredgecolor='white',markeredgewidth=1,markersize=12)
# ax.plot(10**(pf_Nt_u4s7(u4s7_temp[finiteIx_u4s7])),u4s7_temp[finiteIx_u4s7],'r-')
# ax.set_ylim(-15,0)
# ax.set_xscale('log',nonposx='mask')
# ax.invert_yaxis()
# ax.set_ylabel('Temperature ($^{\circ}$C)',fontsize=18)
# ax.tick_params(axis='both', which='major', labelsize=16)
# ax.grid(which='both')

# fig, ax = plt.subplots(figsize=(8,10))
# ax.plot(twc_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'b-')
# ax.plot(twc_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'bo',markeredgecolor='white',markeredgewidth=1,markersize=12)
# ax.plot(10**(pf_twc_u4s7(u4s7_temp[finiteIx_u4s7])),u4s7_temp[finiteIx_u4s7],'r-')
# ax.set_ylim(-15,0)
# ax.set_xscale('log',nonposx='mask')
# ax.invert_yaxis()
# ax.set_ylabel('Temperature ($^{\circ}$C)',fontsize=18)
# ax.tick_params(axis='both', which='major', labelsize=16)
# ax.grid(which='both')

# fig, ax = plt.subplots(figsize=(8,10))
# ax.plot(ar_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'b-')
# ax.plot(ar_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'bo',markeredgecolor='white',markeredgewidth=1,markersize=12)
# ax.plot(pf_ar_u4s7(u4s7_temp[finiteIx_u4s7]),u4s7_temp[finiteIx_u4s7],'r-')
# ax.set_ylim(-15,0)
# ax.invert_yaxis()
# ax.set_ylabel('Temperature ($^{\circ}$C)',fontsize=18)
# ax.tick_params(axis='both', which='major', labelsize=16)
# ax.grid(which='both')

# fig, ax = plt.subplots(figsize=(8,10))
# ax.plot(Dmm_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'b-')
# ax.plot(Dmm_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'bo',markeredgecolor='white',markeredgewidth=1,markersize=12)
# ax.plot(pf_Dmm_u4s7(u4s7_temp[finiteIx_u4s7]),u4s7_temp[finiteIx_u4s7],'r-')
# ax.set_ylim(0,15)
# ax.invert_yaxis()
# ax.set_ylabel('Temperature ($^{\circ}$C)',fontsize=18)
# ax.tick_params(axis='both', which='major', labelsize=16)
# ax.grid(which='both')

# fig, ax = plt.subplots(figsize=(8,10))
# ax.plot(Nt_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'b-')
# ax.plot(Nt_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'bo',markeredgecolor='white',markeredgewidth=1,markersize=12)
# ax.plot(10**(pf_Nt_u4s7(u4s7_temp[finiteIx_u4s7])),u4s7_temp[finiteIx_u4s7],'r-')
# ax.set_ylim(0,15)
# ax.set_xscale('log',nonposx='mask')
# ax.invert_yaxis()
# ax.set_ylabel('Temperature ($^{\circ}$C)',fontsize=18)
# ax.tick_params(axis='both', which='major', labelsize=16)
# ax.grid(which='both')

# fig, ax = plt.subplots(figsize=(8,10))
# ax.plot(twc_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'b-')
# ax.plot(twc_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'bo',markeredgecolor='white',markeredgewidth=1,markersize=12)
# ax.plot(10**(pf_twc_u4s7(u4s7_temp[finiteIx_u4s7])),u4s7_temp[finiteIx_u4s7],'r-')
# ax.set_ylim(0,15)
# ax.set_xscale('log',nonposx='mask')
# ax.invert_yaxis()
# ax.set_ylabel('Temperature ($^{\circ}$C)',fontsize=18)
# ax.tick_params(axis='both', which='major', labelsize=16)
# ax.grid(which='both')

# fig, ax = plt.subplots(figsize=(8,10))
# ax.plot(ar_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'b-')
# ax.plot(ar_u4s7[finiteIx_u4s7],u4s7_temp[finiteIx_u4s7],'bo',markeredgecolor='white',markeredgewidth=1,markersize=12)
# ax.plot(pf_ar_u4s7(u4s7_temp[finiteIx_u4s7]),u4s7_temp[finiteIx_u4s7],'r-')
# ax.set_ylim(0,15)
# ax.invert_yaxis()
# ax.set_ylabel('Temperature ($^{\circ}$C)',fontsize=18)
# ax.tick_params(axis='both', which='major', labelsize=16)
# ax.grid(which='both')