Processing python Modules

rio_geneas.py

class ppodd.pod.p_rio_geneas.rio_geneas(dataset)[source]

FORTRAN routine C_GENEAS DEC$ IDENT ‘V1.02’

ROUTINE:

C_GENEAS SUBROUTINE FORTVAX

PURPOSE:

Derivation of Dew point

DESCRIPTION:

Calculation of Dew Point in K from General Eastern Hygrometer

529- Dew Point [K]

The General Eastern Hygrometer (Parameter 58) is recorded in binary with a range of 0 to 4095 DRS bits. A control signal (Parameter 59) is also recorded which gives an indication of the amount of heating or cooling of the mirror. The instrument should be in control if the signal is between certain limits. Outside these limits it still produces a dew point reading,though of doubtful accuracy, and derived data is flagged - FLAG = 2.

VERSION:

1.00 240190 J HARMER

1.01 17-01-96 D Lauchlan

ARGUMENTS:
Constants:

GEMAX Maximum control condition signal limit RCONST(1)

GEMIN Minimum control condition signal limit RCONST(2)

CALGE(1) GE Dew point calib. constant x0 RCONST(3)

CALGE(2) GE Dew point calib. constant x1 RCONST(4)

CALGE(3) GE Dew point calib. constant x2 RCONST(5)

Inputs:

GENERAL EASTERN 1011 DEW POINT [drs units ] Para 58

GENERAL EASTERN CONTROL SIGNAL [drs units ] Para 59

Outputs:

DEW POINT [K] Para 529

SUBPROGRAMS:

ITSTFLG Examines bits 16,17 for flags

ISETFLG Sets flag bits 16,17 = 0 –> 3

S_QCPT Performs range and rate of change check

REFERENCES:

Code adapted from MRF1/MRF2

CHANGES:

v1.01 17-01-96 D Lauchlan; Unused variables removed

V1.02 27/09/02 W.D.N.JACKSON Changed to include handling of 16 bit data from the new DRS.

rio_buck_cr2

class ppodd.pod.p_rio_buck.rio_buck_cr2(dataset)[source]

Routine to process data from the BUCK CR2 Hygrometer.

rio_co_mixingratio.py

class ppodd.pod.p_rio_comr.rio_co_mixingratio(dataset)[source]

Routine to calculate the Carbon Monoxide concentration from the AL52002 Instrument.

The routine works with the data from the TCP packages that are stored on Fish and Septic. Flagging is done using the cal_status flag ( AL52CO_cal_status) and the pressure measurement in the calibration chamber of the instrument (AL52CO_calpress).

rio_cpc.py

class ppodd.pod.p_rio_cpc.rio_cpc(dataset)[source]

Routine for processing the data from the CPC (Condensation Particle Counter) instrument TSI 3786.

FLAGGING:
  1. Data OK
  2. Saturator temperature more than 6 degrees C, Growth or Optics Temp more/less than 10% from prescribed value
  3. Aerosol (Sample) flow more/less than 10% from prescribed value
  4. Sheath flow more/less than 10% from prescribed value
OUTPUT:

CPC_CNTS

rio_geneas.py

class ppodd.pod.p_rio_geneas.rio_geneas(dataset)[source]

FORTRAN routine C_GENEAS DEC$ IDENT ‘V1.02’

ROUTINE:

C_GENEAS SUBROUTINE FORTVAX

PURPOSE:

Derivation of Dew point

DESCRIPTION:

Calculation of Dew Point in K from General Eastern Hygrometer

529- Dew Point [K]

The General Eastern Hygrometer (Parameter 58) is recorded in binary with a range of 0 to 4095 DRS bits. A control signal (Parameter 59) is also recorded which gives an indication of the amount of heating or cooling of the mirror. The instrument should be in control if the signal is between certain limits. Outside these limits it still produces a dew point reading,though of doubtful accuracy, and derived data is flagged - FLAG = 2.

VERSION:

1.00 240190 J HARMER

1.01 17-01-96 D Lauchlan

ARGUMENTS:
Constants:

GEMAX Maximum control condition signal limit RCONST(1)

GEMIN Minimum control condition signal limit RCONST(2)

CALGE(1) GE Dew point calib. constant x0 RCONST(3)

CALGE(2) GE Dew point calib. constant x1 RCONST(4)

CALGE(3) GE Dew point calib. constant x2 RCONST(5)

Inputs:

GENERAL EASTERN 1011 DEW POINT [drs units ] Para 58

GENERAL EASTERN CONTROL SIGNAL [drs units ] Para 59

Outputs:

DEW POINT [K] Para 529

SUBPROGRAMS:

ITSTFLG Examines bits 16,17 for flags

ISETFLG Sets flag bits 16,17 = 0 –> 3

S_QCPT Performs range and rate of change check

REFERENCES:

Code adapted from MRF1/MRF2

CHANGES:

v1.01 17-01-96 D Lauchlan; Unused variables removed

V1.02 27/09/02 W.D.N.JACKSON Changed to include handling of 16 bit data from the new DRS.

p_rio_heiman.py

class ppodd.pod.p_rio_heiman.rio_heiman(dataset)[source]

FORTRAN routine C_HEIMAN

ROUTINE:

C_HEIMAN SUBROUTINE FORTVAX

PURPOSE:

To derive uncorrected Heimann temperatures

DESCRIPTION:

Converts rawdata input from the Heimann radiometer and black body source into uncorrected surface tempratures, parameter 537.

