Skip to main content

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.

arraylake repo doctor {org}/{repo}

This will analyze your repository and report any CF compliance issues without making changes.

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:

  1. Run arraylake repo doctor {org}/{repo} --group /your/group
  2. Look for "wms" in the "Compatible services" list
  3. If WMS is incompatible, check the missing attributes - WMS requires latitude and longitude standard names

Compatibility Checks

Service Requirements

The Repo Doctor checks compatibility with each Flux service:

ServiceRequired CF AttributesDescription
EDRX, Y axesEnvironmental Data Retrieval requires spatial coordinates
WMSlatitude, longitudeWeb Map Service needs geographic coordinates
TilesX, Y or lat/lonTile service works with either coordinate system
DAP2None (always compatible)OPeNDAP has no specific CF requirements

CF Convention Attributes

The doctor checks for two types of CF attributes:

  1. Axis Attributes (axis): Identifies dimension roles (X, Y, Z, T)
  2. 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'
}