Exemplo n.º 1
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': OUT_UNITS1,
                'long_name': LONG_NAME1,
                'standard_name': '',
                'Category': ['']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': OUT_UNITS2,
                'long_name': LONG_NAME2,
                'standard_name': '',
                'Category': ['']
            }))

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': [LONG_NAME1, LONG_NAME2],
                'InputUnits': [IN_UNITS1, IN_UNITS2],
                'Outputs': [LONG_NAME1, LONG_NAME2],
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)
Exemplo n.º 2
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units':
                'm/s',
                'long_name':
                'easterly wind velocity',
                'standard_name':
                'eastward_wind',
                'Category': ['Thermodynamic', 'Wind']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units':
                'm/s',
                'long_name':
                'northerly wind velocity',
                'standard_name':
                'northward_wind',
                'Category': ['Thermodynamic', 'Wind']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units':
                'm/s',
                'long_name':
                'upward wind velocity',
                'standard_name':
                'upward_air_velocity',
                'Category': ['Thermodynamic', 'Wind']
            }))

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': [
                    'U_a', 'alpha', 'beta', 'u_p', 'v_p', 'w_p', 'phi',
                    'theta', 'psi', 'theta_dot', 'psi_dot', 'L'
                ],
                'InputUnits': [
                    'm/s', 'rad', 'rad', 'm/s', 'm/s', 'm/s', 'rad', 'rad',
                    'rad', 'rad/s', 'rad/s', 'm'
                ],
                'Outputs': ['u', 'v', 'w'],
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
Exemplo n.º 3
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'degree',
                'long_name': 'Solar Zenith Angle',
                'standard_name': 'solar_zenith_angle',
                'Category': ['Radiation']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'degree',
                'long_name': 'Solar Azimuth Angle',
                'standard_name': 'solar_azimuth_angle',
                'Category': ['Radiation']
            }))

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': [
                    'date_time', 'lat', 'lon', 'elevation', 'pressure',
                    'temperature'
                ],
                'InputUnits': ['', 'degrees', 'degrees', 'm', 'hPa', 'degC'],
                'InputTypes':
                ['time', 'vector', 'vector', 'vector', 'vector', 'vector'],
                'InputDescription': [
                    'ISO string of current date time in UTC', 'Latitude',
                    'Longitude', 'Elevation', 'Local pressure',
                    'Local temperature'
                ],
                'Outputs': ['Theta', 'Phi'],
                'OutputUnits': ['degree', 'degree'],
                'OutputTypes': ['vector', 'vector'],
                'OutputDescription':
                ['Solar zenith angle', 'Solar azimuth angle'],
                'Purpose':
                'Calculates the solar vector based on current date/time, elevation, latitude and longitude',
                'Description':
                'Calculates the solar vector based on current date/time, elevation, latitude and longitude. Takes additional optional arguments of pressure and temperature to correct for atmospheric refraction effects. The zenith and azimuth angle calculated by this algorithm have uncertainties equal to +/- 0.0003 degrees in the period from year -2000 to 6000',
                'Category':
                'Radiation',
                'Source':
                '',
                'References':
                'Reda and Andreas, "Solar Position Algorithm for Solar Radiation Applications," National Renewable Energy Laboratory, Revised 2008,accessed February 14, 2012, http://www.nrel.gov/docs/fy08osti/34302.pdf',
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
Exemplo n.º 4
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'deg',
                'long_name': 'camera viewing zenith angle',
                'standard_name': '',
                'Category': ['Radiation']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'deg',
                'long_name': 'camera viewing azimuth angle',
                'standard_name': '',
                'Category': ['Radiation']
            }))

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['n_x', 'n_y', 'l_x', 'l_y', 'f'],
                'InputUnits': ['', '', 'mm', 'mm', 'mm'],
                'InputTypes': ['coeff', 'coeff', 'coeff', 'coeff', 'coeff'],
                'InputDescription': [
                    'Number of pixels in x direction',
                    'Number of pixels in y direction',
                    'Length of the camera sensor in x direction',
                    'Length of the camera sensor in y direction',
                    'Focal length of the camera lens'
                ],
                'Outputs': ['theta_c', 'phi_c'],
                'OutputUnits': ['deg', 'deg'],
                'OutputTypes': ['array[n_x, n_y]', 'array[n_x, n_y]'],
                'OutputDescription': [
                    'Camera viewing zenith angle',
                    'Camera viewing azimuth angle (mathematic negative system with 0 deg into flight direction)'
                ],
                'Purpose':
                'Calculates per-pixel camera viewing angles for a digital camera image',
                'Description':
                'Calculates per-pixel camera viewing angles of a digital camera given its sensor dimension and focal length. x--y coordinates are defined as having the left side of the image (x=0) aligned with the flight direction and y=0 to the top of the image',
                'Category':
                'Radiation',
                'Source':
                'Andre Ehrlich, Leipzig Institute for Meteorology ([email protected])',
                'References':
                '',
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'hPa',
                                                                     'long_name':'dynamic pressure',
                                                                     'standard_name':'',
                                                                     'Category':['Thermodynamics',
                                                                                 'Atmos State']}))

        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'rad',
                                                                     'long_name':'angle of attack',
                                                                     'standard_name':'',
                                                                     'Category':['Thermodynamics',
                                                                                 'Aircraft State']}))

        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'rad',
                                                                     'long_name':'sideslip angle',
                                                                     'standard_name':'',
                                                                     'Category':['Thermodynamics',
                                                                                 'Aircraft State']}))

        self.metadata = egads_metadata.AlgorithmMetadata({'Inputs':['delta_P_t', 'delta_P_b', 'delta_P_l', 'delta_P_r', 'delta_P_s', 'C_alpha', 'C_beta', 'C_dyn'],
                                                          'InputUnits':['hPa', 'hPa', 'hPa', 'hPa', 'hPa', '', '', ''],
                                                          'InputTypes':['vector','vector','vector','vector','vector','coeff.[11,11]','coeff.[11,11]','coeff.[11,11]'],
                                                          'InputDescription':['Pressure difference between top port and center port',
                                                                              'Pressure difference between bottom port and center port',
                                                                              'Pressure difference between left port and center port',
                                                                              'Pressure difference between right port and center port',
                                                                              'Pressure difference between center port and static pressure',
                                                                              'Angle of attack calibration coefficients',
                                                                              'Sideslip calibration coefficients',
                                                                              'Dynamic pressure calibration coefficients'],
                                                          'Outputs':['P_d', 'alpha', 'beta'],
                                                          'OutputUnits':['hPa','rad','rad'],
                                                          'OutputTypes':['vector','vector','vector'],
                                                          'OutputDescription':['Dynamic pressure','Angle of attack','Sideslip angle'],
                                                          'Purpose':'Calculate dynamic pressure, angle of attack and sideslip',
                                                          'Description':'Calculates dynamic pressure and angles of incidence from a 5-hole probe'
                                                                        + ' using differences between the ports. The algorithm requires calibration'
                                                                        + ' coefficients which are obtained by a calibration procedure of the probe'
                                                                        + ' at predefined airflow angles. See van den Kroonenberg, 2008, for more '
                                                                        + ' details on the calibration procedure.',
                                                          'Category':'Thermodynamics',
                                                          'Source':'',
                                                          'References':'A.C. van der Kroonenberg et al, "Measuring the wind vector using the autonomous mini aerial vehicle M^2AV", J. Atmos. Oceanic Technol., 25 (2008), pp. 1969-1982.',
                                                          'Processor':self.name,
                                                          'ProcessorDate':__date__,
                                                          'ProcessorVersion':__version__,
                                                          'DateProcessed':self.now()},
                                                          self.output_metadata)
