oceanum.datamesh.Datasource#

pydantic model oceanum.datamesh.Datasource[source]#

Datasource

Fields:
Validators:
field coordinates: Dict[Coordinates, str] = {}#
Coordinates in datasource, referenced by standard coordinate keys. The dictionary keys map to coordinates variables in the datasource.

Ensemble: “e” Rasterband: “b” Category: “c” Quantile: “q” Season: “s” Month: “m” Time: “t” Vertical: “z” Northing: “y” Easting: “x” Station: “s” (Locations assumed stationary, datasource with a multigeometry indexed by station coordinate) Geometry: “g” (Abstract coordinate - a 2 or 3D geometry that defines a feature location) Frequency: “f” Direction:”d”

Example {“t”:”time”,”x”:”longitude”,”y”:”latitude”}

field dataschema: Schema | None = Schema(attrs={}, dims={}, coords={}, data_vars={}) (alias 'schema')#

Datasource schema

field description: str | None = ''#

Description of datasource

Constraints:
  • max_length = 1500

field details: AnyHttpUrl | None = None#

URL to further details about the datasource

field driver: str [Required]#
field driver_args: dict | None = {} (alias 'args')#

Driver arguments for datasource. These are driver dependent.

field geom: Annotated[Point | MultiPoint | Polygon, _GeometryAnnotation] | None = None#

Valid shapely or geoJSON geometry describing the spatial extent of the datasource

field id: str [Required]#

Unique ID for the datasource

Constraints:
  • min_length = 3

  • max_length = 80

  • pattern = ^[a-z0-9-_]+$

Validated by:
field info: dict | None = {}#

Additional datasource descriptive metadata

field last_modified: datetime | None = datetime.datetime(2025, 2, 11, 2, 47, 47, 337742)#

Last time datasource was modified

field name: str [Required]#

Human readable name for the datasource

Constraints:
  • max_length = 128

field parameters: dict | None = {}#

Additional parameters for accessing datasource

field parchive: Annotated[timedelta, BeforeValidator(func=parse_period, json_schema_input_type=PydanticUndefined)] | None = None#

Duration of a rolling archive (time before present). Must be a valid ISO8601 interval string or None.

field pforecast: Annotated[timedelta, BeforeValidator(func=parse_period, json_schema_input_type=PydanticUndefined)] | None = None#

Duration of a forecast horizon (time after present). Must be a valid ISO8601 interval string or None.

field tags: list | None = []#

Metadata keyword tags related to the datasource

field tend: datetime | None = None#

Latest time in datasource. Must be a valid ISO8601 datetime string

field tstart: datetime | None = None#

Earliest time in datasource. Must be a valid ISO8601 datetime string

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

validator validate_id  »  id[source]#
property attributes#

Datasource global attributes. Note that these are None (undefined) for a summary dataset.

property bounds#

Bounding box of datasource geographical extent

Type:

list[float]

property geometry#
property variables#

Datasource variables (or properties). Note that these are None (undefined) for a summary dataset.