{
  "version": "1",
  "_comment": "Provider-agnostic flatfile → canonical (event, station) field map. Every synonym was validated by value-match against the production EventTable/StationTable in gmdb.v2/index/ (see docs/2026-05-13_flatfile_synonyms_discovery.md). Consumed by parseFlatfile().",
  "events": {
    "_dedup_by": ["EventDate", "EventLatitude", "EventLongitude", "EventMagnitude"],
    "fields": {
      "EventTimeUTC": {
        "type": "datetime",
        "synonyms": ["event_time", "Origin_time", "EarthquakeTime"],
        "compose_from": [
          {
            "fields": [
              "YEAR",
              "MODY",
              "HRMN"
            ],
            "pattern": "{YEAR}{MODY}T{HRMN}00Z"
          },
          {
            "fields": [
              "Year",
              "Month",
              "Day",
              "Hour",
              "Minute",
              "Second"
            ],
            "pattern": "{Year}-{Month}-{Day}T{Hour}:{Minute}:{Second}Z"
          }
        ]
      },
      "EventLatitude": {
        "type": "numeric",
        "synonyms": ["HypLat", "Eqlat", "ev_latitude", "EventLatitude", "EarthquakeLatitude", "Event Latitude (deg.)", "latitude", "Hypocenter.Latitude.(deg)", "Latitude_deg", "EventLatitude_deg"]
      },
      "EventLongitude": {
        "type": "numeric",
        "synonyms": ["HypLon", "Eqlon", "ev_longitude", "EventLongitude", "EarthquakeLongitude", "Event Longitude (deg.)", "longitude", "Hypocenter.Longitude.(deg)", "Longitude_deg", "EventLongitude_deg"]
      },
      "EventDepth": {
        "type": "numeric",
        "synonyms": ["Depth_km", "ev_depth_km", "EventDepth", "Depth (km)", "Hypocenter.Depth.(km)", "EventDepth_km", "EarthquakeDepth"]
      },
      "EventMagnitude": {
        "type": "numeric",
        "synonyms": ["Mw", "Mcat", "EventMagnitude", "MW", "Moment Magnitude (MW)", "Earthquake.Magnitude", "magnitude", "ml", "mw", "EarthquakeMagnitude", "mb", "emec_mw"]
      },
      "EventMagnitudeType": {
        "type": "character",
        "synonyms": ["EventMagnitudeType", "EarthquakeMagnitudeType", "Magnitude.Type", "emec_mw_type"]
      },
      "EventID": {
        "type": "character",
        "generated": true
      },
      "EventDate": {
        "type": "integer",
        "generated": true,
        "compose_from": [
          {
            "fields": [
              "YEAR",
              "MODY"
            ],
            "pattern": "{YEAR}{MODY}"
          },
          {
            "fields": [
              "Year",
              "Month",
              "Day"
            ],
            "pattern": "{Year}{Month}{Day}"
          }
        ]
      },
      "EventMechanism": {
        "type": "character",
        "synonyms": [
          "Mechanism",
          "Mech",
          "fm_type_code",
          "Fault_Type",
          "Mechanism.Based.on.Rake.Angle",
          "Focal_mechanism_Garcia_",
          "Focal_mechanism_kegan_"
        ],
        "note": "value-match not possible (production EventMechanism.owner is 100% NA); synonyms are name-based, audited against gmdb.v2/flatfiles/*"
      }
    }
  },
  "stations": {
    "_dedup_by": ["StationID", "NetworkID"],
    "fields": {
      "NetworkID": {
        "type": "character",
        "synonyms": ["network", "Network", "network_code"]
      },
      "StationLatitude": {
        "type": "numeric",
        "synonyms": ["StationLat", "latitude", "Station Latitude (deg.)", "Latitude", "Coord_lat", "st_latitude", "StationLatitude_deg", "lat", "Station LAT"]
      },
      "StationLongitude": {
        "type": "numeric",
        "synonyms": ["StationLon", "longitude", "Station Longitude (deg.)", "Longitude", "Coord_long", "st_longitude", "StationLongitude_deg", "lon", "Station LON"]
      },
      "StationVs30": {
        "type": "numeric",
        "synonyms": ["Vs30", "vs30", "VS30 (m/s)", "StationVs30_m_s", "PreferedVs30", "preferred_vs30_m_s", "vs30_m_s", "StationVs30", "vs30_measured", "MeasuredVs30", "Vs30_fCSN"]
      },
      "StationID": {
        "type": "character",
        "generated": true
      },
      "SiteClass": {
        "type": "character",
        "derivable_from": "StationVs30",
        "note": "NEHRP class inferable from StationVs30 (A: >1500, B: 760-1500, C: 360-760, D: 180-360, E: <180 m/s)"
      }
    }
  },
  "_helpers": {
    "YEAR": {
      "synonyms": ["year", "YEAR", "Year"]
    },
    "MODY": {
      "synonyms": "MODY"
    },
    "HRMN": {
      "synonyms": "HRMN"
    },
    "Month": {
      "synonyms": "Month"
    },
    "Day": {
      "synonyms": "Day"
    },
    "Hour": {
      "synonyms": "Hour"
    },
    "Minute": {
      "synonyms": "Minute"
    },
    "Second": {
      "synonyms": "Second"
    }
  }
}