Exemplo n.º 6
0
    def __init__(self, return_Egads=True):

        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({'units':'input0',
                                                               'long_name':'',
                                                               'standard_name':'',
                                                               'Category':['']})

        self.metadata = egads_metadata.AlgorithmMetadata({'Inputs':['x', 'f', 'x_interp', 'f_left', 'f_right'],
                                                          'InputUnits':[None, None, None, None, None],
                                                          'InputTypes':['vector','vector','vector','coeff_optional','coeff_optional'],
                                                          'InputDescription':['X-coordinates of the data points (must be increasing and must be the same size as f)',
                                                                              'Data points to interpolate (nan can be used where data are missing, must be the same size as x)',
                                                                              'New set of coordinates to use in interpolation',
                                                                              'Value to return for x_interp < x[0]. default is f[0], if nan are present at the beginning of f, the algorithm will keep them.',
                                                                              'Value to return when x_interp > x[-1]. Default is f[-1], if nan are present at the end of f, the algorithm will keep them.'],
                                                          'Outputs':['f_interp'],
                                                          'OutputUnits':['input0'],
                                                          'OutputTypes':['vector'],
                                                          'OutputDescription':['Interpolated values of f, nans at the beginning and at the end are removed if f_right and f_left are not set to nan.'],
                                                          'Purpose':'Calculate linear interpolation of a variable',
                                                          'Description':'Calculates the one-dimensional piecewise linear interpolation of a variable between two coordinate systems',
                                                          'Category':'',
                                                          'Source':'',
                                                          'References':'',
                                                          'Processor':self.name,
                                                          'ProcessorDate':__date__,
                                                          'ProcessorVersion':__version__,
                                                          'DateProcessed':self.now()},
                                                          self.output_metadata)
