Skip to content

Spatial Coordinate (grid)

version: 0.1.0
trait: spatial_coordinate
profile: grid

View spec source on GitHub

Run with uvx from release on pypi.org:

uvx --with mlwp-data-specs mlwp.validate_dataset_traits --space grid <DATASET_PATH_OR_URL>

Warning: mlwp-data-specs is not published on PyPI yet, so this command is included for future release usage.

Run directly from GitHub source:

uvx --from "git+https://github.com/mlwp-tools/mlwp-data-specs" mlwp.validate_dataset_traits --space grid <DATASET_PATH_OR_URL>

Python API:

from mlwp_data_specs import validate_dataset

report = validate_dataset(ds, space="grid")

1. Introduction

This document defines trait-level requirements for spatial coordinates in MLWP datasets. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

2. Scope

This specification applies to datasets validated with the space=grid profile.

3. Structural Requirements

3.1 Accepted Dimension Variants

  • The dataset MUST match one of the accepted dimension variants for this profile: [{'xc', 'yc'}, {'grid_index'}, {'longitude', 'latitude'}].

3.2 Required Coordinates

  • The dataset MUST include the latitude and longitude coordinates.

3.3 Optional Coordinates

  • The dataset MAY include optional coordinates for this profile: ['xc', 'yc'].

3.4 Optional Dimensions

  • The dataset MAY include optional dimensions for this profile: ['member'].

4. Coordinate Metadata Requirements

  • Longitude/latitude coordinates MUST carry CF-compatible standard_name and angular units.
  • If projected coordinates are present (xc, yc), they MUST expose projection coordinate metadata.