The Core Data File
Filename conventions
The core file is named as core_faam_<date>_<version>_<revision>_<fltnum>[_<freq>].nc
, where:
date indicates the date on which the flight took place, formatted as
YYYYmmdd
, whereYYYY
is the four-digit year,mm
is the two-digit month, anddd
is the two-digit day.version indicates the version of the core file, formatted as vnnn, where nnn is a three-digit integer. The most recent version is 5 (v005), which this document applies to. It is important to note that older versions do not strictly follow the conventions outlined in this document.
revision indicates the revision number of the data, formatted as rn, where n is an integer. Larger values of n indicate a more recent release. Where more than one data revision is available, the file with the largest revision number should be used.
fltnum indicates the flight number of the flight, formatted as xnnn where x is a lowercase letter, and nnn a three digit integer.
freq indicates the frequency of the dataset, formatted as nhz, where n is an integer. If not present, the file is at ‘full’ frequency, with the frequency differing between variables. Typically ‘full’ and 1hz files are provided.
Dimensions
All variables in the core dataset are timeseries with the same start and end times, and with frequencies of 1 Hz or greater.
There is only one time dimension, Time
, with a length equal to the duration of the dataset in seconds.
Variables which are recorded at 1 Hz will have Time
as their only dimension.
Variables which are recorded at higher than 1 Hz will be stored as a two-dimensional array, with Time
as the first dimension and spsNN
as the second.
Here, the NN
repesents the frequency in Hz.
For example, a 4 Hz variable would have dimensions Time
and sps04
, and would be stored as an \(n\times4\), where n is the length of the dataset in seconds.
The dimensions which may be included in the full temporal resolution core data file are:
Time
- An unlimited dimension whose length corresponds to the length of the dataset, in seconds.sps02
- 2 samples per second. A dimension of length 2.sps04
- 4 samples per second. A dimension of length 4.sps10
- 10 samples per second. A dimension of length 10.sps20
- 20 samples per second. A dimension of length 20.sps32
- 32 samples per second. A dimension of length 32.sps64
- 64 samples per second. A dimension of length 64.
Global Attributes
Required Global Attributes
Conventions
- The conventions followed by this dataacknowledgement
- The acknowledgement for use of this data. Should read: Airborne data was obtained using the BAe-146-301 Atmospheric Research Aircraft [ARA] flown by Airtask Ltd and managed by FAAM Airborne Laboratory, jointly operated by UKRI and the University of Leeds for FAAM data.creator_address
- The address of the FAAM offices. Should read: Building 146, Cranfield University, College Road, Cranfield, Bedford. MK43 0AL. UK. for FAAM data.creator_email
- The email address of the data creator, or a generic FAAM email.creator_institution
- The institute responsible for the creation of the data. Should read: FAAM Airborne Laboratory for FAAM datacreator_name
- The name of the person or institute responsible for this datacreator_type
- The type of creator. Should be one of person, institution, positiondate
- Date of the flightdate_created
- ISO:8601 date/time file created, ideally yyyy-mm-ddTHH:MM:SSZ. Equivalent to revision_date.flight_date
- Date of the flightflight_number
- The flight numbergeospatial_bounds
- A well-known text representation of the flight envelopegeospatial_bounds_crs
- Coordinate reference system for geospatial attributes.geospatial_lat_max
- Maximum latitude of the flight.geospatial_lat_min
- Minimum latitude of the flight.geospatial_lat_units
- The units for geospatial_lat_* attributesgeospatial_lon_max
- Maximum longitude of the flightgeospatial_lon_min
- Minimum longitude of the flightgeospatial_lon_units
- The units for geospatial_lon_* attributesgeospatial_vertical_max
- The maximum altitude of the flightgeospatial_vertical_min
- The minimum altitude of the flightgeospatial_vertical_units
- Vertical units associated with geospatial_vertical_* attributesgeospatial_vertical_positive
- Positive direction of geospatial_vertical_* attributesid
- filename without extension, needs to be globally unique w/ naming_authorityinstitution
- The institute responsible for the creation of this data. Should read: FAAM Airborne Laboratory for FAAM data.keywords
- A comma separated list of keywords from the GCMDkeywords_vocabulary
- Controlled vocabulary for keywords. Should read Global Change Master Directory (GCMD)license
- The license for this data. Should read: UK Government Open Licence agreement - http://www.nationalarchives.gov.uk/doc/open-government-licencemetadata_link
- A link to a release of a controlled vocabulary of metadata attributesnaming_authority
- The authority responsible for naming this data. Should read uk.ac.faamplatform
- Platform name of the FAAM aircraft. Should read: FAAM BAe-146-301 Atmospheric Research Aircraftplatform_type
- Platform type: aircraftproject
- The project a flight was for. Expected to be of the form <project_acronym> - <project_name>publisher_email
- The email address of the data publisherpublisher_institution
- The institution responsible for publishing data. Should read: CEDApublisher_type
- Type of entity responsible for publishing data. Should be institutionpublisher_url
- The URL of the data publisher. Should be https://www.ceda.ac.ukreferences
- A list of references relevant to the filerevision_date
- The date this revision created. Analogous to date_createdrevision_number
- The revision number of the dataset. Starts at 0, increments by 1 for each revisionsource
- A description of the source of the data. An instrument where this makes sense, otherwise a description of how data obtainedstandard_name_vocabulary
- A vocabulary of standard names. Expected to be a CF standard name table, e.g. CF Standard Name Table v78summary
- A brief summary of the datatime_coverage_duration
- The duration of the data, in ISO8601 duration formattime_coverage_start
- The start time of the data in the file, in ISO8601 formattime_coverage_end
- The end time of the data in the file, in ISO8601 formattitle
- A brief title for the datasetuuid
- V3 UUID: MD5 hash of id+date_created
Optional Global Attribtues
calibration_date
- Calibration date, where this applies to all file contentscalibration_information
- Calibration information, where this applies all file contentscalibration_url
- Permanent URI or DOI linking to calibration info, where this applies to all file contentscomment
- Comment about dataconstants_file
- Name of external file providing input to processing softwarecreator_url
- Institutional URL or researcher ORCID URLdeployment_mode
- Mode of deployment. Should always be “air”external_variables
- Blank separated list of variables used from an external filehistory
- Logs modifications to file since productioninstrument
- Where all data id from a single instrument. Currently freeform, controlled instrument vocab to followinstrument_description
- Where all data are from a single instrument. Textual description.instrument_location
- Where all data are from a single instrument. Location of instrument on aircraftinstrument_manufacturer
- Where all data are from a single instrument. Instrument manufacturerinstrument_model
- Where all data are from a single instrument. Instrument modelinstrument_serial_number
- Where all data are from a single instrument. Instrument serial numberinstrument_software
- Where all data are from a single instrument. Name of software deployed on instrumentinstrument_software_version
- Where all data are from a single instrument. Version of software deployed on instrumentnotes
- Notes on this data file. For more detailed info than commentprocessing_software_commit
- Commit hash for processing software in vcsprocessing_software_doi
- DOI of the processing doftware release, if availableprocessing_software_url
- URL pointing to processing software source code, if availableprocessing_software_version
- Version of processing softwareproject_acronym
- Project acronymproject_name
- Full project nameproject_principal_investigator
- Name(s) of project PIs. Comma separated if more than oneproject_principal_investigator_email
- Email address(es) of project PIs. Comma separated if more than oneproject_principal_investigator_url
- ORCID URL(s) of project PIs. Comma separated if more than onerevision_comment
- Brief description of changes between revisionssource_files
- List of source files used in the processing of this data producttime_coverage_resolution
- Resolution of data, where this is uniform across the fileprocessing_level
- Processing level of data, where it is uniform for all data in the file
Variable Attributes
Required Variable Attributes
_FillValue
- The prefill/missing data valuecoverage_content_type
- ISO 19115-1 code. One of image, thematicClassification, physicalMeasurement, auxiliaryInformation, qualityInformation, referenceInformation, modelResult, coordinatefrequency
- The frequency of the data. Where this is >1, will typically correspond to an spsNN dimensionlong_name
- A longer, descriptive name for the variableunits
- Valid UDUNITS unit. Where a standard_name is given, must be equivalent to canonical units
Optional Variable Attributes
axis
- Axis for coordinate variables. Should be one of X, Y, Z, Tactual_range
- A length 2 array, of the same datatype as the variable, giving the maximum and minimum valid valuesadd_offset
- Offset for packing. Default is 0ancillary_variables
- Optional in no ancillary variables, otherwise required. Ancillary variables e.g. flags, uncertaintiescalendar
- Required for the time coordinate variable. Should be one of standard, gregoriancalibration_date
- Calibration date, where this applies to variablecalibration_information
- Calibration information, where this applies variablecalibration_url
- Permanent URI or DOI linking to calibration info, where this applies to variablecomment
- Comment about datacoordinates
- Blank separated list of coordinate variablesflag_masks
- Allowed flag mask values. Required for bitmask style flagsflag_meanings
- Blank separated list of flag meanings. Required for flag variablesflag_values
- Allowed flag values. Required for classic flagsinstrument_description
- Textual description of instrument.instrument_location
- Where variable is derived from a single instrument. Location of instrument on aircraftinstrument_manufacturer
- Where variable is derived from a single instrument. Instrument manufacturerinstrument_model
- Where variable is derived from a single instrument. Instrument model numberinstrument_serial_number
- Where variable is derived from a single instrument. Instrument serial numberinstrument_software
- Where variable is derived from a single instrument. Name of software deploed on instrumentinstrument_software_version
- Where all data in the group are from a single instrument. Version of software deployed on instrumentsensor_manufacturer
- Similar to instrument_manufacturer, but where the item is more accurately described as a sensorsensor_model
- Similar to instrument_model, but where the item is more accurately described as a sensorsensor_serial_number
- Where variable is derived from a single sensor, similar to instrument_serial_number. Sensor serial number.sensor_type
- The type of sensor fitted, where different sensor types may be used to produce the same measurement. A canonical example of this is the type of temperature sensor in the Rosemount housings.positive
- Applies to vertical coordinate. Should be “up” if includedscale_factor
- Scale for packing. Default is 1standard_name
- See CF standard names list. Should be used whenever possiblevalid_max
- Recommended where feasible. Where both valid_min and valid_max make sense, valid_range is preferred.valid_min
- Recommended where feasible. Where both valid_min and valid_max make sense, valid_range is preferred.valid_range
- A length 2 array of the same datatype as the variable, giving minimum and maximum valid valuesprocessing_level
- Processing level of variable data
Variables
Below is a list of all output variables which can be created during postprocessing, split into variables which will always be written to file if available, and those which are generally only used internally, but which can be written to file if requested. Note that some variables may be duplicated here. This indicates that the same output variable may be produced from two or more processing modules, depending on the fit of the aircraft. These will be mutually exclusive, so that variables will be unique in a dataset.
Written if Available
Name |
Long Name |
Standard Name |
Processing Module |
---|---|---|---|
ACLD_GIN |
Acceleration along the aircraft vertical axis from POS AV 410 GPS-aided Inertial Navigation unit (positive down) |
||
ACLF_GIN |
Acceleration along the aircraft longitudinal axis from POS AV 410 GPS-aided Inertial Navigation unit (positive forward) |
||
ACLS_GIN |
Acceleration along the aircraft transverse axis from POS AV 410 GPS-aided Inertial Navigation unit (positive starboard) |
||
ALT_GIN |
Altitude from POS AV 410 GPS-aided Inertial Navigation unit |
altitude |
|
AOA |
Angle of attack from the turbulence probe (positive, flow upwards wrt a/c axes) |
||
AOSS |
Angle of sideslip from the turbulence probe (positive, flow from left) |
||
BSC_BLUU |
Uncorrected blue back scattering coefficient from TSI 3563 Nephelometer |
||
BSC_GRNU |
Uncorrected green back scattering coefficient from TSI 3563 Nephelometer |
||
BSC_REDU |
Uncorrected red back scattering coefficient from TSI 3563 Nephelometer |
||
BTHEIM_U |
Uncorrected brightness temperature from the Heimann radiometer |
||
CAB_PRES |
Cabin Pressure |
||
CAB_TEMP |
Cabin temperature at the core consoles |
||
CO_AERO |
Mole fraction of Carbon Monoxide in air from the AERO AL5002 instrument |
mole_fraction_of_carbon_monoxide_in_air |
|
CPC_CNTS |
Condensation Particle Counts measured by the TSI 3786 |
||
EXX_JCI |
Raw data from the Fwd Core Console JCI static monitor, static signal |
||
EXX_ZEUS |
Electric field measured by the Zeus instrument |
||
GSPD_GIN |
Groundspeed from POS AV 410 GPS-aided Inertial Navigation unit |
platform_speed_wrt_ground |
|
HDGR_GIN |
Rate-of-change of heading from POS AV 410 GPS-aided Inertial Navigation unit |
platform_yaw_rate |
|
HDG_GIN |
Heading from POS AV 410 GPS-aided Inertial Navigation unit |
platform_yaw_angle |
|
HGT_RADR |
Radar height from the aircraft radar altimeter |
height |
|
IAS_RVSM |
Indicated air speed from the aircraft RVSM (air data) system |
||
IR_DN_C |
Corrected downward longwave irradiance |
||
IR_UP_C |
Corrected upward longwave irradiance |
||
LAT_GIN |
Latitude from POS AV 410 GPS-aided Inertial Navigation unit |
latitude |
|
LON_GIN |
Longitude from POS AV 410 GPS-aided Inertial Navigation unit |
longitude |
|
NEPH_PR |
Internal sample pressure of the Nephelometer |
||
NEPH_RH |
Relative humidity from TSI 3563 Nephelometer |
||
NEPH_T |
Internal sample temperature of the Nephelometer |
||
NV_LWC1_C |
Corrected liquid water content from the Nevzorov probe (1st collector) |
mass_concentration_of_liquid_water_in_air |
|
NV_LWC1_COL_P |
LWC1 collector power |
||
NV_LWC2_C |
Corrected liquid water content from the Nevzorov probe (2nd collector) |
mass_concentration_of_liquid_water_in_air |
|
NV_LWC2_COL_P |
LWC2 collector power |
||
NV_LWC_C |
Corrected liquid water content from the Nevzorov probe |
mass_concentration_of_liquid_water_in_air |
|
NV_LWC_COL_P |
LWC collector power |
||
NV_LWC_REF_P |
LWC reference power |
||
NV_REF_P |
Reference power |
||
NV_TWC_C |
Corrected total condensed water content from the Nevzorov probe |
||
NV_TWC_COL_P |
TWC collector power |
||
NV_TWC_REF_P |
TWC reference power |
||
O3_2BTECH |
Mole fraction of Ozone in air from the 2BTech photometer |
mole_fraction_of_ozone_in_air |
|
O3_TECO |
Mole fraction of Ozone in air from the TECO 49 instrument |
mole_fraction_of_ozone_in_air |
|
P0_S10 |
Calibrated differential pressure between centre (P0) port and S10 static |
||
P10_STAT |
Static pressure from S10 fuselage ports |
air_pressure |
|
P9_STAT |
Static pressure from S9 fuselage ports |
air_pressure |
|
PALT_RVS |
Pressure altitude from the aircraft RVSM (air data) system |
barometric_altitude |
|
PA_TURB |
Calibrated differential pressure between turbulence probe vertical ports |
||
PB_TURB |
Calibrated differential pressure between turbulence probe horizontal ports |
||
PITR_GIN |
Rate-of-change of pitch angle from POS AV 410 GPS-aided Inertial Navigation unit |
platform_pitch_rate |
|
PSAP_FLO |
PSAP Flow |
||
PSAP_LIN |
Uncorrected absorbtion coefficient at 565nm, linear, from PSAP |
||
PSAP_LOG |
Uncorrected absorption coefficient at 565nm, log, from PSAP |
||
PSAP_TRA |
PSAP Transmittance |
||
PSP_TURB |
Pitot-static pressure from centre-port measurements corrrected for AoA and AoSS |
||
PS_RVSM |
Static pressure from the aircraft RVSM (air data) system |
air_pressure |
|
PTCH_GIN |
Pitch angle from POS AV 410 GPS-aided Inertial Navigation unit |
platform_pitch_angle |
|
Q_RVSM |
Pitot static pressure inverted from RVSM (air data) system indicated airspeed |
||
RED_DN_C |
Corrected downward short wave irradiance, red dome |
||
RED_UP_C |
Corrected upward short wave irradiance, red dome |
||
RH_ICE |
Relative humidity wrt ice water, derived from corrected WVSS-II VMR and Rosemount temperatures |
relative_humidity |
|
RH_ICE_CU |
Combined uncertainty estimate for RH_ICE |
||
RH_LIQ |
Relative humidity wrt liquid water, derived from corrected WVSS-II VMR and Rosemount temperatures |
relative_humidity |
|
RH_LIQ_CU |
Combined uncertainty estimate for RH_LIQ |
||
ROLL_GIN |
Roll angle from POS AV 410 GPS-aided Inertial Navigation unit |
platform_roll_angle |
|
ROLR_GIN |
Rate-of-change of roll angle from POS AV 410 GPS-aided Inertial Navigation unit |
platform_roll_rate |
|
SEA_LWC_021 |
Liquid water content from the SEA WCM-2000 probe, element 021 |
mass_concentration_of_liquid_water_in_air |
|
SEA_LWC_083 |
Liquid water content from the SEA WCM-2000 probe, element 083 |
mass_concentration_of_liquid_water_in_air |
|
SEA_TWC_021 |
Total water content from the SEA WCM-2000 probe, element 021 |
||
SEA_TWC_083 |
Total water content from the SEA WCM-2000 probe, element 083 |
||
SO2_TECO |
Mole fraction of Sulphur Dioxide in air from TECO 43 instrument |
mole_fraction_of_sulfur_dioxide_in_air |
|
SO2_TECO |
Mole fraction of Sulphur Dioxide in air from TECO 43 instrument |
mole_fraction_of_sulfur_dioxide_in_air |
|
SOL_AZIM |
Solar azimuth derived from aircraft position and time |
solar_azimuth_angle |
|
SOL_ZEN |
Solar zenith derived from aircraft position and time |
solar_zenith_angle |
|
STATUS_GIN |
Solution status from POS AV 410 GPS-aided Inertial Navigation unit |
||
SW_DN_C |
Corrected downward short wave irradiance, clear dome |
downwelling_shortwave_flux_in_air |
|
SW_UP_C |
Corrected upward short wave irradiance, clear dome |
upwelling_shortwave_flux_in_air |
|
TAS |
True airspeed (dry-air) from turbulence probe |
platform_speed_wrt_air |
|
TAS_RVSM |
True air speed from the aircraft RVSM (air data) system and deiced temperature |
platform_speed_wrt_air |
|
TAT_DI_R |
True air temperature from the Rosemount deiced temperature sensor |
air_temperature |
|
TAT_DI_R |
True air temperature from the Rosemount deiced temperature sensor |
air_temperature |
|
TAT_DI_R_CU |
Combined uncertainty estimate for TAT_DI_R |
||
TAT_ND_R |
True air temperature from the Rosemount non-deiced temperature sensor |
air_temperature |
|
TAT_ND_R |
True air temperature from the Rosemount non-deiced temperature sensor |
air_temperature |
|
TAT_ND_R_CU |
Combined uncertainty estimate for TAT_ND_R |
||
TDEWCR2C |
Corrected dew point temperature measured by the Buck CR2 Hygrometer |
dew_point_temperature |
|
TDEW_CR2 |
Mirror Temperature measured by the Buck CR2 Hygrometer |
dew_point_temperature |
|
TDEW_C_U |
Combined uncertainty estimate for Buck CR2 Mirror Temperature |
||
TDEW_GE |
Dew Point from the General Eastern instrument |
dew_point_temperature |
|
TRCK_GIN |
Aircraft track angle from POS AV 410 GPS-aided Inertial Navigation unit |
platform_course |
|
TSC_BLUU |
Uncorrected blue total scattering coefficient from TSI 3563 Nephelometer |
||
TSC_GRNU |
Uncorrected green total scattering coefficient from TSI 3563 Nephelometer |
||
TSC_REDU |
Uncorrected red total scattering coefficient from TSI 3563 Nephelometer |
||
U_C |
Eastward wind component from turbulence probe and GIN |
eastward_wind |
|
U_NOTURB |
Eastward wind component derived from aircraft instruments and GIN |
eastward_wind |
|
VELD_GIN |
Aircraft velocity down from POS AV 410 GPS-aided Inertial Navigation unit |
||
VELE_GIN |
Aircraft velocity east from POS AV 410 GPS-aided Inertial Navigation unit |
||
VELN_GIN |
Aircraft velocity north from POS AV 410 GPS-aided Inertial Navigation unit |
||
VMR_CR2 |
Water vapour volume mixing ratio measured by the Buck CR2 |
||
VMR_C_U |
Combined uncertainty estimate for water vapour volume mixing ratio measured by the Buck CR2 |
||
V_C |
Northward wind component from turbulence probe and GIN |
northward_wind |
|
V_NOTURB |
Northward wind component derived from aircraft instruments and GIN |
northward_wind |
|
WAND_GIN |
Wander angle from POS AV 410 GPS-aided Inertial Navigation unit |
||
WOW_IND |
Weight on wheels indicator |
||
WVSS2F_PRESS_U |
Pressure inside {ins} sample cell {interp} |
||
WVSS2F_VMR_C |
Calibrated volume mixing ratio from WVSS2F |
||
WVSS2F_VMR_C_CU |
Uncertainty estimate for calibrated volume mixing ratio from WVSS2F |
||
WVSS2F_VMR_U |
Water Vapour Measurement from {ins} {interp} |
||
WVSS2R_PRESS_U |
Pressure inside {ins} sample cell {interp} |
||
WVSS2R_VMR_U |
Water Vapour Measurement from {ins} {interp} |
||
W_C |
Vertical wind component from turbulence probe and GIN |
upward_air_velocity |
Used internally
Name |
Long Name |
Standard Name |
Processing Module |
---|---|---|---|
ETA_DI |
Variable recovery factor for deiced Rosemount housing |
||
ETA_DI_CU |
Uncertainty in recovery factor for non-deiced Rosemount housing |
||
ETA_ND |
Variable recovery factor for non-deiced Rosemount housing |
||
ETA_ND_CU |
Uncertainty in recovery factor for deiced Rosemount housing |
||
IAT_DI_R |
Indicated air temperature from the Rosemount deiced temperature sensor |
||
IAT_DI_R |
Indicated air temperature from the Rosemount deiced temperature sensor |
||
IAT_DI_R_CU |
Combined uncertainty estimate for IAT_DI_R |
||
IAT_ND_R |
Indicated air temperature from the Rosemount non-deiced temperature sensor |
||
IAT_ND_R |
Indicated air temperature from the Rosemount non-deiced temperature sensor |
||
IAT_ND_R_CU |
Combined uncertainty estimate for IAT_ND_R |
||
LIRS |
LWR I/R SIGNAL |
||
LIRT |
LWR I/R TEMP |
||
LIRZ |
LWR I/R ZERO |
||
LP1S |
LWR VIS CLR SIG |
||
LP1T |
LWR VIS CLR TEMP |
||
LP1Z |
LWR VIS CLR ZERO |
||
LP2S |
LWR VIS RED SIG |
||
LP2T |
LWR VIS RED TEMP |
||
LP2Z |
LWR VIS RED ZERO |
||
MACH |
Moist air Mach derived from WVSS-II(F) and RVSM |
||
MACH |
Dry air Mach derived from and RVSM |
||
MACH_CU |
Uncertainty estimate for moist-air Mach |
||
MACH_CU |
Uncertainty estimate for MACH |
||
NV_CLEAR_AIR_MASK |
Clear air mask based on Nevzorov Total Water power variance |
||
P9_STAT_U |
Static pressure from S9 fuselage ports, uncorrected |
air_pressure |
|
SH_GAMMA |
Ratio of specific heats at constant pressure and constant pressure |
||
SH_GAMMA |
Ratio of specific heats at constant pressure and constant pressure |
||
SH_GAMMA_CU |
Uncertainty estimate for SH_GAMMA |
||
SH_GAMMA_CU |
Uncertainty estimate for SH_GAMMA |
||
SO2_TECO_ZERO |
TECO 43 SO2 interpolated zero |
||
SREG |
Signal Register |
||
UIRS |
UPP I/R SIGNAL |
||
UIRT |
UPP I/R TEMP |
||
UIRZ |
UPP I/R ZERO |
||
UP1S |
UPP VIS CLR SIG |
||
UP1T |
UPP VIS CLR TEMP |
||
UP1Z |
UPP VIS CLR ZERO |
||
UP2S |
UPP VIS RED SIG |
||
UP2T |
UPP VIS RED TEMP |
||
UP2Z |
UPP VIS RED ZERO |
Flags
Every variable has an associated flag variable named <variable_name>_<postfix>
, and referenced in the variable’s ancillary_variables
attribute, which provides some quality or situational information about the data in the variable.
There are two different flagging strategies used in the core data file; the first is a value-based quality flag, referred to as a value-based or classic flag, and the second is a packed boolean representation.
Flagging is largely automatic, other than the flagged_in_qc
flag meaning, which indicates that in the opinion of the person performing the quality control, that data should be treated with caution.
It is up to the user to decide whether or not to use data which has been flagged. If in doubt, users should contact FAAM for advice.
Value-based Flags
Value-based flags represent the quality of the corresponding data variable, with a flag value of 0 representing data which are presumed to be of sufficient quality. Larger values of the flag generally correspond to lower quality data, though this isn’t always the case.
For example, consider a variable array with values
1 2 6 5 4 3 6 5 4 3 2 1 4 5 6 7 7 6 5 3 2
and its corresponding flag with values
0 0 0 0 1 1 0 1 1 1 2 2 1 0 0 0 0 0 0 0 0
To understand the meaning of these flag values, we can look at the flag_values
and flag_meanings
attributes of the flag variable, which may look like
flag_meanings
:data_good minor_data_quality_issue major_data_quality_issue
flag_values
:0b 1b 2b
We can see that there are three different flag meanings and three different flag values, and can deduce that a flag value of 0 indicates the data are considered good, a flag value of 1 indicates a minor data quality issue, and a flag value of 2 indicates a major data quality issue. A user may choose, for example, to eliminate data with a major quality issue. To do this, they would simply mask/nan the variable whereever the flag variable has a value of 2, leaving the variable array as
1 2 6 5 4 3 6 5 4 3 - - 4 5 6 7 7 6 5 3 2
.
Value-based flags will have the same dimensions as their associated variable, and the following variable attributes:
_FillValue
: -128bstandard_name
: ‘status_flag’ if the associated variable has no standard name, otherwise ‘<variable_standard_name> status_flag’long_name
: Flag for <variable_name>flag_values
: An array of the values that the flag variable can take. Typically runs from 0 to <length of flag_meanings> - 1.flag_meanings
: A space separated string of the meanings of each of the values in flag_values.
Bitmask flags
While the value-based flags map the values of an array to a single meaning, bitmask flags allow the representation of a boolean array for every flag_meaning
.
This is done by mapping each flag meaning to an increasing power of 2, which allows the representation of every possible state of every meaning using values from 1 to \(2^{\text{num. flags}-1}\).
A value of 0 indicates that no flags are set, and is set as a fill value.
In order to a bitmask flag it must first be unpacked. This adds to the complexity of using the flag, but makes flags much more powerful, so most variables in the FAAM core data product use bitmask flags.
For example, consider a variable array with values
1 2 6 5 4 3 6 5 4 3 2 1 4 5 6 7 7 6 5 3 2
and its corresponding flag with values
1 1 3 3 2 2 4 4 4 4 6 6 6 6 8 8 5 5 3 3 1
To understand the meaning of these flag values, we can look at the flag_masks
and flag_meanings
attributes of the flag variable, which may look like
flag_meanings
:aircraft_on_ground flow_out_of_range temp_out_of_range data_out_of_bounds
flag_masks
:1b 2b 4b 8b
There are four meanings, with each associated with a value of \(2^n\) with \(n\) taking the four values 0, 1, 2, 3. In the FAAM core data, flag values are guaranteed to be increasing powers of 2, thus the flag array can be unpacked simply by progressively right-bitshifting the flag array, and taking the result modulo 2. In python, this can be achieved with the following code:
# Note that we don't need to worry about using the flag_masks attribute, as it
# is guaranteed to be powers of 2 from 1 to 2^(n-1)
unpacked = {}
for i, meaning in enumerate(flag_var.flag_meanings.split()):
unpacked[meaning] = (flag_data >> i) % 2
this would leave us with the following in unpacked
:
{
aircraft_on_ground: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]),
flow_out_of_range: array([0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0]),
temp_out_of_range: array([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0]),
data_out_of_bounds: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0])
}
Bitmask flags will have the same dimensions as their associated variable, and the following variable attributes:
_FillValue
: 0bstandard_name
: ‘status_flag’ if the associated variable has no standard name, otherwise ‘<variable_standard_name> status_flag’long_name
: Flag for <variable_name>valid_range
: The valid range of values in the flag variable array. Should be 1b, 2^(<number of flag_meanings>) - 1flag_masks
: An array of the values that the flag variable can take, which will runs from 1 to 2^(<number of flag_meanings> - 1).flag_meanings
: A space separated string of the meanings of each of the values in flag_values.