Exemplo n.º 7
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            's',
            'long_name':
            'elapsed seconds',
            'standard_name':
            '',
            'Category': ['']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['t_ISO', 't_ISO_ref', 'format'],
                'InputUnits': ['', '', ''],
                'Outputs': ['delta_t'],
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)

        self.default_ref_time = datetime.datetime(1970, 1, 1, 0, 0, 0)
Exemplo n.º 8
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({'units':'km^-1',
                                                               'long_name':'extinction coefficient',
                                                               'standard_name':'',
                                                               'Category':['Microphysics']})

        self.metadata = egads_metadata.AlgorithmMetadata({'Inputs':['n_i', 'd_i', 'Q_e'],
                                                          'InputUnits':['cm^-3', 'um', ''],
                                                          'InputTypes':['array[time,bins]','vector[bins]','vector[bins]_optional'],
                                                          'InputDescription':['Number concentration of hydrometeors in size category i',
                                                                              'Average diameter of size category i',
                                                                              'Extinction efficiency; default is 2'],
                                                          'Outputs':['B_e'],
                                                          'OutputUnits':['km^-1'],
                                                          'OutputTypes':['vector[time]'],
                                                          'OutputDescription':['Extinction coefficient'],
                                                          'Purpose':'Calculates extinction coefficient based on a particle size distribution',
                                                          'Description':'Calculates extinction coefficient based on a particle size distribution',
                                                          'Category':'Microphysics',
                                                          'Source':'',
                                                          'References':"Data Analysis User's Guide, Chapter 1, Section 1.3.2.2, Droplet Measurement Technologies, 2009, http://www.dropletmeasurement.com/sites/default/files/ManualsGuides/Data%20Analysis%20Guide/DOC-0222%20Rev%20A%20Data%20Analysis%20Guide%20Ch%201.pdf",
                                                          'Processor':self.name,
                                                          'ProcessorDate':__date__,
                                                          'ProcessorVersion':__version__,
                                                          'DateProcessed':self.now()},
                                                          self.output_metadata)
Exemplo n.º 9
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({'units':'m/s',
                                                               'long_name':'true air speed',
                                                               'standard_name':'platform_speed_wrt_air',
                                                               'Category':['Thermodynamics', 'Aircraft State']})

        self.metadata = egads_metadata.AlgorithmMetadata({'Inputs':['T_r', 'M', 'e'],
                                                          'InputUnits':['K', None, None],
                                                          'InputTypes':['vector','vector','coeff'],
                                                          'InputDescription':['Measured temperature','Mach number','Thermometer recovery factor'],
                                                          'Outputs':['V_t'],
                                                          'OutputUnits':['m/s'],
                                                          'OutputTypes':['vector[time]'],
                                                          'OutputDescription':['True air speed'],
                                                          'Purpose':'Calculates true air speed based on Mach number, measured temperature and thermometer recovery factor',
                                                          'Description':'Calculation of true air speed given Mach number, measured temperature and thermometer recovery factor. Typical values of thermometer recovery value range from 0.75-0.9 for platinum wire ratiometer (flash bulb type) thermometers, and around 1.0 for TAT type thermometers',
                                                          'Category':'Thermodynamics',
                                                          'Source':'NCAR-EOL',
                                                          'References':'NCAR-RAF Bulletin #23',
                                                          'Processor':self.name,
                                                          'ProcessorDate':__date__,
                                                          'ProcessorVersion':__version__,
                                                          'DateProcessed':self.now()},
                                                          self.output_metadata)
