lair.noaa.CarbonTracker.download#

CarbonTracker.download(sub_dirs=('fluxes', 'molefractions'), pattern=None)[source]#

Download CarbonTracker data from the NOAA GML FTP server.

Parameters:
  • sub_dirs (list of str, optional) – The subdirectories to download data from, by default [‘fluxes’, ‘molefractions’]. If None, download the entire version data.

  • pattern (str, optional) – Only download matching files: a glob against the remote path if it has wildcards (e.g. '*2015-06*'), else a substring. By default None.

See also

lair.records.ftp_download

Does the download.

Notes

The files go into directory, in the server’s folder layout below the version. Without pattern every file of the folders is downloaded: the CT-CH4-2025 mole fractions of 2015 to 2023 alone are 127 GB.

Examples

One day of mole fractions, as Sample CarbonTracker at points downloads it. It needs the network (about five minutes), so it is not run when the docs build:

>>> from lair.noaa import CarbonTrackerCH4
>>> ct = CarbonTrackerCH4(carbon_tracker_directory="carbontracker")
>>> ct.download(
...     sub_dirs=["molefractions"], pattern="*2020-01-15*"
... )