The Heimmann is recorded by para 141, the blackbody reference temperature by para 142, and bit 0 of the signal register (para 27) indicates whether the Heimann is set to calibrate.

ARGUMENTS:

IRAW input raw data IFRQ raw data frequencies RCONST flight constants corresponding to PRTCCAL and HEIMCAL RDER output data

SUBPROGRAMS:
REFERENCES:
VERSION:

1.00 D.R.Lauchlan

CHANGES:
DESCRIPTION:

Converts the two input parameters 141 (raw Heimann) and 142 (black body reference temperature) into one, the uncorrected HEIMAN temp (para 537).

The Heimann Radiometer data is converted using a quadratic fit : Surface temp = RCONST(4) + RCONST(5)*x + RCONST(6)*x**2 RCONST(4 to 6) correspond to the constants with the keyword HEIMCAL in the flight constants file.

The black body signal (para 142) is converted using a quadratic fit:

BB = a + b*x + c*x**2

where constants a, b and c correspond to RCONST(1 to 3) from the keyword PRTCCAL in the flight constant file.

Signal Register (para 27) bit 0 indicates the position of the black body; 0 = b/b out of FoV, 1 = b/b in FoV.

If signal register bit 0 is set to 1 and black body reference temprature has been steady for the previous 3 seconds (mean of each second differs by no more than 0.1K), the b/b reference temperature is output. Otherwise the HEIMAN temprature is output. An offset is assigned accordingly

    Para 27 bit 0  
233.26 to 313.06 Heimann- 0 (o/s = 0)
1233.26 to 1313.06 Ref/BB - 0 (o/s = 1000)
2233.26 to 2313.06 Heimann- 1 (o/s = 2000)
3233.26 to 3313.06 Ref/BB - 1 (o/s = 2000 + 1000)

(NOTE: an offset of 1000 is never assigned under this scheme)

Heimann data is output for the time that the reference temperature is output. This is done in 4 second bursts imediately after the reference sequence and overwrites the ramping sections. Non reference or dwelling calibration temeratures are flagged as 2. Dwell Heimann data is output for the corresponding calibration reference period after the instrument has switched back to measure, ie para 27 bit 0 becomes 0.

Bits 16 and 17 of the output temperature RDER(x,537) are used to flag certain data conditions as follows :

Bits 16 and 17 = 00 - Good data, MEASURE/HEIMANN
= 01 - Good data, but Heimann on CALIBRATE
and outputing DWELL temp
or looking at the Black Body temps
or BB moved out of field of view
and data are last Heimann dwell
data.
= 02 - Suspect or absent signal register
data, non-reference calibration
temperatures and non-dwelling
calibration temperatures.
= 03 - Absent data, passed through from
IRAW(x,141)
ARGUMENTS:
IRAW(f,141) Raw Heimann data
IRAW(f,27) Raw signal register data
IRAW(f,142) Raw black body data
IFRQ(141) Recorded frequency of Heimann Radiometer
IFRQ(27) Recorded frequency of signal register
IFRQ(142) Recorded frequency of black body
RCONST(1-6) Constants for quadratic fit
RDER(f,537) Uncorrected Heimann temps (deg K)
SUBPROGRAMS:
ITSTFLG - Returns the value of bits 16 & 17 - SCILIB
ISETFLG - Sets the value of bits 16 & 17 - SCILIB
IBITS - Extracts selected bits from input - FORTRAN
BTEST - Tests value of selected single bit - FORTRAN
C_HEIMAN_LTST_BB - Checks array elemenets are within +/- 86 - LOCAL
REFERENCES:
VERSION:

1.00 09-11-94 D.R.Lauchlan Based on C_BARNES V2.00 by D.P. Briggs

CHANGES:

V1.01 10/02/99 W.D.N.JACKSON Bug in flag checking of raw data fixed.

V1.02 27/09/02 W.D.N.JACKSON Changed to include handling of 16 bit data from the new DRS. Also now expects calibrator temp cal to be in deg C.

V1.03 11/11/04 J.P. TAYLOR Changed to account for 16bit representation of DRS parameters. Allowable range of BB ref means changed from +/- 6 to +/- 86 this is equivalent to 0.1K with the new DRS 16bit data stream.

rio_lwc.py

class ppodd.pod.p_rio_lwc.rio_lwc(dataset)[source]

FORTRAN routine C_LWC

ROUTINE:

C_LWC SUBROUTINE FORT VAX [C_LWC.FOR]

PURPOSE:

To calibrate DRS parm 42 to tardis parm 535 (LWC)

DESCRIPTION:

The Liquid Water Content (LWC) is a four hertz parameter. It requires the True Air Speed (Parm 517), True De_iced Temperature (parm 520) and Static Pressure (parm 576). All these derived parameters (517, 520, 576) are at 32 Hertz. So for each quarter point of the LWC requires a sample of eight of the derived paramters to be averaged. This is done using only good data points. If there are not eight samples but more than one then the flag for the derived LWC is set to 1. If the frequency of the DRS parm (42) is not equal to 4 then no values are calculated and all four points of the LWC are set to -9999.0, with a flag of 3. If a point cannot be calculated then the value of it is set to -9999.0 with a flag value of 3. If the instrument is saturated then the flag value is 1. If the derived value for the LWC falls out of the bounds of -10 to 10 then the flag is set to 2.

VERSION:

1.02 17-01-96 D Lauchlan

ARGUMENTS:

IRAW(64,512) I*4 IN Raw data for the parameters