Exemplo n.º 10
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            'm^2',
            'long_name':
            'sample area',
            'standard_name':
            '',
            'Category': ['PMS Probe']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['DOF', 'BD'],
                'InputUnits': ['m', 'm'],
                'InputTypes': ['coeff', 'coeff'],
                'InputDescription': ['Depth of field', 'Beam diameter'],
                'Outputs': ['SA'],
                'OutputUnits': ['m^2'],
                'OutputTypes': ['coeff'],
                'OutputDescription': ['Sample area'],
                'Purpose':
                'Calculation of sampling area for scattering probes',
                'Description':
                'Calculation of sampling area for scattering probes such as the FSSP, CAS, CIP, etc., given depth of field and beam diameter',
                'Category': 'Microphysics',
                'Source': 'NCAR-RAF',
                'References': 'NCAR-RAF Bulletin No. 24',
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)
Exemplo n.º 11
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            'W m^-2 sr^-1 nm^-1',
            'long_name':
            'radiance',
            'standard_name':
            '',
            'Category': ['Radiation']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['T', 'Lambda'],
                'InputUnits': ['K', 'nm'],
                'InputTypes': ['vector', 'coeff'],
                'InputDescription': ['Temperature', 'Wavelength'],
                'Outputs': ['rad'],
                'OutputUnits': ['W m^-2 sr^-1 nm^-1'],
                'OutputTypes': ['vector'],
                'OutputDescription': ['Black body radiance'],
                'Purpose':
                'Calculates the radiance of a surface at a given wavelength given its temperature',
                'Description': 'No description',
                'Category': 'Radiation',
                'Source':
                'Andre Ehrlich, Leipzig Institute for Meteorology ([email protected])',
                'References': '',
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)
Exemplo n.º 12
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            '',
            'long_name':
            'mach number',
            'standard_name':
            '',
            'Category': ['']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['dP', 'Ps'],
                'InputUnits': ['hPa', 'hPa'],
                'InputTypes': ['vector', 'vector'],
                'InputDescription': ['Dynamic pressure', 'Static pressure'],
                'Outputs': ['M'],
                'OutputUnits': [''],
                'OutputTypes': ['vector'],
                'OutputDescription': ['Mach number'],
                'Purpose':
                'Calculates mach number based on dynamic and static pressure',
                'Description': 'No description',
                'Category': 'Thermodynamics',
                'Source': 'NCAR-EOL',
                'References': 'NCAR-RAF Bulletin #23',
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)
Exemplo n.º 13
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            'degree',
            'long_name':
            '',
            'standard_name':
            '',
            'Category': ['']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['angle'],
                'InputUnits': ['degree'],
                'InputTypes': ['vector'],
                'InputDescription':
                ['Angle to limit to between 0 and 360 degrees'],
                'Outputs': ['angle_limited'],
                'OutputUnits': ['degree'],
                'OutputTypes': ['vector'],
                'OutputDescription': ['Resulting angles'],
                'Purpose':
                'This function calculates the corresponding angle between 0 and 360 degrees given an angle of any size',
                'Description': 'No description',
                'Category': 'Mathematics',
                'Source': '',
                'References': '',
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)
Exemplo n.º 14
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            'year',
            'long_name':
            'time in decimal year',
            'standard_name':
            'time',
            'Category': ['']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['t', 't_ref'],
                'InputUnits': ['year', None],
                'InputTypes': ['vector', 'coeff_optional'],
                'InputDescription': ['Time.', 'Time reference in year.'],
                'Outputs': ['t_y'],
                'OutputUnits': ['year'],
                'OutputTypes': ['vector'],
                'OutputDescription': ['Time in decimal year.'],
                'Purpose': 'Converts a time or a time vector to decimal year.',
                'Description':
                'Given a vector of time elapsed and an optional reference year, this algorithm convert the data to a format in decimal year. Ex: 1995.0125',
                'Category': 'Transforms',
                'Source': '',
                'References': '',
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)
Exemplo n.º 15
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        # 3. Complete output_metadata with metadata of the parameter(s) to be produced
        #    by this algorithm. In the case of multiple parameters, use the  following
        #    formula:
        #            self.output_metadata = []
        #            self.output_metadata.append(egads_metadata.VariableMetadata(...)
        #            self.output_metadata.append(egads_metadata.VariableMetadata(...)
        #            ...
        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            '%',
            'long_name':
            'template',
            'standard_name':
            '',
            'Category': ['']
        })

        # 3 cont. Complete metadata with parameters specific to algorithm, including
        #         a list of inputs, a corresponding list of units, and the list of
        #         outputs.
        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': [''],
                'InputUnits': [''],
                'Outputs': ['template'],
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)
Exemplo n.º 16
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            '',
            'long_name':
            'ISO 8601 date-time',
            'standard_name':
            '',
            'Category': ['']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['t_secs', 't_ref', 'format'],
                'InputUnits': ['s', '', ''],
                'Outputs': ['t_ISO'],
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)

        self.format_default = 'yyyymmddTHHMMss'
