API reference
This page provides a summary of cerbere API. For more details and examples, refer to the relevant chapters in the main part of the documentation.
cerbere provides to accessors for xarray DataArray and Dataset classes. In both cases, they are called cerbere.
DataArray accessor
Creating a cerbere DataArray
|
Describes a scientific data array. |
Attributes
|
Returns a CF normalized version of the dataset. |
|
The variable description ( |
|
The variable standard name ( |
|
identifies a variable that contains closely associated data, e.g., the measurement uncertainties of instrument data. |
|
The variable data units ( |
|
ACDD 1.3 attribute; An ISO 19115-1 code to indicate the source of the data (image, thematicClassification, physicalMeasurement, auxiliaryInformation, qualityInformation, referenceInformation, modelResult, or coordinate). |
|
The scientific dtype of the data (ignores xarray internal conversion) |
|
Return the mask of the data (like in numpy MaskedArray) |
|
The value for missing data in the field |
|
The encoding scaling factor for the data ( |
|
The encoding offset factor for the data ( |
|
The least significant digit for the values of the field. |
|
The minimum valid value in the field data |
|
The maximum valid value in the data ( |
Methods
|
|
|
Attribute for location based indexing like pandas. |
|
Returns: |
|
Return the data of a field within a geographical area. |
Dataset cerbere accessor
The base class for Dataset
objects, than can be imported from
cerbere.dataset.dataset
module. All other classes in cerbere.dataset
package are derived from this class.
Creating a dataset
|
Attributes
|
Return the basename of the file storing the dataset |
|
|
|
The dataset file size, in octets |
|
The date the dataset file was generated |
|
The bounding box, e.g. |
|
The bounding box in WKT format. |
|
return the identifier of the product collection |
|
|
|
Return the product version |
|
Returns the first measurement time in the data. |
|
Returns the last measurement time in the data. |
Dataset contents
|
|
Dataset subsetting
|
|
|
Return the dataset subsets within a geographical area. |
|
Return the indices and geolocation of a given value. |
|
Get closest dataset lat/lon location to given coordinates. |
Feature
A Feature
object inherits all the attributes
and methods of a Dataset
object. It provides
in addition the following methods and attributes.
Creating a feature
The generic method to create or open from a file a feature is
cerbere.open_as_feature()
. It allows to instantiate any of the following
features.
|
To represent data at scattered locations and times with no implied relationship among of coordinate positions, both data and coordinates must share the same (sample) instance dimension. |
|
Feature class for the profile observation patterns. |
|
Feature class for the trajectory observation patterns. |
|
Data may be taken over periods of time at a set of discrete point, spatial locations called stations (see also discussion in 9.1). The set of elements at a particular station is referred to as a timeSeries feature and a data variable may contain a collection of such features. The instance dimension in the case of timeSeries specifies the number of time series in the collection and is also referred to as the station dimension. The instance variables, which have just this dimension, including latitude and longitude for example, are also referred to as station variables and are considered to contain information describing the stations. The station variables may contain missing values, allowing one to reserve space for additional stations that may be added at a later time, as discussed insection 9.6. In addition, * It is strongly recommended that there should be a station variable ( which may be of any type) with the attribute cf_role=”timeseries_id”, whose values uniquely identify the stations. * It is recommended that there should be station variables with standard_name attributes " platform_name ", " surface_altitude " and “ platform_id ” when applicable. |
|
When profiles are taken repeatedly at a station, one gets a time series of profiles (see also section H.2 for discussion of stations and time series). |
|
Feature class for the CF / Unidata CDM observation pattern corresponding to Profiles along a single trajectory. |
|
Feature class for representing a swath, a two-dimensional irregular grid along the satellite ground track. |
|
Model class for the grid feature, ie a two-dimensional array on fixed projection, resolution and boundaries. |
|
Class implementing a time series of grids |
Additional collection feature class, as defined by CF convention:
|
Feature class for an incomplete multidimensional collection of features, as defined by Climate and Forecast convention: https://cfconventions.org/cf-conventions/cf-conventions.html #_incomplete_multidimensional_array_representation |
|
Feature class for an orthogonal multidimensional collection of features. |
Attributes
|
Return the type of the feature |
Feature contents
|
Extract a subset as a new |
|
Append the fields from another feature |