Tutorial#
Functions used in our OpenGHG tutorial notebooks and documentation.
- openghg.tutorial.populate_flux_data()[source]#
Populate the tutorial store with flux data
- Return type:
None
- Returns:
None
- openghg.tutorial.populate_footprint_data()[source]#
Adds all footprint data to the tutorial object store
- Return type:
None
- Returns:
None
- openghg.tutorial.populate_surface_data()[source]#
Populates the tutorial object store with surface measurement data from the example data repository.
- Return type:
None
- Returns:
None
- openghg.tutorial.populate_bc_ch4()[source]#
Populates the tutorial object store with boundary conditions data from the example data repository.
- Return type:
None
- Returns:
None
- openghg.tutorial.populate_flux_ch4()[source]#
Populates the tutorial object store with flux data from the example data repository.
- Return type:
None
- Returns:
None
- openghg.tutorial.populate_flux_co2()[source]#
Populate the tutorial object store with CO2 flux data
- Return type:
None
- Returns:
None
- openghg.tutorial.populate_footprint_co2()[source]#
Populates the tutorial object store with footprints data from the example data repository.
- Return type:
None
- Returns:
None
- openghg.tutorial.populate_footprint_inert()[source]#
Populates the tutorial object store with inert footprint data
- Return type:
None
- Returns:
None
- openghg.tutorial.retrieve_example_data(url, extract_dir=None)[source]#
Retrieve data from the OpenGHG example data repository, cache the downloaded data, extract the data and return the filepaths of the extracted files.
- Parameters:
url (
str
) – URL to retrieve.extract_dir (
Union
[str
,Path
,None
]) – Folder to extract example tarballs to
- Returns:
List of filepaths
- Return type:
list
- openghg.tutorial.clear_example_cache()[source]#
Removes the file cache created when running the tutorials.
- Return type:
None
- Returns:
None
- openghg.tutorial.clear_tutorial_store()[source]#
Delete the contents of the tutorial object store
- Return type:
None
- Returns:
None
- openghg.tutorial.example_extract_path()[source]#
Return the path to folder containing the extracted example files
- Return type:
Path
- Returns:
None
- openghg.tutorial.use_tutorial_store()[source]#
Sets an environment variable telling OpenGHG to use a temporary object store. This sets the store to be the result of tempfile.gettempdir() / openghg_temp_store. To tidy up this store use the clean_tutorial_store function.
- Return type:
None
- Returns:
None