Exemplo n.º 17
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({'units':'m',
                                                               'long_name':'pressure altitude calculated incrementally',
                                                               'standard_name':'pressure altitude',
                                                               'Category':['Thermodynamics', 'Aircraft State']})

        self.metadata = egads_metadata.AlgorithmMetadata({'Inputs':['P_s','T_v','t','Z0','S0'],
                                                          'InputUnits':['hPa','K','s','m','s'],
                                                          'InputTypes':['vector','vector','vector','coeff','coeff_optional'],
                                                          'InputDescription':['Static pressure',
                                                                              'Virtual temperature',
                                                                              'Measurement period',
                                                                              'reference altitude (at S0 if S0 is provided,can be airport altitude (m) if S0 is not provided and measurements start in airport)',
                                                                              'reference time (if not provided, S0 = t[0]'],
                                                          'Outputs':['alt_p'],
                                                          'OutputUnits':['m'],
                                                          'OutputTypes':['vector'],
                                                          'OutputDescription':['Pressure altitude'],
                                                          'Purpose':'Calculate pressure altitude incrementally',
                                                          'Description':'Calculate a pressure altitude incrementally along the trajectory of an aircraft from the Laplace formula (Z2 = Z1 + Ra/g < Tv > log(P1/P2)).',
                                                          'Category':'Thermodynamics',
                                                          'Source':'CNRM/GMEI/TRAMM',
                                                          'References':"Equation of state for a perfect gas, Triplet-Roche, page 36.",
                                                          'Processor':self.name,
                                                          'ProcessorDate':__date__,
                                                          'ProcessorVersion':__version__,
                                                          'DateProcessed':self.now()},
                                                          self.output_metadata)
Exemplo n.º 18
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)
        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            'deg',
            'long_name':
            'scattering angle',
            'standard_name':
            '',
            'Category': ['Radiation']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs':
                ['n_x', 'n_y', 'theta_c', 'phi_c', 'theta_sun', 'phi_sun'],
                'InputUnits': ['', '', 'deg', 'deg', 'deg', 'deg'],
                'Outputs': ['theta_scat'],
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
Exemplo n.º 19
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'radians',
                'long_name': 'right ascension',
                'standard_name': '',
                'Category': ['Radiation']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'radians',
                'long_name': 'declination',
                'standard_name': '',
                'Category': ['Radiation']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'radians',
                'long_name': 'solar zenith',
                'standard_name': '',
                'Category': ['Radiation']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'radians',
                'long_name': 'solar azimuth',
                'standard_name': '',
                'Category': ['Radiation']
            }))

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['date-time', 'lat', 'long'],
                'InputUnits': ['', 'degrees', 'degrees'],
                'Outputs': ['ra', 'delta', 'theta_z', 'gamma'],
                'Processor': self.name,
                'ProcessorDate': __date__,
                'ProcessorVersion': __version__,
                'DateProcessed': self.now()
            }, self.output_metadata)