FRQ(512) I*4 IN Frequencies of the data

RCONST(64) R*4 IN Constants required by routine,(1-28)

RDER(64,1024)R*4 OUT Tardis parameters

SUBPROGRAMS:

ISETFLG (linked automatically)

REFERENCES:

MRF2 Specification for Total Water Hygrometer 4 Dec 1989 Ouldridge Feb 1982 Johnson 1979

CHANGES:

110190 Documentational changes only M.Glover

v 1.02 17-01-96 D Lauchlan Unused parameters removed

V1.03 27/09/02 W.D.N.JACKSON Changed to include handling of 16 bit data from the new DRS.

rio_nephelometer.py

class ppodd.pod.p_rio_nephelometer.rio_nephelometer(dataset)[source]

Module for the TSI 3563 Nephelometer

No post processing is done to the data that are recorded and streamed by the RIO modules. However, the units of the scatter values are converted from megameters-1 to meters-1 and the flags are set using the AERACK_neph_status parameter.

The status flag definition is described in the TSI 3563 manual on page 6-22.

Flagging is done for the:

  1. scattering values
  2. the relative
  3. temperature
  4. pressure measurements.
Flagging:

RF returns a four-character hexadecimal value representing the state of the Nephelometer. The values for the sixteen flags are as follows:

  1. Data OK
  2. Not used
  3. Not used
  4. Lamp not within 10% of SP setting * Valve fault * Chopper fault * Shutter fault * Heater active but not stabilized * Pressure out of range * Sample Temp out of range * Inlet temp out of range * RH out of range

rio_ozone.py

class ppodd.pod.p_rio_ozone.rio_ozone(dataset)[source]
DESCRIPTION:

Calibrated TEI Ozone instrument data The flagging of the data uses mainly the flow measurements in the two chambers | TEIOZO_FlowA | TEIOZO_FlowB Data points while on the ground (WOW_IND = 1) are also flagged as ‘3’ and so are all data points for the first 20 seconds after take-off

The TECO_49 also sends its own flag in the data stream (TEIOZO_flag) which is used for flagging

FLAGGING:

Flag values are set using flow_a, flow_b, weight on wheels index and the instruments own flag value | flag=flag!=‘1c100000’ | flag[conc < -10]=2 | flag[flow_a < flow_threshold]=3 | flag[flow_b < flow_threshold]=3 | flag[wow_ind != 0]=3

rio_press.py

class ppodd.pod.p_rio_press.rio_press(dataset)[source]

FORTRAN routine C_PRESS1

ROUTINE:

C_PRESS1 SUBROUTINE FORTVAX

PURPOSE:

Calibrates the cabin pressure sensor and the S9 static port.

DESCRIPTION:

Apply calibration the combined transducer and DRS coefficients to DRS parameters 14 and 221 to obtain derived parameters 579 and 778. Invalid data is flagged with 3, data outside limits is flagged with 2.

METHOD:

For each DRS parameter to be calibrated

  1. If data is FFFF or FFFE then flag 3
  2. Apply the calibration constants
  3. Check the results for being within acceptable values.
  4. Set data flag bits (16+17)
FLAGGING:
0 = Good data
1 = Data of lower quality
2 = Probably faulty, exceed lims
3 = Data absent or invalid.

Flagging - If a value can’t be computed, due to missing data missing constants, divide be zeroes, etc, a value of 0 is used, flagged with a three. If a value is outside its limits for range or rate of change, it is flagged with a two. If there are no problems with the data it is flagged with 0.

VERSION:

1.00 23/07/03 W.D.N.JACKSON

ARGUMENTS:
Inputs:

DRS para 14 CABP 1 Hz Cabin pressure

DRS para 221 S9SP 32 Hz S9 static pressure

Constants:

RCONST(1 to 3) Para 14 cal constants X0 to X2

RCONST(4 to 6) Para 221 cal constants X0 to X2

Outputs:

Derived para 579 CABP mb 1 Hz Cabin pressure

Derived para 778 S9SP mb 32 Hz S9 static pressure

SUBPROGRAMS:

ISETFLG

REFERENCES:
CHANGES:

V1.00 23/07/03 WDNJ Original version Note that V1.00 has no application of S9 position errors.

rio_psap.py

class ppodd.pod.p_rio_psap.rio_psap(dataset)[source]

PSAP processing module

INPUTS:
AERACK_psap_flow
AERACK_psap_lin
AERACK_psap_log
AERACK_psap_transmission
OUTPUTS:
PSAP_LIN - Uncorrected absorption coefficient at 565nm, linear, from PSAP
PSAP_LOG - Uncorrected absorption coefficient at 565nm, log, from PSAP
PSAP_FLO - PSAP Flow
PSAP_TRA - SAP Transmittance
FLAGGING:
using flow and transmission thresholds
flag[(psap_transmission<0.5) | (psap_transmission>1.05)]=1
ix=np.where(psap_flow < 1.0)[0]
#add two second buffer to the index
ix=np.unique(np.array([list(ix+i) for i in range(-2,3)]))
ix=ix[(ix >= 0) & (ix < n-1)]
flag[ix]=2
flag[((psap_transmission<0.5) | (psap_transmission>1.05)) & (psap_flow<1.0)]=3

rio_radal.py

class ppodd.pod.p_rio_radal.rio_radal(dataset)[source]

FORTRAN routine C_RADAL1

ROUTINE:

C_RADAL1 SUBROUTINE FORTVAX

PURPOSE:

