climate_ref.doctor.checks.data
#
Checks over the data a deployment has ingested.
These look for the conditions that make a solve quietly do the wrong thing rather than fail: reference data that no diagnostic can reach, reference data that is missing so its diagnostics never run, and datasets whose files cover the same period twice.
check_duplicate_coverage(context)
#
Find datasets holding more than one file for the same period.
This happens when the same dataset is ingested from two collections at the same version:
the files merge into one dataset because they share an instance_id,
and every diagnostic reading it then sees the overlapping period twice.
The obs4REF registry and the obs4MIPs archive both carry several datasets, so ingesting both triggers it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
DoctorContext
|
The deployment to check. |
required |
Returns:
| Type | Description |
|---|---|
list[Finding]
|
One finding per dataset with overlapping files. |
Source code in packages/climate-ref/src/climate_ref/doctor/checks/data.py
check_missing_reference_data(context)
#
Find reference datasets the enabled diagnostics require but which are not ingested.
An unmet reference requirement is silent: the diagnostic simply plans no executions, so a deployment can look healthy while producing nothing for whole diagnostics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
DoctorContext
|
The deployment to check. |
required |
Returns:
| Type | Description |
|---|---|
list[Finding]
|
One finding per required dataset that is not ingested. |
Source code in packages/climate-ref/src/climate_ref/doctor/checks/data.py
check_overlapping_registries(context)
#
Report datasets that more than one registry carries.
Fetching both copies is what produces the duplicate coverage that check_duplicate_coverage finds,
so this is the warning before the error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
DoctorContext
|
The deployment to check. |
required |
Returns:
| Type | Description |
|---|---|
list[Finding]
|
One finding per dataset carried by more than one registry. |
Source code in packages/climate-ref/src/climate_ref/doctor/checks/data.py
check_unreachable_source_types(context)
#
Find data ingested under a source type that no enabled diagnostic asks for.
The clearest case is obs4REF.
The obs4ref source type exists and can be ingested,
but no diagnostic declares an obs4REF data requirement,
and the solver only matches a requirement against its own source type.
Data ingested that way is never selected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
DoctorContext
|
The deployment to check. |
required |
Returns:
| Type | Description |
|---|---|
list[Finding]
|
One finding per source type that holds data nothing asks for. |