Exemplo n.º 20
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            '',
            'long_name':
            'relative humidity',
            'standard_name':
            'relative_humidity',
            'Category': ['Thermodynamics', 'Atmos State']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': [
                    'Ucapf', 'T_s', 'P_s', 'dP', 'C_t', 'Fmin', 'C_0', 'C_1',
                    'C_2'
                ],
                'InputUnits':
                ['Hz', 'K', 'hPa', 'hPa', '%/degC', 'Hz', '', '', ''],
                'InputTypes': [
                    'vector', 'vector', 'vector', 'vector', 'coeff', 'coeff',
                    'coeff', 'coeff', 'coeff'
                ],
                'InputDescription': [
                    'Output frequency of capacitive probe',
                    'Static temperature', 'Static pressure',
                    'Dynamic pressure', 'Temperature correction coefficient',
                    'Minimal acceptable frequency',
                    'Calibration law 0th degree coefficient',
                    'Calibration law 1st degree coefficient',
                    'Calibration law 2nd degree coefficient'
                ],
                'Outputs': ['H_u'],
                'OutputUnits': [''],
                'OutputTypes': ['vector'],
                'OutputDescription': ['Relative humidity'],
                'Purpose':
                'Calculate relative humidity from capacitive probe',
                'Description':
                'Calculates relative humidity of the air based on the frequency of the capacitive probe',
                'Category':
                'Thermodynamics',
                'Source':
                'CNRM/GMEI/TRAMM',
                'References':
                '',
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
Exemplo n.º 21
0
    def setUp(self):
        cf_var_metadata_dict = {
            '_FillValue': '',
            'valid_min': '',
            'valid_max': '',
            'valid_range': '',
            'scale_factor': '',
            'add_offset': '',
            'units': '',
            'long_name': '',
            'standard_name': '',
            'ancillary_variables': '',
            'flag_values': '',
            'flag_masks': '',
            'flag_meanings': ''
        }
        raf_var_metadata_dict = {
            '_FillValue': '',
            'units': '',
            'long_name': '',
            'standard_name': '',
            'SampledRate': '',
            'CalibrationCoefficients': '',
            'Category': '',
            'Dependencies': ''
        }
        iwgadts_var_metadata_dict = {
            '': '',
            '': '',
            '': '',
            '': '',
            '': '',
            '': '',
            '': ''
        }
        n6sp_var_metadata_dict = {
            '': '',
            '': '',
            '': '',
            '': '',
            '': '',
            '': '',
            '': '',
        }
        nasa_ames_var_metadata_dict = {
            '': '',
            '': '',
            '': '',
            '': '',
            '': '',
        }

        var_metadata = metadata.VariableMetadata()
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'deg',
                                                               'long_name':'solar zenith, aircraft coordinates',
                                                               'standard_name':'',
                                                               'Category':['Radiation']}))

        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'deg',
                                                               'long_name':'solar azimuth, aircraft coordinates',
                                                               'standard_name':'',
                                                               'Category':['Radiation']}))

        self.metadata = egads_metadata.AlgorithmMetadata({'Inputs':['theta_sun', 'phi_sun', 'roll', 'pitch', 'roll'],
                                                          'InputUnits':['deg', 'deg', 'deg', 'deg', 'deg'],
                                                          'Outputs':['theta_new', 'phi_new'],
                                                          'Processor':self.name,
                                                          'ProcessorDate':__date__,
                                                          'ProcessorVersion':__version__,
                                                          'DateProcessed':self.now()},
                                                          self.output_metadata)
