Exemplo n.º 1
0
def nitrocon(z):
    """
    Function for calculating the number concentration of
    Nitrogen at a given altitude

    Inputs:

    z = altitude [m]

    Outputs:

    n_N2 = number concentration of Nitrogen [#/m^3]
    
    """
    import numpy as np
    import lidar_tools_v1 as ltools
    
    #calculate temperature and pressure profiles using US Standard atmosphere

    [T,P,d] = ltools.std_atm(z)

    #determine backscatter and extinction coefficients as per Rayleigh scattering
    #equations and constats from Kovalev pp 33-36

    T_s = 288.15  #[K] reference temperature
    P_s = 101325.0  #[Pa] reference pressure
    N_s = 2.547e25  #[1/m^3]  reference number concentration
    gamma = 0.0279 #[unitless] depolarization factor (from Kovalev pg.35)

    #convert air mass density to number density

    N_a = 6.02214e23 #Avogadro's number [#/mol]
    M_air = 0.028964 #molar density of air [kg/mol]

    n_t = N_a*d/M_air


    #assuming ideal gas, volume fraction of Nitrogen is mole fraction

    c_N2 = 0.78084

    n_N2 = n_t*c_N2

    return n_N2
Exemplo n.º 2
0
def nitrocon(z):
    """
    Function for calculating the number concentration of
    Nitrogen at a given altitude

    Inputs:

    z = altitude [m]

    Outputs:

    n_N2 = number concentration of Nitrogen [#/m^3]
    
    """
    import numpy as np
    import lidar_tools_v1 as ltools

    #calculate temperature and pressure profiles using US Standard atmosphere

    [T, P, d] = ltools.std_atm(z)

    #determine backscatter and extinction coefficients as per Rayleigh scattering
    #equations and constats from Kovalev pp 33-36

    T_s = 288.15  #[K] reference temperature
    P_s = 101325.0  #[Pa] reference pressure
    N_s = 2.547e25  #[1/m^3]  reference number concentration
    gamma = 0.0279  #[unitless] depolarization factor (from Kovalev pg.35)

    #convert air mass density to number density

    N_a = 6.02214e23  #Avogadro's number [#/mol]
    M_air = 0.028964  #molar density of air [kg/mol]

    n_t = N_a * d / M_air

    #assuming ideal gas, volume fraction of Nitrogen is mole fraction

    c_N2 = 0.78084

    n_N2 = n_t * c_N2

    return n_N2
Exemplo n.º 3
0
def raman_molecular(z, wave_0, wave_r):
    """
    Function for generating molecular extinction coefficients at original and
    Raman shifted wavelengths.  Ozone absorption is ignored.

    Inputs:

    z = altitude [m]
    wave_0 = original wavelength [nm]
    wave_r = Raman-shifted wavelength [nm]

    Outputs:

    alpha_0 = extinction coefficient at original [1/m]
    alpha_r = extinction at Raman
    """
    import numpy as np
    import lidar_tools_v1 as ltools

    beta = np.empty_like(z)
    alpha = np.empty_like(z)

    #calculate temperature and pressure profiles using US Standard atmosphere

    [T, P, d] = ltools.std_atm(z)

    #determine backscatter and extinction coefficients as per Rayleigh scattering
    #equations and constats from Kovalev pp 33-36

    T_s = 288.15  #[K] reference temperature
    P_s = 101325.0  #[Pa] reference pressure
    N_s = 2.547e25  #[1/m^3]  reference number concentration
    gamma = 0.0279  #[unitless] depolarization factor (from Kovalev pg.35)

    #calculate reference index of refraction using a polynomial approximation

    nu_0 = 1000 / wave_0  #frequency in 1/um
    m_s0 = 1 + 1e-8 * (8342.13 + (2406030 / (130 - nu_0**2)) +
                       (15997 / (38.9 - nu_0**2)))

    #now calculate index of refraction at altitude as function of temperature and pressure

    m_0 = 1 + (m_s0 - 1) * ((1 + 0.00367 * T_s) /
                            (1 + 0.00367 * T)) * (P / P_s)

    #convert air mass density to number density

    N_a = 6.02214e23  #Avogadro's number [#/mol]
    M_air = 0.028964  #molar density of air [kg/mol]

    N = N_a * d / M_air

    #without absorption, extinction is equal to total scattering

    alpha_0 = (8*np.pi**3*(m_0**2-1)**2*N/(3*N_s**2*(wave_0*1e-9)**4))*((6+3*gamma)/(6-7*gamma))* \
            (P/P_s)*(T_s/T)

    #repeat above steps for Raman shifted wavelength

    nu_r = 1000 / wave_r  #frequency in 1/um
    m_sr = 1 + 1e-8 * (8342.13 + (2406030 / (130 - nu_r**2)) +
                       (15997 / (38.9 - nu_r**2)))

    #now calculate index of refraction at altitude as function of temperature and pressure

    m_r = 1 + (m_sr - 1) * ((1 + 0.00367 * T_s) /
                            (1 + 0.00367 * T)) * (P / P_s)

    #without absorption, extinction is equal to total scattering

    alpha_r = (8*np.pi**3*(m_r**2-1)**2*N/(3*N_s**2*(wave_r*1e-9)**4))*((6+3*gamma)/(6-7*gamma))* \
            (P/P_s)*(T_s/T)

    return T, P, d, alpha_0, alpha_r
