Repo Doctor
The Repo Doctor is a diagnostic tool that analyzes your Arraylake repositories to ensure they are compatible with Flux services. It checks for CF convention compliance and helps you fix any issues that would prevent your data from being served through Flux protocols.
Overview
Before enabling Flux services on a repository, the Repo Doctor validates that your data meets the requirements for each protocol. It checks for proper coordinate system metadata, dimension attributes, and data structure compliance with CF conventions.
Running Repo Doctor
The Repo Doctor can be run via the Arraylake CLI to diagnose and optionally fix CF compliance issues in your datasets.
- Diagnose Only
- Diagnose and Fix
- Specific Group
arraylake repo doctor {org}/{repo}
This will analyze your repository and report any CF compliance issues without making changes.
arraylake repo doctor {org}/{repo} --treat
This will diagnose issues and prompt you to fix them automatically.
arraylake repo doctor {org}/{repo} --group /path/to/group
Target a specific group within your Zarr hierarchy.
Checking Service Compatibility
While the Repo Doctor doesn't have a flag to check for a single service, it always reports which services your data is compatible with. Look for the compatibility section in the output:
✅ edr
✅ tiles
✅ wms
❌ dap2
To check if your data is ready for a specific service like WMS:
- Run
arraylake repo doctor {org}/{repo} --group /your/group
- Look for "wms" in the "Compatible services" list
- If WMS is incompatible, check the missing attributes - WMS requires
latitude
andlongitude
standard names
Compatibility Checks
Service Requirements
The Repo Doctor checks compatibility with each Flux service:
Service | Required CF Attributes | Description |
---|---|---|
EDR | X, Y axes | Environmental Data Retrieval requires spatial coordinates |
WMS | latitude, longitude | Web Map Service needs geographic coordinates |
Tiles | X, Y or lat/lon | Tile service works with either coordinate system |
DAP2 | None (always compatible) | OPeNDAP has no specific CF requirements |
CF Convention Attributes
The doctor checks for two types of CF attributes:
- Axis Attributes (
axis
): Identifies dimension roles (X, Y, Z, T) - Standard Name Attributes (
standard_name
): Identifies physical quantities (latitude, longitude, time, vertical)
Example of properly attributed coordinates:
# X axis / Longitude
ds.lon.attrs = {
'axis': 'X',
'standard_name': 'longitude',
'units': 'degrees_east'
}
# Y axis / Latitude
ds.lat.attrs = {
'axis': 'Y',
'standard_name': 'latitude',
'units': 'degrees_north'
}
# Time dimension
ds.time.attrs = {
'axis': 'T',
'standard_name': 'time'
}