Exemplo n.º 23
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            'g/cm^3',
            'long_name':
            'Mass concentration',
            'standard_name':
            '',
            'Category': ['Microphysics']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['c_i', 'd_i', 's_i', 'rho_i'],
                'InputUnits': ['cm^-3', 'um', '', 'g/cm^3'],
                'InputTypes': [
                    'array[time, bins]', 'vector[bins]', 'array[time,bins]',
                    'vector[bins]'
                ],
                'InputDescription': [
                    'Number concentration of hydrometeors in size category i',
                    'Average diameter of size category i',
                    'Shape factor of hydrometeor in size category i to account for asphericity',
                    'density of the hydrometeor in size category i'
                ],
                'Outputs': ['M'],
                'OutputUnits': ['g/cm^3'],
                'OutputTypes': ['vector[time]'],
                'OutputDescription': ['Mass concentration'],
                'Purpose':
                'Calculates mass concentration given a size distribution',
                'Description':
                'Calculates mass concentration given a size distribution. Can be used to calculate liquid or ice water content depending on the types of hydrometeors being sampled',
                'Category':
                'Microphysics',
                'Source':
                '',
                'References':
                "Data Analysis User's Guide, Chapter 1, Section 1.3.2, Droplet Measurement Technologies, 2009, http://www.dropletmeasurement.com/sites/default/files/ManualsGuides/Data%20Analysis%20Guide/DOC-0222%20Rev%20A%20Data%20Analysis%20Guide%20Ch%201.pdf",
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
Exemplo n.º 24
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            'um',
            'long_name':
            'median volume diameter',
            'standard_name':
            '',
            'Category': ['Microphysics']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['n_i', 'd_i', 's_i', 'rho_i'],
                'InputUnits': ['cm^-3', 'um', '', 'g/cm^3'],
                'InputTypes': [
                    'array[time,bins]', 'vector[bins]',
                    'array[time, bins]_optional', 'vector[bins]_optional'
                ],
                'InputDescription': [
                    'Number concentration of hydrometeors in bin i',
                    'Average diameter of bin i',
                    'Shape factor of hydrometeor in size category i to account for asphericity',
                    'Density of hydrometeor in bin i, default is 1.0 g/cm^3'
                ],
                'Outputs': ['D_mvd'],
                'OutputUnits': ['um'],
                'OutputTypes': ['vector[time]'],
                'OutputDescription': ['Median volume diameter'],
                'Purpose':
                'Calculation of median volume diameter',
                'Description':
                'Calculates the median volume diameter given a size distribution. The median volume  diameter is the size of droplet below which 50% of the total water volume resides',
                'Category':
                'Microphysics',
                'Source':
                '',
                'References':
                "Data Analysis User's Guide, Chapter 1, Section 1.3.2.4, Droplet Measurement Technologies, 2009, http://www.dropletmeasurement.com/sites/default/files/ManualsGuides/Data%20Analysis%20Guide/DOC-0222%20Rev%20A%20Data%20Analysis%20Guide%20Ch%201.pdf",
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
Exemplo n.º 25
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'deg',
                                                               'long_name':'camera viewing zenith angle',
                                                               'standard_name':'',
                                                               'Category':['Radiation']}))

        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'deg',
                                                               'long_name':'camera viewing azimuth angle',
                                                               'standard_name':'',
                                                               'Category':['Radiation']}))


        self.metadata = egads_metadata.AlgorithmMetadata({'Inputs':['n_x', 'n_y', 'l_x', 'l_y', 'f'],
                                                          'InputUnits':['', '', 'mm', 'mm', 'mm'],
                                                          'Outputs':['theta_c', 'phi_c'],
                                                          'Processor':self.name,
                                                          'ProcessorDate':__date__,
                                                          'ProcessorVersion':__version__,
                                                          'DateProcessed':self.now()},
                                                          self.output_metadata)
Exemplo n.º 26
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'degrees',
                'long_name': 'Solar Zenith Angle',
                'standard_name': 'solar_zenith_angle',
                'Category': ['Radiation']
            }))

        self.output_metadata.append(
            egads_metadata.VariableMetadata({
                'units': 'degrees',
                'long_name': 'Solar Azimuth Angle',
                'standard_name': 'solar_azimuth_angle',
                'Category': ['Radiation']
            }))

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': [
                    'date_time', 'lat', 'long', 'elevation', 'pressure',
                    'temperature'
                ],
                'InputUnits': ['', 'degrees', 'degrees', 'm', 'hPa', 'degC'],
                'Outputs': ['Theta', 'Phi'],
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
Exemplo n.º 27
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)
        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            'deg',
            'long_name':
            'scattering angle',
            'standard_name':
            '',
            'Category': ['Radiation']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs':
                ['n_x', 'n_y', 'theta_c', 'phi_c', 'theta_sun', 'phi_sun'],
                'InputUnits': ['', '', 'deg', 'deg', 'deg', 'deg'],
                'InputTypes':
                ['coeff', 'coeff', 'array', 'array', 'coeff', 'coeff'],
                'InputDescription': [
                    'Number of pixels in x dimension',
                    'Number of pixels in y dimension',
                    'Camera viewing zenith angle',
                    'Camera viewing azimuth angle (0 deg = flight dir)',
                    'Solar zenith angle', 'Solar azimuth angle'
                ],
                'Outputs': ['theta_scat'],
                'OutputUnits': ['deg'],
                'OutputTypes': ['array[n_x, n_y]'],
                'OutputDescription': ['Scattering angles of each pixel'],
                'Purpose':
                'Calculates the scattering angle for each pixel on an image given the camera viewing angle and solar vector',
                'Description':
                'No description',
                'Category':
                'Radiation',
                'Source':
                'Andre Ehrlich, Leipzig Institute for Meteorology ([email protected])',
                'References':
                '',
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)
Exemplo n.º 28
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = []
        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'deg',
                                                               'long_name':'solar zenith, aircraft coordinates',
                                                               'standard_name':'',
                                                               'Category':['Radiation']}))

        self.output_metadata.append(egads_metadata.VariableMetadata({'units':'deg',
                                                               'long_name':'solar azimuth, aircraft coordinates',
                                                               'standard_name':'',
                                                               'Category':['Radiation']}))

        self.metadata = egads_metadata.AlgorithmMetadata({'Inputs':['theta_sun', 'phi_sun', 'roll', 'pitch', 'roll'],
                                                          'InputUnits':['deg', 'deg', 'deg', 'deg', 'deg'],
                                                          'InputTypes':['vector','vector','vector','vector','vector'],
                                                          'InputDescription':['Solar zenith',
                                                                              'Solar azimuth (mathematic negative, north=0 deg)',
                                                                              'Aircraft roll (mathematic positive, left wing up=positive)',
                                                                              'Aircraft pitch (mathematic positive, nose down=positive)',
                                                                              'Aircraft yaw (mathematic negative, north=0 deg)'],
                                                          'Outputs':['theta_new', 'phi_new'],
                                                          'OutputUnits':['deg','deg'],
                                                          'OutputTypes':['vector','vector'],
                                                          'OutputDescription':['Solar zenith, aircraft coordinates','Solar azimuth, aircraft coordinates (mathematic negative, north=0 deg)'],
                                                          'Purpose':'Rotates polar solar vector by rotation of aircraft roll, pitch and yaw',
                                                          'Description':'No description',
                                                          'Category':'Radiation',
                                                          'Source':'Andre Ehrlich, Leipzig Institute for Meteorology ([email protected])',
                                                          'References':'',
                                                          'Processor':self.name,
                                                          'ProcessorDate':__date__,
                                                          'ProcessorVersion':__version__,
                                                          'DateProcessed':self.now()},
                                                          self.output_metadata)