To subroutine to calculate the aircraft altitude from the radar altimeter.

DESCRIPTION:

The raw radar altimeter data is provided as a 16 bit signed number from the ARINC 429 data bus, with a least bit resolution of 0.25 ft.

FLAGGING:

The derived data is quality controlled to ensure that

data outside the range 0 to 8191.75 ft are flagged 3
more than two values the same are flagged 3
more than 1000’ change between values is flagged 3
TO COMPILE:

$FORT C_RADAL1

VERSION:

1.00 02/10/02 W.D.N.JACKSON

ARGUMENTS:
IRAW(X,37) - where x=1 or 2, on entry this contains the raw radar height.
IFRQ(37) - on entry contains 2, the frequency of the raw radar height.
RDER(X,575) - where x= 1 or 2, on exit contains the derived radar height in meters.
CHANGES:

V1.01 WDNJ 05/11/04 Flagging criteria improved

rio_rvsm.py

class ppodd.pod.p_rio_rvsm.rio_rvsm(dataset)[source]
ROUTINE:

C_RVSM SUBROUTINE FORTVAX

PURPOSE:

Computes static pressure, pitot-static pressure, and pressure height from the 146 RVSM altitude and airspeed data.

DESCRIPTION:

RVSM altitude is available in ARINC-429 message 203 and is recorded as by the DRS as a 16 bit signed word, with the LSB representing 4 feet.

RVSM computed airspeed is available in ARINC-429 message 206 and is recorded by the DRS as a 16 bit signed word, with the LSB representing 1/32 kt, but always zero.

These values should be within the system accuracy specification and do not require calibration.

Note that altitude is updated by the RVSM at about 20 Hz and airspeed is updated at about 10 Hz. Both signals are sampled by the DRS at 32 Hz so there will be multiple values and aliasing effects.

METHOD:

For each DRS parameter to be calibrated:

  1. If data is FFFF or FFFE or out of range then flag 3
  2. Decode the altitude and use the tables in NASA TN D-822 to back compute the static pressure.
  3. Decode the airspeed and use fundamental equations to compute pitot-static pressure.
  4. Check the results for being within acceptable values.
  5. Set data flag bits (16+17)
0: Good data
1: Data of lower quality
2: Probably faulty, exceed lims
3: Data absent or invalid.
FLAGGING:

If a value can’t be computed, due to missing data missing constants, divide be zeroes, etc, a value of 0 is used, flagged with a three. If a value is outside its limits for range, it is flagged with a two. If there are no problems with the data it is flagged with 0. Any flags on input data are propagated through subsequent calculations.

Note that routine does not currently apply position error corrections, nor interpolate missing data.

VERSION:

1.00 23/07/03 W.D.N.JACKSON

ARGUMENTS:
Inputs:
DRS para 222 RVAL 32 Hz RVSM altitude
DRS para 223 RVAS 32 Hz RVSM computed airspeed
Outputs:
Derived para 576 SPR mb 32 Hz Static pressure
Derived para 577 PSP mb 32 Hz Pitot-static pressure
Derived para 578 PHGT m 32 Hz Pressure height
Flags:
Missing/corrupt data output as 0 flagged 3.
Out of range derived data flagged 2.
SUBPROGRAMS:

S_PSP, ALT2PRESS, ISETFLG

REFERENCES:

NASA Technical Note D-822, Aug 1961, Tables of airspeed, altitude, and mach number.

Interface Control Document, Air Data Display Unit, ISS 1G-80130-22.

CHANGES:

V1.00 23/07/03 WDNJ Original version

V1.01 23/10/03 WDNJ Now replicates data when missing

V1.02 11/12/03 WDNJ Fixes bug if initial data missing

V1.03 11/03/04 DAT Flags data outside altitude range 3

V1.04 17/03/04 WDNJ Now handles negative heights correctly and uses more accurate flagging criteria

rio_so2_mixingratio.py

class ppodd.pod.p_rio_so2.rio_so2_mixingratio(dataset)[source]

Routine to process the SO2 measurements from the SO2-TECO analyser.

rio_sols.py

class ppodd.pod.p_rio_sols.rio_sols(dataset)[source]
ROUTINE:

C_SOLS SUBROUTINE FORTVAX

PURPOSE:

CALIBRATE PYRANOMETER & PYRGEOMETER RAW SIGNALS AND THERMISTORS.

DESCRIPTION:

Apply calibration coefficients to RAW parameters 81-89 and 91-99 to obtain uncorrected values of signal flux, zero offset signal (W/m-2) and thermistor output (deg K) for each of the upward-facing and downward-facing sets of: clear dome & red dome pyranometers and pyrgeometer.

METHOD:

For each RAW parameter to be calibrated, for the six instruments:

  1. Check all its required constants are present (Flag <3) (if not, the calibration of that parameter will not proceed) [Also check that the normal configuration of instruments is to be used. Any changes are indicated by the presence of a large offset to the second calibration constant for any instrument. If this is present the offset is decoded to generate a revised ICONF indicator for that instrument. See note below.]

  2. Obtain the raw signal/zero value and float the result.

  3. Calibrate by applying the appropriate instrument cal in RCALB (which is loaded from the RCONST arguments) to both raw signal flux and zero offset, which use the same coefficients The gains are in W/m-2 /DRS count. DRS counts are related to radiometer output Voltage. Note that the output Voltage from the instrument is the value after being amplified by the head amplifier.

  4. Range check and Rate-of-change check: (S/R QCPT)

    the calibrated signal (Wm-2)
    Zero offset (DRS units)
    temperature (deg K)
  5. Calibrate the thermistor input using two RCALB coefficients. Add 273.15 deg to thermistor results to express the instrument thermopile temperature in degrees Kelvin.

  6. Check the result is within pre-defined limits

