{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opentideconstants.org/schema/otc-1.0.schema.json",
  "title": "OpenTideConstants release document",
  "description": "format_version 1.0. Schema for OTC_{YYYYMMDD}.json. Each line of OTC_{YYYYMMDD}.jsonl (and of the optional OTC_{YYYYMMDD}.jsonl.gz) is one station document, valid against #/$defs/station. OTC_{YYYYMMDD}.meta.json is the same document without `stations`, valid against #/$defs/meta, so a .jsonl reader can get the conventions, licences, constituent table and release metadata. Units: metres, metres per second (current amplitudes), degrees, degrees per hour, UTC. Every anchored pattern of a value ends with $(?![\\s\\S]) so that a validator whose $ also matches before a final newline (Python re) still rejects one. Cross-references (convention_id, licence_id, recommended_set_id, constituent names, astro_table_id, datum.chart_datum, default_current_bin, current_offsets reference_station_id and reference_bin) must resolve inside the same release, alias ids must be unique within each alias system across the release, and bin numbers must be unique within a set's current_bins and within a station's current_offsets. JSON Schema cannot express these, so the release build checks them separately. The build also checks: (1) a no_constants set with too_short has fewer than release.fit_min_good_hours hours of good data, and every gauge set with constants has at least that many; good_hours is never more than the hours between record_span start and end; (2) a station's recommended set is never a no_constants set, under the ordinary rank never a short_record set when the station has a set of the same quantity with constants and more good_hours, whatever their source types; a uniquely bound measured-accuracy-review-v1 decision (tier review, outcome accept) may instead select a measured height improvement, retaining short-record, fallback, clock and datum findings and the timing comparison, and always has the quantity of the station's kind; (3) a time_base correction has from different from to, its from equals declared and its to equals published, and an unverified or disputed time_base has published equal to declared; (4) a tombstone's merged_into names an active station whose aliases include every alias id the removed station had; (5) provenance.carried_from_release is earlier than the release datestamp and names a release that held the same set_id, and a carried set's convention_id and licence_id exist in this release; (6) recommended_set_id is null on a reference station only when every set of the station is no_constants (the schema checks this too), and a subordinate station has constant sets, subordinate_offsets or current_offsets (the schema checks this too); (7) every constituent of every set with constants has a row in its convention's astro table, each row's speed equals the set's speed and the constituents table speed within 1e-7 degrees per hour, every v0u_deg and f array has last_year - first_year + 1 entries, and a convention's tables_sha256, when present, equals its astro table's; (8) datum.chart_datum names a key of datum.named; (9) datum.basis and datum.named have the same keys; (10) a key starting with otc_ has kind computed or observed and exists only when the same key without the prefix is published on the same set; (11) a datum basis control.station_id and control.set_id resolve to a set in the release, and for an observed level that set has a 19-year determination over the same epoch of every control level that the method's formulas use: the standard method MTL, MSL, DTL (when the set writes DTL), the mean range (MHW, MLW) and the inequalities (MHHW, MLLW); the modified range ratio method MTL, DTL, MSL, the mean range and the great diurnal range (MHHW, MLLW); the direct method MHW and MHHW; so a 19-year determination with only MHW and MHHW (truncated lows) is a control for the direct method only; (12) per station: when any set of a station has a published chart datum, no set of that station has a computed or observed chart datum. Published means published by the station's chart-datum publisher: in the Baltic and the Kattegat the charting authority, and also the charting authority for the Baltic gauge operators' (FMI, SMHI, DMI, WSV) gauges outside them (for example DMI's Esbjerg); elsewhere the source that states it (NOAA, Kartverket, LINZ, JMA, PEGELONLINE, Marine Institute); and, outside the Baltic and Kattegat, a GESLA record or SHOM REFMAR gauge whose stated zero is the chart datum (zero chart_datum, published cd = 0; a record stating BSCD2000 follows the charting authority). An older pre-BSCD2000 datum counts. Another set there has the publisher's datum, re-expressed above its own zero, or no chart datum; (13) every datum date is a real calendar date, and every datum epoch and data_span has start <= end; (14) a first_reduction with the flag no_qualified_control has an epoch equal to its data_span, covers whole years when it has 12 or more months, and does not have a primary's coverage (at least 216 counted months inside the OTC datum epoch with every calendar month counted in at least 17 of the 19 years); one without it (a 19-year determination) has its data_span inside the OTC datum epoch and every calendar month counted in at least 17 of the 19 years; and data_span.months is never more than the calendar months from data_span start to end.",
  "type": "object",
  "required": [
    "format_version",
    "release",
    "conventions",
    "licences",
    "constituents",
    "stations"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "$ref": "#/$defs/astro_tables_when_used"
    }
  ],
  "properties": {
    "format_version": {
      "description": "Always 1.0 in this schema.",
      "const": "1.0"
    },
    "release": {
      "$ref": "#/$defs/release"
    },
    "conventions": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/convention"
      }
    },
    "licences": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/licence"
      }
    },
    "constituents": {
      "description": "Release-level constituent table: one row per constituent name and constituent_table_version that the release uses.",
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/constituent_definition"
      }
    },
    "astro_tables": {
      "$ref": "#/$defs/astro_tables"
    },
    "stations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/station"
      }
    }
  },
  "$defs": {
    "retained_datum": {
      "description": "An original numerical alternative, independent of recommended prediction datum selection. Conflicting frames, methods and values remain separate; null uncertainty makes no accuracy claim.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind",
        "method",
        "values",
        "units",
        "frame",
        "source_record_id",
        "input_binding",
        "reliability",
        "uncertainty_m"
      ],
      "properties": {
        "kind": {
          "enum": [
            "published",
            "observed",
            "computed"
          ]
        },
        "method": {
          "type": "string",
          "minLength": 1
        },
        "values": {
          "type": "object",
          "minProperties": 1,
          "propertyNames": {
            "type": "string",
            "minLength": 1
          },
          "additionalProperties": {
            "type": "number"
          }
        },
        "units": {
          "type": "string",
          "minLength": 1
        },
        "frame": {
          "$ref": "#/$defs/retained_frame"
        },
        "source_record_id": {
          "type": "string",
          "minLength": 1
        },
        "set_id": {
          "type": "string",
          "minLength": 1
        },
        "input_binding": {
          "$ref": "#/$defs/input_binding"
        },
        "reliability": {
          "$ref": "#/$defs/retained_reliability"
        },
        "uncertainty_m": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "basis": {
          "$ref": "#/$defs/retained_basis"
        },
        "window": {
          "$ref": "#/$defs/window"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "kind": {
                "const": "computed"
              },
              "method": {
                "not": {
                  "enum": [
                    "noaa_subordinate_reference_datums_v1",
                    "noaa_subordinate_reference_time_offsets_v1",
                    "noaa_subordinate_mtl_msl_proxy_v1"
                  ]
                }
              }
            }
          },
          "then": {
            "required": [
              "set_id",
              "window"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "method": {
                "const": "noaa_subordinate_reference_datums_v1"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/noaa_subordinate_reference_datum"
          }
        },
        {
          "if": {
            "properties": {
              "method": {
                "const": "noaa_subordinate_reference_time_offsets_v1"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/noaa_subordinate_time_offsets_datum"
          }
        },
        {
          "if": {
            "properties": {
              "method": {
                "const": "noaa_subordinate_mtl_msl_proxy_v1"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/noaa_subordinate_msl_proxy_datum"
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "observed"
              }
            }
          },
          "then": {
            "required": [
              "window"
            ]
          }
        }
      ]
    },
    "noaa_subordinate_reference_datum": {
      "description": "Computed alternatives from authenticated NOAA high/low adjustments and an existing published reference body. No own harmonic set, prediction window, surveyed tie or default selection is implied. Runtime validation binds both actual stations and independently checks each value.",
      "required": [
        "basis"
      ],
      "not": {
        "anyOf": [
          {
            "required": [
              "set_id"
            ]
          },
          {
            "required": [
              "window"
            ]
          }
        ]
      },
      "properties": {
        "kind": {
          "const": "computed"
        },
        "units": {
          "const": "m"
        },
        "uncertainty_m": {
          "const": null
        },
        "source_record_id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])"
        },
        "input_binding": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "published_offsets",
            "published_reference"
          ],
          "properties": {
            "published_offsets": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "source",
                "source_record_id",
                "source_version",
                "source_url",
                "response_json",
                "sha256",
                "reference_source_record_id"
              ],
              "properties": {
                "source": {
                  "const": "noaa"
                },
                "source_record_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])"
                },
                "source_version": {
                  "type": "string",
                  "minLength": 1
                },
                "source_url": {
                  "type": "string",
                  "minLength": 1
                },
                "response_json": {
                  "type": "string",
                  "minLength": 1,
                  "contentSchema": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "refStationId": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "heightOffsetHighTide": {
                        "type": "number"
                      },
                      "heightOffsetLowTide": {
                        "type": "number"
                      },
                      "timeOffsetHighTide": {
                        "type": "integer"
                      },
                      "timeOffsetLowTide": {
                        "type": "integer"
                      },
                      "heightAdjustedType": {
                        "type": "string"
                      },
                      "self": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "x-closed-factual": true
                  }
                },
                "sha256": {
                  "$ref": "#/$defs/sha256"
                },
                "reference_source_record_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])"
                }
              }
            },
            "published_reference": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "source",
                "source_record_id",
                "native_station_id",
                "source_url",
                "response_json",
                "sha256",
                "units"
              ],
              "properties": {
                "source": {
                  "const": "noaa"
                },
                "source_record_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])"
                },
                "native_station_id": {
                  "type": "string",
                  "minLength": 1
                },
                "source_url": {
                  "type": "string",
                  "minLength": 1
                },
                "response_json": {
                  "type": "string",
                  "minLength": 1,
                  "contentSchema": {
                    "$ref": "#/$defs/carrier_noaa_datums"
                  }
                },
                "sha256": {
                  "$ref": "#/$defs/sha256"
                },
                "units": {
                  "const": "meters"
                }
              }
            }
          }
        },
        "basis": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "native_offsets",
            "reference_epoch",
            "reference_zero",
            "operation",
            "offset_height_units",
            "output_height_units"
          ],
          "properties": {
            "native_offsets": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "reference_station_id",
                "height_adjusted_type",
                "height_offset_high",
                "height_offset_low",
                "time_offset_high_min",
                "time_offset_low_min"
              ],
              "properties": {
                "reference_station_id": {
                  "type": "string",
                  "minLength": 1
                },
                "height_adjusted_type": {
                  "enum": [
                    "R",
                    "A"
                  ]
                },
                "height_offset_high": {
                  "type": "number"
                },
                "height_offset_low": {
                  "type": "number"
                },
                "time_offset_high_min": {
                  "type": "number"
                },
                "time_offset_low_min": {
                  "type": "number"
                }
              }
            },
            "reference_epoch": {
              "type": [
                "string",
                "null"
              ]
            },
            "reference_zero": {
              "const": "MLLW"
            },
            "operation": {
              "enum": [
                "R",
                "F"
              ]
            },
            "offset_height_units": {
              "enum": [
                "ratio",
                "feet"
              ]
            },
            "output_height_units": {
              "const": "m"
            },
            "published_values": {
              "type": "object",
              "additionalProperties": {
                "type": "number"
              }
            },
            "extrema_period": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "lat": {
                  "$ref": "#/$defs/noaa_published_extrema_date"
                },
                "hat": {
                  "$ref": "#/$defs/noaa_published_extrema_date"
                }
              }
            }
          }
        },
        "reliability": {
          "properties": {
            "status": {
              "const": "unverified"
            },
            "limitations": {
              "allOf": [
                {
                  "contains": {
                    "const": "derived_from_published_NOAA_reference_and_offsets"
                  }
                },
                {
                  "contains": {
                    "const": "not_locally_observed_or_surveyed"
                  }
                },
                {
                  "contains": {
                    "const": "accuracy_unverified"
                  }
                },
                {
                  "contains": {
                    "const": "not_selected_for_prediction"
                  }
                }
              ]
            }
          }
        }
      },
      "oneOf": [
        {
          "properties": {
            "values": {
              "propertyNames": {
                "enum": [
                  "mhhw",
                  "mhw",
                  "mlw",
                  "mllw",
                  "mtl",
                  "dtl",
                  "msl",
                  "lat",
                  "hat"
                ]
              }
            },
            "frame": {
              "const": {
                "kind": "unknown",
                "name": "NOAA subordinate MLLW",
                "tie_status": "unknown"
              }
            }
          }
        },
        {
          "properties": {
            "values": {
              "propertyNames": {
                "enum": [
                  "mn",
                  "gt",
                  "dhq",
                  "dlq"
                ]
              }
            },
            "frame": {
              "const": {
                "kind": "derived_range",
                "name": null,
                "tie_status": "not_applicable"
              }
            }
          }
        }
      ]
    },
    "noaa_published_extrema_date": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "date"
      ],
      "properties": {
        "date": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "noaa_subordinate_time_offsets_datum": {
      "required": [
        "basis"
      ],
      "not": {
        "anyOf": [
          {
            "required": [
              "set_id"
            ]
          },
          {
            "required": [
              "window"
            ]
          }
        ]
      },
      "properties": {
        "kind": {
          "const": "computed"
        },
        "units": {
          "const": "h"
        },
        "uncertainty_m": {
          "const": null
        },
        "source_record_id": {
          "$ref": "#/$defs/noaa_subordinate_reference_datum/properties/source_record_id"
        },
        "input_binding": {
          "$ref": "#/$defs/noaa_subordinate_reference_datum/properties/input_binding"
        },
        "values": {
          "propertyNames": {
            "enum": [
              "hwi",
              "lwi"
            ]
          }
        },
        "frame": {
          "const": {
            "kind": "elapsed_time",
            "name": "Greenwich lunar transit",
            "tie_status": "not_applicable"
          }
        },
        "reliability": {
          "properties": {
            "status": {
              "const": "unverified"
            },
            "limitations": {
              "allOf": [
                {
                  "contains": {
                    "const": "derived NOAA subordinate time offsets from REF"
                  }
                },
                {
                  "contains": {
                    "const": "carried published Greenwich reference; not a newly evaluated own local lunar-transit/event average"
                  }
                },
                {
                  "contains": {
                    "const": "source reference hours and published minute-offset precision preserved"
                  }
                },
                {
                  "contains": {
                    "const": "not_selected_for_prediction"
                  }
                },
                {
                  "contains": {
                    "const": "accuracy_unverified"
                  }
                }
              ]
            }
          }
        },
        "basis": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "native_offsets",
            "reference_epoch",
            "operation",
            "offset_height_units",
            "derivation_operation",
            "reference_interval_basis",
            "reference_interval_units",
            "published_time_offset_units",
            "output_interval_units",
            "time_offset_precision",
            "reference_meridian_policy",
            "cycle_policy"
          ],
          "properties": {
            "native_offsets": {
              "$ref": "#/$defs/noaa_subordinate_reference_datum/properties/basis/properties/native_offsets"
            },
            "reference_epoch": {
              "type": [
                "string",
                "null"
              ]
            },
            "operation": {
              "enum": [
                "R",
                "F"
              ]
            },
            "offset_height_units": {
              "enum": [
                "ratio",
                "feet"
              ]
            },
            "derivation_operation": {
              "const": "published_interval_plus_time_offset"
            },
            "reference_interval_basis": {
              "const": "published_greenwich"
            },
            "reference_interval_units": {
              "const": "h"
            },
            "published_time_offset_units": {
              "const": "min"
            },
            "output_interval_units": {
              "const": "h"
            },
            "time_offset_precision": {
              "const": "Sourcepublishedminutevalues; nofalsegreaterclockaccuracy"
            },
            "reference_meridian_policy": {
              "const": "CarryactualpublishedGreenwichreference; noextraownlongitude/localtransitcorrection"
            },
            "cycle_policy": {
              "const": "Noadditionalmoduloorcyclecorrectionbeyondstraightaddition"
            }
          }
        }
      }
    },
    "noaa_subordinate_msl_proxy_datum": {
      "required": [
        "basis"
      ],
      "not": {
        "anyOf": [
          {
            "required": [
              "set_id"
            ]
          },
          {
            "required": [
              "window"
            ]
          }
        ]
      },
      "properties": {
        "kind": {
          "const": "computed"
        },
        "units": {
          "const": "m"
        },
        "uncertainty_m": {
          "const": null
        },
        "source_record_id": {
          "$ref": "#/$defs/noaa_subordinate_reference_datum/properties/source_record_id"
        },
        "input_binding": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "published_offsets",
            "published_reference"
          ],
          "properties": {
            "published_offsets": {
              "$ref": "#/$defs/noaa_subordinate_reference_datum/properties/input_binding/properties/published_offsets"
            },
            "published_reference": {
              "$ref": "#/$defs/noaa_subordinate_reference_datum/properties/input_binding/properties/published_reference"
            },
            "computed_reference": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "source_candidate_json",
                "sha256",
                "reference_model_json",
                "reference_model_sha256",
                "events_response_sha256",
                "hourly_response_sha256"
              ],
              "properties": {
                "source_candidate_json": {
                  "type": "string",
                  "contentSchema": {
                    "$ref": "#/$defs/computed_source_snapshot"
                  }
                },
                "sha256": {
                  "$ref": "#/$defs/sha256"
                },
                "reference_model_json": {
                  "type": "string",
                  "contentSchema": {
                    "$ref": "#/$defs/constant_set"
                  }
                },
                "reference_model_sha256": {
                  "$ref": "#/$defs/sha256"
                },
                "events_response_sha256": {
                  "$ref": "#/$defs/sha256"
                },
                "hourly_response_sha256": {
                  "$ref": "#/$defs/sha256"
                },
                "reference_model_public_sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "source_candidate_public_sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              }
            }
          }
        },
        "values": {
          "propertyNames": {
            "enum": [
              "msl"
            ]
          }
        },
        "frame": {
          "const": {
            "kind": "unknown",
            "name": "NOAA subordinate MLLW",
            "tie_status": "unknown"
          }
        },
        "reliability": {
          "properties": {
            "status": {
              "const": "low"
            },
            "limitations": {
              "allOf": [
                {
                  "contains": {
                    "const": "approximation: MTL used as MSL proxy, subordinate-derived"
                  }
                },
                {
                  "contains": {
                    "const": "not_selected_for_prediction"
                  }
                },
                {
                  "contains": {
                    "const": "accuracy_unverified"
                  }
                },
                {
                  "contains": {
                    "const": "not_locally_observed_or_surveyed"
                  }
                }
              ]
            }
          }
        },
        "basis": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "native_offsets",
            "reference_epoch",
            "operation",
            "offset_height_units",
            "derivation_operation",
            "approximation",
            "proxy_of",
            "reference_statistic_origin",
            "never_default",
            "reference_zero",
            "output_height_units"
          ],
          "properties": {
            "native_offsets": {
              "$ref": "#/$defs/noaa_subordinate_reference_datum/properties/basis/properties/native_offsets"
            },
            "reference_epoch": {
              "type": [
                "string",
                "null"
              ]
            },
            "operation": {
              "enum": [
                "R",
                "F"
              ]
            },
            "offset_height_units": {
              "enum": [
                "ratio",
                "feet"
              ]
            },
            "derivation_operation": {
              "const": "derived_mtl_as_msl_proxy"
            },
            "approximation": {
              "const": "approximation: MTL used as MSL proxy, subordinate-derived"
            },
            "proxy_of": {
              "const": "derived_mtl"
            },
            "reference_statistic_origin": {
              "enum": [
                "published",
                "computed_harmonic_reference"
              ]
            },
            "never_default": {
              "const": true
            },
            "reference_zero": {
              "const": "MLLW"
            },
            "output_height_units": {
              "const": "m"
            }
          }
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "basis": {
                "properties": {
                  "reference_statistic_origin": {
                    "const": "computed_harmonic_reference"
                  }
                }
              }
            }
          },
          "then": {
            "properties": {
              "input_binding": {
                "required": [
                  "computed_reference"
                ]
              }
            }
          },
          "else": {
            "properties": {
              "input_binding": {
                "not": {
                  "required": [
                    "computed_reference"
                  ]
                }
              }
            }
          }
        }
      ]
    },
    "meta": {
      "description": "OTC_{YYYYMMDD}.meta.json: the release document without stations.",
      "type": "object",
      "required": [
        "format_version",
        "release",
        "conventions",
        "licences",
        "constituents"
      ],
      "additionalProperties": false,
      "allOf": [
        {
          "$ref": "#/$defs/astro_tables_when_used"
        }
      ],
      "properties": {
        "format_version": {
          "const": "1.0"
        },
        "release": {
          "$ref": "#/$defs/release"
        },
        "conventions": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/convention"
          }
        },
        "licences": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/licence"
          }
        },
        "constituents": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/constituent_definition"
          }
        },
        "astro_tables": {
          "$ref": "#/$defs/astro_tables"
        }
      }
    },
    "astro_tables_when_used": {
      "description": "astro_tables is required, with at least one table, when any convention has nodal_handling f_u_at_prediction.",
      "if": {
        "required": [
          "conventions"
        ],
        "properties": {
          "conventions": {
            "contains": {
              "required": [
                "nodal_handling"
              ],
              "properties": {
                "nodal_handling": {
                  "const": "f_u_at_prediction"
                }
              }
            }
          }
        }
      },
      "then": {
        "required": [
          "astro_tables"
        ]
      }
    },
    "astro_tables": {
      "description": "The predictor's per-year astronomical tables: V0+u and the node factor f for each constituent the release uses, computed with congen (XTide, David Flater) after Schureman, Manual of Harmonic Analysis and Prediction of Tides, US C&GS Special Publication 98. A convention with nodal_handling f_u_at_prediction names its table by astro_table_id. Published under CC BY 4.0.",
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/astro_table"
      }
    },
    "astro_table": {
      "type": "object",
      "required": [
        "astro_table_id",
        "v0_model",
        "tables_sha256",
        "generator",
        "first_year",
        "last_year",
        "constituents"
      ],
      "additionalProperties": false,
      "properties": {
        "astro_table_id": {
          "description": "Id that convention.astro_table_id refers to, e.g. tcd-20251228.",
          "type": "string",
          "minLength": 1
        },
        "v0_model": {
          "description": "Astronomical-argument model of the table, as in convention.v0_model, e.g. schureman_tcd.",
          "type": "string",
          "minLength": 1
        },
        "tables_sha256": {
          "description": "SHA-256 of the TCD file whose values the table equals. Same meaning as convention.tables_sha256.",
          "$ref": "#/$defs/sha256"
        },
        "generator": {
          "description": "What computed the values, e.g. congen (XTide) after Schureman, US C&GS Special Publication 98.",
          "type": "string",
          "minLength": 1
        },
        "first_year": {
          "description": "Year of the first entry of every array.",
          "type": "integer"
        },
        "last_year": {
          "description": "Year of the last entry of every array. Each array has last_year - first_year + 1 entries; the release build checks this.",
          "type": "integer"
        },
        "constituents": {
          "description": "One row per constituent the release uses, keyed by OTC canonical name.",
          "type": "object",
          "minProperties": 1,
          "propertyNames": {
            "$ref": "#/$defs/constituent_name"
          },
          "additionalProperties": {
            "$ref": "#/$defs/astro_table_row"
          }
        }
      }
    },
    "astro_table_row": {
      "type": "object",
      "required": [
        "speed_deg_per_hour",
        "v0u_deg",
        "f"
      ],
      "additionalProperties": false,
      "properties": {
        "speed_deg_per_hour": {
          "type": "number",
          "minimum": 0
        },
        "v0u_deg": {
          "description": "v0u_deg[i] is V0 at (first_year + i)-01-01T00:00:00Z plus u at the middle of that year, in degrees, rounded to 0.01 and reduced to [0, 360). It holds for the whole year and steps at 00:00 UTC on 1 January.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "number",
            "minimum": 0,
            "exclusiveMaximum": 360
          }
        },
        "f": {
          "description": "f[i] is the node factor at the middle of the year first_year + i, rounded to 0.0001. It holds for the whole year and steps at 00:00 UTC on 1 January.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "number",
            "minimum": 0
          }
        }
      }
    },
    "datestamp": {
      "description": "Release id: YYYYMMDD in UTC, the day the release was built, with an optional .N counter for a second release on the same day.",
      "type": "string",
      "pattern": "^[0-9]{8}(\\.[2-9]|\\.[1-9][0-9]+)?$(?![\\s\\S])"
    },
    "release": {
      "type": "object",
      "required": [
        "datestamp",
        "source_versions",
        "min_reader_version",
        "fit_min_good_hours"
      ],
      "additionalProperties": false,
      "properties": {
        "datestamp": {
          "$ref": "#/$defs/datestamp"
        },
        "min_reader_version": {
          "description": "Always 1.0 in this schema. The oldest format version a reader must understand to use this release safely, MAJOR.MINOR. A reader that supports only an older version must not use the release, and stays on its last release (the latest pointer per format major and OTC_index.json carry the same value).",
          "const": "1.0"
        },
        "fit_min_good_hours": {
          "description": "The minimum hours of good data this build needs to fit constants (about 15 days, 360 hours). A record with fewer is a no_constants set with no_constants_reason too_short.",
          "type": "number",
          "exclusiveMinimum": 0
        },
        "concept_doi": {
          "description": "The concept DOI: the one DOI for all Zenodo versions of OpenTideConstants. Cite a release by this DOI and the release datestamp. Null only before the concept DOI exists. A Zenodo version DOI is minted after the release files are fixed, and not every release gets one, so a release file never carries it: the version DOI, when a release has one, is only in OTC_index.json and the latest pointers, as zenodo_version_doi.",
          "type": [
            "string",
            "null"
          ],
          "pattern": "^10\\.[0-9]{4,9}/\\S+$(?![\\s\\S])"
        },
        "source_versions": {
          "description": "Upstream version per source, e.g. {\"gesla\": \"4.1\", \"noaa\": \"20261008\"}.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "convention": {
      "type": "object",
      "required": [
        "convention_id",
        "phase_reference",
        "v0_model",
        "nodal_handling",
        "constituent_table_version"
      ],
      "additionalProperties": false,
      "properties": {
        "convention_id": {
          "type": "string",
          "minLength": 1
        },
        "phase_reference": {
          "description": "Phase reference of the source data before conversion. Published phases are always Greenwich (UTC).",
          "enum": [
            "greenwich_utc",
            "local"
          ]
        },
        "utc_offset_hours": {
          "description": "Required when phase_reference is local.",
          "type": "number"
        },
        "v0_model": {
          "description": "Astronomical-argument model, e.g. schureman_tcd or tamura_iho2006.",
          "type": "string"
        },
        "nodal_handling": {
          "enum": [
            "f_u_at_prediction",
            "none"
          ]
        },
        "nodal_formula_ids": {
          "description": "Node-factor formula id per constituent name, when nodal_handling is f_u_at_prediction.",
          "type": "object",
          "additionalProperties": {
            "type": [
              "string",
              "integer"
            ]
          }
        },
        "constituent_table_version": {
          "type": "string"
        },
        "tables_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "astro_table_id": {
          "description": "The astro_tables entry with the V0+u and f for this convention. Required when nodal_handling is f_u_at_prediction. When tables_sha256 is also present, it equals the table's (the release build checks this).",
          "type": "string",
          "minLength": 1
        },
        "validation": {
          "$ref": "#/$defs/phase_validation"
        },
        "metadata_sha256": {
          "type": "string"
        }
      },
      "if": {
        "properties": {
          "phase_reference": {
            "const": "local"
          }
        }
      },
      "then": {
        "required": [
          "utc_offset_hours"
        ]
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "nodal_handling": {
                "const": "f_u_at_prediction"
              }
            }
          },
          "then": {
            "required": [
              "astro_table_id"
            ]
          }
        }
      ],
      "x-closed-factual": true
    },
    "licence": {
      "type": "object",
      "required": [
        "licence_id",
        "spdx",
        "provider",
        "attribution",
        "commercial_use"
      ],
      "additionalProperties": false,
      "properties": {
        "licence_id": {
          "type": "string",
          "minLength": 1
        },
        "spdx": {
          "description": "SPDX id, or a LicenseRef- id where SPDX has none (e.g. LicenseRef-PublicDomain-USGov). Only ticon-4-bodc-restricted and ticon-4-cmems-restricted use NOASSERTION: a special no-conclusion marker, not a licence identifier or grant.",
          "type": "string",
          "pattern": "^([A-Za-z0-9.+-]+|LicenseRef-[A-Za-z0-9.-]+)$(?![\\s\\S])"
        },
        "provider": {
          "type": "string"
        },
        "citation": {
          "type": "string"
        },
        "attribution": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "commercial_use": {
          "description": "true: the licence allows commercial use, on its own terms (for example attribution). false: non-commercial use only; restriction says why and terms_url gives the upstream terms.",
          "type": "boolean"
        },
        "restriction": {
          "description": "One line: what use is not allowed and why. Required when commercial_use is false.",
          "type": "string",
          "minLength": 1
        },
        "terms_url": {
          "description": "The upstream page that sets the restriction. Required when commercial_use is false.",
          "type": "string",
          "format": "uri"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "licence_id": { "$ref": "#/$defs/ticon_publication_licence_id" }
            }
          },
          "then": {
            "required": ["restriction"],
            "properties": {
              "spdx": { "const": "CC-BY-4.0" },
              "commercial_use": { "const": true }
            }
          }
        },
        {
          "if": {
            "properties": {
              "licence_id": {
                "enum": ["ticon-4-chs-meds-as-published", "ticon-4-chs-restricted"]
              }
            }
          },
          "then": {
            "required": ["terms_url"],
            "properties": {
              "terms_url": { "const": "https://www.tides.gc.ca/en/licence-agreement" }
            }
          }
        },
        {
          "if": {
            "properties": {
              "licence_id": { "const": "ticon-4-chs-restricted" }
            }
          },
          "then": {
            "properties": {
              "spdx": { "const": "LicenseRef-CHS-IWLS-Restricted" },
              "commercial_use": { "const": false }
            }
          }
        },
        {
          "if": {
            "required": [
              "licence_id"
            ],
            "properties": {
              "licence_id": {
                "const": "ticon-4-bodc-restricted"
              }
            }
          },
          "then": {
            "required": [
              "restriction",
              "terms_url"
            ],
            "properties": {
              "spdx": {
                "const": "NOASSERTION"
              },
              "commercial_use": {
                "const": false
              },
              "provider": {
                "minLength": 1
              },
              "attribution": {
                "minLength": 1
              },
              "terms_url": {
                "const": "https://www.bodc.ac.uk/data/documents/nodb/267795/"
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "licence_id"
            ],
            "properties": {
              "licence_id": {
                "const": "ticon-4-cmems-restricted"
              }
            }
          },
          "then": {
            "required": [
              "restriction",
              "terms_url"
            ],
            "properties": {
              "spdx": {
                "const": "NOASSERTION"
              },
              "commercial_use": {
                "const": false
              },
              "provider": {
                "minLength": 1
              },
              "attribution": {
                "minLength": 1
              },
              "terms_url": {
                "const": "https://gesla787883612.wordpress.com/license/"
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "spdx"
            ],
            "properties": {
              "spdx": {
                "const": "NOASSERTION"
              }
            }
          },
          "then": {
            "properties": {
              "licence_id": {
                "enum": [
                  "ticon-4-bodc-restricted",
                  "ticon-4-cmems-restricted"
                ]
              },
              "commercial_use": {
                "const": false
              }
            }
          }
        }
      ],
      "if": {
        "required": [
          "commercial_use"
        ],
        "properties": {
          "commercial_use": {
            "const": false
          }
        }
      },
      "then": {
        "required": [
          "restriction",
          "terms_url"
        ]
      }
    },
    "constituent_name": {
      "description": "OTC canonical constituent name. At most 15 characters, so that a C reader can hold it in char[16].",
      "type": "string",
      "pattern": "^[A-Z0-9]+$(?![\\s\\S])",
      "maxLength": 15
    },
    "constituent_definition": {
      "type": "object",
      "required": [
        "constituent_table_version",
        "name",
        "speed_deg_per_hour"
      ],
      "additionalProperties": false,
      "properties": {
        "constituent_table_version": {
          "description": "Matches convention.constituent_table_version.",
          "type": "string"
        },
        "name": {
          "$ref": "#/$defs/constituent_name"
        },
        "doodson": {
          "type": "string",
          "pattern": "^[0-9]{3} ?[0-9]{3}$(?![\\s\\S])"
        },
        "speed_deg_per_hour": {
          "type": "number",
          "minimum": 0
        },
        "nodal_formula_id": {
          "description": "Node-factor formula id, as in convention.nodal_formula_ids.",
          "type": [
            "string",
            "integer"
          ]
        }
      }
    },
    "sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$(?![\\s\\S])"
    },
    "station": {
      "type": "object",
      "required": [
        "station_id",
        "status"
      ],
      "properties": {
        "station_id": {
          "description": "Stable id in the OTC namespace. Never changed, never reused.",
          "type": "string",
          "pattern": "^OTC-[A-Za-z0-9_-]+$(?![\\s\\S])"
        },
        "status": {
          "enum": [
            "active",
            "removed"
          ]
        }
      },
      "oneOf": [
        {
          "$ref": "#/$defs/active_station"
        },
        {
          "$ref": "#/$defs/tombstone"
        }
      ],
      "unevaluatedProperties": false
    },
    "tombstone": {
      "description": "A station id that is not used any more, because the station was merged into another station or was a duplicate of one. The row keeps the id from being reused and points to the station that holds its records. These are the only reasons: a station is never removed because its records are short, broken or from a source that failed a check. Those records stay as constant sets with their annotations. The release build checks that merged_into is an active station whose aliases include every alias id of the removed station.",
      "type": "object",
      "required": [
        "station_id",
        "status",
        "removed_in",
        "merged_into"
      ],
      "additionalProperties": false,
      "properties": {
        "station_id": {
          "type": "string"
        },
        "status": {
          "const": "removed"
        },
        "name": {
          "type": "string"
        },
        "removed_in": {
          "$ref": "#/$defs/datestamp"
        },
        "merged_into": {
          "description": "The OTC station id that holds this station's records.",
          "type": "string",
          "pattern": "^OTC-[A-Za-z0-9_-]+$(?![\\s\\S])"
        }
      }
    },
    "active_station": {
      "type": "object",
      "required": [
        "station_id",
        "status",
        "name",
        "country",
        "lat",
        "lon",
        "timezone",
        "type",
        "recommended_set_id",
        "constant_sets"
      ],
      "additionalProperties": false,
      "properties": {
        "station_id": {
          "type": "string"
        },
        "status": {
          "const": "active"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "country": {
          "description": "ISO 3166-1 alpha-3, or null when no country is established from retained source evidence.",
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[A-Z]{3}$(?![\\s\\S])"
        },
        "region_code": {
          "description": "Optional ISO 3166-2 subdivision code from retained source metadata. NOAA ordinary US state/DC codes use exact acquired state metadata. Coverage is partial. Omitted when unavailable.",
          "type": "string",
          "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$(?![\\s\\S])"
        },
        "lat": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "timezone": {
          "description": "IANA time zone name of the station, e.g. Europe/Oslo, for showing local times. Constants and phases stay in UTC.",
          "type": "string",
          "pattern": "^(UTC|[A-Z][A-Za-z_]+(/[A-Za-z0-9_+-]+)+)$(?![\\s\\S])"
        },
        "type": {
          "enum": [
            "reference",
            "subordinate"
          ]
        },
        "aliases": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          }
        },
        "recommended_set_id": {
          "description": "The set_id of the set chosen by the published recommendation rule, or null for a subordinate station with offsets only, for a station whose every set is no_constants, or for an identity-only reference with source_records. Only sets of one quantity compete: water-level sets for a tide station, current sets for a current station. The recommended set is never a no_constants set. Non-fallbacks rank before fallbacks; the other criteria apply within each group. Under the ordinary rank a set flagged short_record never outranks a set of the same quantity at the same station and in the same fallback group that has constants and more hours of good data (record_span.good_hours), whatever their source types. A unique measured-accuracy-review-v1 review/accept decision can select a measured height improvement instead: its reason binds both scientific subjects, the station and set identities, closed proof/fit/observation/reader pins, height comparisons, non-regressing aggregate timing against the comparator and the disclosed timing tradeoff against the previous model. Findings and retained alternatives remain intact. The release build checks these.",
          "type": [
            "string",
            "null"
          ]
        },
        "recommended_is_fallback": {
          "description": "True exactly when recommended_set_id selects a fallback; otherwise omitted. The release checker verifies this cross-reference.",
          "type": "boolean"
        },
        "prediction_profiles": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "required": [
              "selection_status"
            ],
            "oneOf": [
              {
                "required": [
                  "set_id"
                ]
              },
              {
                "required": [
                  "offset_id"
                ]
              }
            ],
            "additionalProperties": false,
            "properties": {
              "set_id": {
                "type": "string",
                "minLength": 1
              },
              "offset_id": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              },
              "selection_status": {
                "enum": [
                  "measured",
                  "unmeasured"
                ]
              }
            },
            "allOf": [
              {
                "if": {
                  "properties": {
                    "selection_status": {
                      "const": "measured"
                    }
                  }
                },
                "then": {
                  "properties": {
                    "selection_evidence": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "else": {
                  "properties": {
                    "selection_evidence": {
                      "type": "null"
                    }
                  }
                }
              }
            ],
            "x-private-process-fields": [
              "selection_evidence"
            ]
          }
        },
        "constant_sets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/constant_set"
          }
        },
        "source_records": {
          "description": "Original upstream identities and material, separate from predictive sets. The release checker verifies source-tuple uniqueness, licence and set references, and raw row annotations. Identity-only references have no constants or prediction path.",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/source_record"
          }
        },
        "subordinate_offsets": {
          "$ref": "#/$defs/subordinate_offsets"
        },
        "subordinate_offset_alternatives": {
          "description": "Retained subordinate offset models. Wrapper identities are unique within this station and distinct from its original offset handle. The existing offsets.offset_id keeps its historical NOAA meaning.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": [
              "offset_id",
              "offsets"
            ],
            "additionalProperties": false,
            "properties": {
              "offset_id": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              },
              "offsets": {
                "$ref": "#/$defs/subordinate_offsets"
              }
            }
          }
        },
        "default_current_bin": {
          "description": "Current stations only: the bin to show by default (NOAA currbin). It names a bin of the recommended set's current_bins, or of current_offsets for a subordinate current station.",
          "type": "integer",
          "minimum": 1
        },
        "current_offsets": {
          "description": "Subordinate current stations only: one entry per bin, each tied to a bin of a reference current station, as NOAA currentpredictionoffsets gives them.",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/current_offset"
          }
        }
      },
      "if": {
        "properties": {
          "type": {
            "const": "reference"
          }
        }
      },
      "then": {
        "anyOf": [
          {
            "properties": {
              "constant_sets": {
                "minItems": 1
              }
            }
          },
          {
            "required": [
              "source_records"
            ],
            "properties": {
              "constant_sets": {
                "maxItems": 0
              },
              "recommended_set_id": {
                "const": null
              }
            },
            "not": {
              "anyOf": [
                {
                  "required": [
                    "subordinate_offsets"
                  ]
                },
                {
                  "required": [
                    "current_offsets"
                  ]
                },
                {
                  "required": [
                    "default_current_bin"
                  ]
                },
                {
                  "required": [
                    "recommended_is_fallback"
                  ]
                }
              ]
            }
          }
        ],
        "if": {
          "properties": {
            "constant_sets": {
              "contains": {
                "properties": {
                  "qc_status": {
                    "not": {
                      "const": "no_constants"
                    }
                  }
                }
              }
            }
          }
        },
        "then": {
          "anyOf": [
            {
              "properties": {
                "recommended_set_id": {
                  "type": "string"
                }
              }
            },
            {
              "description": "A reference may retain explicitly labelled, reliability-withheld water-level model alternatives without changing its null default. Ordinary usable sets still require a recommendation.",
              "required": [
                "source_records"
              ],
              "properties": {
                "recommended_set_id": {
                  "const": null
                },
                "constant_sets": {
                  "items": {
                    "anyOf": [
                      {
                        "properties": {
                          "qc_status": {
                            "const": "no_constants"
                          }
                        }
                      },
                      {
                        "required": [
                          "fallback",
                          "qc_flags"
                        ],
                        "properties": {
                          "source_type": {
                            "const": "model"
                          },
                          "quantity": {
                            "const": "water_level"
                          },
                          "qc_status": {
                            "const": "flagged"
                          },
                          "fallback": {
                            "properties": {
                              "reason": {
                                "const": "reliability_withheld"
                              }
                            }
                          },
                          "qc_flags": {
                            "contains": {
                              "required": [
                                "flag"
                              ],
                              "properties": {
                                "flag": {
                                  "const": "fallback:reliability_withheld"
                                }
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "subordinate_offsets"
                    ]
                  },
                  {
                    "required": [
                      "current_offsets"
                    ]
                  },
                  {
                    "required": [
                      "default_current_bin"
                    ]
                  },
                  {
                    "required": [
                      "recommended_is_fallback"
                    ]
                  }
                ]
              }
            }
          ]
        }
      },
      "else": {
        "anyOf": [
          {
            "required": [
              "subordinate_offsets"
            ]
          },
          {
            "required": [
              "current_offsets"
            ]
          },
          {
            "properties": {
              "constant_sets": {
                "minItems": 1
              }
            }
          }
        ]
      }
    },
    "source_record": {
      "description": "Source identity, publication rights, original harmonics and retained datum alternatives.",
      "type": "object",
      "required": [
        "source",
        "source_version",
        "source_record_id",
        "role",
        "disposition",
        "licence_id",
        "published_set_ids",
        "provenance"
      ],
      "additionalProperties": false,
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "source_version": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "source_record_id": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "role": {
          "enum": [
            "gauge_station",
            "published_harmonic_record",
            "model",
            "reference"
          ]
        },
        "disposition": {
          "description": "metadata_only: identifying metadata without acquired observations or harmonic material for this capture. not_fitted: actual observations without an actual fit outcome. licence_restricted: actual coefficients or a fit whose publication is restricted. unavailable: an observed acquisition/input failure. retained: original harmonic material, an actual no-fit outcome, or a published set is retained. Alternatives never erase another original's disposition.",
          "enum": [
            "metadata_only",
            "not_fitted",
            "licence_restricted",
            "unavailable",
            "retained"
          ]
        },
        "licence_id": {
          "description": "The actual applicable restrictive licence/policy in the release table, or null for unresolved terms. Null grants no permission. Explicit noncommercial restrictions remain noncommercial under both readings.",
          "type": [
            "string",
            "null"
          ],
          "minLength": 1
        },
        "upstream_licence_id": {
          "description": "Separately published source terms, when different. Resolves in the release table and never overrides the applicable restrictive licence_id.",
          "type": "string",
          "minLength": 1
        },
        "published_set_ids": {
          "description": "Actual same-station sets produced from this source tuple; empty when none. No inferred fit or prediction claim.",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "provenance": {
          "$ref": "#/$defs/source_record_provenance"
        },
        "original_metadata": {
          "$ref": "#/$defs/public_original_metadata",
          "description": "Typed source citation, method, fit span and harmonic alternatives."
        },
        "retained_datums": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/retained_datum"
          }
        },
        "original_harmonics": {
          "$ref": "#/$defs/original_harmonics"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "disposition": {
                "not": {
                  "const": "retained"
                }
              }
            },
            "required": [
              "disposition"
            ]
          },
          "then": {
            "properties": {
              "published_set_ids": {
                "maxItems": 0
              }
            },
            "not": {
              "required": [
                "original_harmonics"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "disposition": {
                "const": "licence_restricted"
              }
            },
            "required": [
              "disposition"
            ]
          },
          "then": {
            "properties": {
              "licence_id": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "original_harmonics"
            ]
          },
          "then": {
            "properties": {
              "source": {
                "const": "ticon"
              },
              "source_version": {
                "const": "4"
              },
              "role": {
                "const": "published_harmonic_record"
              },
              "licence_id": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "original_metadata"
            ],
            "properties": {
              "original_metadata": {
                "required": [
                  "native_coefficient_availability"
                ]
              }
            }
          },
          "then": {
            "properties": {
              "source": {
                "const": "fes2022"
              },
              "source_version": {
                "const": "FES2022b"
              },
              "role": {
                "const": "model"
              },
              "original_metadata": {
                "required": [
                  "algorithm"
                ],
                "properties": {
                  "algorithm": {
                    "const": "complex-bilinear-valid-corners-ocean-v1"
                  }
                }
              }
            }
          }
        }
      ],
      "x-private-process-fields": [
        "detail"
      ]
    },
    "source_record_provenance": {
      "description": "Exact input artifacts and the pinned retained inventory binding this original source tuple to them. The source tuple locates the record; original metadata preserves any actual member/row locator. An inventory-file hash is not an observation-member hash.",
      "type": "object",
      "required": [
        "input_sha256",
        "inventory_sha256"
      ],
      "additionalProperties": false,
      "properties": {
        "input_sha256": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/sha256"
          }
        },
        "inventory_sha256": {
          "$ref": "#/$defs/sha256"
        }
      }
    },
    "original_harmonics": {
      "description": "Lossless original TICON-4 CSV material, not predictive constituents. Retain all 50 rows and 18 ordered string cells, including signed phases, uncertainty and missing/sentinel text. Unit interpretations do not certify phase compatibility or create TCD definitions.",
      "type": "object",
      "required": [
        "format",
        "columns",
        "rows",
        "amplitude_unit",
        "amplitude_unit_basis",
        "phase_unit",
        "phase_convention",
        "amplitude_uncertainty_unit",
        "amplitude_uncertainty_unit_basis",
        "annotations"
      ],
      "additionalProperties": false,
      "properties": {
        "format": {
          "const": "ticon-4-csv"
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "number",
                "boolean",
                "null"
              ]
            }
          }
        },
        "amplitude_unit": {
          "const": "cm"
        },
        "amplitude_unit_basis": {
          "const": "native_ticon_loader"
        },
        "phase_unit": {
          "const": "deg"
        },
        "phase_convention": {
          "const": "as_published"
        },
        "amplitude_uncertainty_unit": {
          "const": "cm"
        },
        "amplitude_uncertainty_unit_basis": {
          "const": "native_ticon_loader_interpretation"
        },
        "annotations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/raw_harmonic_annotation"
          }
        }
      }
    },
    "raw_harmonic_annotation": {
      "type": "object",
      "required": [
        "row",
        "reason",
        "detail"
      ],
      "additionalProperties": false,
      "properties": {
        "row": {
          "type": "integer",
          "minimum": 0,
          "maximum": 49
        },
        "reason": {
          "const": "unsupported_definition"
        },
        "detail": {
          "type": "string"
        }
      }
    },
    "fallback": {
      "description": "Retained values with a finding. This is not a carry-over from an earlier release. preferred_set_id names a non-fallback set at the same station; the release checker verifies it.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "reason"
      ],
      "properties": {
        "reason": {
          "enum": [
            "time_base_disputed",
            "time_base_unresolved",
            "refused_fit",
            "short_record_uncalibrated",
            "short_record_long_period",
            "published_full_list",
            "reliability_withheld",
            "licence_reading",
            "datum_gate_failed",
            "not_in_otc_input",
            "historical_offsets"
          ]
        },
        "preferred_set_id": {
          "type": "string",
          "minLength": 1
        }
      },
      "x-private-process-fields": [
        "basis",
        "otc_finding"
      ]
    },
    "ticon_publication_licence_id": {
      "enum": [
        "ticon-4-as-published-bodc",
        "ticon-4-as-published-bom",
        "ticon-4-chs-meds-as-published"
      ]
    },
    "constant_set": {
      "type": "object",
      "required": [
        "set_id",
        "source",
        "source_type",
        "quantity",
        "source_record_id",
        "source_version",
        "convention_id",
        "licence_id",
        "qc_status",
        "constituents",
        "provenance"
      ],
      "additionalProperties": false,
      "properties": {
        "set_id": {
          "type": "string",
          "minLength": 1
        },
        "astronomy_correction": {
          "description": "Source-bound daily astronomy correction for this set.",
          "const": "source_daily_utc_noon"
        },
        "source": {
          "description": "e.g. gesla-fit, noaa, kartverket.",
          "type": "string",
          "pattern": "^[a-z0-9-]+$(?![\\s\\S])"
        },
        "source_type": {
          "description": "official: constants published by the agency that runs the gauge; gauge: an OTC fit to gauge observations; analysis: constants published by a third party from gauge observations: not the gauge operator, not an OTC fit; model: interpolated from a global tide model or deterministically derived from explicitly identified parent tidal models. A station's recommended set ranks non-fallbacks first, then source types in this order.",
          "enum": [
            "official",
            "gauge",
            "analysis",
            "model"
          ]
        },
        "quantity": {
          "description": "What the constants predict. A station's kind comes from its recommended set, or from its reference station's recommended set if it is subordinate.",
          "enum": [
            "water_level",
            "current"
          ]
        },
        "source_record_id": {
          "type": "string"
        },
        "source_version": {
          "type": "string"
        },
        "record_span": {
          "type": "object",
          "required": [
            "start",
            "end"
          ],
          "additionalProperties": false,
          "properties": {
            "start": {
              "type": "string",
              "format": "date-time"
            },
            "end": {
              "type": "string",
              "format": "date-time"
            },
            "good_samples": {
              "type": "integer",
              "minimum": 0
            },
            "good_hours": {
              "description": "Hours of good data in the record, after quality control. Required on every gauge set; an analysis set has it when its publisher states it. This is the record length that decides which constituents can be fitted, whether constants are fitted at all, and how a set ranks. start and end give the span.",
              "type": "number",
              "minimum": 0
            }
          }
        },
        "datum": {
          "description": "A constant set's levels. Methods subordinate_offsets and subordinate_offset_zero are for subordinate_offsets.datum only.",
          "allOf": [
            {
              "$ref": "#/$defs/datum"
            },
            {
              "properties": {
                "basis": {
                  "additionalProperties": {
                    "properties": {
                      "method": {
                        "not": {
                          "enum": [
                            "subordinate_offsets",
                            "subordinate_offset_zero"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          ]
        },
        "convention_id": {
          "type": "string",
          "minLength": 1
        },
        "licence_id": {
          "type": "string",
          "minLength": 1
        },
        "qc_status": {
          "description": "ok: constants are published and qc_flags is empty. flagged: constants are published and qc_flags says what to know about them. no_constants: the set is listed but no constants were fitted; no_constants_reason says why, and qc_flags has at least one flag. No status marks a record as removed: every record stays listed. A disputed third-party analysis is retained only with a matching labelled fallback. A set carried over from an earlier release has the carried_over flag and provenance.carried_from_release.",
          "enum": [
            "ok",
            "flagged",
            "no_constants"
          ]
        },
        "qc_flags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/qc_flag"
          },
          "not": {
            "contains": {
              "required": [
                "flag"
              ],
              "properties": {
                "flag": {
                  "const": "fallback:historical_offsets"
                }
              }
            }
          }
        },
        "fallback": {
          "allOf": [
            {
              "$ref": "#/$defs/fallback"
            },
            {
              "properties": {
                "reason": {
                  "not": {
                    "const": "historical_offsets"
                  }
                }
              }
            }
          ]
        },
        "time_base": {
          "$ref": "#/$defs/time_base_annotation"
        },
        "record_issues": {
          "description": "What is wrong with a broken record. The set stays listed. When a usable segment exists, fit_segment names it and the constants are fitted to it; when none exists, qc_status is no_constants.",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/record_issue"
          }
        },
        "fit_segment": {
          "description": "The part of a broken record that the constants are fitted to. Absent when the whole record is fitted.",
          "type": "object",
          "required": [
            "start",
            "end"
          ],
          "additionalProperties": false,
          "properties": {
            "start": {
              "type": "string",
              "format": "date-time"
            },
            "end": {
              "type": "string",
              "format": "date-time"
            },
            "reason": {
              "type": "string",
              "pattern": "\\S"
            }
          }
        },
        "expected_accuracy": {
          "$ref": "#/$defs/expected_accuracy"
        },
        "no_constants_reason": {
          "description": "Only with qc_status no_constants. too_short: less than about 15 days of good data (needs the short_record flag). fit_unusable: the record is broken and no segment gives a usable fit; record_issues says what is wrong.",
          "enum": [
            "too_short",
            "fit_unusable"
          ]
        },
        "constituents": {
          "description": "Water-level constituents. Empty for a current set, whose constants are in current_bins, and for a no_constants set.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/constituent"
          }
        },
        "current_bins": {
          "description": "Current sets only: tidal-current ellipse constants, one entry per depth bin.",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/current_bin"
          }
        },
        "dropped_constituents": {
          "description": "Constituents left out of this set, each with its reason. For a short record these are the constituents the record is too short to separate (rayleigh).",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "dropped_reason"
            ],
            "additionalProperties": false,
            "properties": {
              "name": {
                "$ref": "#/$defs/constituent_name"
              },
              "dropped_reason": {
                "enum": [
                  "rayleigh",
                  "noise",
                  "long_period_rule",
                  "non_tidal_rule",
                  "convention",
                  "other"
                ]
              },
              "not_separable_from": {
                "description": "With dropped_reason rayleigh: the kept constituent that the record is too short to separate this one from, e.g. K1 for P1.",
                "$ref": "#/$defs/constituent_name"
              },
              "detail": {
                "type": "string"
              }
            },
            "if": {
              "properties": {
                "dropped_reason": {
                  "const": "rayleigh"
                }
              }
            },
            "then": {
              "required": [
                "not_separable_from"
              ]
            },
            "else": {
              "not": {
                "required": [
                  "not_separable_from"
                ]
              }
            }
          }
        },
        "provenance": {
          "$ref": "#/$defs/provenance"
        }
      },
      "dependentRequired": {
        "fit_segment": [
          "record_issues"
        ]
      },
      "allOf": [
        {
          "description": "A retained fallback is flagged and keeps its matching reason flag.",
          "if": {
            "required": [
              "fallback"
            ]
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_status": {
                "const": "flagged"
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "time_base_disputed"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:time_base_disputed"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:time_base_disputed"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "time_base_disputed"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "time_base_unresolved"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:time_base_unresolved"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:time_base_unresolved"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "time_base_unresolved"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "refused_fit"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:refused_fit"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:refused_fit"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "refused_fit"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "short_record_uncalibrated"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:short_record_uncalibrated"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:short_record_uncalibrated"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "short_record_uncalibrated"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "short_record_long_period"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:short_record_long_period"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:short_record_long_period"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "short_record_long_period"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "published_full_list"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:published_full_list"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:published_full_list"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "published_full_list"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "reliability_withheld"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:reliability_withheld"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:reliability_withheld"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "reliability_withheld"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "licence_reading"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:licence_reading"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:licence_reading"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "if": {
              "properties": {
                "licence_id": {
                  "not": {
                    "const": "ticon-4-chs-restricted"
                  }
                }
              }
            },
            "then": {
              "properties": {
                "fallback": {
                  "required": [
                    "reason"
                  ],
                  "properties": {
                    "reason": {
                      "const": "licence_reading"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "datum_gate_failed"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:datum_gate_failed"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:datum_gate_failed"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "datum_gate_failed"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "not_in_otc_input"
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:not_in_otc_input"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:not_in_otc_input"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "fallback"
            ],
            "properties": {
              "fallback": {
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "const": "not_in_otc_input"
                  }
                }
              }
            }
          }
        },
        {
          "description": "A current set has current_bins (unless no_constants) and no water-level constituents; a water-level set has no current_bins.",
          "if": {
            "properties": {
              "quantity": {
                "const": "current"
              }
            }
          },
          "then": {
            "properties": {
              "constituents": {
                "maxItems": 0
              }
            },
            "if": {
              "properties": {
                "qc_status": {
                  "const": "no_constants"
                }
              }
            },
            "then": {
              "not": {
                "required": [
                  "current_bins"
                ]
              }
            },
            "else": {
              "required": [
                "current_bins"
              ]
            }
          },
          "else": {
            "not": {
              "required": [
                "current_bins"
              ]
            }
          }
        },
        {
          "description": "Every gauge set (an OTC fit) carries a time-base annotation and its hours of good data.",
          "if": {
            "properties": {
              "source_type": {
                "const": "gauge"
              }
            }
          },
          "then": {
            "required": [
              "time_base",
              "record_span"
            ],
            "properties": {
              "record_span": {
                "required": [
                  "good_hours"
                ]
              }
            }
          }
        },
        {
          "description": "Every analysis set carries the annotation of OTC's time-base audit of the same gauge record. A disputed time base remains flagged. A TICON publication-licence fallback can preserve its disputed clock annotation alongside the primary rights label.",
          "if": {
            "properties": {
              "source_type": {
                "const": "analysis"
              }
            }
          },
          "then": {
            "required": [
              "time_base"
            ],
            "allOf": [
              {
                "if": {
                  "required": [
                    "time_base"
                  ],
                  "properties": {
                    "time_base": {
                      "required": [
                        "code"
                      ],
                      "properties": {
                        "code": {
                          "const": "disputed"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "required": [
                    "fallback"
                  ],
                  "properties": {
                    "fallback": {
                      "properties": {
                        "reason": {
                          "enum": [
                            "time_base_disputed",
                            "time_base_unresolved",
                            "reliability_withheld",
                            "licence_reading"
                          ]
                        }
                      }
                    }
                  },
                  "if": {
                    "properties": {
                      "fallback": {
                        "properties": {
                          "reason": {
                            "const": "licence_reading"
                          }
                        }
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "licence_id": {
                        "$ref": "#/$defs/ticon_publication_licence_id"
                      },
                      "qc_flags": {
                        "contains": {
                          "required": ["flag"],
                          "properties": { "flag": { "const": "time_base" } }
                        }
                      }
                    }
                  }
                }
              }
            ],
            "if": {
              "properties": {
                "time_base": {
                  "required": [
                    "code"
                  ],
                  "properties": {
                    "code": {
                      "const": "corrected"
                    }
                  }
                }
              }
            },
            "then": {
              "required": [
                "provenance"
              ],
              "properties": {
                "provenance": {
                  "required": [
                    "modified"
                  ]
                }
              }
            },
            "else": {
              "properties": {
                "provenance": {
                  "not": {
                    "required": [
                      "modified"
                    ]
                  }
                }
              }
            }
          },
          "else": {
            "properties": {
              "provenance": {
                "not": {
                  "required": [
                    "modified"
                  ]
                }
              }
            }
          }
        },
        {
          "description": "TICON-4 supplies analysis sets and GESLA fits are gauge sets. The original TICON BODC and CMEMS restrictions keep their scientific fallback rules. TICON publication-licence readings require their own fallback label.",
          "allOf": [
            {
              "if": {
                "properties": {
                  "source": {
                    "const": "ticon-4"
                  }
                },
                "required": [
                  "source"
                ]
              },
              "then": {
                "properties": {
                  "source_type": {
                    "const": "analysis"
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "source": {
                    "const": "ticon-4"
                  }
                },
                "required": [
                  "source"
                ]
              },
              "then": {
                "properties": {
                  "licence_id": {
                    "anyOf": [
                      {
                        "enum": [
                          "ticon-4",
                          "ticon-4-bodc-restricted",
                          "ticon-4-cmems-restricted",
                          "ticon-4-chs-restricted"
                        ]
                      },
                      {
                        "$ref": "#/$defs/ticon_publication_licence_id"
                      }
                    ]
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "licence_id": {
                    "anyOf": [
                      {
                        "enum": [
                          "ticon-4",
                          "ticon-4-bodc-restricted",
                          "ticon-4-cmems-restricted",
                          "ticon-4-chs-restricted"
                        ]
                      },
                      {
                        "$ref": "#/$defs/ticon_publication_licence_id"
                      }
                    ]
                  }
                },
                "required": [
                  "licence_id"
                ]
              },
              "then": {
                "required": [
                  "source"
                ],
                "properties": {
                  "source": {
                    "const": "ticon-4"
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "licence_id": { "$ref": "#/$defs/ticon_publication_licence_id" }
                },
                "required": ["licence_id"]
              },
              "then": {
                "required": ["fallback"],
                "properties": {
                  "fallback": {
                    "properties": { "reason": { "const": "licence_reading" } }
                  }
                }
              }
            },
            {
              "if": {
                "required": [
                  "licence_id"
                ],
                "properties": {
                  "licence_id": {
                    "enum": [
                      "ticon-4-bodc-restricted",
                      "ticon-4-cmems-restricted"
                    ]
                  }
                }
              },
              "then": {
                "required": [
                  "fallback"
                ],
                "if": {
                  "required": [
                    "time_base"
                  ],
                  "properties": {
                    "time_base": {
                      "required": [
                        "code"
                      ],
                      "properties": {
                        "code": {
                          "const": "disputed"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "properties": {
                    "fallback": {
                      "properties": {
                        "reason": {
                          "const": "time_base_disputed"
                        }
                      }
                    }
                  }
                },
                "else": {
                  "properties": {
                    "fallback": {
                      "properties": {
                        "reason": {
                          "const": "licence_reading"
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "source": {
                    "const": "gesla-fit"
                  }
                },
                "required": [
                  "source"
                ]
              },
              "then": {
                "properties": {
                  "source_type": {
                    "const": "gauge"
                  }
                }
              }
            }
          ]
        },
        {
          "description": "ok: constants and no flags.",
          "if": {
            "properties": {
              "qc_status": {
                "const": "ok"
              }
            }
          },
          "then": {
            "properties": {
              "qc_flags": {
                "maxItems": 0
              }
            }
          }
        },
        {
          "description": "flagged: constants and at least one flag.",
          "if": {
            "properties": {
              "qc_status": {
                "const": "flagged"
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "minItems": 1
              }
            }
          }
        },
        {
          "description": "A water-level set with qc_status ok or flagged has constants.",
          "if": {
            "properties": {
              "quantity": {
                "const": "water_level"
              },
              "qc_status": {
                "enum": [
                  "ok",
                  "flagged"
                ]
              }
            },
            "required": [
              "quantity",
              "qc_status"
            ]
          },
          "then": {
            "properties": {
              "constituents": {
                "minItems": 1
              }
            }
          }
        },
        {
          "description": "fit_unusable needs record_issues to say what is wrong.",
          "if": {
            "properties": {
              "no_constants_reason": {
                "const": "fit_unusable"
              }
            },
            "required": [
              "no_constants_reason"
            ]
          },
          "then": {
            "required": [
              "record_issues"
            ]
          }
        },
        {
          "description": "too_short is a short record: it has the short_record flag, which brings in good_hours.",
          "if": {
            "properties": {
              "no_constants_reason": {
                "const": "too_short"
              }
            },
            "required": [
              "no_constants_reason"
            ]
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "short_record"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "description": "record_issues and the broken_record flag go together.",
          "if": {
            "required": [
              "record_issues"
            ]
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "broken_record"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "broken_record"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "record_issues"
            ]
          }
        },
        {
          "description": "A short record retains good_hours and dropped-constituent evidence. Expected accuracy is required unless no constants were fitted or it is labelled short_record_uncalibrated.",
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "short_record"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "record_span"
            ],
            "properties": {
              "record_span": {
                "required": [
                  "good_hours"
                ]
              }
            },
            "if": {
              "properties": {
                "qc_status": {
                  "const": "no_constants"
                }
              }
            },
            "else": {
              "required": [
                "dropped_constituents"
              ],
              "properties": {
                "dropped_constituents": {
                  "minItems": 1
                }
              },
              "if": {
                "required": [
                  "fallback"
                ],
                "properties": {
                  "fallback": {
                    "properties": {
                      "reason": {
                        "const": "short_record_uncalibrated"
                      }
                    }
                  }
                }
              },
              "else": {
                "required": [
                  "expected_accuracy"
                ]
              }
            }
          }
        },
        {
          "description": "An unverified or disputed time base is flagged, so the set is never ok.",
          "if": {
            "required": [
              "time_base"
            ],
            "properties": {
              "time_base": {
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "enum": [
                      "unverified",
                      "disputed"
                    ]
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_status": {
                "not": {
                  "const": "ok"
                }
              },
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "time_base"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "description": "A time_base flag means the set's time base is unverified or disputed.",
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "time_base"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "time_base"
            ],
            "properties": {
              "time_base": {
                "properties": {
                  "code": {
                    "enum": [
                      "unverified",
                      "disputed"
                    ]
                  }
                }
              }
            }
          }
        },
        {
          "description": "A source_quality_note flag is only on an analysis set.",
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "source_quality_note"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "required": [
              "source_type"
            ],
            "properties": {
              "source_type": {
                "const": "analysis"
              }
            }
          }
        },
        {
          "description": "A carried-over set has the carried_over flag, and the flag has the release it came from. A gate fallback is a carry-over.",
          "if": {
            "required": [
              "provenance"
            ],
            "properties": {
              "provenance": {
                "required": [
                  "carried_from_release"
                ]
              }
            }
          },
          "then": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "carried_over"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "qc_flags"
            ],
            "properties": {
              "qc_flags": {
                "contains": {
                  "properties": {
                    "flag": {
                      "const": "carried_over"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "properties": {
              "provenance": {
                "required": [
                  "carried_from_release"
                ]
              }
            }
          }
        },
        {
          "description": "The LINZ provenance keys only on a linz set.",
          "if": {
            "properties": {
              "source": {
                "not": {
                  "const": "linz"
                }
              }
            }
          },
          "then": {
            "properties": {
              "provenance": {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "member"
                      ]
                    },
                    {
                      "required": [
                        "position"
                      ]
                    },
                    {
                      "required": [
                        "header_dropped"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      ]
    },
    "time_base_label": {
      "description": "A time-base class: utc_instant; utc_mean_start60 (hourly means stamped at the start of the hour); utc_plus_N or utc_minus_N (UTC plus or minus N whole hours); local_dst:<IANA zone> (local time with daylight saving); step:<date>[,<date>...] (the time base changes at each date). utc_filtered_as_published: filtered observations with explicit UTC timestamps kept as published; effective response, centering and delay are unknown. It implies no physical instantaneous response, timestamp shift or inverse-response correction.",
      "type": "string",
      "pattern": "^(utc_instant|utc_filtered_as_published|utc_mean_start60|utc_(plus|minus)_[1-9][0-9]?|local_dst:[A-Z][A-Za-z_]+(/[A-Za-z0-9_+-]+)+|step:[0-9]{4}-[0-9]{2}-[0-9]{2}(,[0-9]{4}-[0-9]{2}-[0-9]{2})*)$(?![\\s\\S])"
    },
    "time_base_annotation": {
      "description": "The time-base annotation of the record behind a set. On an analysis set, it is OTC's audit of the same record, and corrected means that OTC applied the correction to the publisher's phases. verified: the evidence confirms the declared time base. corrected: the evidence shows another class, and the constants are fitted after the correction; this needs positive evidence. unverified: no comparator gives a verdict, so the declared time base (GESLA's, for a GESLA record) is kept. disputed: the evidence disagrees with the declared time base but no class explains it, so the declared time base is kept. For utc_filtered_as_published, declared and published both classify the documented source product, not a token supplied by its publisher. Use unverified, retain the time_base flag and unknown response/sample quality in source metadata, and omit correction and invented comparator evidence. This class creates no verified verdict, utc_instant audit or sampling_corrected stamp.",
      "type": "object",
      "required": [
        "code",
        "declared",
        "published"
      ],
      "additionalProperties": false,
      "properties": {
        "code": {
          "enum": [
            "verified",
            "corrected",
            "unverified",
            "disputed"
          ]
        },
        "declared": {
          "description": "The time base the source declares for the record. For utc_filtered_as_published, OTC classifies the documented source product without claiming the publisher uses this token.",
          "$ref": "#/$defs/time_base_label"
        },
        "published": {
          "description": "The time base the constants were fitted with: declared, unless code is corrected.",
          "$ref": "#/$defs/time_base_label"
        },
        "correction": {
          "description": "Only with code corrected: the correction applied, from the declared time base to the published one.",
          "type": "object",
          "required": [
            "from",
            "to"
          ],
          "additionalProperties": false,
          "properties": {
            "from": {
              "$ref": "#/$defs/time_base_label"
            },
            "to": {
              "$ref": "#/$defs/time_base_label"
            }
          }
        },
        "months_dropped": {
          "description": "Isolated bad months left out of the fit (YYYY-MM). A field of the annotation, not a time-base class: it goes with any code.",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$(?![\\s\\S])"
          }
        },
        "evidence": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/time_base_evidence"
          }
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "code": {
                "const": "corrected"
              }
            }
          },
          "then": {
            "required": [
              "correction"
            ]
          },
          "else": {
            "not": {
              "required": [
                "correction"
              ]
            }
          }
        }
      ],
      "x-private-process-fields": [
        "decided_build_commit",
        "decided_in",
        "reason"
      ]
    },
    "time_base_evidence": {
      "description": "One comparison behind a time-base annotation. comparator_kind: official_predictions (an agency's predictions near the gauge), official_constants (e.g. NOAA harmonic constants for a NOAA record), sibling_record (another record at the same gauge from a different contributor, after its own correction), provider (the verdict of other records from the same provider), model (a global tide model, e.g. EOT20), served_constants (constants already served for the location), dst_selftest (the record's own daylight-saving test).",
      "type": "object",
      "required": [
        "comparator_kind",
        "comparator_id"
      ],
      "additionalProperties": false,
      "properties": {
        "comparator_kind": {
          "enum": [
            "official_predictions",
            "official_constants",
            "sibling_record",
            "provider",
            "model",
            "served_constants",
            "dst_selftest"
          ]
        },
        "comparator_id": {
          "description": "e.g. kartverket:EXA, a GESLA file id, eot20. For dst_selftest, the record's own id.",
          "type": "string",
          "minLength": 1
        },
        "distance_km": {
          "description": "Distance from the gauge to the comparator, or null where it has none (a self-test).",
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "lag_min": {
          "description": "The measured lag or offset in minutes: the record's time stamp of an event minus the comparator's time of the same event. Negative when the record's stamps are early. An hourly mean stamped at the start of its hour is about -30, and its correction moves the stamps by +30 min.",
          "type": "number"
        }
      },
      "x-private-process-fields": [
        "detail"
      ]
    },
    "record_issue": {
      "description": "One thing wrong with a record. start and end give where it is (a step has only start).",
      "type": "object",
      "required": [
        "issue"
      ],
      "additionalProperties": false,
      "properties": {
        "issue": {
          "enum": [
            "datum_step",
            "flatline",
            "spikes",
            "gaps",
            "clock_step",
            "quantised",
            "out_of_range",
            "unstable_constituents",
            "neighbour_disagreement",
            "no_tide"
          ]
        },
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        },
        "values": {
          "$ref": "#/$defs/numeric_record_values"
        }
      },
      "x-private-process-fields": [
        "reason"
      ],
      "allOf": [
        {
          "if": {
            "properties": {
              "issue": {
                "const": "datum_step"
              }
            },
            "required": [
              "issue"
            ]
          },
          "else": {
            "properties": {
              "values": {
                "not": {
                  "required": [
                    "step_m"
                  ]
                }
              }
            }
          }
        }
      ]
    },
    "expected_accuracy": {
      "description": "How accurate a short record's constants are expected to be, measured by cutting long records down to the same length (cut_to_days) and comparing their fits with the full-length fits. Give the amplitude and phase uncertainty, or the expected prediction error, or both.",
      "type": "object",
      "required": [
        "cut_to_days",
        "calibration_records"
      ],
      "additionalProperties": false,
      "properties": {
        "cut_to_days": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "calibration_records": {
          "description": "How many long records were cut down.",
          "type": "integer",
          "minimum": 1
        },
        "amp_uncertainty_m": {
          "description": "Expected amplitude error of the main constituents (median over the calibration records).",
          "type": "number",
          "minimum": 0
        },
        "phase_uncertainty_deg": {
          "description": "Expected phase error of the main constituents.",
          "type": "number",
          "minimum": 0
        },
        "time_mae_min": {
          "description": "Expected mean absolute error of high- and low-water times.",
          "type": "number",
          "minimum": 0
        },
        "height_mae_m": {
          "description": "Expected mean absolute error of high- and low-water heights.",
          "type": "number",
          "minimum": 0
        }
      },
      "anyOf": [
        {
          "required": [
            "amp_uncertainty_m",
            "phase_uncertainty_deg"
          ]
        },
        {
          "required": [
            "time_mae_min",
            "height_mae_m"
          ]
        }
      ],
      "x-closed-factual": true
    },
    "constituent": {
      "type": "object",
      "required": [
        "name",
        "speed_deg_per_hour",
        "amplitude_m",
        "phase_deg"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "$ref": "#/$defs/constituent_name"
        },
        "source_name": {
          "description": "The source's own name. At most 31 characters, so that a C reader can hold it in char[32].",
          "type": "string",
          "maxLength": 31
        },
        "doodson": {
          "type": "string",
          "pattern": "^[0-9]{3} ?[0-9]{3}$(?![\\s\\S])"
        },
        "speed_deg_per_hour": {
          "type": "number",
          "minimum": 0
        },
        "amplitude_m": {
          "type": "number",
          "minimum": 0
        },
        "phase_deg": {
          "description": "Greenwich phase lag g.",
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 360
        },
        "amp_uncertainty_m": {
          "type": "number",
          "minimum": 0
        },
        "phase_uncertainty_deg": {
          "type": "number",
          "minimum": 0
        },
        "kept_reason": {
          "type": "string"
        },
        "noise_m": {
          "type": "number"
        },
        "uncertainty_basis": {
          "type": "string"
        }
      }
    },
    "current_depth_type": {
      "description": "How depth_m is measured: below_surface (NOAA depthType S), below_chart_datum (NOAA depthType B, which NOAA's metadata API documents as 'below chart datum') or unknown (NOAA depthType U).",
      "enum": [
        "below_surface",
        "below_chart_datum",
        "unknown"
      ]
    },
    "direction_deg": {
      "description": "Degrees true, clockwise from north.",
      "type": "number",
      "minimum": 0,
      "exclusiveMaximum": 360
    },
    "current_bin": {
      "description": "Ellipse constants for one depth bin: per constituent, the amplitude and phase of the current along the major axis (azimuth_deg) and along the minor axis, perpendicular to it, as NOAA harcon gives them. Minor-axis velocity is positive toward `azimuth_deg + 90°`, that is, 90° clockwise from the positive major-axis direction (measured against NOAA `speed_dir` predictions).",
      "type": "object",
      "required": [
        "bin",
        "depth_m",
        "depth_type",
        "azimuth_deg",
        "constituents"
      ],
      "additionalProperties": false,
      "properties": {
        "bin": {
          "description": "Source bin number (NOAA binNbr).",
          "type": "integer",
          "minimum": 1
        },
        "depth_m": {
          "description": "Bin depth in metres, or null if the source gives none.",
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "depth_type": {
          "$ref": "#/$defs/current_depth_type"
        },
        "azimuth_deg": {
          "description": "Major-axis direction (NOAA azi).",
          "$ref": "#/$defs/direction_deg"
        },
        "mean_flood_dir_deg": {
          "$ref": "#/$defs/direction_deg"
        },
        "mean_ebb_dir_deg": {
          "$ref": "#/$defs/direction_deg"
        },
        "mean_major_ms": {
          "description": "Mean current along the major axis in metres per second, signed: positive toward azimuth_deg. A constant added to the major-axis harmonic sum at every time. NOAA majorMeanSpeed (cm/s) divided by 100. Absent if the source gives none; a reader then adds 0.",
          "type": "number"
        },
        "mean_minor_ms": {
          "description": "Mean current along the minor axis in metres per second, signed in the same sense as the minor-axis harmonic terms. A constant added to the minor-axis harmonic sum at every time. NOAA minorMeanSpeed (cm/s) divided by 100. Absent if the source gives none; a reader then adds 0.",
          "type": "number"
        },
        "constituents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/current_constituent"
          }
        }
      }
    },
    "current_constituent": {
      "description": "One constituent of a current bin. Amplitudes in metres per second (NOAA cm/s divided by 100). Phases are Greenwich phase lags under the set's convention (NOAA majorPhaseGMT and minorPhaseGMT). The mean current is not a constituent: it goes in the bin's mean_major_ms and mean_minor_ms, so the name Z0 is not allowed here.",
      "type": "object",
      "required": [
        "name",
        "speed_deg_per_hour",
        "major_amplitude_ms",
        "major_phase_deg",
        "minor_amplitude_ms",
        "minor_phase_deg"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "allOf": [
            {
              "$ref": "#/$defs/constituent_name"
            },
            {
              "not": {
                "const": "Z0"
              }
            }
          ]
        },
        "source_name": {
          "description": "The source's own name. At most 31 characters, so that a C reader can hold it in char[32].",
          "type": "string",
          "maxLength": 31
        },
        "speed_deg_per_hour": {
          "description": "Constituent speed, as in the constituent table.",
          "type": "number",
          "minimum": 0
        },
        "major_amplitude_ms": {
          "type": "number",
          "minimum": 0
        },
        "major_phase_deg": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 360
        },
        "minor_amplitude_ms": {
          "type": "number",
          "minimum": 0
        },
        "minor_phase_deg": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 360
        }
      }
    },
    "current_offset": {
      "description": "Offsets for one bin of a subordinate current station. Time adjustments in minutes, added to the reference bin's event times; amplitude ratios multiply the reference bin's speeds. A value the source gives as null stays null.",
      "type": "object",
      "required": [
        "bin",
        "reference_station_id",
        "reference_bin",
        "time_adj_max_flood_min",
        "time_adj_slack_before_ebb_min",
        "time_adj_max_ebb_min",
        "time_adj_slack_before_flood_min",
        "flood_amp_ratio",
        "ebb_amp_ratio"
      ],
      "additionalProperties": false,
      "properties": {
        "bin": {
          "description": "Bin number of this station (the _N suffix of the NOAA id).",
          "type": "integer",
          "minimum": 1
        },
        "depth_m": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "depth_type": {
          "$ref": "#/$defs/current_depth_type"
        },
        "reference_station_id": {
          "type": "string",
          "pattern": "^OTC-[A-Za-z0-9_-]+$(?![\\s\\S])"
        },
        "reference_bin": {
          "description": "NOAA refStationBin.",
          "type": "integer",
          "minimum": 1
        },
        "mean_flood_dir_deg": {
          "$ref": "#/$defs/direction_deg"
        },
        "mean_ebb_dir_deg": {
          "$ref": "#/$defs/direction_deg"
        },
        "time_adj_max_flood_min": {
          "description": "NOAA mfcTimeAdjMin.",
          "type": [
            "number",
            "null"
          ]
        },
        "time_adj_slack_before_ebb_min": {
          "description": "NOAA sbeTimeAdjMin.",
          "type": [
            "number",
            "null"
          ]
        },
        "time_adj_max_ebb_min": {
          "description": "NOAA mecTimeAdjMin.",
          "type": [
            "number",
            "null"
          ]
        },
        "time_adj_slack_before_flood_min": {
          "description": "NOAA sbfTimeAdjMin.",
          "type": [
            "number",
            "null"
          ]
        },
        "flood_amp_ratio": {
          "description": "NOAA mfcAmpAdj.",
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "ebb_amp_ratio": {
          "description": "NOAA mecAmpAdj.",
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "licence_id": {
          "type": "string"
        }
      }
    },
    "qc_flag": {
      "description": "Something a user of the set needs to know. time_base: the time base is unverified or disputed (see the set's time_base). broken_record: see record_issues. short_record: the record is too short to resolve every candidate constituent; see record_span.good_hours, dropped_constituents and expected_accuracy. carried_over: the source failed a check in this build, so the set keeps its constants from provenance.carried_from_release. source_quality_note: on an analysis set only, a quality note that its publisher gives with the constants, for example a high share of missing data; values holds the publisher's numbers.",
      "type": "object",
      "required": [
        "flag"
      ],
      "additionalProperties": false,
      "properties": {
        "flag": {
          "enum": [
            "time_base",
            "broken_record",
            "microtidal",
            "non_tidal_signal",
            "short_record",
            "sibling_disagreement",
            "carried_over",
            "source_quality_note",
            "fallback:time_base_disputed",
            "fallback:time_base_unresolved",
            "fallback:refused_fit",
            "fallback:short_record_uncalibrated",
            "fallback:short_record_long_period",
            "fallback:published_full_list",
            "fallback:reliability_withheld",
            "fallback:licence_reading",
            "fallback:datum_gate_failed",
            "fallback:not_in_otc_input",
            "fallback:historical_offsets"
          ]
        },
        "values": {
          "$ref": "#/$defs/numeric_qc_values"
        },
        "calibration_inputs": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "required": [
            "M2"
          ],
          "description": "Values supplied by the calibration input; not validated accuracy.",
          "properties": {
            "M2": {
              "type": "object",
              "additionalProperties": false,
              "x-closed-factual": true,
              "required": [
                "amp_error_m",
                "phase_error_deg",
                "accuracy_claimed"
              ],
              "properties": {
                "amp_error_m": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0
                },
                "phase_error_deg": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0
                },
                "accuracy_claimed": {
                  "const": false
                }
              }
            }
          }
        }
      },
      "x-private-process-fields": [
        "reason"
      ],
      "allOf": [
        {
          "if": {
            "properties": {
              "flag": {
                "const": "short_record"
              }
            },
            "required": [
              "flag"
            ]
          },
          "else": {
            "not": {
              "required": [
                "calibration_inputs"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "flag": {
                "const": "source_quality_note"
              }
            },
            "required": [
              "flag"
            ]
          },
          "else": {
            "properties": {
              "values": {
                "not": {
                  "required": [
                    "missing_pct"
                  ]
                }
              }
            }
          }
        }
      ]
    },
    "provenance": {
      "description": "Scientific source lineage and source-declared modifications.",
      "type": "object",
      "required": [],
      "additionalProperties": false,
      "properties": {
        "derived_from_set_id": {
          "description": "Original set from which this set was derived.",
          "type": "string",
          "minLength": 1
        },
        "analysis_years": {
          "$ref": "#/$defs/analysis_years"
        },
        "phase_reference_longitude_deg": {
          "description": "JMA: the longitude whose local meridian the source phases refer to.",
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "jma_station_code": {
          "description": "JMA tide-table station code, e.g. TK.",
          "type": "string",
          "pattern": "^[A-Z0-9]{1,4}$(?![\\s\\S])"
        },
        "member": {
          "description": "LINZ: the *_Harm_* file in the LINZ zip that the set comes from.",
          "type": "string",
          "pattern": "\\S"
        },
        "header_dropped": {
          "description": "LINZ: which header fields were not used, and why.",
          "type": "string",
          "pattern": "\\S"
        },
        "position": {
          "$ref": "#/$defs/position"
        },
        "source_constituents_not_published": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/source_constituent"
          }
        },
        "modified": {
          "description": "Analysis sets only, and exactly when the set's time_base code is corrected: one line saying what OTC changed in the publisher's constants, for example the phases moved by the time-base correction. This is the indication of changes that a CC BY 4.0 licence asks for.",
          "type": "string",
          "pattern": "\\S"
        },
        "carried_from_release": {
          "description": "The datestamp of the earlier release whose constants this set keeps, because its source failed a check in this build. Goes with the carried_over flag.",
          "$ref": "#/$defs/datestamp"
        },
        "tcd_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "input_sha256": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/sha256"
          }
        },
        "adapter_version": {
          "type": "string"
        },
        "redistribution": {
          "type": "string"
        }
      },
      "x-closed-factual": true,
      "x-private-process-fields": [
        "build",
        "decision",
        "owner",
        "selection_reason"
      ]
    },
    "historical_offset_vintage": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "publication_year",
        "source_lifecycle",
        "removal_events",
        "current_validity",
        "current_accuracy",
        "reference_2020_equivalence"
      ],
      "properties": {
        "publication_year": {
          "const": 2020
        },
        "source_lifecycle": {
          "const": "retired"
        },
        "removal_events": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "source_clock_timestamp",
              "name",
              "operation",
              "source_timezone",
              "evidence_sha256"
            ],
            "properties": {
              "source_clock_timestamp": {
                "type": "string",
                "pattern": "^2026-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$(?![\\s\\S])"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              },
              "operation": {
                "const": "Removed"
              },
              "source_timezone": {
                "const": null
              },
              "evidence_sha256": {
                "$ref": "#/$defs/sha256"
              }
            }
          }
        },
        "current_validity": {
          "const": "unestablished"
        },
        "current_accuracy": {
          "const": "unverified"
        },
        "reference_2020_equivalence": {
          "enum": [
            "not_checked",
            "matched_at_publisher_precision",
            "disagrees"
          ]
        },
        "reference_2020_equivalence_sha256": {
          "$ref": "#/$defs/sha256"
        }
      },
      "description": "Retired original2020 profile, not a current-accuracy claim. Source-clock removal strings have no declared timezone. Book agreement is informational.",
      "allOf": [
        {
          "if": {
            "required": [
              "reference_2020_equivalence"
            ],
            "properties": {
              "reference_2020_equivalence": {
                "const": "not_checked"
              }
            }
          },
          "then": {
            "not": {
              "required": [
                "reference_2020_equivalence_sha256"
              ]
            }
          },
          "else": {
            "required": [
              "reference_2020_equivalence_sha256"
            ]
          }
        }
      ]
    },
    "historical_offset_provenance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source_manifest_sha256",
        "input_sha256",
        "book",
        "annual_table_row",
        "printed_page",
        "pdf_page",
        "raw_row_text",
        "raw_values_json",
        "id_crosswalk",
        "reference_binding"
      ],
      "properties": {
        "source_manifest_sha256": {
          "const": "667eec5b3fd25f99d46f24864766726094961d7db5fa104ca12450f3ecd0fdf7"
        },
        "input_sha256": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/sha256"
          }
        },
        "book": {
          "enum": [
            "atlantic",
            "pacific"
          ]
        },
        "annual_table_row": {
          "type": "integer",
          "minimum": 1
        },
        "printed_page": {
          "type": "integer",
          "minimum": 1
        },
        "pdf_page": {
          "type": "integer",
          "minimum": 1
        },
        "raw_row_text": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "raw_values_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/historical_raw_values"
          }
        },
        "id_crosswalk": {
          "$ref": "#/$defs/historical_crosswalk"
        },
        "reference_binding": {
          "$ref": "#/$defs/reference_binding"
        }
      },
      "description": "Exact original book/row and retained raw fields. The acceptance report covers source input only; the separate comparison hash covers measured book equivalence.",
      "x-private-process-fields": [
        "acceptance_report_sha256"
      ]
    },
    "subordinate_offsets": {
      "type": "object",
      "required": [
        "reference_station_id",
        "height_adjusted_type"
      ],
      "additionalProperties": false,
      "properties": {
        "reference_station_id": {
          "type": "string",
          "pattern": "^OTC-[A-Za-z0-9_-]+$(?![\\s\\S])"
        },
        "time_offset_high_min": {
          "type": "number"
        },
        "time_offset_low_min": {
          "type": "number"
        },
        "height_offset_high": {
          "type": "number"
        },
        "height_offset_low": {
          "type": "number"
        },
        "height_adjusted_type": {
          "description": "R = ratio, A = additive (metres), as NOAA gives it.",
          "enum": [
            "R",
            "A"
          ]
        },
        "licence_id": {
          "type": "string"
        },
        "datum": {
          "description": "The subordinate station's own levels: the levels its source publishes for it (method source), LAT and HAT computed by the offsets (method subordinate_offsets), and the explicitly labelled algebraic offset zero (method subordinate_offset_zero). The offsets carry no constants or gauge record, so no other method is allowed here; a constant set of the same station has its own datum. Its zero is the subordinate station's chart datum as the offsets define it (for NOAA, the subordinate station's MLLW).",
          "allOf": [
            {
              "$ref": "#/$defs/datum"
            },
            {
              "properties": {
                "basis": {
                  "additionalProperties": {
                    "properties": {
                      "method": {
                        "enum": [
                          "source",
                          "subordinate_offsets",
                          "subordinate_offset_zero"
                        ]
                      }
                    }
                  }
                }
              }
            },
            {
              "description": "The algebraic offset zero is only MLLW = 0 in the explicit subordinate MLLW chart frame. Other retained levels keep their own methods.",
              "properties": {
                "basis": {
                  "patternProperties": {
                    "^(?!mllw$)": {
                      "properties": {
                        "method": {
                          "not": {
                            "const": "subordinate_offset_zero"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "if": {
                "required": [
                  "basis"
                ],
                "properties": {
                  "basis": {
                    "required": [
                      "mllw"
                    ],
                    "properties": {
                      "mllw": {
                        "required": [
                          "method"
                        ],
                        "properties": {
                          "method": {
                            "const": "subordinate_offset_zero"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "then": {
                "required": [
                  "zero",
                  "zero_name",
                  "chart_datum",
                  "named"
                ],
                "properties": {
                  "zero": {
                    "const": "chart_datum"
                  },
                  "zero_name": {
                    "const": "MLLW"
                  },
                  "chart_datum": {
                    "const": "mllw"
                  },
                  "named": {
                    "required": [
                      "mllw"
                    ],
                    "properties": {
                      "mllw": {
                        "const": 0.0
                      }
                    }
                  }
                }
              }
            }
          ]
        },
        "offset_id": {
          "enum": [
            "noaa-2020-atlantic-table2-2513",
            "noaa-2020-pacific-table2-517"
          ]
        },
        "source": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "source_type": {
          "description": "official: constants published by the agency that runs the gauge; gauge: an OTC fit to gauge observations; analysis: constants published by a third party from gauge observations: not the gauge operator, not an OTC fit; model: interpolated from a global tide model. A station's recommended set ranks non-fallbacks first, then source types in this order.",
          "enum": [
            "official",
            "gauge",
            "analysis",
            "model"
          ]
        },
        "source_version": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "source_record_id": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "qc_status": {
          "enum": [
            "ok",
            "flagged"
          ]
        },
        "qc_flags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/qc_flag"
          }
        },
        "fallback": {
          "$ref": "#/$defs/fallback"
        },
        "vintage": {
          "$ref": "#/$defs/historical_offset_vintage"
        },
        "provenance": {
          "$ref": "#/$defs/historical_offset_provenance"
        }
      },
      "allOf": [
        {
          "if": {
            "anyOf": [
              {
                "required": [
                  "offset_id"
                ]
              },
              {
                "required": [
                  "fallback"
                ],
                "properties": {
                  "fallback": {
                    "required": [
                      "reason"
                    ],
                    "properties": {
                      "reason": {
                        "const": "historical_offsets"
                      }
                    }
                  }
                }
              },
              {
                "required": [
                  "qc_flags"
                ],
                "properties": {
                  "qc_flags": {
                    "contains": {
                      "required": [
                        "flag"
                      ],
                      "properties": {
                        "flag": {
                          "const": "fallback:historical_offsets"
                        }
                      }
                    }
                  }
                }
              }
            ]
          },
          "then": {
            "required": [
              "offset_id",
              "source",
              "source_type",
              "source_version",
              "source_record_id",
              "licence_id",
              "qc_status",
              "qc_flags",
              "fallback",
              "vintage",
              "provenance",
              "datum",
              "time_offset_high_min",
              "time_offset_low_min",
              "height_offset_high",
              "height_offset_low"
            ],
            "properties": {
              "source": {
                "const": "noaa"
              },
              "source_type": {
                "const": "official"
              },
              "source_version": {
                "const": "annual-tide-tables-2020"
              },
              "licence_id": {
                "type": "string",
                "minLength": 1
              },
              "qc_status": {
                "const": "flagged"
              },
              "qc_flags": {
                "minItems": 1,
                "maxItems": 1,
                "contains": {
                  "required": [
                    "flag"
                  ],
                  "properties": {
                    "flag": {
                      "const": "fallback:historical_offsets"
                    }
                  }
                }
              },
              "fallback": {
                "properties": {
                  "reason": {
                    "const": "historical_offsets"
                  }
                },
                "not": {
                  "required": [
                    "preferred_set_id"
                  ]
                }
              },
              "datum": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "zero",
                  "chart_datum",
                  "named",
                  "basis"
                ],
                "properties": {
                  "zero": {
                    "const": "chart_datum"
                  },
                  "chart_datum": {
                    "const": "mllw"
                  },
                  "named": {
                    "const": {
                      "mllw": 0.0
                    }
                  },
                  "basis": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "mllw"
                    ],
                    "properties": {
                      "mllw": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "method",
                          "source_name"
                        ],
                        "properties": {
                          "kind": {
                            "const": "published"
                          },
                          "method": {
                            "const": "source"
                          },
                          "source_name": {
                            "const": "MLLW"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "offset_id"
            ],
            "properties": {
              "offset_id": {
                "const": "noaa-2020-atlantic-table2-2513"
              }
            }
          },
          "then": {
            "properties": {
              "height_adjusted_type": {
                "const": "R"
              },
              "time_offset_high_min": {
                "const": 4
              },
              "time_offset_low_min": {
                "const": 15
              },
              "height_offset_high": {
                "const": 0.84
              },
              "height_offset_low": {
                "const": 1.0
              },
              "reference_station_id": {
                "const": "OTC-a6c00a3f"
              },
              "source_record_id": {
                "const": "annual-tide-tables-2020/atlantic/Table2/2513"
              },
              "vintage": {
                "properties": {
                  "removal_events": {
                    "const": [
                      {
                        "source_clock_timestamp": "2026-02-18T14:09:46",
                        "name": "Lockwoods Folly Inlet (r)",
                        "operation": "Removed",
                        "source_timezone": null,
                        "evidence_sha256": "c100d0fbc5482ec24f5c99d912be73306bd2dea079690f08edc5f58a821bcd61"
                      }
                    ]
                  }
                }
              },
              "provenance": {
                "properties": {
                  "book": {
                    "const": "atlantic"
                  },
                  "annual_table_row": {
                    "const": 2513
                  },
                  "printed_page": {
                    "const": 345
                  },
                  "pdf_page": {
                    "const": 351
                  },
                  "raw_row_text": {
                    "const": "  2513     Lockwoods Folly Inlet . . . . . . . . . . . . . . . . . . . . . . .         33° 55'     78° 14'     +0 04      +0 15     *0.84     *1.00    4.2    4.8     2.3"
                  },
                  "id_crosswalk": {
                    "properties": {
                      "legacy_id": {
                        "const": "TEC2869"
                      }
                    }
                  },
                  "reference_binding": {
                    "properties": {
                      "noaa_id": {
                        "const": "8661070"
                      },
                      "station_id": {
                        "const": "OTC-a6c00a3f"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "offset_id"
            ],
            "properties": {
              "offset_id": {
                "const": "noaa-2020-pacific-table2-517"
              }
            }
          },
          "then": {
            "properties": {
              "height_adjusted_type": {
                "const": "A"
              },
              "time_offset_high_min": {
                "const": -35
              },
              "time_offset_low_min": {
                "const": -31
              },
              "height_offset_high": {
                "const": -0.06096
              },
              "height_offset_low": {
                "const": 0.0
              },
              "reference_station_id": {
                "const": "OTC-ee4593cd"
              },
              "source_record_id": {
                "const": "annual-tide-tables-2020/pacific/Table2/517"
              },
              "vintage": {
                "properties": {
                  "removal_events": {
                    "const": [
                      {
                        "source_clock_timestamp": "2026-02-18T14:09:50",
                        "name": "San Francisco Bar (r)",
                        "operation": "Removed",
                        "source_timezone": null,
                        "evidence_sha256": "c100d0fbc5482ec24f5c99d912be73306bd2dea079690f08edc5f58a821bcd61"
                      },
                      {
                        "source_clock_timestamp": "2026-07-06T11:17:37",
                        "name": "San Francisco Bar",
                        "operation": "Removed",
                        "source_timezone": null,
                        "evidence_sha256": "c100d0fbc5482ec24f5c99d912be73306bd2dea079690f08edc5f58a821bcd61"
                      }
                    ]
                  }
                }
              },
              "provenance": {
                "properties": {
                  "book": {
                    "const": "pacific"
                  },
                  "annual_table_row": {
                    "const": 517
                  },
                  "printed_page": {
                    "const": 284
                  },
                  "pdf_page": {
                    "const": 302
                  },
                  "raw_row_text": {
                    "const": "   517     San Francisco Bar . . . . . . . . . . . . . . . . . . . . . . . . .         37° 46'     122° 38'     -0 35       -0 31      -0.2        0.0    3.9    5.6     3.0"
                  },
                  "id_crosswalk": {
                    "properties": {
                      "legacy_id": {
                        "const": "TWC0509"
                      }
                    }
                  },
                  "reference_binding": {
                    "properties": {
                      "noaa_id": {
                        "const": "9414290"
                      },
                      "station_id": {
                        "const": "OTC-ee4593cd"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    },
    "datum": {
      "description": "Vertical reference of a constant set, or of a subordinate station's offsets. named holds levels in metres above the zero; basis says, for each level, how it was obtained: published by the source, computed from harmonic constants, or observed from the gauge record.",
      "type": "object",
      "additionalProperties": false,
      "dependentRequired": {
        "named": [
          "basis"
        ],
        "basis": [
          "named"
        ]
      },
      "properties": {
        "msl_offset_m": {
          "description": "The mean level (Z0) above the zero, in metres.",
          "type": "number"
        },
        "zero": {
          "description": "What the zero is. chart_datum: the source's chart datum (e.g. NOAA's MLLW, JMA's tide-table datum); gauge_zero: the gauge's own zero (GESLA fits, PEGELONLINE's PNP); vertical_datum: a national or survey height system such as NAP, RH 2000, N2000, DVR90, NN2000 or OD Malin; msl: mean sea level; harmonic_mean: the same set's explicit harmonic computational origin, not surveyed MSL, a gauge zero or an agency chart-datum tie; unknown: the source does not say. harmonic_mean has no msl_offset_m or publisher zero_name; a named height is the harmonic sum minus that named level.",
          "enum": [
            "chart_datum",
            "gauge_zero",
            "vertical_datum",
            "msl",
            "harmonic_mean",
            "unknown"
          ]
        },
        "zero_name": {
          "description": "The source's name for the zero, e.g. MLLW, STND, PNP, NAP, RH 2000, OD Malin.",
          "type": "string",
          "minLength": 1,
          "maxLength": 31
        },
        "chart_datum": {
          "description": "The key in named that is the chart datum, e.g. mllw, lat or tide_table_datum. Absent when there is none. Its basis says whether the agency published it or OTC computed or observed it. A computed or observed chart datum is written only where the station's chart-datum publisher publishes none at that station (build check 12, per station), so it never replaces a published one. chart_datum can name a level OTC computed or observed, so a reader checks basis[chart_datum].kind to tell it from the publisher's official chart datum.",
          "$ref": "#/$defs/datum_key"
        },
        "named": {
          "description": "Levels in metres above the zero (negative when below). One value per key.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/datum_key"
          },
          "additionalProperties": {
            "type": "number"
          }
        },
        "basis": {
          "description": "One entry per key of named, saying how that level was obtained. Required with named. The release build checks that basis and named have the same keys (build check 9).",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/datum_key"
          },
          "additionalProperties": {
            "$ref": "#/$defs/datum_basis"
          }
        }
      },
      "allOf": [
        {
          "if": {
            "required": [
              "zero"
            ],
            "properties": {
              "zero": {
                "const": "harmonic_mean"
              }
            }
          },
          "then": {
            "not": {
              "anyOf": [
                {
                  "required": [
                    "msl_offset_m"
                  ]
                },
                {
                  "required": [
                    "zero_name"
                  ]
                }
              ]
            }
          }
        },
        {
          "description": "An otc_ key is OTC's own value next to a published one, so it is never kind published. sampling_assumed is never on msl, mtl, dtl or their otc_ forms: they are means of heights. When low waters are cut off (truncated_lows, by the direct method or a first reduction), only high-water levels are given: a level by the direct method or with truncated_lows is mhw or mhhw (or otc_mhw, otc_mhhw). Keys reach this pattern only after datum_key has accepted them, so its $ needs no newline guard.",
          "properties": {
            "basis": {
              "patternProperties": {
                "^otc_": {
                  "properties": {
                    "kind": {
                      "enum": [
                        "computed",
                        "observed"
                      ]
                    }
                  }
                },
                "^(otc_)?(msl|mtl|dtl)$": {
                  "not": {
                    "required": [
                      "flags"
                    ],
                    "properties": {
                      "flags": {
                        "contains": {
                          "const": "sampling_assumed"
                        }
                      }
                    }
                  }
                },
                "^(?!(otc_)?(mhw|mhhw)$)": {
                  "not": {
                    "anyOf": [
                      {
                        "required": [
                          "method"
                        ],
                        "properties": {
                          "method": {
                            "const": "direct"
                          }
                        }
                      },
                      {
                        "required": [
                          "flags"
                        ],
                        "properties": {
                          "flags": {
                            "contains": {
                              "const": "truncated_lows"
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        {
          "description": "Lows from a cut-off record are never trusted: when any level of the datum carries truncated_lows, every basis key other than mhw, mhhw, hat, otc_mhw, otc_mhhw and otc_hat has kind published, so the datum's only computed or observed levels are those six and a published level of any key is kept; named has no other otc_ key (an otc_ key is never published). An unprefixed key in named with no basis entry is left to build check 9.",
          "if": {
            "required": [
              "basis"
            ],
            "properties": {
              "basis": {
                "not": {
                  "additionalProperties": {
                    "not": {
                      "required": [
                        "flags"
                      ],
                      "properties": {
                        "flags": {
                          "contains": {
                            "const": "truncated_lows"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "then": {
            "properties": {
              "basis": {
                "patternProperties": {
                  "^(?!(otc_)?(mhw|mhhw|hat)$)": {
                    "properties": {
                      "kind": {
                        "const": "published"
                      }
                    }
                  }
                }
              },
              "named": {
                "propertyNames": {
                  "not": {
                    "pattern": "^otc_(?!(mhw|mhhw|hat)$)"
                  }
                }
              }
            }
          }
        }
      ]
    },
    "datum_key": {
      "description": "A datum name: lower case, at most 31 characters (a C reader holds it in char[32]). mean_level, zero and chart are keywords in the SDKs' API and are not allowed. OTC's own levels use the canonical names lat, hat, msl, mtl, dtl, mhw, mlw, mhhw and mllw; a published level uses the canonical name when the source's definition is the same, and otherwise the source's name in lower case (mhws, stnd, navd88, nap, cd, tide_table_datum). Where a published level holds a canonical key, OTC's value for the same datum on the same set is otc_<key>, e.g. otc_lat next to NOAA's lat (build check 10).",
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,30}$(?![\\s\\S])",
      "not": {
        "enum": [
          "mean_level",
          "zero",
          "chart"
        ]
      }
    },
    "datum_date": {
      "description": "A calendar date YYYY-MM-DD. The release build also checks that it is a real date (no 2021-02-30; build check 13).",
      "type": "string",
      "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$(?![\\s\\S])"
    },
    "datum_period": {
      "description": "A period with inclusive ends. The release build checks start <= end (build check 13).",
      "type": "object",
      "required": [
        "start",
        "end"
      ],
      "additionalProperties": false,
      "properties": {
        "start": {
          "$ref": "#/$defs/datum_date"
        },
        "end": {
          "$ref": "#/$defs/datum_date"
        },
        "name": {
          "description": "e.g. NTDE 1983-2001, OTC 2002-2020, OTC LAT 2020-2038.",
          "type": "string",
          "minLength": 1
        }
      }
    },
    "datum_data_span": {
      "description": "The gauge data an observed level is reduced from: the first and last day, and how many calendar months contributed. The release build checks start <= end (build check 13).",
      "type": "object",
      "required": [
        "start",
        "end",
        "months"
      ],
      "additionalProperties": false,
      "properties": {
        "start": {
          "$ref": "#/$defs/datum_date"
        },
        "end": {
          "$ref": "#/$defs/datum_date"
        },
        "months": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "datum_basis": {
      "description": "How one datum level was obtained. kind published: given by the level's publisher (the source, or, for a chart datum in the Baltic and the Kattegat and at the Baltic gauge operators' gauges, the charting authority), unchanged except for units and zero. kind computed: from harmonic constants. kind observed: reduced from the gauge record by the NOAA tidal-datum method. Observed levels refer to the OTC datum epoch 2002-01-01 to 2020-12-31, except a first reduction over the record's own months, which has the flag no_qualified_control and an epoch equal to its data_span.",
      "type": "object",
      "required": [
        "kind",
        "method"
      ],
      "additionalProperties": false,
      "dependentRequired": {
        "uncertainty_m": [
          "uncertainty_basis"
        ],
        "uncertainty_basis": [
          "uncertainty_m"
        ]
      },
      "dependentSchemas": {
        "fallback": {
          "properties": {
            "kind": {
              "enum": [
                "computed",
                "observed"
              ]
            }
          }
        }
      },
      "properties": {
        "kind": {
          "enum": [
            "published",
            "computed",
            "observed"
          ]
        },
        "fallback": {
          "description": "A finding on this computed or observed level only; the constant set and its published levels keep their own status. A labelled computed or observed datum_gate_failed level may omit unknown total uncertainty and its basis together; its finding states that uncertainty is unestablished and normal acceptance is false. Tuning diagnostics are not a calibrated station uncertainty.",
          "allOf": [
            {
              "$ref": "#/$defs/fallback"
            },
            {
              "properties": {
                "reason": {
                  "const": "datum_gate_failed"
                }
              }
            }
          ]
        },
        "method": {
          "description": "subordinate_offset_zero: the algebraic zero of the source-declared subordinate MLLW prediction frame, not a surveyed datum or time-window computation; carries an explicit fallback finding and no invented epoch or uncertainty. source: as published. harmonic_extremes: the lowest or highest height of the set's harmonic prediction over epoch. subordinate_offsets: the lowest or highest of the reference station's predicted extremes over epoch with the subordinate station's offsets applied. first_reduction: means over data_span with no control. Without the flag no_qualified_control it is a 19-year determination over the OTC datum epoch 2002-01-01 to 2020-12-31: the schema checks at least 216 months and the epoch dates; the release build checks that data_span is inside the epoch and that every calendar month counts in at least 17 of the 19 years (build check 14). With no_qualified_control it is an average over the record's own months (at most 228 months, and never with a primary's coverage), and its epoch equals its data_span (build check 14). standard, modified_range_ratio, direct: comparison with the control station on common tidal days (NOAA CO-OPS methods).",
          "enum": [
            "source",
            "harmonic_extremes",
            "subordinate_offsets",
            "subordinate_offset_zero",
            "first_reduction",
            "standard",
            "modified_range_ratio",
            "direct"
          ]
        },
        "source_name": {
          "description": "The publisher's own name for this level: the source's (e.g. MThw, CD, STND), or the charting authority's for a Baltic or Kattegat chart datum (e.g. Traficom's MSL, Sjöfartsverket's RH 2000).",
          "type": "string",
          "minLength": 1,
          "maxLength": 31
        },
        "epoch": {
          "$ref": "#/$defs/datum_period"
        },
        "data_span": {
          "$ref": "#/$defs/datum_data_span"
        },
        "control": {
          "$ref": "#/$defs/control"
        },
        "uncertainty_m": {
          "description": "One standard deviation, in metres. Observed and computed: the expected difference from a 19-year determination over the stated epoch. Published: only when the source gives one.",
          "type": "number",
          "minimum": 0
        },
        "uncertainty_basis": {
          "description": "source: given by the source; the only basis of a published level. calibrated: from OTC's cut-down experiments and comparisons with published or gauge-computed values, on the tuning partition and on gauges outside all partitions, never on a holdout or reserve gauge. (OTC's validation stations are split by a fixed hash into a tuning partition, used to set methods and thresholds, and a holdout and a reserve, kept apart so that validation is independent.) propagated: from the scatter of the data or the constituent uncertainties. A computed or observed level is calibrated or propagated.",
          "enum": [
            "source",
            "calibrated",
            "propagated"
          ]
        },
        "flags": {
          "description": "time_base_unverified / time_base_disputed: the set's time-base annotation. sampling_assumed: the sampling class (instantaneous or hourly mean) is the declared one, not verified; the uncertainty includes the possible bias; never on msl, mtl, dtl or their otc_ forms, which are means of heights and do not depend on the sampling class. truncated_lows: low waters are cut off, so the datum's only computed or observed levels are MHW, MHHW and HAT (a published level of any key is kept). gaps: gaps of 3 hours or less were filled, or months were skipped for gaps. segment: the record is split by a datum step, and the value is reduced from one segment of it, on either side of the step (see data_span). short_record: observed, under 12 months of data (an observed level has it exactly then); computed, constants from under one year of good data, so the level does not follow the IHO recommendation for computing LAT and HAT (constants from at least one year of observations). no_qualified_control: no comparison was possible, so this is a first reduction over the record's own months, not adjusted to the OTC datum epoch. microtidal: mean range under 0.1 m. provisional: the source marks the value provisional. convention_unverified: a computed, nonofficial chart-reference stand-in whose agency chart-datum convention, equivalence and absolute vertical tie are unestablished.",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "enum": [
              "time_base_unverified",
              "time_base_disputed",
              "sampling_assumed",
              "truncated_lows",
              "gaps",
              "segment",
              "short_record",
              "no_qualified_control",
              "microtidal",
              "provisional",
              "convention_unverified"
            ]
          }
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "kind": {
                "const": "published"
              }
            }
          },
          "then": {
            "properties": {
              "method": {
                "const": "source"
              },
              "flags": {
                "items": {
                  "enum": [
                    "provisional"
                  ]
                }
              },
              "uncertainty_basis": {
                "const": "source"
              },
              "control": {
                "required": [
                  "source_id"
                ]
              }
            },
            "not": {
              "required": [
                "data_span"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "computed"
              }
            }
          },
          "then": {
            "allOf": [
              {
                "if": {
                  "properties": {
                    "method": {
                      "const": "subordinate_offset_zero"
                    }
                  }
                },
                "then": {
                  "required": [
                    "fallback"
                  ],
                  "not": {
                    "anyOf": [
                      {
                        "required": [
                          "epoch"
                        ]
                      },
                      {
                        "required": [
                          "uncertainty_m"
                        ]
                      }
                    ]
                  }
                },
                "else": {
                  "required": [
                    "epoch"
                  ]
                }
              }
            ],
            "if": {
              "required": [
                "fallback"
              ],
              "properties": {
                "fallback": {
                  "required": [
                    "reason"
                  ],
                  "properties": {
                    "reason": {
                      "const": "datum_gate_failed"
                    }
                  }
                }
              }
            },
            "else": {
              "required": [
                "uncertainty_m"
              ]
            },
            "properties": {
              "method": {
                "enum": [
                  "harmonic_extremes",
                  "subordinate_offsets",
                  "subordinate_offset_zero"
                ]
              },
              "uncertainty_basis": {
                "enum": [
                  "calibrated",
                  "propagated"
                ]
              },
              "flags": {
                "items": {
                  "enum": [
                    "time_base_unverified",
                    "time_base_disputed",
                    "sampling_assumed",
                    "short_record",
                    "microtidal",
                    "convention_unverified"
                  ]
                }
              }
            },
            "not": {
              "anyOf": [
                {
                  "required": [
                    "data_span"
                  ]
                },
                {
                  "required": [
                    "control"
                  ]
                }
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "observed"
              }
            }
          },
          "then": {
            "required": [
              "epoch",
              "data_span"
            ],
            "if": {
              "required": [
                "fallback"
              ],
              "properties": {
                "fallback": {
                  "required": [
                    "reason"
                  ],
                  "properties": {
                    "reason": {
                      "const": "datum_gate_failed"
                    }
                  }
                }
              }
            },
            "else": {
              "required": [
                "uncertainty_m"
              ]
            },
            "properties": {
              "method": {
                "enum": [
                  "first_reduction",
                  "standard",
                  "modified_range_ratio",
                  "direct"
                ]
              },
              "uncertainty_basis": {
                "enum": [
                  "calibrated",
                  "propagated"
                ]
              },
              "flags": {
                "items": {
                  "not": {
                    "enum": [
                      "provisional",
                      "convention_unverified"
                    ]
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "method": {
                "enum": [
                  "standard",
                  "modified_range_ratio",
                  "direct"
                ]
              }
            }
          },
          "then": {
            "required": [
              "control"
            ],
            "properties": {
              "control": {
                "required": [
                  "station_id",
                  "set_id"
                ]
              },
              "epoch": {
                "properties": {
                  "start": {
                    "const": "2002-01-01"
                  },
                  "end": {
                    "const": "2020-12-31"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "method": {
                "const": "first_reduction"
              }
            }
          },
          "then": {
            "not": {
              "required": [
                "control"
              ]
            }
          }
        },
        {
          "description": "Own-month averages are labelled: no_qualified_control goes only with a first reduction of at most 228 months (the latest 19 years at most), and a first reduction without it is a 19-year determination: at least 216 months, over the OTC datum epoch 2002-01-01 to 2020-12-31. Comparisons are reduced to the same epoch.",
          "if": {
            "required": [
              "flags"
            ],
            "properties": {
              "flags": {
                "contains": {
                  "const": "no_qualified_control"
                }
              }
            }
          },
          "then": {
            "properties": {
              "method": {
                "const": "first_reduction"
              },
              "data_span": {
                "properties": {
                  "months": {
                    "maximum": 228
                  }
                }
              }
            }
          },
          "else": {
            "if": {
              "properties": {
                "method": {
                  "const": "first_reduction"
                }
              }
            },
            "then": {
              "properties": {
                "data_span": {
                  "properties": {
                    "months": {
                      "minimum": 216
                    }
                  }
                },
                "epoch": {
                  "properties": {
                    "start": {
                      "const": "2002-01-01"
                    },
                    "end": {
                      "const": "2020-12-31"
                    }
                  }
                }
              }
            }
          }
        },
        {
          "description": "The direct method goes with truncated_lows: low waters are cut off.",
          "if": {
            "required": [
              "method"
            ],
            "properties": {
              "method": {
                "const": "direct"
              }
            }
          },
          "then": {
            "required": [
              "flags"
            ],
            "properties": {
              "flags": {
                "contains": {
                  "const": "truncated_lows"
                }
              }
            }
          }
        },
        {
          "description": "truncated_lows goes with the direct method or a first reduction (own-month or 19-year), and the direct method always carries it (the rule above); never with another comparison method.",
          "if": {
            "required": [
              "flags"
            ],
            "properties": {
              "flags": {
                "contains": {
                  "const": "truncated_lows"
                }
              }
            }
          },
          "then": {
            "properties": {
              "method": {
                "enum": [
                  "direct",
                  "first_reduction"
                ]
              }
            }
          }
        },
        {
          "description": "An observed level has short_record exactly when it comes from under 12 months of data.",
          "if": {
            "properties": {
              "kind": {
                "const": "observed"
              }
            }
          },
          "then": {
            "if": {
              "required": [
                "flags"
              ],
              "properties": {
                "flags": {
                  "contains": {
                    "const": "short_record"
                  }
                }
              }
            },
            "then": {
              "properties": {
                "data_span": {
                  "properties": {
                    "months": {
                      "maximum": 11
                    }
                  }
                }
              }
            },
            "else": {
              "properties": {
                "data_span": {
                  "properties": {
                    "months": {
                      "minimum": 12
                    }
                  }
                }
              }
            }
          }
        }
      ]
    },
    "fit_segment": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "start": {
              "type": [
                "string",
                "number",
                "boolean",
                "null"
              ]
            },
            "end": {
              "type": [
                "string",
                "number",
                "boolean",
                "null"
              ]
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "retained_frame": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind",
        "name",
        "tie_status"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "tie_status": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "retained_reliability": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "status",
        "limitations"
      ],
      "properties": {
        "status": {
          "type": "string",
          "minLength": 1
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "window": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "start": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "end": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        }
      }
    },
    "public_original_metadata": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "source_citation": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_provider": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_identifier": {
          "type": [
            "string",
            "null"
          ]
        },
        "licence_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "licence_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "terms_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "method": {
          "type": [
            "string",
            "null"
          ]
        },
        "fit_start": {
          "type": [
            "string",
            "number",
            "null"
          ]
        },
        "fit_end": {
          "type": [
            "string",
            "number",
            "null"
          ]
        },
        "harmonic_models_json": {
          "type": "string",
          "contentSchema": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/embedded_harmonic_model"
            }
          }
        },
        "sampling": {
          "type": [
            "string",
            "null"
          ]
        },
        "native_sample_quality": {
          "type": [
            "string",
            "null"
          ]
        },
        "filter_response": {
          "type": [
            "string",
            "null"
          ]
        },
        "sampling_response_correction": {
          "type": [
            "string",
            "null"
          ]
        },
        "offset_id": {
          "type": "string"
        },
        "raw_row_text": {
          "type": "string"
        },
        "raw_values_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/historical_raw_values"
          }
        },
        "algorithm": {
          "type": [
            "string",
            "null"
          ]
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "loading_added": {
          "type": "boolean"
        },
        "ocean_grid": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_header": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "FILE NAME": {
              "type": "string"
            },
            "SITE NAME": {
              "type": "string"
            },
            "SITE CODE": {
              "type": "string"
            },
            "COUNTRY": {
              "type": "string"
            },
            "CONTRIBUTOR (ABBREVIATED)": {
              "type": "string"
            },
            "CONTRIBUTOR (FULL)": {
              "type": "string"
            },
            "CONTRIBUTOR WEBSITE": {
              "type": "string"
            },
            "CONTRIBUTOR CONTACT": {
              "type": "string"
            },
            "ORGINATOR": {
              "type": "string"
            },
            "ORIGINATOR WEBSITE": {
              "type": "string"
            },
            "ORIGINATOR CONTACT": {
              "type": "string"
            },
            "LATITUDE": {
              "type": "string"
            },
            "LONGITUDE": {
              "type": "string"
            },
            "COORDINATE SYSTEM": {
              "type": "string"
            },
            "START DATE/TIME": {
              "type": "string"
            },
            "END DATE/TIME": {
              "type": "string"
            },
            "NUMBER OF YEARS": {
              "type": "string"
            },
            "TIME ZONE HOURS": {
              "type": "string"
            },
            "DATUM INFORMATION": {
              "type": "string"
            },
            "INSTRUMENT": {
              "type": "string"
            },
            "PRECISION": {
              "type": "string"
            },
            "NULL VALUE": {
              "type": "string"
            },
            "GAUGE TYPE": {
              "type": "string"
            },
            "OVERALL RECORD QUALITY": {
              "type": "string"
            },
            "DOWNLOAD LINK": {
              "type": "string"
            }
          }
        },
        "parent_published_set_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "source_provenance": {
          "type": "object",
          "properties": {
            "OTC_parent_source_record_id": {
              "type": "string"
            },
            "acquired_local": {
              "type": "string"
            },
            "acquisition_manifest_path": {
              "type": "string"
            },
            "acquisition_manifest_sha256": {
              "type": "string"
            },
            "alignment_limitation": {
              "type": "string"
            },
            "benchmark_response_html": {
              "type": "string"
            },
            "benchmark_response_sha256": {
              "type": "string"
            },
            "benchmark_response_url": {
              "type": "string"
            },
            "candidate_list": {
              "type": "string"
            },
            "capture_identity_basis": {
              "type": "string"
            },
            "datum_meaning_limit": {
              "type": "string"
            },
            "datums_response_sha256": {
              "type": "string"
            },
            "datums_response_url": {
              "type": "string"
            },
            "identity_registry_acquisition_manifest_path": {
              "type": "string"
            },
            "identity_registry_acquisition_manifest_sha256": {
              "type": "string"
            },
            "identity_registry_path": {
              "type": "string"
            },
            "identity_registry_sha256": {
              "type": "string"
            },
            "inventory_sha256": {
              "type": "string"
            },
            "load_datestamp": {
              "type": "string"
            },
            "metadata_response_sha256": {
              "type": "string"
            },
            "metadata_response_url": {
              "type": "string"
            },
            "native_tcd_dump_sha256": {
              "type": "string"
            },
            "observation_sha256": {
              "type": "string"
            },
            "observed_profile_sha256": {
              "type": "string"
            },
            "phase_convention_source": {
              "type": "string"
            },
            "phase_convention_source_capture_sha256": {
              "type": "string"
            },
            "time_base_limitation": {
              "type": "string"
            },
            "time_base_status": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "source_position": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "interpretation": {
              "type": "string"
            },
            "original_longitude": {
              "type": "number"
            },
            "physical_location_verified": {
              "type": "boolean"
            },
            "position_unreliable": {
              "type": "boolean"
            },
            "signed_longitude": {
              "type": "number"
            }
          }
        },
        "source_grid_variables": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "path": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "amplitude": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "netcdf_type": {
                    "type": "integer"
                  },
                  "units": {
                    "type": "string"
                  },
                  "_Unsigned": {
                    "type": "null"
                  },
                  "_FillValue": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "missing_value": {
                    "type": "null"
                  },
                  "scale_factor": {
                    "type": "null"
                  },
                  "add_offset": {
                    "type": "null"
                  }
                }
              },
              "phase": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "netcdf_type": {
                    "type": "integer"
                  },
                  "units": {
                    "type": "string"
                  },
                  "_Unsigned": {
                    "type": "null"
                  },
                  "_FillValue": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "missing_value": {
                    "type": "null"
                  },
                  "scale_factor": {
                    "type": "null"
                  },
                  "add_offset": {
                    "type": "null"
                  }
                }
              }
            }
          }
        },
        "source_identity": {
          "type": "object",
          "properties": {
            "alternative_name_raw": {
              "type": [
                "null",
                "string"
              ]
            },
            "constants_acquired": {
              "type": "boolean"
            },
            "country": {
              "type": [
                "string",
                "null"
              ],
              "description": "Country supplied by the publisher, preserved verbatim; not canonical station country or validated geography."
            },
            "datum_code": {
              "type": "null"
            },
            "datums": {
              "type": "null"
            },
            "is_tidal_published": {
              "type": "boolean"
            },
            "name": {
              "type": "string"
            },
            "observations_acquired": {
              "type": "boolean"
            },
            "official_station_id": {
              "type": "string"
            },
            "official_station_name": {
              "type": "string"
            },
            "predictions_acquired": {
              "type": "boolean"
            },
            "province_published": {
              "type": "string"
            },
            "region_published": {
              "type": "string"
            },
            "region_upstream": {
              "type": "string"
            },
            "role_evidence": {
              "type": "string"
            },
            "roles_json": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "roles_meaning_json": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "wl": {
                  "type": "string"
                },
                "wcd": {
                  "type": "string"
                },
                "wcs": {
                  "type": "string"
                },
                "ap": {
                  "type": "string"
                },
                "bore": {
                  "type": "string"
                },
                "dvc": {
                  "type": "string"
                },
                "wcslack": {
                  "type": "string"
                },
                "ws": {
                  "type": "string"
                },
                "wt": {
                  "type": "string"
                }
              },
              "x-closed-factual": true
            },
            "source_catalogue": {
              "type": "string"
            },
            "source_record_id": {
              "type": "string"
            },
            "source_sha256": {
              "type": "string"
            },
            "source_version": {
              "type": "string"
            },
            "station_code": {
              "type": "string"
            },
            "timezone_iana": {
              "type": "null"
            },
            "timezone_published": {
              "type": "string"
            },
            "timezone_upstream_code": {
              "type": [
                "null",
                "string"
              ]
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "source_fit_summary": {
          "type": "object",
          "properties": {
            "blend_weight_old_common": {
              "type": "number"
            },
            "blend_weight_recent": {
              "type": "number"
            },
            "derived_mean_m": {
              "type": "number"
            },
            "fit_first_s": {
              "type": "integer"
            },
            "fit_last_s": {
              "type": "integer"
            },
            "fit_n": {
              "type": "integer"
            },
            "fit_outcome": {
              "type": "string"
            },
            "fit_rayleigh_hours": {
              "type": "number"
            },
            "fit_reason": {
              "type": "string"
            },
            "fit_sha256": {
              "type": "string"
            },
            "fit_t_mean_s": {
              "type": "number"
            },
            "fit_trend_m_per_yr": {
              "type": "number"
            },
            "fit_z0_m": {
              "type": "number"
            },
            "frame_overlap_exact": {
              "type": "boolean"
            },
            "frame_overlap_pairs": {
              "type": "integer"
            },
            "frame_overlap_sha256": {
              "type": "string"
            },
            "mean_origin": {
              "type": "string"
            },
            "old_only_terms_retained": {
              "type": "integer"
            },
            "original_fit_path": {
              "type": "string"
            },
            "original_fit_sha256": {
              "type": "string"
            },
            "original_member_sha256": {
              "type": "string"
            },
            "raw_refit": {
              "type": "boolean"
            },
            "recent_parent_samples": {
              "type": "integer"
            },
            "spikes_dropped": {
              "type": "integer"
            },
            "training_overlap": {
              "type": "boolean"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "predecessor_model_routes": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "recommended_set_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "prediction_profiles": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "required": [
                  "selection_status"
                ],
                "oneOf": [
                  {
                    "required": [
                      "set_id"
                    ]
                  },
                  {
                    "required": [
                      "offset_id"
                    ]
                  }
                ],
                "additionalProperties": false,
                "properties": {
                  "set_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "offset_id": {
                    "type": "string",
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "selection_status": {
                    "enum": [
                      "measured",
                      "unmeasured"
                    ]
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "selection_status": {
                          "const": "measured"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "selection_evidence": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "else": {
                      "properties": {
                        "selection_evidence": {
                          "type": "null"
                        }
                      }
                    }
                  }
                ],
                "x-private-process-fields": [
                  "selection_evidence"
                ]
              }
            }
          },
          "x-closed-factual": true
        },
        "source_capture_summaries": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "aliases": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                }
              },
              "country": {
                "type": "string"
              },
              "has_offsets": {
                "type": "boolean"
              },
              "id": {
                "type": "string"
              },
              "lat": {
                "type": "number"
              },
              "lon": {
                "type": "number"
              },
              "n_bins": {
                "type": "integer"
              },
              "n_constituents": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "offsets_ref": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "source_provider": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "qc_status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "quantity": {
                "type": "string"
              },
              "redistribution": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "source": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "contributor": {
                "type": "string"
              },
              "first": {
                "type": "integer"
              },
              "gauge_type": {
                "type": "string"
              },
              "good_hours": {
                "type": "integer"
              },
              "kind": {
                "type": "string"
              },
              "last": {
                "type": "integer"
              },
              "licence": {
                "type": "string"
              },
              "n_good": {
                "type": "integer"
              },
              "originator": {
                "type": "boolean"
              },
              "span_days": {
                "type": "number"
              },
              "country_interpretation": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "coordinate_substitution": {
                    "type": "boolean"
                  },
                  "resolved_country": {
                    "type": "string"
                  },
                  "source_response_sha256": {
                    "type": "string"
                  },
                  "source_url": {
                    "type": "string"
                  },
                  "method": {
                    "type": "string"
                  },
                  "source_feature_type": {
                    "type": "string"
                  },
                  "source_admin_region": {
                    "type": "string"
                  },
                  "water_level_identity_match": {
                    "type": "boolean"
                  }
                },
                "x-closed-factual": true,
                "x-private-process-fields": [
                  "retrieved_at_utc"
                ]
              },
              "original_identity": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "index_number_as_printed": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "not_water_level_station_07860": {
                    "type": "boolean"
                  },
                  "parent": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  }
                }
              },
              "original_position": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "converted_latitude": {
                    "type": "number"
                  },
                  "converted_longitude": {
                    "type": "number"
                  },
                  "latitude_as_printed": {
                    "type": "string"
                  },
                  "longitude_as_printed": {
                    "type": "string"
                  },
                  "resolution": {
                    "type": "string"
                  }
                }
              },
              "quality_status": {
                "type": "string"
              },
              "rights_notice": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "copyright": {
                    "type": "string"
                  },
                  "copyright_notice_pdf_zero_based_page": {
                    "type": "integer"
                  },
                  "copyright_notice_printed_page": {
                    "type": "integer"
                  },
                  "notice_fact": {
                    "type": "string"
                  },
                  "ogl_grant_established": {
                    "type": "boolean"
                  },
                  "permission_granted": {
                    "type": "boolean"
                  },
                  "permission_inferred": {
                    "type": "boolean"
                  },
                  "legal_determination_made": {
                    "type": "boolean"
                  }
                },
                "x-private-process-fields": [
                  "comparator_special_permission_established"
                ]
              },
              "role": {
                "type": "string"
              },
              "source_document": {
                "type": "string"
              },
              "source_edition_year": {
                "type": "integer"
              },
              "source_pdf_sha256": {
                "type": "string"
              },
              "source_pdf_zero_based_page": {
                "type": "integer"
              },
              "source_printed_page": {
                "type": "integer"
              },
              "source_url": {
                "type": "string"
              },
              "unbundled_numeric_fields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "upstream_harmonic_constants_acquired": {
                "type": "boolean"
              },
              "active": {
                "type": "boolean"
              },
              "crs": {
                "type": "string"
              },
              "fd_span": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "latest": {
                    "type": "string"
                  },
                  "oldest": {
                    "type": "string"
                  }
                },
                "x-closed-factual": true
              },
              "gloss": {
                "type": "null"
              },
              "reseau": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_limitations": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "current_applicability_established": {
                    "type": "boolean"
                  },
                  "numerical_accuracy_established": {
                    "type": "boolean"
                  },
                  "source_position_resolution_arcminutes": {
                    "type": "integer"
                  },
                  "source_position_is_approximate": {
                    "type": "boolean"
                  },
                  "converted_decimal_digits_add_measured_precision": {
                    "type": "boolean"
                  },
                  "upstream_harmonic_constants_acquired": {
                    "type": "boolean"
                  },
                  "source_forecast_timestamps_acquired": {
                    "type": "boolean"
                  },
                  "continuous_current_speed_curve_acquired": {
                    "type": "boolean"
                  },
                  "iwls_current_identity_acquired": {
                    "type": "boolean"
                  },
                  "maximum_rate_speed_derivation_method_established": {
                    "type": "boolean"
                  },
                  "speed_method_source_printed_page": {
                    "type": "integer"
                  },
                  "current_index_water_level_identity_equivalent": {
                    "type": "boolean"
                  },
                  "water_level_identity_exclusion": {
                    "type": "string"
                  },
                  "numeric_values_bundled": {
                    "type": "boolean"
                  },
                  "numeric_values_withheld_for_source_restriction": {
                    "type": "boolean"
                  }
                }
              }
            },
            "x-private-process-fields": [
              "cached_obs",
              "publication_tier",
              "retrieved_at_utc",
              "slackwater_used_as_input",
              "prediction_capability",
              "payload_scope"
            ]
          }
        },
        "source_datum_offsets": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "code": {
                "type": "string"
              },
              "offset": {
                "type": "number"
              },
              "offsetPrecision": {
                "type": "integer"
              }
            }
          }
        },
        "source_datum_response": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "accepted": {
              "type": "string"
            },
            "superseded": {
              "type": "string"
            },
            "epoch": {
              "type": "string"
            },
            "units": {
              "type": "string"
            },
            "OrthometricDatum": {
              "type": "string"
            },
            "datums": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "value": {
                    "type": "number"
                  }
                }
              }
            },
            "LAT": {
              "type": [
                "null",
                "number"
              ]
            },
            "LATdate": {
              "type": "string"
            },
            "LATtime": {
              "type": "string"
            },
            "HAT": {
              "type": [
                "null",
                "number"
              ]
            },
            "HATdate": {
              "type": "string"
            },
            "HATtime": {
              "type": "string"
            },
            "min": {
              "type": [
                "null",
                "number"
              ]
            },
            "mindate": {
              "type": "string"
            },
            "mintime": {
              "type": "string"
            },
            "max": {
              "type": [
                "null",
                "number"
              ]
            },
            "maxdate": {
              "type": "string"
            },
            "maxtime": {
              "type": "string"
            },
            "disclaimers": {
              "type": "object",
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {
                "disclaimers": {
                  "type": "array",
                  "items": false
                },
                "self": {
                  "type": "null"
                }
              }
            },
            "DatumAnalysisPeriod": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "NGSLink": {
              "type": "string"
            },
            "ctrlStation": {
              "type": "string"
            },
            "self": {
              "type": "string"
            }
          }
        },
        "source_model_eligibility": {
          "type": "object",
          "properties": {
            "default_promotion_permitted": {
              "type": "boolean"
            },
            "recent_source_withheld": {
              "type": "boolean"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "source_harmonic_response": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "url": {
              "type": "string"
            },
            "response_sha256": {
              "type": "string"
            },
            "fetched_at_local": {
              "type": "string"
            },
            "source_identity_carrier_version": {
              "type": "string"
            },
            "acquired_payload_date": {
              "type": "string"
            },
            "response": {
              "type": "object",
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {
                "units": {
                  "type": "string"
                },
                "HarmonicConstituents": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "x-closed-factual": true,
                    "properties": {
                      "number": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "amplitude": {
                        "type": "number"
                      },
                      "phase_GMT": {
                        "type": "number"
                      },
                      "phase_local": {
                        "type": "number"
                      },
                      "speed": {
                        "type": "number"
                      },
                      "comments": {
                        "type": "string"
                      }
                    }
                  }
                },
                "self": {
                  "type": "string"
                }
              }
            },
            "accuracy_status": {
              "type": "string"
            },
            "note": {
              "type": "string"
            }
          }
        },
        "source_runtime_identity": {
          "type": "object",
          "properties": {
            "historical_current_station_id": {
              "type": "string"
            },
            "published_harmonics": {
              "type": "boolean"
            },
            "quantity": {
              "type": "string"
            },
            "runtime_identity_basis": {
              "type": "string"
            },
            "runtime_provider": {
              "type": "string"
            },
            "runtime_provider_station_id": {
              "type": "string"
            },
            "runtime_station_id": {
              "type": "string"
            },
            "runtime_status": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "source_input_manifest": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "path": {
              "type": "string"
            },
            "sha256": {
              "type": "string"
            }
          }
        },
        "source_inventory": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "bin": {
                "type": [
                  "null",
                  "integer"
                ]
              },
              "granularity": {
                "type": "string"
              },
              "input_sha256": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "native_good_hours": {
                "type": [
                  "null",
                  "integer"
                ]
              },
              "native_good_samples": {
                "type": [
                  "null",
                  "integer"
                ]
              },
              "source_provider": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "parent_station_id": {
                "type": "string"
              },
              "redistribution": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "source": {
                "type": "string"
              },
              "upstream_record_id": {
                "type": "string"
              },
              "upstream_type": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "acquired_files": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "path": {
                      "type": "string"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "size": {
                      "type": "integer"
                    },
                    "source_url": {
                      "type": "string"
                    }
                  },
                  "x-closed-factual": true,
                  "required": [
                    "path",
                    "sha256",
                    "size"
                  ]
                }
              }
            },
            "x-private-process-fields": [
              "cached_observations"
            ]
          }
        },
        "source_rights": {
          "type": "object",
          "properties": {
            "licence_evidence": {
              "type": "string"
            },
            "licence_evidence_sha256": {
              "type": "string"
            },
            "redistribution_basis": {
              "type": "string"
            },
            "runtime_licence_note": {
              "type": "string"
            },
            "runtime_licence_url": {
              "type": "string"
            },
            "survey_tie_established": {
              "type": "boolean"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "source_inputs": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "path": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              }
            }
          }
        },
        "source_input_manifests": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "files": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "x-closed-factual": true,
                  "properties": {
                    "fetched_at": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "size": {
                      "type": "integer"
                    },
                    "source_url": {
                      "type": "string"
                    }
                  }
                }
              },
              "manifest": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "size": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "source_parsed_harmonics": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "harms60": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "x-closed-factual": true,
                  "properties": {
                    "analysis_years": {
                      "type": "object",
                      "additionalProperties": false,
                      "x-closed-factual": true,
                      "properties": {
                        "long_period": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "short_period": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "constituents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "x-closed-factual": true,
                        "properties": {
                          "amplitude_cm": {
                            "type": "number"
                          },
                          "name": {
                            "type": "string"
                          },
                          "phase_deg": {
                            "type": "number"
                          },
                          "source_name": {
                            "type": "string"
                          },
                          "speed": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "longitude_deg": {
                      "type": "number"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              ]
            },
            "input_sha256": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "station": {
              "type": "object",
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {
                "code": {
                  "type": "string"
                },
                "datum_elevation_cm": {
                  "type": [
                    "null",
                    "number"
                  ]
                },
                "harms60_href": {
                  "type": [
                    "null",
                    "string"
                  ]
                },
                "lat": {
                  "type": "number"
                },
                "lon": {
                  "type": "number"
                },
                "main4": {
                  "type": "object",
                  "additionalProperties": false,
                  "x-closed-factual": true,
                  "properties": {
                    "K1": {
                      "type": "object",
                      "additionalProperties": false,
                      "x-closed-factual": true,
                      "properties": {
                        "amplitude_cm": {
                          "type": "number"
                        },
                        "phase_deg": {
                          "type": "number"
                        }
                      }
                    },
                    "M2": {
                      "type": "object",
                      "additionalProperties": false,
                      "x-closed-factual": true,
                      "properties": {
                        "amplitude_cm": {
                          "type": "number"
                        },
                        "phase_deg": {
                          "type": "number"
                        }
                      }
                    },
                    "O1": {
                      "type": "object",
                      "additionalProperties": false,
                      "x-closed-factual": true,
                      "properties": {
                        "amplitude_cm": {
                          "type": "number"
                        },
                        "phase_deg": {
                          "type": "number"
                        }
                      }
                    },
                    "S2": {
                      "type": "object",
                      "additionalProperties": false,
                      "x-closed-factual": true,
                      "properties": {
                        "amplitude_cm": {
                          "type": "number"
                        },
                        "phase_deg": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                "msl_above_datum_cm": {
                  "type": "number"
                },
                "msl_elevation_cm": {
                  "type": [
                    "null",
                    "number"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                },
                "number": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "source_station": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "aliases": {
              "type": "object",
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {}
            },
            "country": {
              "type": "string"
            },
            "lat": {
              "type": "number"
            },
            "lon": {
              "type": "number"
            },
            "name": {
              "type": "string"
            },
            "timezone": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          }
        },
        "ordered_source_members": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "day_utc": {
                "type": "string"
              },
              "fetched_at": {
                "type": "string"
              },
              "manifest": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "size": {
                    "type": "integer"
                  }
                }
              },
              "path": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              },
              "source_url": {
                "type": "string"
              }
            }
          }
        },
        "source_grid_sampling": {
          "type": "object",
          "properties": {
            "recommended_default": {
              "type": "boolean"
            },
            "reliability": {
              "type": "string"
            },
            "sourcepack_sha256": {
              "type": "string"
            },
            "target_latitude": {
              "type": "number"
            },
            "target_longitude": {
              "type": "number"
            },
            "worst_distance_km": {
              "type": "number"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "source_version_binding": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "encoded_sha256": {
              "type": "string"
            },
            "encoding": {
              "type": "string"
            },
            "fit_sha256": {
              "type": "string"
            },
            "hex_source_version": {
              "type": "string"
            },
            "prefix": {
              "type": "string"
            },
            "recipe": {
              "type": "string"
            }
          },
          "x-private-process-fields": []
        },
        "source_station_snapshots": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "input": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "fetched_at": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "size": {
                    "type": "integer"
                  },
                  "source_url": {
                    "type": "string"
                  }
                }
              },
              "manifest": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "size": {
                    "type": "integer"
                  }
                }
              },
              "station": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "W": {
                    "type": "object",
                    "additionalProperties": false,
                    "x-closed-factual": true,
                    "properties": {
                      "equidistance_min": {
                        "type": "integer"
                      },
                      "gaugeZero": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "additionalProperties": false,
                        "x-closed-factual": true,
                        "properties": {
                          "unit": {
                            "type": "string"
                          },
                          "validFrom": {
                            "type": "string"
                          },
                          "value": {
                            "type": "number"
                          }
                        }
                      },
                      "unit": {
                        "type": "string"
                      }
                    }
                  },
                  "agency": {
                    "type": "string"
                  },
                  "km": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "latitude": {
                    "type": "number"
                  },
                  "longitude": {
                    "type": "number"
                  },
                  "longname": {
                    "type": "string"
                  },
                  "number": {
                    "type": "string"
                  },
                  "shortname": {
                    "type": "string"
                  },
                  "uuid": {
                    "type": "string"
                  },
                  "water": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "source_licence_record": {
          "type": "null"
        },
        "OTC_country_resolution_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_country_resolution"
          }
        },
        "source_observation_support_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_observation_support"
          }
        },
        "catalogue_row_json": {
          "type": "string",
          "contentSchema": {
            "anyOf": [
              {
                "$ref": "#/$defs/carrier_chs_catalogue"
              },
              {
                "$ref": "#/$defs/carrier_noaa_station"
              }
            ]
          }
        },
        "identity_binding_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_identity_binding"
          }
        },
        "metadata_evidence_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_metadata_evidence"
          }
        },
        "metadata_response_json": {
          "type": "string",
          "contentSchema": {
            "anyOf": [
              {
                "$ref": "#/$defs/carrier_chs_metadata"
              },
              {
                "$ref": "#/$defs/carrier_noaa_response"
              }
            ]
          }
        },
        "raw_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_chs_raw"
          }
        },
        "raw_metadata_rows_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_raw_metadata_rows"
          }
        },
        "row_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_chs_identity_row"
          }
        },
        "source_observations_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_source_observations"
          }
        },
        "training_overlap_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_training_overlap"
          }
        },
        "DATUM INFORMATION": {
          "type": "string"
        },
        "FILE NAME": {
          "type": "string"
        },
        "original_member_sha256": {
          "type": "string"
        },
        "metadata_response_sha256": {
          "type": "string"
        },
        "metadata_response_url": {
          "type": "string"
        },
        "station_code": {
          "type": "string"
        },
        "quantity": {
          "type": "string"
        },
        "runtime_provider": {
          "type": "string"
        },
        "runtime_station_id": {
          "type": "string"
        },
        "runtime_provider_station_id": {
          "type": "string"
        },
        "historical_current_station_id": {
          "type": "string"
        },
        "runtime_status": {
          "type": "string"
        },
        "runtime_licence_note": {
          "type": "string"
        },
        "runtime_licence_url": {
          "type": "string"
        },
        "published_harmonics": {
          "type": "boolean"
        },
        "original_row_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/public_original_metadata/properties/source_header"
          }
        },
        "datums_response_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_noaa_datums"
          }
        },
        "datums_response_sha256": {
          "type": "string"
        },
        "supersededdatums_response_json": {
          "type": "string",
          "contentSchema": {
            "$ref": "#/$defs/carrier_noaa_datums"
          }
        },
        "supersededdatums_response_sha256": {
          "type": "string"
        },
        "native_coefficient_availability": {
          "$ref": "#/$defs/native_coefficient_availability"
        }
      },
      "x-closed-factual": true
    },
    "embedded_harmonic_model": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "model_id": {
          "type": "string"
        },
        "source_record_id": {
          "type": "string"
        },
        "source_name": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "fit_window": {
          "$ref": "#/$defs/numeric_window"
        },
        "quantity": {
          "type": "string"
        },
        "datum": {
          "$ref": "#/$defs/datum"
        },
        "units": {
          "type": "string"
        },
        "convention_id": {
          "type": "string"
        },
        "constituents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/embedded_constituent"
          }
        },
        "current_bins": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/current_bin"
          }
        },
        "original_harmonics": {
          "$ref": "#/$defs/original_harmonics"
        },
        "input_sha256": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "z0_m": {
          "type": "number"
        },
        "trend_m_per_yr": {
          "type": "number"
        },
        "t_mean_s": {
          "type": "number"
        },
        "rms_m": {
          "type": "number"
        },
        "sample_count": {
          "type": "number"
        },
        "span_hours": {
          "type": "number"
        },
        "rayleigh_hours": {
          "type": "number"
        },
        "band_noise_m": {
          "$ref": "#/$defs/noise_amplitude_bands"
        },
        "band_noise_n": {
          "$ref": "#/$defs/noise_count_bands"
        },
        "band_noise_basis": {
          "$ref": "#/$defs/noise_basis_bands"
        },
        "rayleigh_kept": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "snr_dropped": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "candidates_missing_from_tcd": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "fit_statistics": {
          "$ref": "#/$defs/fit_statistics"
        },
        "selection": {
          "$ref": "#/$defs/selection"
        },
        "licence_id": {
          "type": "string"
        },
        "qc_status": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "source_type": {
          "type": "string"
        },
        "source_version": {
          "type": "string"
        },
        "source_reliability_label": {
          "type": "string"
        },
        "source_note": {
          "type": "string"
        },
        "recommended_default": {
          "type": "boolean"
        },
        "source_station": {
          "$ref": "#/$defs/source_station"
        },
        "spatial_sampling": {
          "$ref": "#/$defs/spatial_sampling"
        },
        "candidate_list": {
          "type": "string"
        },
        "station_id": {
          "type": "string"
        },
        "native_input": {
          "type": "object",
          "properties": {
            "native_byte_length": {
              "type": "integer"
            },
            "native_byte_offset": {
              "type": "integer"
            },
            "native_line_sha256": {
              "type": "string"
            },
            "native_row_sha256": {
              "type": "string"
            },
            "native_sha256": {
              "type": "string"
            },
            "original_native_length": {
              "type": "integer"
            },
            "original_native_offset": {
              "type": "integer"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true,
          "x-private-process-fields": [
            "native_row_path"
          ]
        },
        "fit_input": {
          "type": "object",
          "properties": {
            "record": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "tcd_dump_sha256": {
              "type": "string"
            },
            "tcd_sha256": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true,
          "x-private-process-fields": [
            "history_context_sha256",
            "implementation_sha256",
            "input_declaration_sha256",
            "runtime"
          ]
        },
        "source_observations": {
          "type": "object",
          "properties": {
            "chunks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": [
                      "null",
                      "object"
                    ],
                    "properties": {
                      "reflevelcode": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "unit": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false,
                    "x-closed-factual": true
                  },
                  "data_present": {
                    "type": "boolean"
                  },
                  "eligible_rows": {
                    "type": "integer"
                  },
                  "empty_interval": {
                    "type": "boolean"
                  },
                  "empty_reason": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "excluded_rows": {
                    "type": "integer"
                  },
                  "metres_factor": {
                    "type": [
                      "null",
                      "number"
                    ]
                  },
                  "query": {
                    "type": "object",
                    "properties": {
                      "expected_name": {
                        "type": "string"
                      },
                      "from_s": {
                        "type": "integer"
                      },
                      "params": {
                        "type": "object",
                        "properties": {
                          "datatype": {
                            "type": "string"
                          },
                          "dst": {
                            "type": "integer"
                          },
                          "fromtime": {
                            "type": "string"
                          },
                          "interval": {
                            "type": "integer"
                          },
                          "refcode": {
                            "type": "string"
                          },
                          "stationcode": {
                            "type": "string"
                          },
                          "tide_request": {
                            "type": "string"
                          },
                          "totime": {
                            "type": "string"
                          },
                          "tzone": {
                            "type": "integer"
                          }
                        },
                        "additionalProperties": false,
                        "x-closed-factual": true
                      },
                      "to_s": {
                        "type": "integer"
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false,
                    "x-closed-factual": true,
                    "x-private-process-fields": [
                      "id"
                    ]
                  },
                  "raw_unit": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "reference": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "rows": {
                    "type": "integer"
                  },
                  "source_files": {
                    "type": "object",
                    "properties": {
                      "response.xml": {
                        "type": "string"
                      },
                      "rows.jsonl": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false,
                    "x-closed-factual": true,
                    "x-private-process-fields": [
                      "http.json",
                      "query.json",
                      "shape.json"
                    ]
                  }
                },
                "additionalProperties": false,
                "x-closed-factual": true,
                "x-private-process-fields": [
                  "query_id"
                ]
              }
            },
            "credit": {
              "type": "string"
            },
            "data": {
              "type": "object",
              "properties": {
                "reflevelcode": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            },
            "data_present": {
              "type": "boolean"
            },
            "eligible_rows": {
              "type": "integer"
            },
            "empty_interval": {
              "type": "boolean"
            },
            "empty_reason": {
              "type": "null"
            },
            "excluded_rows": {
              "type": "integer"
            },
            "exclusion_reasons": {
              "type": "object",
              "properties": {
                "flag_not_obs": {
                  "type": "integer"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            },
            "control": {
              "type": "object",
              "properties": {
                "cadence_counts": {
                  "type": "object",
                  "properties": {
                    "600": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true
                },
                "data": {
                  "type": "object",
                  "properties": {
                    "reflevelcode": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "unit": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true
                },
                "eligible": {
                  "type": "integer"
                },
                "endpoint_rows": {
                  "type": "integer"
                },
                "flag_counts": {
                  "type": "object",
                  "properties": {
                    "obs": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true
                },
                "location": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "latitude": {
                      "type": "string"
                    },
                    "longitude": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true
                },
                "offset_counts": {
                  "type": "object",
                  "properties": {
                    "0": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true
                },
                "rows": {
                  "type": "integer"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true,
              "x-private-process-fields": [
                "ledger_path",
                "ledger_sha256"
              ]
            },
            "filter_response": {
              "type": "string"
            },
            "inclusive_endpoint_rows": {
              "type": "integer"
            },
            "declared_input": {
              "type": "object",
              "properties": {
                "attribution": {
                  "type": "object",
                  "properties": {
                    "adaptation_labelling": {
                      "type": "string"
                    },
                    "additional_named_credit": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "licence_url": {
                      "type": "string"
                    },
                    "link_where_possible": {
                      "type": "string"
                    },
                    "observation_api_url": {
                      "type": "string"
                    },
                    "observation_protocol_url": {
                      "type": "string"
                    },
                    "official_terms_last_updated": {
                      "type": "string"
                    },
                    "official_terms_url": {
                      "type": "string"
                    },
                    "required_credit": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true,
                  "x-private-process-fields": [
                    "basis",
                    "commercial_use",
                    "excluded_basis"
                  ]
                },
                "measurement": {
                  "type": "object",
                  "properties": {
                    "datum": {
                      "type": "string"
                    },
                    "declared_unit": {
                      "type": "string"
                    },
                    "deconvolution": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false,
                      "x-closed-factual": true
                    },
                    "filter_response": {
                      "type": "string"
                    },
                    "height_conversion_to_metres": {
                      "type": "number"
                    },
                    "native_sample_quality": {
                      "type": "string"
                    },
                    "product": {
                      "type": "string"
                    },
                    "request": {
                      "type": "object",
                      "properties": {
                        "datatype": {
                          "type": "string"
                        },
                        "dst": {
                          "type": "integer"
                        },
                        "interval": {
                          "type": "integer"
                        },
                        "refcode": {
                          "type": "string"
                        },
                        "tide_request": {
                          "type": "string"
                        },
                        "tzone": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false,
                      "x-closed-factual": true
                    },
                    "row_admission": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "timestamps": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true,
              "x-private-process-fields": [
                "authority",
                "first_station",
                "future_fix_precondition",
                "inputs",
                "kind",
                "provenance",
                "status"
              ]
            },
            "licence": {
              "type": "string"
            },
            "licence_url": {
              "type": "string"
            },
            "location": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "latitude": {
                  "type": "string"
                },
                "longitude": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            },
            "metres_factor": {
              "type": "number"
            },
            "modifications": {
              "type": "string"
            },
            "native_flags": {
              "type": "object",
              "properties": {
                "obs": {
                  "type": "integer"
                },
                "pre": {
                  "type": "integer"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            },
            "native_interval_min": {
              "type": "integer"
            },
            "native_sample_quality": {
              "type": "string"
            },
            "numerical_admission": {
              "type": "string"
            },
            "product": {
              "type": "string"
            },
            "raw_unit": {
              "type": "string"
            },
            "reference": {
              "type": "string"
            },
            "rows": {
              "type": "integer"
            },
            "sampling": {
              "type": "string"
            },
            "sampling_response_correction": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "source_gaps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from_s": {
                    "type": "integer"
                  },
                  "query_id": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "to_s": {
                    "type": "integer"
                  }
                },
                "additionalProperties": false,
                "x-closed-factual": true
              }
            },
            "source_url": {
              "type": "string"
            },
            "station": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true,
          "x-private-process-fields": [
            "acquisition_manifest_sha256",
            "acquisition_result_sha256",
            "acquisition_root",
            "query_plan_sha256"
          ]
        },
        "source_recipe": {
          "type": "object",
          "properties": {
            "adapter_version": {
              "type": "string"
            },
            "analysis_years": {
              "$ref": "#/$defs/analysis_years"
            },
            "phase_reference_longitude_deg": {
              "type": "number"
            },
            "jma_station_code": {
              "type": "string"
            },
            "redistribution": {
              "type": "string"
            },
            "source_constituents_not_published": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/source_constituent"
              }
            },
            "source_provider": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true,
          "x-private-process-fields": [
            "build",
            "selection_reason",
            "owner"
          ]
        },
        "declared_method": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "qc": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "admission": {
                  "type": "string",
                  "enum": [
                    "finite_literal_obs"
                  ]
                },
                "duplicates": {
                  "type": "string",
                  "enum": [
                    "first_in_source_order"
                  ]
                },
                "subhourly_selection": {
                  "type": "string",
                  "enum": [
                    "record_modal_offset"
                  ]
                },
                "offset_tie": {
                  "type": "string",
                  "enum": [
                    "earliest"
                  ]
                },
                "single_sample_hour": {
                  "type": "string",
                  "enum": [
                    "retain"
                  ]
                },
                "missing_modal_offset_hour": {
                  "type": "string",
                  "enum": [
                    "drop"
                  ]
                },
                "averaging": {
                  "type": "boolean"
                },
                "interpolation": {
                  "type": "boolean"
                },
                "despike": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "window_hours": {
                      "type": "integer"
                    },
                    "k": {
                      "type": "number"
                    },
                    "mad_scale": {
                      "type": "number"
                    },
                    "minimum_samples": {
                      "type": "integer"
                    },
                    "keep_unassessed": {
                      "type": "boolean"
                    }
                  }
                }
              }
            },
            "training": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "source_series_end_s": {
                  "type": "integer"
                },
                "additional_fit_before_cutoff": {
                  "type": "boolean"
                },
                "retrospective": {
                  "type": "boolean"
                },
                "holdout_claim": {
                  "type": "boolean"
                }
              }
            },
            "solver": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "method": {
                  "type": "string",
                  "enum": [
                    "linear_least_squares"
                  ]
                },
                "arithmetic": {
                  "type": "string",
                  "enum": [
                    "float64"
                  ]
                },
                "fit_mean": {
                  "type": "boolean"
                },
                "fit_linear_trend": {
                  "type": "boolean"
                },
                "rcond": {
                  "type": "null"
                },
                "snr_min": {
                  "type": "number"
                },
                "rayleigh_r": {
                  "type": "number"
                }
              }
            },
            "window": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "rolling_cap_years": {
                  "type": "number"
                },
                "days_per_year": {
                  "type": "number"
                },
                "shorter_record": {
                  "type": "string",
                  "enum": [
                    "use_available"
                  ]
                },
                "declared_tcd_first_year": {
                  "type": "integer"
                },
                "declared_tcd_last_year": {
                  "type": "integer"
                },
                "minimum_record_hours": {
                  "type": "integer"
                },
                "selection_training": {
                  "type": "string",
                  "enum": [
                    "before_window_a"
                  ]
                },
                "minimum_window_a_samples": {
                  "type": "integer"
                },
                "extended_selection": {
                  "type": "string",
                  "enum": [
                    "strictly_lower_window_a_rms"
                  ]
                },
                "base_fallback": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "insufficient_window_a_samples",
                      "unresolved_extended_constituent",
                      "selection_fit_error"
                    ]
                  }
                },
                "extended_forced": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "half_fit_failures": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "half": {
                "enum": [
                  "half1",
                  "half2"
                ]
              },
              "reason_code": {
                "enum": [
                  "insufficient_samples",
                  "insufficient_samples_for_unknowns"
                ]
              },
              "sample_count": {
                "type": "integer"
              },
              "unknown_count": {
                "type": "integer"
              },
              "fit": {
                "type": "null"
              }
            }
          }
        }
      },
      "x-closed-factual": true
    },
    "input_binding": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "fit_manifest_sha256": {
          "type": "string"
        },
        "fit_results_sha256": {
          "type": "string"
        },
        "fit_segment": {
          "$ref": "#/$defs/fit_segment"
        },
        "fit_sha256": {
          "type": "string"
        },
        "gesla_manifest_sha256": {
          "type": "string"
        },
        "member_sha256": {
          "type": "string"
        },
        "member_size": {
          "type": "integer"
        },
        "native_input_sha256": {
          "type": "string"
        },
        "original_zero": {
          "$ref": "#/$defs/original_zero"
        },
        "release_sha256": {
          "type": "string"
        },
        "set_id": {
          "type": "string"
        },
        "source_record_id": {
          "type": "string"
        },
        "station_id": {
          "type": "string"
        },
        "tcd_sha256": {
          "type": "string"
        },
        "time_base": {
          "$ref": "#/$defs/time_base_annotation"
        },
        "timebase_sha256": {
          "type": "string"
        },
        "native_sha256": {
          "type": "string"
        },
        "constant_set_sha256": {
          "type": "string"
        },
        "source_provenance": {
          "$ref": "#/$defs/provenance"
        },
        "astro_table_id": {
          "type": "string"
        },
        "convention_id": {
          "type": "string"
        },
        "algorithm": {
          "type": "string"
        },
        "hourly_heights": {
          "$ref": "#/$defs/hourly_heights"
        },
        "model_tcd_sha256": {
          "type": "string"
        },
        "source_candidate_sha256": {
          "type": "string"
        },
        "receipt_sha256": {
          "type": "string"
        },
        "sha256": {
          "type": "string"
        },
        "source_url": {
          "type": "string"
        },
        "tidal_day_padding": {
          "$ref": "#/$defs/hourly_heights"
        },
        "phase_convention": {
          "$ref": "#/$defs/convention"
        },
        "access_terms_url": {
          "type": "string"
        },
        "acquired_at_local": {
          "type": "string"
        },
        "archive_gzip_sha256": {
          "type": "string"
        },
        "attachment_type": {
          "type": "string"
        },
        "computed_reference": {
          "type": "object",
          "properties": {
            "events_response_sha256": {
              "type": "string"
            },
            "hourly_response_sha256": {
              "type": "string"
            },
            "reference_model_json": {
              "type": "string",
              "contentSchema": {
                "$ref": "#/$defs/constant_set"
              }
            },
            "reference_model_sha256": {
              "type": "string"
            },
            "sha256": {
              "type": "string"
            },
            "source_candidate_json": {
              "type": "string",
              "contentSchema": {
                "$ref": "#/$defs/computed_source_snapshot"
              }
            },
            "reference_model_public_sha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "source_candidate_public_sha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "current_native_sha256": {
          "type": "string"
        },
        "height_type_registry": {
          "type": "object",
          "properties": {
            "height_type": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "nameEn": {
                  "type": "string"
                },
                "nameFr": {
                  "type": "string"
                },
                "phenomenonId": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            },
            "path": {
              "type": "string"
            },
            "sha256": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "identity_registry_path": {
          "type": "string"
        },
        "identity_registry_sha256": {
          "type": "string"
        },
        "identity_station_id": {
          "type": "string"
        },
        "metadata_inputs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              }
            },
            "additionalProperties": false,
            "x-closed-factual": true
          }
        },
        "native_input_manifests": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "files": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fetched_at": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "size": {
                      "type": "integer"
                    },
                    "source_url": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true
                }
              },
              "manifest": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "size": {
                    "type": "integer"
                  }
                },
                "additionalProperties": false,
                "x-closed-factual": true
              }
            },
            "additionalProperties": false,
            "x-closed-factual": true
          }
        },
        "original_provenance": {
          "$ref": "#/$defs/source_record/properties/provenance"
        },
        "original_source_provenance": {
          "$ref": "#/$defs/source_record/properties/provenance"
        },
        "permission_grant_asserted": {
          "type": "boolean"
        },
        "published_offsets": {
          "type": "object",
          "properties": {
            "reference_source_record_id": {
              "type": "string"
            },
            "response_json": {
              "type": "string",
              "contentSchema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "refStationId": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "heightOffsetHighTide": {
                    "type": "number"
                  },
                  "heightOffsetLowTide": {
                    "type": "number"
                  },
                  "timeOffsetHighTide": {
                    "type": "integer"
                  },
                  "timeOffsetLowTide": {
                    "type": "integer"
                  },
                  "heightAdjustedType": {
                    "type": "string"
                  },
                  "self": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "x-closed-factual": true
              }
            },
            "sha256": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "source_record_id": {
              "type": "string"
            },
            "source_url": {
              "type": "string"
            },
            "source_version": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "published_reference": {
          "type": "object",
          "properties": {
            "native_station_id": {
              "type": "string"
            },
            "response_json": {
              "type": "string",
              "contentSchema": {
                "$ref": "#/$defs/carrier_noaa_datums"
              }
            },
            "sha256": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "source_record_id": {
              "type": "string"
            },
            "source_url": {
              "type": "string"
            },
            "units": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "source_resource": {
          "type": "string"
        },
        "source_response": {
          "type": "object",
          "properties": {
            "accessed_local": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "sha256": {
              "type": "string"
            },
            "source_field": {
              "type": "string"
            },
            "source_row_index": {
              "type": "integer"
            },
            "source_url": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "station_code": {
          "type": "string"
        },
        "tlt_projection": {
          "type": "object",
          "properties": {
            "native_sha256": {
              "type": "string"
            },
            "projected_constant_set_sha256": {
              "type": "string"
            },
            "source_constant_set_sha256": {
              "type": "string"
            },
            "source_native_sha256": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true,
          "x-private-process-fields": [
            "boundaries_request_sha256",
            "boundaries_results_sha256",
            "events_request_sha256",
            "events_results_sha256",
            "sdk_commit"
          ]
        },
        "unit_registry": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "phenomenon": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "nameEn": {
                  "type": "string"
                },
                "nameFr": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            },
            "sha256": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        }
      },
      "x-closed-factual": true,
      "x-private-process-fields": [
        "sdk_commit",
        "request_sha256",
        "results_sha256",
        "binary_sha256",
        "operation_origin",
        "path",
        "receipt_path",
        "requests_sha256"
      ]
    },
    "retained_basis": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "actual_sample_window": {
          "$ref": "#/$defs/window"
        },
        "counted_days": {
          "type": "integer"
        },
        "counted_months": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "quality": {
          "$ref": "#/$defs/source_quality"
        },
        "reconstruction": {
          "$ref": "#/$defs/reconstruction"
        },
        "high_count": {
          "type": "integer"
        },
        "low_count": {
          "type": "integer"
        },
        "qc_status": {
          "type": "string"
        },
        "qc_flags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/qc_flag"
          }
        },
        "source_type": {
          "type": "string"
        },
        "fallback": {
          "anyOf": [
            {
              "$ref": "#/$defs/fallback"
            },
            {
              "type": "null"
            }
          ]
        },
        "hourly_sample_count": {
          "type": "integer"
        },
        "step_seconds": {
          "type": "number"
        },
        "spring_convention": {
          "type": "string"
        },
        "amplitudes_m": {
          "$ref": "#/$defs/datum_amplitudes"
        },
        "computed_msl_m": {
          "type": "number"
        },
        "per_level": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/datum_basis"
          }
        },
        "DatumAnalysisPeriod": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "ctrlStation": {
          "type": [
            "string",
            "null"
          ]
        },
        "epoch": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_fields": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "heightTypeId": {
                  "type": "string"
                },
                "value": {
                  "type": "number"
                },
                "valuePrecision": {
                  "type": "integer"
                },
                "date": {
                  "type": "string"
                }
              },
              "required": [
                "heightTypeId",
                "value",
                "valuePrecision"
              ],
              "x-closed-factual": true
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "code": {
                  "type": "string"
                },
                "offset": {
                  "type": "number"
                },
                "offsetPrecision": {
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "offset",
                "offsetPrecision"
              ],
              "x-closed-factual": true
            },
            {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/$defs/source_datum_value"
              },
              "properties": {
                "NAVD88": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/source_datum_value"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "MHHW": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/source_datum_value"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "MHW": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/source_datum_value"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "MTL": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/source_datum_value"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "MSL": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/source_datum_value"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "MLW": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/source_datum_value"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "MLLW": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/source_datum_value"
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            }
          ]
        },
        "tidal_day_mode": {
          "type": "string"
        },
        "tidal_day_seconds": {
          "type": "number"
        },
        "higher_high_count": {
          "type": "integer"
        },
        "lower_low_count": {
          "type": "integer"
        },
        "m2_phase_greenwich_deg": {
          "type": "number"
        },
        "m2_speed_deg_per_hour": {
          "type": "number"
        },
        "longitude_east_deg": {
          "type": "number"
        },
        "local_hwi_hours": {
          "type": "number"
        },
        "local_lwi_hours": {
          "type": "number"
        },
        "period_hours": {
          "type": "number"
        },
        "formula": {
          "type": "string"
        },
        "alignment_limitation": {
          "type": "string"
        },
        "analytic_basis": {
          "type": "string"
        },
        "annual_low_event_counts": {
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            "^[0-9]{4}$": {
              "type": "integer"
            }
          }
        },
        "annual_minimum_low_events_m": {
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            "^[0-9]{4}$": {
              "type": "number"
            }
          }
        },
        "approximation": {
          "type": "string"
        },
        "benchmark_mark_elevations_imported": {
          "type": "boolean"
        },
        "boundary_heights_m": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "calendar_timezone": {
          "type": "string"
        },
        "chart_datum": {
          "type": "string"
        },
        "control_station_values_transferred": {
          "type": "boolean"
        },
        "control_tide_station_original": {
          "type": "string"
        },
        "cycle_policy": {
          "type": "string"
        },
        "definition_url": {
          "type": "string"
        },
        "derivation_operation": {
          "type": "string"
        },
        "duration_seconds": {
          "type": "number"
        },
        "duration_years": {
          "type": "number"
        },
        "excluded_constituents": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "extrema_period": {
          "type": "object",
          "properties": {
            "hat": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            },
            "lat": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "historical": {
          "type": "boolean"
        },
        "length_of_series_original": {
          "type": "string"
        },
        "licence_evidence_path": {
          "type": "string"
        },
        "llwlt_convention": {
          "type": "string"
        },
        "measurement_reuse": {
          "type": "object",
          "properties": {
            "basis": {
              "type": "string"
            },
            "origin_input_binding": {
              "$ref": "#/$defs/input_binding"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "msl": {
          "type": "object",
          "properties": {
            "flags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "kind": {
              "type": "string"
            },
            "method": {
              "type": "string"
            },
            "source_name": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "native_offsets": {
          "type": "object",
          "properties": {
            "height_adjusted_type": {
              "type": "string"
            },
            "height_offset_high": {
              "type": "number"
            },
            "height_offset_low": {
              "type": "number"
            },
            "reference_station_id": {
              "type": "string"
            },
            "time_offset_high_min": {
              "type": "integer"
            },
            "time_offset_low_min": {
              "type": "integer"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "neap_envelope_amplitude_m": {
          "type": "number"
        },
        "neap_plane_proxy": {
          "type": "string"
        },
        "never_default": {
          "type": "boolean"
        },
        "nllw_convention": {
          "type": "string"
        },
        "not_selected_for_prediction": {
          "type": "boolean"
        },
        "offset_height_units": {
          "type": "string"
        },
        "operation": {
          "type": "string"
        },
        "output_height_units": {
          "type": "string"
        },
        "output_interval_units": {
          "type": "string"
        },
        "physical_alignment_asserted": {
          "type": "boolean"
        },
        "projected_set_id": {
          "type": "string"
        },
        "proxy_of": {
          "type": "string"
        },
        "publication_date_original": {
          "type": "string"
        },
        "published_time_offset_units": {
          "type": "string"
        },
        "reference": {
          "type": "null"
        },
        "reference_epoch": {
          "type": [
            "string",
            "null"
          ]
        },
        "reference_interval_basis": {
          "type": "string"
        },
        "reference_interval_units": {
          "type": "string"
        },
        "reference_meridian_policy": {
          "type": "string"
        },
        "reference_original": {
          "type": "string"
        },
        "reference_statistic_origin": {
          "type": "string"
        },
        "reference_zero": {
          "type": "string"
        },
        "rights_limitation": {
          "type": "string"
        },
        "selected_constituents": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "source_collection": {
          "type": "string"
        },
        "source_licence_id": {
          "type": "string"
        },
        "source_metadata": {
          "type": "object",
          "properties": {
            "DatumAnalysisPeriod": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "HAT": {
              "type": [
                "null",
                "number"
              ]
            },
            "HATdate": {
              "type": "string"
            },
            "HATtime": {
              "type": "string"
            },
            "LAT": {
              "type": [
                "null",
                "number"
              ]
            },
            "LATdate": {
              "type": "string"
            },
            "LATtime": {
              "type": "string"
            },
            "NGSLink": {
              "type": "string"
            },
            "OrthometricDatum": {
              "type": "string"
            },
            "accepted": {
              "type": "string"
            },
            "ctrlStation": {
              "type": "string"
            },
            "disclaimers": {
              "type": "object",
              "properties": {
                "disclaimers": {
                  "type": "array",
                  "items": {}
                },
                "self": {
                  "type": "null"
                }
              },
              "additionalProperties": false,
              "x-closed-factual": true
            },
            "epoch": {
              "type": "string"
            },
            "max": {
              "type": [
                "null",
                "number"
              ]
            },
            "maxdate": {
              "type": "string"
            },
            "maxtime": {
              "type": "string"
            },
            "min": {
              "type": [
                "null",
                "number"
              ]
            },
            "mindate": {
              "type": "string"
            },
            "mintime": {
              "type": "string"
            },
            "self": {
              "type": "string"
            },
            "superseded": {
              "type": "string"
            },
            "units": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "source_name": {
          "type": "string"
        },
        "station_datum_table_original": {
          "type": "string"
        },
        "tide_table_datum": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string"
            },
            "method": {
              "type": "string"
            },
            "source_name": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "time_offset_precision": {
          "type": "string"
        },
        "time_period_original": {
          "type": "string"
        },
        "units_original": {
          "type": "string"
        },
        "usage_evidence": {
          "type": "object",
          "properties": {
            "licence_evidence": {
              "type": "string"
            },
            "redistribution_basis": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        },
        "year_basis_days": {
          "type": "number"
        },
        "year_count": {
          "type": "integer"
        }
      },
      "x-closed-factual": true
    },
    "source_quality": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "duplicates_dropped": {
          "type": "integer"
        },
        "flag_dropped": {
          "type": "integer"
        },
        "hourly": {
          "type": "integer"
        },
        "hours_off_modal_dropped": {
          "type": "integer"
        },
        "non_null": {
          "type": "integer"
        },
        "rows": {
          "type": "integer"
        },
        "timebase": {
          "type": "string"
        },
        "timebase_dropped": {
          "type": "integer"
        }
      },
      "x-closed-factual": true
    },
    "fit_statistics": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "duplicates_dropped": {
          "type": "integer"
        },
        "filter_response": {
          "type": "string"
        },
        "flag_dropped": {
          "type": "integer"
        },
        "hourly": {
          "type": "integer"
        },
        "hours_off_modal_dropped": {
          "type": "integer"
        },
        "in_window": {
          "type": "integer"
        },
        "native_sample_quality": {
          "type": "string"
        },
        "non_null": {
          "type": "integer"
        },
        "outside_tcd_years": {
          "type": "integer"
        },
        "rows": {
          "type": "integer"
        },
        "sampling": {
          "type": "string"
        },
        "sampling_corrected": {
          "$ref": "#/$defs/sampling_correction"
        },
        "sampling_response_correction": {
          "type": "string"
        },
        "spike_mad_m": {
          "type": "number"
        },
        "spikes_dropped": {
          "type": "integer"
        },
        "spikes_unassessed": {
          "type": "integer"
        },
        "timebase": {
          "type": "string"
        },
        "timebase_dropped": {
          "type": "integer"
        }
      },
      "x-closed-factual": true
    },
    "selection": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "chosen": {
          "type": "string"
        },
        "rms_m": {
          "$ref": "#/$defs/fit_rms"
        },
        "selection_last_s": {
          "type": "number"
        },
        "window_a": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "window_a_hours": {
          "type": "number"
        },
        "method": {
          "type": "string"
        }
      }
    },
    "fit_rms": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "base": {
          "type": "number"
        },
        "extended": {
          "type": "number"
        }
      }
    },
    "original_zero": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "msl_offset_m": {
          "type": [
            "number",
            "null"
          ]
        },
        "zero": {
          "type": [
            "string",
            "null"
          ]
        },
        "zero_name": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "control": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "station_id": {
          "type": "string"
        },
        "set_id": {
          "type": "string"
        },
        "source_id": {
          "type": "string"
        }
      },
      "required": []
    },
    "reconstruction": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "fit_sha256": {
              "type": "string"
            },
            "published_clock": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "tie_to_harmonic_set": {
              "type": "string"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "hourly_heights": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "window": {
          "$ref": "#/$defs/window"
        },
        "input_binding": {
          "$ref": "#/$defs/input_binding"
        },
        "convention_id": {
          "type": "string"
        },
        "astro_table_id": {
          "type": "string"
        }
      }
    },
    "source_datum_value": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "value": {
          "type": "number"
        },
        "source_field": {
          "type": "string"
        }
      },
      "x-closed-factual": true
    },
    "position": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "header_lat": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "header_lon": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "list_port": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "list_lat": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "list_lon": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "list_distance_km": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "from": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "checked": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "replaced_because": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        }
      },
      "x-closed-factual": true
    },
    "analysis_years": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "long_period": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "short_period": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        }
      }
    },
    "source_constituent": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "source_name": {
          "type": "string"
        },
        "speed_deg_per_hour": {
          "type": [
            "number",
            "null"
          ]
        },
        "amplitude_m": {
          "type": "number"
        },
        "reason": {
          "type": "string"
        }
      },
      "x-closed-factual": true
    },
    "datum_amplitudes": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "M2": {
          "type": "number"
        },
        "S2": {
          "type": "number"
        },
        "K1": {
          "type": "number"
        },
        "O1": {
          "type": "number"
        }
      },
      "x-closed-factual": true
    },
    "numeric_qc_values": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "K1_amp_uncertainty_m": {
          "type": [
            "number",
            "null"
          ]
        },
        "K1_phase_uncertainty_deg": {
          "type": [
            "number",
            "null"
          ]
        },
        "O1_amp_uncertainty_m": {
          "type": [
            "number",
            "null"
          ]
        },
        "O1_phase_uncertainty_deg": {
          "type": [
            "number",
            "null"
          ]
        },
        "S2_amp_uncertainty_m": {
          "type": [
            "number",
            "null"
          ]
        },
        "S2_phase_uncertainty_deg": {
          "type": [
            "number",
            "null"
          ]
        },
        "clock_offset_h": {
          "type": "number"
        },
        "distance_km": {
          "type": "number"
        },
        "otc_seasonal_error_m": {
          "type": "number"
        },
        "otc_tidal_error_m": {
          "type": "number"
        },
        "seasonal_error_m": {
          "type": "number"
        },
        "tidal_error_m": {
          "type": "number"
        },
        "missing_pct": {
          "type": "number",
          "description": "Publisher-reported percentage of record hours missing; not OTC-derived or OTC-validated completeness."
        }
      },
      "x-closed-factual": true
    },
    "numeric_record_values": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "step_m": {
          "type": "number",
          "description": "Signed mean-level change in metres at the issue boundary; negative for a drop."
        }
      },
      "x-closed-factual": true
    },
    "historical_crosswalk": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "legacy_id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "modern_alias_verified": {
          "type": "boolean"
        },
        "evidence_sha256": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "reference_binding": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "noaa_id": {
          "type": "string"
        },
        "station_id": {
          "type": "string"
        },
        "mapping_status": {
          "type": "string"
        },
        "evidence_sha256": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "numeric_window": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "start": {
          "type": "number"
        },
        "end": {
          "type": "number"
        }
      }
    },
    "source_station": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "station_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "timezone": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "aliases": {
          "type": "object",
          "properties": {
            "noaa": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "x-closed-factual": true
        }
      },
      "x-closed-factual": true
    },
    "spatial_sampling": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "worst_distance_km": {
          "type": "number"
        },
        "omitted_source_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "native_samples": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "adaptive_passes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "candidate_count": {
                      "type": "integer"
                    },
                    "found": {
                      "type": "boolean"
                    },
                    "radius_km": {
                      "type": "number"
                    },
                    "tested": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": false,
                  "x-closed-factual": true
                }
              },
              "amplitude_m": {
                "type": "number"
              },
              "cap_candidate_count": {
                "type": "integer"
              },
              "cap_geometry": {
                "type": "object",
                "properties": {
                  "candidate_count": {
                    "type": "integer"
                  },
                  "latitude_bounds": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "longitude_half_width_deg": {
                    "type": "number"
                  },
                  "radius_km": {
                    "type": "number"
                  },
                  "rectangle_grid_centers": {
                    "type": "integer"
                  }
                },
                "additionalProperties": false,
                "x-closed-factual": true
              },
              "cell_latitude": {
                "type": "number"
              },
              "cell_longitude": {
                "type": "number"
              },
              "cell_weight": {
                "type": "number"
              },
              "closer_candidates_checked": {
                "type": "integer"
              },
              "decoded_amplitude_cm": {
                "type": "number"
              },
              "decoded_phase_deg": {
                "type": "number"
              },
              "distance_km": {
                "type": "number"
              },
              "grid_sha256": {
                "type": "string"
              },
              "lat_index": {
                "type": "integer"
              },
              "lon_index": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "native_name": {
                "type": "string"
              },
              "phase_deg": {
                "type": "number"
              },
              "raw_amplitude": {
                "type": "number"
              },
              "raw_phase": {
                "type": "number"
              },
              "search_radius_km": {
                "type": "number"
              },
              "tie_rule": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "x-closed-factual": true,
            "x-private-process-fields": [
              "grid_file",
              "nearest_proof",
              "status"
            ]
          }
        }
      },
      "x-closed-factual": true
    },
    "sampling_correction": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "factors": {
          "$ref": "#/$defs/sampling_factors"
        },
        "kind": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      }
    },
    "sampling_factors": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "2MK3": {
          "type": "number"
        },
        "2MK5": {
          "type": "number"
        },
        "2MK6": {
          "type": "number"
        },
        "2MN6": {
          "type": "number"
        },
        "2MO5": {
          "type": "number"
        },
        "2MS6": {
          "type": "number"
        },
        "2N2": {
          "type": "number"
        },
        "2Q1": {
          "type": "number"
        },
        "2SK5": {
          "type": "number"
        },
        "2SM2": {
          "type": "number"
        },
        "2SM6": {
          "type": "number"
        },
        "3MK7": {
          "type": "number"
        },
        "EPS2": {
          "type": "number"
        },
        "J1": {
          "type": "number"
        },
        "K1": {
          "type": "number"
        },
        "K2": {
          "type": "number"
        },
        "L2": {
          "type": "number"
        },
        "LDA2": {
          "type": "number"
        },
        "M1": {
          "type": "number"
        },
        "M2": {
          "type": "number"
        },
        "M3": {
          "type": "number"
        },
        "M4": {
          "type": "number"
        },
        "M6": {
          "type": "number"
        },
        "M8": {
          "type": "number"
        },
        "MA2": {
          "type": "number"
        },
        "MB2": {
          "type": "number"
        },
        "MF": {
          "type": "number"
        },
        "MK3": {
          "type": "number"
        },
        "MK4": {
          "type": "number"
        },
        "MKS2": {
          "type": "number"
        },
        "MM": {
          "type": "number"
        },
        "MN4": {
          "type": "number"
        },
        "MS4": {
          "type": "number"
        },
        "MSF": {
          "type": "number"
        },
        "MSK6": {
          "type": "number"
        },
        "MSN2": {
          "type": "number"
        },
        "MU2": {
          "type": "number"
        },
        "N2": {
          "type": "number"
        },
        "N4": {
          "type": "number"
        },
        "NU2": {
          "type": "number"
        },
        "O1": {
          "type": "number"
        },
        "OO1": {
          "type": "number"
        },
        "P1": {
          "type": "number"
        },
        "Q1": {
          "type": "number"
        },
        "R2": {
          "type": "number"
        },
        "RHO1": {
          "type": "number"
        },
        "S1": {
          "type": "number"
        },
        "S2": {
          "type": "number"
        },
        "S3": {
          "type": "number"
        },
        "S4": {
          "type": "number"
        },
        "S6": {
          "type": "number"
        },
        "SA": {
          "type": "number"
        },
        "SIG1": {
          "type": "number"
        },
        "SK3": {
          "type": "number"
        },
        "SN4": {
          "type": "number"
        },
        "SO3": {
          "type": "number"
        },
        "SSA": {
          "type": "number"
        },
        "T2": {
          "type": "number"
        }
      },
      "x-closed-factual": true,
      "propertyNames": {
        "$ref": "#/$defs/constituent_name"
      }
    },
    "phase_validation": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "gauges": {
          "type": "integer"
        },
        "median_amp_diff_m": {
          "type": "number"
        },
        "median_phase_diff_deg": {
          "type": "number"
        }
      },
      "x-closed-factual": true
    },
    "noise_amplitude_bands": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "D1": {
          "type": "number"
        },
        "D2": {
          "type": "number"
        },
        "D3": {
          "type": "number"
        },
        "D4": {
          "type": "number"
        },
        "D5": {
          "type": "number"
        },
        "D6": {
          "type": "number"
        },
        "D8": {
          "type": "number"
        },
        "LP": {
          "type": "number"
        }
      },
      "x-closed-factual": true
    },
    "noise_count_bands": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "D1": {
          "type": "integer"
        },
        "D2": {
          "type": "integer"
        },
        "D3": {
          "type": "integer"
        },
        "D4": {
          "type": "integer"
        },
        "D5": {
          "type": "integer"
        },
        "D6": {
          "type": "integer"
        },
        "D8": {
          "type": "integer"
        },
        "LP": {
          "type": "integer"
        }
      },
      "x-closed-factual": true
    },
    "noise_basis_bands": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "D1": {
          "type": "string"
        },
        "D2": {
          "type": "string"
        },
        "D3": {
          "type": "string"
        },
        "D4": {
          "type": "string"
        },
        "D5": {
          "type": "string"
        },
        "D6": {
          "type": "string"
        },
        "D8": {
          "type": "string"
        },
        "LP": {
          "type": "string"
        }
      },
      "x-closed-factual": true
    },
    "historical_raw_values": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "source": {
          "type": "string"
        },
        "source_version": {
          "type": "string"
        },
        "data_kind": {
          "type": "string"
        },
        "exact_legacy_id_in_annual_row": {
          "type": "boolean"
        },
        "id_crosswalk_status": {
          "type": "string"
        },
        "modern_replacement_alias_verified": {
          "type": "boolean"
        },
        "nominal_position_precision": {
          "type": "string"
        },
        "chart_datum": {
          "type": "string"
        },
        "msl_offset_or_subordinate_datum_epoch_verified": {
          "type": "boolean"
        },
        "reference_model_2020_equivalence_verified": {
          "type": "boolean"
        },
        "source_2026_prediction_claim": {
          "type": "boolean"
        },
        "mathematical_contract": {
          "type": "string"
        },
        "legacy_source_record_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "annual_table_row": {
          "type": "integer"
        },
        "printed_page": {
          "type": "integer"
        },
        "pdf_page": {
          "type": "integer"
        },
        "annual_body": {
          "type": "string"
        },
        "raw_position": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "latitude": {
              "type": "string"
            },
            "longitude": {
              "type": "string"
            }
          }
        },
        "nominal_position_degrees": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "latitude": {
              "type": "number"
            },
            "longitude": {
              "type": "number"
            }
          }
        },
        "table_standard_meridian": {
          "type": "string"
        },
        "table_fixed_utc_offset_hours": {
          "type": "integer"
        },
        "daylight_saving_applied_in_book": {
          "type": "boolean"
        },
        "reference_name_in_table": {
          "type": "string"
        },
        "candidate_reference_noaa_id": {
          "type": "string"
        },
        "reference_id_binding_status": {
          "type": "string"
        },
        "raw_offsets": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "high_time": {
              "type": "string"
            },
            "low_time": {
              "type": "string"
            },
            "high_height": {
              "type": "string"
            },
            "low_height": {
              "type": "string"
            },
            "high_height_feet": {
              "type": "number"
            },
            "low_height_feet": {
              "type": "number"
            }
          },
          "x-closed-factual": true
        },
        "contract_numeric_representation": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "height_adjusted_type": {
              "type": "string"
            },
            "time_offset_high_min": {
              "type": "integer"
            },
            "time_offset_low_min": {
              "type": "integer"
            },
            "height_offset_high": {
              "type": "number"
            },
            "height_offset_low": {
              "type": "number"
            }
          }
        },
        "raw_other_published_values_feet": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "mean_range": {
              "type": "number"
            },
            "spring_range": {
              "type": "number"
            },
            "mean_tide_level": {
              "type": "number"
            },
            "diurnal_range": {
              "type": "number"
            }
          },
          "x-closed-factual": true
        },
        "removal_events": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "source_clock_timestamp": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "operation": {
                "type": "string"
              },
              "timezone_not_declared_by_history": {
                "type": "boolean"
              }
            }
          }
        },
        "conversion": {
          "type": "string"
        }
      },
      "x-closed-factual": true,
      "x-private-process-fields": [
        "native_augmentation_or_prediction_validation_run",
        "status"
      ]
    },
    "embedded_constituent": {
      "type": "object",
      "required": [
        "name",
        "amplitude_m",
        "phase_deg"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "$ref": "#/$defs/constituent_name"
        },
        "source_name": {
          "description": "The source's own name. At most 31 characters, so that a C reader can hold it in char[32].",
          "type": "string",
          "maxLength": 31
        },
        "doodson": {
          "type": "string",
          "pattern": "^[0-9]{3} ?[0-9]{3}$(?![\\s\\S])"
        },
        "speed_deg_per_hour": {
          "type": "number",
          "minimum": 0
        },
        "amplitude_m": {
          "type": "number",
          "minimum": 0
        },
        "phase_deg": {
          "description": "Greenwich phase lag g.",
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 360
        },
        "amp_uncertainty_m": {
          "type": "number",
          "minimum": 0
        },
        "phase_uncertainty_deg": {
          "type": "number",
          "minimum": 0
        },
        "kept_reason": {
          "type": "string"
        },
        "noise_m": {
          "type": "number"
        },
        "uncertainty_basis": {
          "type": "string"
        }
      }
    },
    "carrier_citation": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "sha256": {
          "type": "string"
        },
        "source_url": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "bytes": {
          "type": "integer"
        },
        "size": {
          "type": "integer"
        }
      },
      "x-private-process-fields": [
        "path"
      ]
    },
    "carrier_chs_catalogue": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "alternativeName": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "officialName": {
          "type": "string"
        },
        "operating": {
          "type": "boolean"
        },
        "timeSeries": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "code": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "latitude": {
                "type": "number"
              },
              "longitude": {
                "type": "number"
              },
              "nameEn": {
                "type": "string"
              },
              "nameFr": {
                "type": "string"
              },
              "owner": {
                "type": "string"
              },
              "phenomenonId": {
                "type": "string"
              }
            }
          }
        },
        "type": {
          "type": "string"
        }
      }
    },
    "carrier_chs_metadata": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "alternativeNames": {
          "type": "string"
        },
        "chsRegionCode": {
          "type": "string"
        },
        "classCode": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "commissioningDate": {
          "type": "string"
        },
        "datums": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "code": {
                "type": "string"
              },
              "offset": {
                "type": "number"
              },
              "offsetPrecision": {
                "type": "integer"
              }
            }
          }
        },
        "decommissioningDate": {
          "type": "string"
        },
        "ebbDirection": {
          "type": "integer"
        },
        "establishedYear": {
          "type": "integer"
        },
        "expectedProductivityPerHour": {
          "type": "integer"
        },
        "floodDirection": {
          "type": "integer"
        },
        "heights": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "date": {
                "type": "string"
              },
              "heightTypeId": {
                "type": "string"
              },
              "value": {
                "type": "number"
              },
              "valuePrecision": {
                "type": "integer"
              }
            }
          }
        },
        "id": {
          "type": "string"
        },
        "isTidal": {
          "type": "boolean"
        },
        "isTideTableReferencePort": {
          "type": "boolean"
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "officialName": {
          "type": "string"
        },
        "operating": {
          "type": "boolean"
        },
        "owner": {
          "type": "string"
        },
        "provinceCode": {
          "type": "string"
        },
        "referencePortStationId": {
          "type": "string"
        },
        "stationOwner": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "acronymEn": {
              "type": "string"
            },
            "acronymFr": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "nameEn": {
              "type": "string"
            },
            "nameFr": {
              "type": "string"
            }
          }
        },
        "status": {
          "type": "string"
        },
        "tideTableId": {
          "type": "string"
        },
        "timeSeries": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "code": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "latitude": {
                "type": "number"
              },
              "longitude": {
                "type": "number"
              },
              "nameEn": {
                "type": "string"
              },
              "nameFr": {
                "type": "string"
              },
              "owner": {
                "type": "string"
              },
              "phenomenonId": {
                "type": "string"
              }
            }
          }
        },
        "timeZoneCode": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "tideTypeCode": {
          "type": "string"
        },
        "externalId": {
          "type": "string"
        },
        "highestHighWaterTimeDifference": {
          "type": "string"
        },
        "lowestLowWaterTimeDifference": {
          "type": "string"
        },
        "publicNotificationEn": {
          "type": "string"
        },
        "publicNotificationFr": {
          "type": "string"
        },
        "waterBody": {
          "type": "string"
        }
      }
    },
    "carrier_chs_ogl_row": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "ARCHIVE_LINK_ENG": {
          "type": "string"
        },
        "ARCHIVE_LINK_FRA": {
          "type": "string"
        },
        "BENCHMARK_LINK_ENG": {
          "type": "string"
        },
        "BENCHMARK_LINK_FRA": {
          "type": "string"
        },
        "DATUM_CODE": {
          "type": "string"
        },
        "LATITUDE": {
          "type": "string"
        },
        "LONGITUDE": {
          "type": "string"
        },
        "MEDS_STATUS": {
          "type": "string"
        },
        "REGION": {
          "type": "string"
        },
        "REGION_ENG": {
          "type": "string"
        },
        "REGION_FRA": {
          "type": "string"
        },
        "STATION_NAME": {
          "type": "string"
        },
        "STATION_NUMBER": {
          "type": "string"
        },
        "STATUS": {
          "type": "string"
        },
        "SYMBOLOGY": {
          "type": "string"
        },
        "TIME_ZONE_TWL": {
          "type": "string"
        }
      }
    },
    "carrier_chs_raw": {
      "anyOf": [
        {
          "$ref": "#/$defs/carrier_chs_catalogue"
        },
        {
          "$ref": "#/$defs/carrier_chs_ogl_row"
        }
      ]
    },
    "carrier_noaa_station": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "HTFhistorical": {
          "type": "boolean"
        },
        "HTFmonthly": {
          "type": "boolean"
        },
        "affiliations": {
          "type": "string"
        },
        "benchmarks": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "datums": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "details": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "disclaimers": {
          "type": [
            "null",
            "object"
          ],
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "expand": {
          "type": [
            "null",
            "string"
          ]
        },
        "floodlevels": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "forecast": {
          "type": "boolean"
        },
        "greatlakes": {
          "type": "boolean"
        },
        "harmonicConstituents": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "id": {
          "type": "string"
        },
        "inundationdb": {
          "type": "boolean"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "nearby": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "nonNavigational": {
          "type": "boolean"
        },
        "notices": {
          "type": [
            "null",
            "object"
          ],
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "observedst": {
          "type": "boolean"
        },
        "ofsMapOffsets": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "outlook": {
          "type": "boolean"
        },
        "portscode": {
          "type": [
            "string",
            "null"
          ]
        },
        "products": {
          "type": [
            "null",
            "object"
          ],
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "reference_id": {
          "type": "string"
        },
        "self": {
          "type": [
            "null",
            "string"
          ]
        },
        "sensors": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "shefcode": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "stormsurge": {
          "type": "boolean"
        },
        "supersededdatums": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "tidal": {
          "type": "boolean"
        },
        "tidePredOffsets": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "tideType": {
          "type": "string"
        },
        "tidepredoffsets": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "timemeridian": {
          "type": [
            "integer",
            "null"
          ]
        },
        "timezone": {
          "type": "string"
        },
        "timezonecorr": {
          "type": "integer"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "carrier_noaa_response": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "count": {
          "type": "integer"
        },
        "units": {
          "type": [
            "string",
            "null"
          ]
        },
        "stations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/carrier_noaa_station"
          }
        },
        "self": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "carrier_noaa_current_station": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "affiliations": {
          "type": "string"
        },
        "currbin": {
          "type": "integer"
        },
        "currentpredictionoffsets": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "depth": {
          "type": [
            "number",
            "null"
          ]
        },
        "depthType": {
          "type": "string"
        },
        "disclaimers": {
          "type": "null"
        },
        "expand": {
          "type": "string"
        },
        "harmonicConstituents": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "self": {
              "type": "string"
            }
          }
        },
        "id": {
          "type": "string"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "notices": {
          "type": "null"
        },
        "portscode": {
          "type": "string"
        },
        "products": {
          "type": "null"
        },
        "self": {
          "type": "string"
        },
        "tideType": {
          "type": "string"
        },
        "timezone_offset": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "carrier_bom_feature": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "geometry": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "coordinates": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "type": {
              "type": "string"
            }
          }
        },
        "properties": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "AAC": {
              "type": "string"
            },
            "ABBR_NAME": {
              "type": "string"
            },
            "ALT_REF": {
              "type": "number"
            },
            "AVAIL_FLAG": {
              "type": "string"
            },
            "LAT": {
              "type": "number"
            },
            "LON": {
              "type": "number"
            },
            "NOTES": {
              "type": [
                "string",
                "null"
              ]
            },
            "OFFICE": {
              "type": "string"
            },
            "OPER_FLAG": {
              "type": [
                "string",
                "null"
              ]
            },
            "PORT_NAME": {
              "type": "string"
            },
            "PS_FLAG": {
              "type": "string"
            },
            "Priority": {
              "type": [
                "integer",
                "null"
              ]
            },
            "QUADRANT": {
              "type": "integer"
            },
            "STATE_CODE": {
              "type": "string"
            },
            "STATE_NAME": {
              "type": "string"
            },
            "TIME_ZONE": {
              "type": "string"
            },
            "TYPE": {
              "type": "string"
            },
            "TZ_DIFF": {
              "type": "integer"
            }
          }
        },
        "type": {
          "type": "string"
        }
      }
    },
    "carrier_noaa_datums": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "DatumAnalysisPeriod": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "HAT": {
          "type": [
            "number",
            "null"
          ]
        },
        "HATdate": {
          "type": "string"
        },
        "HATtime": {
          "type": "string"
        },
        "LAT": {
          "type": [
            "number",
            "null"
          ]
        },
        "LATdate": {
          "type": "string"
        },
        "LATtime": {
          "type": "string"
        },
        "NGSLink": {
          "type": "string"
        },
        "OrthometricDatum": {
          "type": "string"
        },
        "accepted": {
          "type": "string"
        },
        "ctrlStation": {
          "type": "string"
        },
        "datums": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "description": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "value": {
                "type": "number"
              }
            }
          }
        },
        "disclaimers": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "disclaimers": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "x-closed-factual": true
              }
            },
            "self": {
              "type": "null"
            }
          }
        },
        "epoch": {
          "type": "string"
        },
        "max": {
          "type": [
            "number",
            "null"
          ]
        },
        "maxdate": {
          "type": "string"
        },
        "maxtime": {
          "type": "string"
        },
        "min": {
          "type": [
            "number",
            "null"
          ]
        },
        "mindate": {
          "type": "string"
        },
        "mintime": {
          "type": "string"
        },
        "self": {
          "type": "string"
        },
        "superseded": {
          "type": "string"
        },
        "units": {
          "type": "string"
        }
      }
    },
    "carrier_raw_metadata_rows": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/carrier_noaa_station"
          },
          {
            "$ref": "#/$defs/carrier_noaa_current_station"
          },
          {
            "$ref": "#/$defs/carrier_bom_feature"
          },
          {
            "$ref": "#/$defs/carrier_noaa_datums"
          }
        ]
      }
    },
    "carrier_metadata_evidence": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "sha256": {
          "type": "string"
        },
        "raw": {
          "$ref": "#/$defs/carrier_chs_metadata"
        }
      }
    },
    "carrier_chs_identity_row": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "alternative_name_raw": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": "null"
        },
        "datum_code": {
          "type": "null"
        },
        "datum_meaning_limit": {
          "type": "string"
        },
        "datums": {
          "type": [
            "null",
            "array"
          ],
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "code": {
                "type": "string"
              },
              "offset": {
                "type": "number"
              },
              "offsetPrecision": {
                "type": "integer"
              }
            }
          }
        },
        "is_tidal_published": {
          "type": "boolean"
        },
        "latitude": {
          "type": "number"
        },
        "licence_evidence": {
          "type": "string"
        },
        "longitude": {
          "type": "number"
        },
        "metadata_evidence": {
          "$ref": "#/$defs/carrier_metadata_evidence"
        },
        "name": {
          "type": "string"
        },
        "province_published": {
          "type": "string"
        },
        "raw": {
          "$ref": "#/$defs/carrier_chs_raw"
        },
        "redistribution_basis": {
          "type": "string"
        },
        "region_published": {
          "type": "string"
        },
        "region_upstream": {
          "type": "string"
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "roles_meaning": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "wcd": {
              "type": "string"
            },
            "wcs": {
              "type": "string"
            },
            "wl": {
              "type": "string"
            },
            "ap": {
              "type": "string"
            },
            "bore": {
              "type": "string"
            },
            "dvc": {
              "type": "string"
            },
            "wcslack": {
              "type": "string"
            },
            "ws": {
              "type": "string"
            },
            "wt": {
              "type": "string"
            }
          }
        },
        "source_catalogue": {
          "type": "string"
        },
        "source_record_id": {
          "type": "string"
        },
        "source_sha256": {
          "type": "string"
        },
        "source_version": {
          "type": "string"
        },
        "station_code": {
          "type": "string"
        },
        "timezone_iana": {
          "type": "null"
        },
        "timezone_published": {
          "type": "string"
        },
        "timezone_upstream_code": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "carrier_identity_binding": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "datums_receipt_sha256": {
          "type": "string"
        },
        "datums_response_sha256": {
          "type": "string"
        },
        "metadata_response_sha256": {
          "type": "string"
        },
        "metadata_response_url": {
          "type": "string"
        },
        "metadata_row_locator": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "id": {
              "type": "string"
            }
          }
        },
        "official_catalogue_response_sha256": {
          "type": "string"
        },
        "official_catalogue_row_locator": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "id": {
              "type": "string"
            }
          }
        },
        "official_station_identity": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "id": {
              "type": "string"
            },
            "lat": {
              "type": "number"
            },
            "lng": {
              "type": "number"
            },
            "name": {
              "type": "string"
            }
          }
        },
        "original_inventory_source_tuple": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "source": {
              "type": "string"
            },
            "source_record_id": {
              "type": "string"
            },
            "source_version": {
              "type": "string"
            }
          }
        },
        "original_station_identity": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "lat": {
              "type": "string"
            },
            "lon": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "originator": {
              "type": "string"
            },
            "site_code": {
              "type": "string"
            }
          }
        },
        "physical_alignment_asserted": {
          "type": "boolean"
        },
        "same_gauge_asserted": {
          "type": "boolean"
        }
      }
    },
    "carrier_observation_support": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "deconvolution": {
          "type": "string"
        },
        "eligible_history_rows": {
          "type": "integer"
        },
        "empty_intervals": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "x-closed-factual": true,
            "properties": {
              "from_s": {
                "type": "integer"
              },
              "to_s": {
                "type": "integer"
              },
              "reason": {
                "type": "string"
              },
              "raw_sha256": {
                "type": "string"
              },
              "data_present": {
                "type": "boolean"
              }
            },
            "x-private-process-fields": [
              "query_id"
            ]
          }
        },
        "excluded_history_rows": {
          "type": "integer"
        },
        "exclusion_reason_counts": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "flag_not_obs": {
              "type": "integer"
            }
          }
        },
        "filter_response": {
          "type": "string"
        },
        "first_eligible_epoch_s": {
          "type": "integer"
        },
        "flag_counts": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "obs": {
              "type": "integer"
            },
            "pre": {
              "type": "integer"
            }
          }
        },
        "last_eligible_epoch_s": {
          "type": "integer"
        },
        "longest_eligible_gap_seconds": {
          "type": "integer"
        },
        "longest_native_gap_seconds": {
          "type": "integer"
        },
        "native_sample_quality": {
          "type": "string"
        },
        "no_QC_fit_or_interpolation": {
          "type": "boolean"
        },
        "raw_history_rows": {
          "type": "integer"
        },
        "repeated_eligible_instants_retained": {
          "type": "integer"
        },
        "repeated_raw_instants_retained": {
          "type": "integer"
        },
        "sample_quality": {
          "type": "string"
        },
        "unique_eligible_hour_buckets": {
          "type": "integer"
        },
        "unique_eligible_instants": {
          "type": "integer"
        },
        "unique_history_instants": {
          "type": "integer"
        },
        "support_counts_before_fit_qc": {
          "type": "boolean"
        },
        "endpoint_repeats_retained": {
          "type": "boolean"
        },
        "unique_counts_descriptive_only": {
          "type": "boolean"
        },
        "non_observation_rows_retained": {
          "type": "boolean"
        },
        "unknown_flag_meanings_inferred": {
          "type": "boolean"
        },
        "acquisition_performs_deconvolution": {
          "type": "boolean"
        },
        "acquisition_performs_fit": {
          "type": "boolean"
        },
        "acquisition_independent_holdout_claim": {
          "type": "boolean"
        }
      },
      "x-private-process-fields": [
        "first_eligible_local",
        "last_eligible_local"
      ]
    },
    "carrier_source_observations": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "code": {
          "type": "string"
        },
        "credit": {
          "type": "string"
        },
        "filter_response": {
          "type": "string"
        },
        "fit_pin": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "bytes": {
              "type": "integer"
            },
            "sha256": {
              "type": "string"
            }
          },
          "x-private-process-fields": [
            "path"
          ]
        },
        "licence": {
          "type": "string"
        },
        "licence_url": {
          "type": "string"
        },
        "native_class": {
          "type": "string"
        },
        "native_sample_quality": {
          "type": "string"
        },
        "new_datum_tie_or_deconvolved_claim": {
          "type": "boolean"
        },
        "new_fit_input": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "qc_status": {
          "type": "string"
        },
        "sample_quality": {
          "type": "string"
        },
        "sampling_response_correction": {
          "type": "string"
        },
        "sampling_success_stamp_present": {
          "type": "boolean"
        },
        "source": {
          "type": "string"
        },
        "source_location": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "code": {
              "type": "string"
            },
            "latitude": {
              "type": "string"
            },
            "longitude": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          }
        },
        "source_provenance_pin": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "bytes": {
              "type": "integer"
            },
            "sha256": {
              "type": "string"
            }
          },
          "x-private-process-fields": [
            "path"
          ]
        },
        "source_type": {
          "type": "string"
        },
        "time_base": {
          "type": "string"
        },
        "time_base_code": {
          "type": "string"
        },
        "time_base_declared_and_published": {
          "type": "string"
        },
        "provider_station_code": {
          "type": "string"
        }
      },
      "x-private-process-fields": [
        "original_daily_annual_NC_models_retained_unchanged",
        "original_models_retained",
        "original_models_preserved",
        "public_schema_validity",
        "external_metadata_cadence_status_preserved"
      ]
    },
    "carrier_training_overlap": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "evaluation_start_s": {
          "type": "number"
        },
        "evaluation_stop_exclusive_s": {
          "type": "number"
        },
        "fit_first_s": {
          "type": "integer"
        },
        "fit_last_s": {
          "type": "integer"
        },
        "holdout_claim": {
          "type": "boolean"
        },
        "independent_holdout_claim": {
          "type": "boolean"
        },
        "overlap_of_span_bounds": {
          "type": "boolean"
        },
        "primary_span_covers_original_selector_A": {
          "type": "boolean"
        },
        "retrospective": {
          "type": "boolean"
        },
        "selector_window_A_hours": {
          "type": "integer"
        },
        "source_training_span_overlaps_evaluation": {
          "type": "boolean"
        },
        "span_overlap": {
          "type": "boolean"
        },
        "exact_training_membership_reconstructed": {
          "type": "boolean"
        },
        "term_selection_uses_overlapping_evaluation_window": {
          "type": "boolean"
        }
      }
    },
    "carrier_country_resolution": {
      "type": "object",
      "additionalProperties": false,
      "x-closed-factual": true,
      "properties": {
        "observed_input_provenance": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "input_sha256": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "inventory_sha256": {
              "type": "string"
            }
          }
        },
        "observed_source_version": {
          "type": "string"
        },
        "resolution": {
          "type": "object",
          "additionalProperties": false,
          "x-closed-factual": true,
          "properties": {
            "assembled_position": {
              "type": "object",
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {
                "latitude": {
                  "type": "number"
                },
                "longitude": {
                  "type": "number"
                }
              }
            },
            "code_registry_evidence": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/carrier_citation"
              }
            },
            "corrected_position": {
              "type": [
                "object",
                "null"
              ],
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {
                "latitude": {
                  "type": "number"
                },
                "longitude": {
                  "type": "number"
                },
                "evidence": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "x-closed-factual": true,
                    "properties": {
                      "sha256": {
                        "type": "string"
                      },
                      "source_url": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "version": {
                        "type": "string"
                      },
                      "bytes": {
                        "type": "integer"
                      },
                      "size": {
                        "type": "integer"
                      },
                      "path": {
                        "type": "string",
                        "pattern": "^sha256/[0-9a-f]{64}/[^/]+$"
                      }
                    },
                    "x-private-process-fields": []
                  }
                },
                "exact_station_location_verified": {
                  "type": "boolean"
                },
                "position_is_approximate": {
                  "type": "boolean"
                },
                "coordinate_source_provider": {
                  "type": "string"
                },
                "decimal_coordinate_conversion": {
                  "type": "string"
                },
                "decimal_digits_imply_measured_gauge_precision": {
                  "type": "boolean"
                },
                "displayed_decimal_places": {
                  "type": "integer"
                },
                "observation_accuracy_claim": {
                  "type": "boolean"
                },
                "original_signed_longitude": {
                  "type": "number"
                },
                "position_kind": {
                  "type": "string"
                },
                "prediction_accuracy_claim": {
                  "type": "boolean"
                },
                "raw_latitude_retained": {
                  "type": "boolean"
                },
                "source_coordinate_resolution_arcminutes": {
                  "type": "integer"
                },
                "source_document_location": {
                  "type": "object",
                  "additionalProperties": false,
                  "x-closed-factual": true,
                  "properties": {
                    "pdf_page": {
                      "type": "integer"
                    },
                    "printed_page": {
                      "type": "integer"
                    },
                    "table_entry": {
                      "type": "string"
                    },
                    "table_id": {
                      "type": "string"
                    }
                  }
                },
                "source_latitude_agrees_after_rounding": {
                  "type": "boolean"
                },
                "source_longitude_dms": {
                  "type": "object",
                  "additionalProperties": false,
                  "x-closed-factual": true,
                  "properties": {
                    "degrees": {
                      "type": "integer"
                    },
                    "minutes": {
                      "type": "integer"
                    },
                    "hemisphere": {
                      "type": "string"
                    }
                  }
                },
                "source_nominal_latitude_dms": {
                  "type": "object",
                  "additionalProperties": false,
                  "x-closed-factual": true,
                  "properties": {
                    "degrees": {
                      "type": "integer"
                    },
                    "minutes": {
                      "type": "integer"
                    },
                    "hemisphere": {
                      "type": "string"
                    }
                  }
                },
                "source_place_name": {
                  "type": "string"
                },
                "typo_cause_asserted": {
                  "type": "boolean"
                }
              }
            },
            "evidence": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/carrier_citation"
              }
            },
            "input_member_sha256": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "inventory_sha256": {
              "type": "string"
            },
            "lookup_position": {
              "type": "object",
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {
                "latitude": {
                  "type": "number"
                },
                "longitude": {
                  "type": "number"
                }
              }
            },
            "maritime_zone": {
              "type": [
                "object",
                "null"
              ],
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {
                "area_km2": {
                  "type": "integer"
                },
                "iso_sov1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "iso_sov2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "iso_sov3": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "iso_ter1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "iso_ter2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "iso_ter3": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mrgid_eez": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mrgid_sov1": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mrgid_sov2": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mrgid_sov3": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mrgid_ter1": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mrgid_ter2": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mrgid_ter3": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pol_type": {
                  "type": "string"
                },
                "sovereign1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sovereign2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sovereign3": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "territory1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "territory2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "territory3": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "un_sov1": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "un_sov2": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "un_sov3": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "un_ter1": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "un_ter2": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "un_ter3": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "union": {
                  "type": "string"
                },
                "x_1": {
                  "type": "number"
                },
                "y_1": {
                  "type": "number"
                }
              }
            },
            "method": {
              "type": "string"
            },
            "official_source_evidence": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/carrier_citation"
              }
            },
            "raw_hash_role": {
              "type": "string"
            },
            "raw_values": {
              "type": "object",
              "additionalProperties": false,
              "x-closed-factual": true,
              "properties": {
                "country": {
                  "type": [
                    "null",
                    "string"
                  ]
                },
                "country_code": {
                  "type": [
                    "null",
                    "string"
                  ]
                },
                "latitude": {
                  "type": [
                    "number",
                    "string"
                  ]
                },
                "longitude": {
                  "type": [
                    "number",
                    "string"
                  ]
                }
              }
            },
            "resolved_country": {
              "type": [
                "string",
                "null"
              ]
            },
            "resolved_sovereign": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "source_record_id": {
              "type": "string"
            },
            "source_record_sha256": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "source_url": {
              "type": "string"
            },
            "source_versions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sovereign_attribute_role": {
              "type": "string"
            },
            "sovereign_candidates": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "station_ids": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "station_registry_evidence": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/carrier_citation"
              }
            },
            "status": {
              "type": "string"
            },
            "upstream_raw_hash_fields": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "upstream_raw_sha256": {
              "type": "string"
            },
            "zone_candidates": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "x-closed-factual": true,
                "properties": {
                  "feature_id": {
                    "type": "string"
                  },
                  "point_relation": {
                    "type": "string"
                  },
                  "properties": {
                    "type": "object",
                    "additionalProperties": false,
                    "x-closed-factual": true,
                    "properties": {
                      "area_km2": {
                        "type": "integer"
                      },
                      "iso_sov1": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "iso_sov2": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "iso_sov3": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "iso_ter1": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "iso_ter2": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "iso_ter3": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "mrgid_eez": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "mrgid_sov1": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "mrgid_sov2": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "mrgid_sov3": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "mrgid_ter1": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "mrgid_ter2": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "mrgid_ter3": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "pol_type": {
                        "type": "string"
                      },
                      "sovereign1": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "sovereign2": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "sovereign3": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "territory1": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "territory2": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "territory3": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "un_sov1": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "un_sov2": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "un_sov3": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "un_ter1": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "un_ter2": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "un_ter3": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "union": {
                        "type": "string"
                      },
                      "x_1": {
                        "type": "number"
                      },
                      "y_1": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "table_sha256": {
          "type": "string"
        }
      }
    },
    "computed_source_snapshot": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "station_id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "source_record_id": {
          "type": "string"
        },
        "source_version": {
          "type": "string"
        },
        "retained_datums": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/retained_datum"
          }
        }
      },
      "x-closed-factual": true
    },
    "native_coefficient_availability": {
      "type": "object",
      "required": [
        "available_count",
        "total_count"
      ],
      "properties": {
        "available_count": {
          "type": "integer",
          "minimum": 0
        },
        "total_count": {
          "type": "integer",
          "minimum": 1
        }
      },
      "additionalProperties": false,
      "x-closed-factual": true
    }
  }
}
