User API

This section of the documentation gives an overview of the public facing functions used in the Jupyter notebooks available at the OpenGHG hub. For developers documentation of the internal workings of the library are available in the developer API section.

modules

These modules are used to process observation data. Classes in this module should not be used directly as they are used by functions in the Client or LocalClient modules when either uploading data to the OpenGHG cloud platform or processing data for storage in a local object store.

ObsSurface

Process surface observation data

client

Classes within the client module are used to interact with the cloud based OpenGHG system.

Process

Upload and process observation data files

Search

Search for data in the object store

RankSources

Rank data sources by date range

localclient

For use with a local version of the object store. These functions make it easy to take advantage of the processing and export capabilities of OpenGHG on your local filesystem. Use of this module results in the creation of a local object store in a location controlled by the OPENGHG_PATH environment variable.

get_obs_surface()

Search for surface observations in the object store using a site, species and date range.

process_files()

Process files for storage in the object store

RankSources

Rank data sources by date range

Search

Search for data within the object store (soon to be deprecated in favour of get_obs

processing

This submodule contains functions that are widely used in the processing functions found in modules.

Attributes

These functions ensure that the processed data has the correct CF compliant attributes.

assign_attributes()

Assign attributes to a dictionary of observation data in NetCDF format using get_attributes

get_attributes()

Write attributes to an in-memory NetCDF file to ensure it is CF-compliant

Export

These functions produce files that are used for upload of processed data to archiving facilities such as CEDA.

get_ceda_file()

Create a file that contains the correct attributes for uploading to the CEDA archive

Data control

These control the assignment, splitting and recombination of data.

recombine_datasets()

Recombine separate NetCDF files into a single file sorted by date

assign_data()

Assings data to exisiting Datasources or creates new Datasources

Searching

The base search functionality provided to the client and localclient modules.

search()

The function that is used by openghg.client.Search and openghg.localclient.Search to search the object store