Exemplo n.º 29
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            's',
            'long_name':
            'elapsed seconds',
            'standard_name':
            '',
            'Category': ['']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['t_ISO', 't_ISO_ref', 'format'],
                'InputUnits': ['', '', ''],
                'InputTypes': ['vector', 'string_optional', 'string_optional'],
                'InputDescription': [
                    'ISO 8601 strings',
                    'Reference time (ISO 8601 string) - default is 19700101T000000',
                    'Time string format - if none provided algorithm will attempt to automatically deconstruct timestring'
                ],
                'Outputs': ['delta_t'],
                'OutputUnits': ['s'],
                'OutputTypes': ['vector'],
                'OutputDescription': ['Seconds since reference'],
                'Purpose':
                'Calculates seconds elapsed from a series of ISO 8601 date/time strings',
                'Description':
                'Calculates seconds elapsed from a series of ISO 8601 date/time strings using the Python dateutil and datetime modules',
                'Category':
                'Transforms',
                'Source':
                '',
                'References':
                '',
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)

        self.default_ref_time = datetime.datetime(1970, 1, 1, 0, 0, 0)
Exemplo n.º 30
0
    def __init__(self, return_Egads=True):
        egads_core.EgadsAlgorithm.__init__(self, return_Egads)

        self.output_metadata = egads_metadata.VariableMetadata({
            'units':
            '',
            'long_name':
            'ISO 8601 date-time',
            'standard_name':
            '',
            'Category': ['']
        })

        self.metadata = egads_metadata.AlgorithmMetadata(
            {
                'Inputs': ['t_secs', 't_ref', 'format'],
                'InputUnits': ['s', None, None],
                'InputTypes': ['vector', 'string', 'string_optional'],
                'InputDescription': [
                    'Elapsed seconds', 'ISO 8601 reference time',
                    'ISO 8601 format string, default is yyyymmddTHHMMss '
                ],
                'Outputs': ['t_ISO'],
                'OutputUnits': [''],
                'OutputTypes': ['vector'],
                'OutputDescription': ['ISO 8601 date-time strings'],
                'Purpose':
                'Converts an elapsed seconds parameter into ISO 8601 formatted time string',
                'Description':
                'Given a vector of seconds elapsed and a reference time, this algorithm calculates  a series of ISO 8601 strings using the Python datetime module. ISO 8601 string formats can be controlled by the optional format string, default is yyyymmddTHHMMss',
                'Category':
                'Transforms',
                'Source':
                '',
                'References':
                '',
                'Processor':
                self.name,
                'ProcessorDate':
                __date__,
                'ProcessorVersion':
                __version__,
                'DateProcessed':
                self.now()
            }, self.output_metadata)

        self.default_ref_time = '19700101T000000'
        self.format_default = 'yyyymmddTHHMMss'