lair.noaa.GMLData#

class lair.noaa.GMLData(specie, site, platform='surface', sample_type='flask', lab_id=1, measurement_group='ccgg', frequency='event', driver='pandas', gml_dir=None)[source]#

Bases: object

NOAA GML Data

Parameters:
  • specie (str)

  • site (str)

  • platform (Literal['surface', 'shipboard'])

  • sample_type (Literal['flask', 'pfp'])

  • lab_id (int)

  • measurement_group (Literal['ccgg', 'sil'])

  • frequency (Literal['event', 'month'])

  • driver (Literal['pandas', 'xarray'])

  • gml_dir (str | Path | None)

specie#

The greenhouse gas specie.

Type:

str

site#

The site where the flask samples were collected.

Type:

str

platform#

The platform where the flask samples were collected, by default ‘surface’.

Type:

str, optional

lab_id#

The lab ID, by default 1.

Type:

int, optional

measurement_group#

The measurement group, by default ‘ccgg’.

Type:

str, optional

frequency#

The frequency of the measurements, by default ‘event’.

Type:

str, optional

driver#

The driver to use to read the data, by default ‘pandas’.

Type:

str, optional

gml_dir#

The NOAA GML data root, by default $LAIR_GML_DIR.

Type:

str, optional

directory#

The directory for the data.

Type:

str

filename#

The filename for the data.

Type:

str

filepath#

The filepath for the data.

Type:

str

data#

The data.

Type:

pd.DataFrame | xr.Dataset

file_template#

The template for the filename.

Type:

str

driver_ext#

The driver extensions.

Type:

dict

static apply_qaqc(data, flags=None, driver='pandas')[source]#

Apply QA/QC filtering.

Parameters:
  • data (pd.DataFrame | xr.Dataset) – The data.

  • flags (None | str | list of str, optional) – The allowed QA/QC flags. If None, only keep good data (qcflag == ‘…’). By default None.

  • driver (str, optional) – The driver to use to read the data, by default ‘pandas’.

Returns:

pd.DataFrame | xr.Dataset – The filtered data.