Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/check-schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint and Validate

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:

jobs:
lint-and-validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Validate examples against schemas
run: |
uv run scripts/validate-examples.sh
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
3 changes: 3 additions & 0 deletions examples/air_temperature.zarr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Air Temperature

This example comes from http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html. Accessed via https://github.com/pydata/xarray-data/blob/master/air_temperature.nc
65 changes: 65 additions & 0 deletions examples/air_temperature.zarr/air/zarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"shape": [
2920,
25,
53
],
"data_type": "int16",
"chunk_grid": {
"name": "regular",
"configuration": {
"chunk_shape": [
730,
13,
27
]
}
},
"chunk_key_encoding": {
"name": "default",
"configuration": {
"separator": "/"
}
},
"fill_value": 0,
"codecs": [
{
"name": "bytes",
"configuration": {
"endian": "little"
}
},
{
"name": "zstd",
"configuration": {
"level": 0,
"checksum": false
}
}
],
"attributes": {
"long_name": "4xDaily Air temperature at sigma level 995",
"units": "degK",
"precision": 2,
"GRIB_id": 11,
"GRIB_name": "TMP",
"var_desc": "Air temperature",
"dataset": "NMC Reanalysis",
"level_desc": "Surface",
"statistic": "Individual Obs",
"parent_stat": "Other",
"actual_range": [
185.16000366210938,
322.1000061035156
],
"scale_factor": 0.01
},
"dimension_names": [
"time",
"lat",
"lon"
],
"zarr_format": 3,
"node_type": "array",
"storage_transformers": []
}
49 changes: 49 additions & 0 deletions examples/air_temperature.zarr/lat/zarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"shape": [
25
],
"data_type": "float32",
"chunk_grid": {
"name": "regular",
"configuration": {
"chunk_shape": [
25
]
}
},
"chunk_key_encoding": {
"name": "default",
"configuration": {
"separator": "/"
}
},
"fill_value": 0.0,
"codecs": [
{
"name": "bytes",
"configuration": {
"endian": "little"
}
},
{
"name": "zstd",
"configuration": {
"level": 0,
"checksum": false
}
}
],
"attributes": {
"standard_name": "latitude",
"long_name": "Latitude",
"units": "degrees_north",
"axis": "Y",
"_FillValue": "AAAAAAAA+H8="
},
"dimension_names": [
"lat"
],
"zarr_format": 3,
"node_type": "array",
"storage_transformers": []
}
49 changes: 49 additions & 0 deletions examples/air_temperature.zarr/lon/zarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"shape": [
53
],
"data_type": "float32",
"chunk_grid": {
"name": "regular",
"configuration": {
"chunk_shape": [
53
]
}
},
"chunk_key_encoding": {
"name": "default",
"configuration": {
"separator": "/"
}
},
"fill_value": 0.0,
"codecs": [
{
"name": "bytes",
"configuration": {
"endian": "little"
}
},
{
"name": "zstd",
"configuration": {
"level": 0,
"checksum": false
}
}
],
"attributes": {
"standard_name": "longitude",
"long_name": "Longitude",
"units": "degrees_east",
"axis": "X",
"_FillValue": "AAAAAAAA+H8="
},
"dimension_names": [
"lon"
],
"zarr_format": 3,
"node_type": "array",
"storage_transformers": []
}
49 changes: 49 additions & 0 deletions examples/air_temperature.zarr/time/zarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"shape": [
2920
],
"data_type": "float32",
"chunk_grid": {
"name": "regular",
"configuration": {
"chunk_shape": [
2920
]
}
},
"chunk_key_encoding": {
"name": "default",
"configuration": {
"separator": "/"
}
},
"fill_value": 0.0,
"codecs": [
{
"name": "bytes",
"configuration": {
"endian": "little"
}
},
{
"name": "zstd",
"configuration": {
"level": 0,
"checksum": false
}
}
],
"attributes": {
"standard_name": "time",
"long_name": "Time",
"units": "hours since 1800-01-01",
"calendar": "standard",
"_FillValue": "AAAAAAAA+H8="
},
"dimension_names": [
"time"
],
"zarr_format": 3,
"node_type": "array",
"storage_transformers": []
}
11 changes: 11 additions & 0 deletions examples/air_temperature.zarr/zarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"attributes": {
"Conventions": "COARDS",
"title": "4x daily NMC reanalysis (1948)",
"description": "Data is from NMC initialized reanalysis\n(4x/day). These are the 0.9950 sigma level values.",
"platform": "Model",
"references": "http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html"
},
"zarr_format": 3,
"node_type": "group"
}
31 changes: 31 additions & 0 deletions examples/example-array/zarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"zarr_format": 3,
"node_type": "array",
"shape": [10000, 1000],
"dimension_names": ["rows", "columns"],
"data_type": "float64",
"chunk_grid": {
"name": "regular",
"configuration": {
"chunk_shape": [1000, 100]
}
},
"chunk_key_encoding": {
"name": "default",
"configuration": {
"separator": "/"
}
},
"codecs": [{
"name": "bytes",
"configuration": {
"endian": "little"
}
}],
"fill_value": "NaN",
"attributes": {
"foo": 42,
"bar": "apples",
"baz": [1, 2, 3, 4]
}
}
8 changes: 8 additions & 0 deletions examples/example-group/zarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"zarr_format": 3,
"node_type": "group",
"attributes": {
"spam": "ham",
"eggs": 42
}
}
Loading