FLAGGING:

Set the calibrated values flag bits (16+17) as follows

0: Good data
1: Data of lower quality
2: Data probably faulty, exceeding limits
3: Data absent or known to be invalid.
VERSION:

1.04 250692 A D HENNINGS

ARGUMENTS:
RCONST(1) - REAL*4 IN Upper Clear dome Signal & Zero const.
* RCONST(2) - REAL*4 IN Upper Clear dome Signal & Zero gain.
RCONST(3) - REAL*4 IN Upper Clear dome Thermistor: constant
RCONST(4) - REAL*4 IN Upper Clear dome Thermistor: coeff x.
RCONST(5) - REAL*4 IN Upper Red dome Signal & Zero const.
* RCONST(6) - REAL*4 IN Upper Red dome Signal & Zero gain.
RCONST(7) - REAL*4 IN Upper Red dome Thermistor: constant
RCONST(8) - REAL*4 IN Upper Red dome Thermistor: coeff x.
RCONST(9) - REAL*4 IN Upper I/R dome Signal & Zero const.
* RCONST(10) - REAL*4 IN Upper I/R dome Signal & Zero gain.
RCONST(11) - REAL*4 IN Upper I/R dome Thermistor: constant
RCONST(12) - REAL*4 IN Upper I/R dome Thermistor: coeff x.
RCONST(13) - REAL*4 IN Lower Clear dome Signal & Zero const.
* RCONST(14) - REAL*4 IN Lower Clear dome Signal & Zero gain.
RCONST(15) - REAL*4 IN Lower Clear dome Thermistor: constant
RCONST(16) - REAL*4 IN Lower Clear dome Thermistor: coeff x.
RCONST(17) - REAL*4 IN Lower Red dome Signal & Zero const.
* RCONST(18) - REAL*4 IN Lower Red dome Signal & Zero gain.
RCONST(19) - REAL*4 IN Lower Red dome Thermistor: constant
RCONST(20) - REAL*4 IN Lower Red dome Thermistor: coeff x.
RCONST(21) - REAL*4 IN Lower I/R dome Signal & Zero const.
* RCONST(22) - REAL*4 IN Lower I/R dome Signal & Zero gain.
RCONST(23) - REAL*4 IN Lower I/R dome Thermistor: constant
RCONST(24) - REAL*4 IN Lower I/R dome Thermistor: coeff x.
(* also contains an offset evaluated to ICONF() ).

IFRQ(par) - INT*4 IN Input frequency of each sample. IRAW(n,par)- INT*4 IN Raw instrument voltage conversion. (samples n=1; par=81-89, 91-99) RDER(op,opar)REAL*4 OUT Raw flux signal, zero-offset signal and instrument temperature. (samples op=1; opar=673-690)

SUBPROGRAMS:

ITSTFLG, ISETFLG

REFERENCES:

Equations from MRF Instrument section.

CHANGES:

020490 Revised range limits introduced. ADH

100191 ADH a) Range limits revised to allow for Pyranometer changes b) New arrays to hold raw input, constants etc for more straightforward indexing. c) Include ICONF to aid reconfiguring instrument types.

010891 Range limits for ZERO now in terms of DRS units, revised limits in Wm-2 for signal.

030292 Rates of change checks instituted on all BBR inputs. ADH

120698 Bug fixed in quality control processing when using non- standard configurations. MDG/WDNJ

270600 I/R signal maximum increased to stop flagging good data value arbitary, as no explanation of numbers found. 1050. > 1500. DAT

V1.06 02/10/02 Changed to use 16 bit DRS data.

V1.07 27/11/02 Now takes X0 sensitivity constant as well as X1

V1.08 22/07/04 Bug so doesn’t crash if first data flagged 3

V1.09 13/08/04 Quality Control zero limits increased for 16 bit data

rio_sreg.py

class ppodd.pod.p_rio_sreg.rio_sreg(dataset)[source]

Routine to calculate signal register from DECADES parameters

rio_sun.py

class ppodd.pod.p_rio_sun.rio_sun(dataset)[source]

FORTRAN routine C_GSUN

ROUTINE:

C_SUN SUBROUTINE FORTVAX C_SUN.FOR

PURPOSE:

PUT SOLAR ZENITH AND AZIMUTH ANGLES IN MFD

DESCRIPTION:

Given date, time and location on the earth’s surface this routine puts a solar zenith and azimuth angle in the array of derived parameters. It computes a value once every second. The angles are only obtained if all the flags are set to less than 3 and the date, time and location are all within sensible limits. Any flags set on input are also set in the solar angles derived. If the input is in error or the flags are set to 3 a value of -99. is returned for ZEN and AZIM. To test the routine: $ FOR C_SUN $ FOR TEST_C_SUN $ LINK TEST_C_SUN,C_SUN Ensure contents of files RCONST.DAT and TEST_C_SUN.DAT contain simulated data you require to test the routine with.

VERSION:

1.02 1st May 1992 J.A.Smith

