Source code for irfpy.cena.backscatter_angle

''' Module to implement the backscatter angle.
'''
import os
import sys
import logging
import datetime
import math

import numpy as np

def _torad(deg):
    return deg * np.pi / 180.


[docs]def fs(sza, phi, theta): ''' Equation (2) :param sza: Solar zenith angle in degrees. :param phi: Phi angle in degrees. :param theta: Theta angle in degrees. ''' return f0(sza, phi, theta) * f1(sza, phi, theta) * f2(sza, phi, theta) * f3(sza, phi, theta)
[docs]def f0(sza, phi, theta): ''' Equation (3)a :param sza: Solar zenith angle in degrees. :param phi: Phi angle in degrees. :param theta: Theta angle in degrees. ''' return 0.009 * z0(sza)
[docs]def f1(sza, phi, theta): ''' Equation (3)b :param sza: Solar zenith angle in degrees. :param phi: Phi angle in degrees. :param theta: Theta angle in degrees. ''' return _torad(z1(sza)) * np.cos(2 * _torad(phi)) + (1 - _torad(z1(sza)))
[docs]def f2(sza, phi, theta): ''' Equation (3)c :param sza: Solar zenith angle in degrees. :param phi: Phi angle in degrees. :param theta: Theta angle in degrees. ''' return z2(sza) * np.cos(_torad(phi)) + (1-z2(sza))
[docs]def f3(sza, phi, theta): ''' Equation (3)d :param sza: Solar zenith angle in degrees. :param phi: Phi angle in degrees. :param theta: Theta angle in degrees. ''' return (1 - z3(sza) / 90.0) * np.sin(_torad(theta) + _torad(z3(sza))) + z3(sza) / 90.0
[docs]def z0(sza): ''' Equation (5)a :param sza: Solar zenith angle in degrees. ''' return 1.24 * np.cos(_torad(1.44 * sza - 48.7))
[docs]def z1(sza): ''' Equation (5)b :param sza: Solar zenith angle in degrees. ''' return 0.30 * sza + 1.72
[docs]def z2(sza): ''' Equation (5)c :param sza: Solar zenith angle in degrees. ''' return 0.24 * np.cos(_torad(74.48 - 1.52 * sza))
[docs]def z3(sza): ''' Equation (5)d :param sza: Solar zenith angle in degrees. ''' return 90 - 1.03 * sza