Exemplo n.º 4
0
def raman_molecular(z,wave_0,wave_r):
    """
    Function for generating molecular extinction coefficients at original and
    Raman shifted wavelengths.  Ozone absorption is ignored.

    Inputs:

    z = altitude [m]
    wave_0 = original wavelength [nm]
    wave_r = Raman-shifted wavelength [nm]

    Outputs:

    alpha_0 = extinction coefficient at original [1/m]
    alpha_r = extinction at Raman
    """
    import numpy as np
    import lidar_tools_v1 as ltools
    
    beta = np.empty_like(z)
    alpha = np.empty_like(z)

    #calculate temperature and pressure profiles using US Standard atmosphere
    
    [T,P,d] = ltools.std_atm(z)

    #determine backscatter and extinction coefficients as per Rayleigh scattering
    #equations and constats from Kovalev pp 33-36

    T_s = 288.15  #[K] reference temperature
    P_s = 101325.0  #[Pa] reference pressure
    N_s = 2.547e25  #[1/m^3]  reference number concentration
    gamma = 0.0279 #[unitless] depolarization factor (from Kovalev pg.35)

    #calculate reference index of refraction using a polynomial approximation

    nu_0 = 1000/wave_0 #frequency in 1/um
    m_s0 = 1 + 1e-8*(8342.13+(2406030/(130-nu_0**2))+(15997/(38.9-nu_0**2)))

    #now calculate index of refraction at altitude as function of temperature and pressure

    m_0 = 1+(m_s0-1)*((1+0.00367*T_s)/(1+0.00367*T))*(P/P_s)

    #convert air mass density to number density

    N_a = 6.02214e23 #Avogadro's number [#/mol]
    M_air = 0.028964 #molar density of air [kg/mol]

    N = N_a*d/M_air


    #without absorption, extinction is equal to total scattering

    alpha_0 = (8*np.pi**3*(m_0**2-1)**2*N/(3*N_s**2*(wave_0*1e-9)**4))*((6+3*gamma)/(6-7*gamma))* \
            (P/P_s)*(T_s/T)


    #repeat above steps for Raman shifted wavelength

    nu_r = 1000/wave_r #frequency in 1/um
    m_sr = 1 + 1e-8*(8342.13+(2406030/(130-nu_r**2))+(15997/(38.9-nu_r**2)))

    #now calculate index of refraction at altitude as function of temperature and pressure

    m_r = 1+(m_sr-1)*((1+0.00367*T_s)/(1+0.00367*T))*(P/P_s)

    #without absorption, extinction is equal to total scattering

    alpha_r = (8*np.pi**3*(m_r**2-1)**2*N/(3*N_s**2*(wave_r*1e-9)**4))*((6+3*gamma)/(6-7*gamma))* \
            (P/P_s)*(T_s/T)

    return T,P,d,alpha_0,alpha_r