ARGUMENTS:
RDER(1,515) R*4 IN Time GMT (seconds from midnight)
RDER(1,550) R*4 IN Omega latitude degrees (north +ve)
RDER(1,551) R*4 IN Omega longitude degrees (east +ve)
or RDER(1,541) R*4 IN INU latitude degrees (north +ve)
or RDER(1,542) R*4 IN INU longitude degrees (east +ve)
RCONST(1) R*4 IN Day in month (1-31)
RCONST(2) R*4 IN Month in year (1-12)
RCONST(3) R*4 IN Year (eg 1984)
RDER(1,642) R*4 OUT Solar azimuth in degrees
RDER(1,643) R*4 OUT Solar zenith in degrees
SUBPROGRAMS:

S_SUN , ITSTFLG, ISETFLG

CHANGES:

01 Range checks for input data now done in S_SUN RWS 30/10/90

1.02 Check added if time RSECS has reached midnight and if so to reduce RSECS to less than 86400 s and increase the date. JAS 1/5/92

1.03 Following the demise of the Omega, now uses INU position for flights after 30/09/97. Note that this routine is now always called by CALIBRATE, even if neither Omega or INU were available. WDNJ 20/10/97

1.04 Now strips flags from data before use. WDNJ 22/12/97

1.05 Can take GIN input 05/09/07

1.06 Changes made how lon/lat input is derived AxW 29/03/10

rio_temps.py

class ppodd.pod.p_rio_temps.rio_temps(dataset)[source]

FORTRAN routine C_TEMPS2

ROUTINE:

C_TEMPS2 SUBROUTINE FORTVAX

PURPOSE:

Produces calibrated deiced and non-deiced temperatures

DESCRIPTION:

Calculates indicated and true air temperatures in K for the Deiced and Non-Deiced temperature sensors as follows:

519 - Indicated Air Temperature from Deiced [K] at 32Hz
520 - True Air Temperature from Deiced [K] at 32Hz
524 - Indicated Air Temperature from Non-deiced [K] at 32Hz
525 - True Air Temperature from Non-deiced [K] at 32Hz

Note that this module only processes data recorded on the 146 which only uses one parameter per temperature.

The Deiced Temperature is recorded on the DRS at 32Hz as parameter 10 and the Non-deiced Temperature is recorded on the DRS as parameter 23.

Indicated Air Temperature is derived by application of the appropriate second order calibration coefficients to the raw data.

A correction for heating from the deicing heater is made to the deiced indicated air temperature if the heater is switched on, as indicated by bit 5 of the signal register (parameter 27) being clear. This heating correction is obtained from graphs of Temperature vs Machno in Rosemount Technical Reports 7597 & 7637. If Machno is less than 0.1 the data is flagged 1, because the Rosemount graph is invalid below 0.1, and if Machno below 0.05, a value of 0.05 is use to ensure a valid logarithm. The algorithm used for heating correction is:

(exp(exp(1.171+(log(Machno)+2.738)*(-0.000568*(s+q)-0.452))))*0.1
where: s=static pressure       [mbs]
       q=pitot static pressure [mbs]

True Air Temperature is derived as:

TAT[K] = (Indicated Air Temperature[K]) /
                     (1.0 +(0.2 * MACHNO * MACHNO * TRECFTR))
where: MACHNO  is computed by scientific subroutine S_MACH.
       TRECFTR is the Temperature recovery factor - used to
         compensate for effects of kinetic heating.
         This is supplied as a constant from the
         flight constants file to this routine.


It can be calculated from flight results of slow/fast runs as::

  (Tindfast-Tindslow)/(Ffast*Tindslow-Fslow*Tindfast)
    where: Tind = indicated temperature [K]
           F    = 0.2 * Machno * Machno
FLAGGING:

Both deiced and non-deiced temperature calculations follow a similar scheme for error flagging, with worst case flags being propagated through the calculations. Sources of error flags are:

Absence of calibration constants - flag 3
Absence of recovery factor constant - flag 3
Static pressure errors - Parameter 576 flag
Pitot pressure errors - Parameter 577 flag
Max/min/rate of change errors - flag 2
Mach No less than 0.1 - flag 1

Not all the above errors need affect all measurements. For instance pressure errors will not affect Indicated Air Temperatures, unless the deicing heater is on. Note that this module cannot be called if any of the raw (not derived) parameters are missing. Also note that no raw data on which this module can be used will be carrying flags (only raw data transcribed on the Gould computer can carry flags). If any temperature has a flag of three, its value is set to 0.0 K (and flagged with a three).

VERSION:1.00 10/09/92 W.D.N.JACKSON
ARGUMENTS:
Constants:
RCONST(1) Recovery factor for Deiced sensor
RCONST(2) Recovery factor for Non-deiced sensor
RCONST(3) Deiced X0 calibration constant (deg C)
RCONST(4) Deiced X1 calibration constant (deg C)
RCONST(5) Deiced X2 calibration constant (deg C)
RCONST(6) Non-deiced X0 calibration constant (deg C)
RCONST(7) Non-deiced X1 calibration constant (deg C)
RCONST(8) Non-deiced X2 calibration constant (deg C)
Inputs:
DEICED TEMPERATURE [bits 0-15] Para 10 32Hz
NON DEICED TEMPERATURE [bits 0-15] Para 23 32Hz
SIGNAL REGISTER [drs units-bcd] Para 27 2Hz
STATIC PRESSURE [mbs] Para 576 32Hz
PITOT STATIC PRESSURE [mbs] Para 577 32Hz
Outputs:
INDICATED AIR TEMPERATURE (Deiced) [K] Para 519 32Hz
TRUE AIR TEMPERATURE (Deiced) [K] Para 520 32Hz
INDICATED AIR TEMPERATURE (NonDeiced)[K] Para 524 32Hz
TRUE AIR TEMPERATURE (NonDeiced)[K] Para 525 32Hz
SUBPROGRAMS:
S_MACH Calculates Mach no
ITSTFLG Examines bits 16,17 for flags
ISETFLG Sets flag bits 16,17 = 0 –> 3
S_QCPT Performs range and rate of change check
REFERENCES:

Code adapted from C_TEMPS module. See MRF Internal Note 55 - ‘Temperature Measurement Working Group Report’ for full details of C-130 temperature measurement.

CHANGES:

V1.01 27/09/02 W.D.N.JACKSON Changed to handle 16 bit temperature recording.

V1.02 23/05/05 D.A.TIDDEMAN Temperature heater correction changed to opposite sense Now raw para 27 bit 5 on = heater on

p_rio_tpress.py

class ppodd.pod.p_rio_tpress.rio_tpress(dataset)[source]

FORTRAN routine C_TPRESS

ROUTINE:

C_TPRESS SUBROUTINE FORTVAX

PURPOSE:

Calibrates the five turbulence probe pressure transducers into mb.

DESCRIPTION:

Apply calibration the combined transducer and DRS coefficients to DRS parameters 215 to 219 to obtain derived parameters 773 to 777. Invalid data is flagged with 3, data outside limits is flagged with 2.

METHOD:

For each DRS parameter to be calibrated

  1. If data is FFFF or FFFE then flag 3
  2. Apply the calibration constants
  3. Check the results for being within acceptable values.
  4. Set data flag bits (16+17) 0: Good data
  1. Data of lower quality
  2. Probably faulty, exceed limits
  3. Data absent or invalid.
Flagging:

If a value can’t be computed, due to missing data missing constants, divide be zeroes, etc, a value of 0 is used, flagged with a three. If a value is outside its limits for range or rate of change, it is flagged with a two. If there are no problems with the data it is flagged with 0.

Missing/corrupt data output as 0 flagged 3. Out of range data flagged 2.

VERSION:

1.00 23/07/03 W.D.N.JACKSON

ARGUMENTS:
Inputs:
para 215 TBP1 32 Hz Turbulence probe centre port
para 216 TBP2 32 Hz Turbulence probe attack ports
para 217 TBP3 32 Hz Turbulence probe sideslip ports
para 218 TBP4 32 Hz Turbulence probe attack check
para 219 TBP5 32 Hz Turbulence probe sideslip check
Constants:
RCONST(1 to 4) Para 215 cal constants X0 to X3
RCONST(5 to 8) Para 216 cal constants X0 to X3
RCONST(9 to 12) Para 217 cal constants X0 to X3
RCONST(13 to 14) Para 218 cal constants X0 to X1
RCONST(15 to 16) Para 219 cal constants X0 to X1
Outputs:
para 773 TBP0 mb 32 Hz Centre pressure
para 774 TBPA mb 32 Hz Attack pressure
para 775 TBPB mb 32 Hz Sideslip pressure
para 776 TBPC mb 32 Hz Attack check pressure
para 777 TBPD mb 32 Hz Sideslip check pressure
SUBPROGRAMS:

ISETFLG

REFERENCES:
CHANGES:

V1.00 23/07/03 WDNJ Original version Note that V1.00 has no limit checking and no use is made of the check pressures.

V1.01 25/03/04 WDNJ Now takes third order calibration constants for the main transducers, and first order for the check transducers.

V1.02 26/01/06 Phil Brown Realistic min/max values provided for centre-port, Pa, Pb for flagging purposes. Values alsoe provided for check pressures Ca, Cb based on current (and probably wrong) calibration coefficients.

V1.03 09/02/11 Axel Wellpott From an email from Phil Brown: “The P0-S10 differential pressure (para 773) is flagged 2 if it exceeds 130.0 hPa. This is easily exceeded when we do acceleration to max speed (min Angle of Attack) so all the subsequent parameters calculated n C_TURB.for end up with a flag-3 saetting. I reckon a better value would be 180.0 hPa.”

rio_wow.py

class ppodd.pod.p_rio_wow.rio_weight_on_wheels(dataset)[source]

Weight on wheels indicator.

The weight on wheel status is logged on the PRTAFT CRIO.

DESCRIPTION:
1 aircraft is on the ground
0 aircraft is in the air
FLAGGING:No flagging needed for this variable. A dummy flag is added to the core netCDF for consistency (all other variables have a flag variable). A lot of code will expect a _FLAG variable for every variable in the dataset.

p_gin.py

class ppodd.pod.p_gin.gin(dataset)[source]

GIN processing

Purpose: Resample GIN data to 32Hz so it matches the time frame of turbulence and temperature data

Description: Use numpy.interpolation to resample frequency from 50 to 32Hz Missing out times where the gap is greater than 0.5 sec ( see resample.createtimes )

@author: Dave Tiddeman

p_turb.py

class ppodd.pod.p_turb.turb(dataset)[source]

FORTRAN routine C_TURB

ROUTINE:

C_TURB

PURPOSE:

To calibrate and apply designated correction factors to angle of attack (AOA), angle of sideslip (AOSS) and the centre-static differential pressure (to derive TAS)).

DESCRIPTION:

Calibration of AOA and AOSS is assumed to be of the form:

PA/q = a0(M) + a1(M)*alpha    
PB/q = b0(M) + b1(M)*beta

where q is the pitot(dynamic) pressure.

Calculations follow the scheme described in BAES doc ADE-46S-R-463-34 1233 (Page 78 of 116). Initial value of pitot pressure is taken from RVSM and used to calculate first guess AOA and AOSS. These are to derive corrections to the centre-port along with separate calculation of static position error in the centre-port measurement. AOA and AOSS are recalculated with iteration continuing until specified tolerance is achieved or max.iteration count exceeded. Corrected centre-port pressure is then used to calculate TAS (currently only the dry value) using:

TAS = Corrtn.fac * 340.294*M*SQRT(T/288.15)
VERSION:

1.01 Phil Brown 24/5/2004

CHANGES:

1.02 Phil Brown 11/6/2004 Logic changed to reproduce PVWAVE test version MRFB:[BROWN.PVWAVE]TURB.PRO at this date

1.03 Phil Brown 28/6/2004 Check flags and values following return of calls to S_MACH. Unacceptable causes C_TURB to return its default values of output parameters (flag 3)

1.04 Phil Brown 2/7/04 Uses G_MACH routine to calculate Mach no. and avoid complications due to flagging.

1.05 Phil Brown 08/07/04 Uses simpler Mach-dependent PE.Corrtn derived empirically from B001-012 s&l legs.

1.06 Phil Brown 09/07/04 No position error correction currently applied to P0 differential pressure.

1.07 Phil Brown 26/08/04 Change sign of AOSS. Cals were done against INS drift angle (-ve for +ve AOSS).

1.08 Phil Brown 27/8/04 AOSS calcs revert to original, but assumed to use new fit coefficients for B0 and B1

1.09 26/01/06 Phil Brown Min/max limits provided for AoA, AoSS and TAS for flagging purposes.

1.10 20/06/06 Phil Brown Takes additional input of non-deiced temp, used as alternative when de-iced is flagged 2 or more.

1.11 24/10/06 Phil Brown Fix bug setting flag on TTND to zero before use. Define 4 additional flight constants to apply fudge factors to the calculated AoA / AoSS These have the form: AoA_new = AoA * ALPH1 + ALPH0 AoSS_new= AoSS * BET1 + BET0

1.12 08/10/2010 Axel Wellpott added line “DATA TAS/-9999./” Missing TAS data values were set to -999. and not to -9999. as specified in the netcdf files.

SUBROUTINES:

S10_PECORR, ITSTFLG, ISETFLG, G_MACH

FILES:
REFERENCES:
CONSTANTS:

RCONST(1-3) Coefficients of 2nd order polynomial in Mach to calculate AOA offset, A0

RCONST(4-6) Coefficients of 2nd order polynomial in Mach to calculate AOA sensitivity, A1

RCONST(7-9) Coefficients of 2nd order polynomial in Mach to calculate AOSS offset, B0

RCONST(10-12) Coefficients of 2nd order polynomial in Mach to calculate AOSS sensitivity, B1

RCONST(13) Tolerance for AOA/AOSS iteration

RCONST(14) True Airspeed correction factor (fudge factor to remove residual along-heading wind errors).

RCONST(15-16) Coefficients of linear correction to calculated AoA

RCONST(17-18) Coefficients of linear correction to calculated AoSS

INPUT:
PARAMETERS
516 IAS 32Hz
520 TTDI 32Hz
525 TTND 32Hz
576 SPR 32Hz
577 PSP 32Hz
578 PHGT 32Hz
773 TBP0 32Hz
774 TBPA 32Hz
775 TBPB 32Hz
776 TBPC 32Hz
777 TBPD 32Hz
OUTPUT:
PARAMETERS
548 AOA 32Hz deg
549 AOSS 32Hz deg
779 TASD 32Hz ms-1
780 TASW 32Hz ms-1
781 TPSP 32Hz mb

p_twc_calc.py

class ppodd.pod.p_twc_calc.twc_calc(dataset)[source]

Use the fit to create a Mass Mixing ratio for the TWC and then a dewpoint.

p_twc_fit_ge

class ppodd.pod.p_twc_fit_ge.twc_fit_ge(dataset)[source]

Fit TWC sensor to GE chilled mirror

Calculates Vapour pressures from GE where less than a threshold ( to screen out liquid and ice ) Calculate a theoretical Oxygen absorption from pressure Fit the TWC detector less the oxygen correction against the GE vapour pressure

p_twc_fit_wvss

class ppodd.pod.p_twc_fit_wvss.twc_fit_wvss(dataset)[source]

Fit TWC sensor to WVSS

Calculates Vapour pressures from GE where less than a threshold ( to screen out liquid and ice ) Calculate a theoretical Oxygen absorption from pressure Fit the TWC detector less the oxygen correction against the GE vapour pressure

p_noturb_windvectors.py

class ppodd.pod.p_noturb_windvectors.noturb_windvectors(dataset)[source]

Calculation of windvectors that do not rely on the turbulence probe in the radom of the aircraft. The data are especially useful in icing conditions, when the pressure sensors in the radom are blocked by ice and no tub

INPUTS:
VELE_GIN
VELN_GIN
HDG_GIN
TAT_DI_R
TAS_RVSM
ROLL_GIN

tas_scale_factor = 0.9984

FLAGGING:

The flag is inherited from the input variables. The flag is determined by choosing the worst flag from the input variables. In addition to this a roll angle threshold is used, which is set to 1.5 degrees. All values with an absolute roll angle greater than this are flagged “3”.