Options
All
  • Public
  • Public/Protected
  • All
Menu

METAR

🌦 A TypeScript library for processing METAR weather data.

Test Compile Lint Docs Coverage License

author

Will Barkoff william@barkoffusa.com

license

MIT

see

https://www.icams-portal.gov/publications/fmh/FMH1/FMH1.pdf Federal Meteorological Handbook No. 1: Surface Weather Observations and Reports, referred to as FMH1.

Index

Type aliases

METARReport

METARReport: { respectModifier: RespectModifier; runwayVisibilities: RunwayVisibility[]; stationIdentifier: string; time: ReportTime; type: "routine" | "special" | "unknown"; visibility: number; visibilityType: VisibilityType; wind: Wind }

Type declaration

  • respectModifier: RespectModifier

    respectModifier represents the respect modifier of the report.

    • automatic if the report had no human intervention (AUTO in the METAR report)
    • correction if the report had a human correction (COR in the METAR report)
    • unknown if the field was omitted from the report, or another value was provided.
    see

    FMH1 section 12.6.4

  • runwayVisibilities: RunwayVisibility[]

    runwayVisibilities represents the visibilities at an airport's runways.

  • stationIdentifier: string

    stationIdentifier is the identifier of the reporting station.

    example

    KJFK for John F. Kennedy Interational Airport

    example

    EGLL for Heathrow Airport

    see

    FMH1 section 12.6.2

  • time: ReportTime

    time represents the time of the report. The day of the month, the hour, and the minute are reported. These are reported in UTC or Zulu time.

    example

    {day: 10, hour: 3, minute: 12} would represent 100312Z in the METAR.

    see

    FMH1 section 12.6.3

  • type: "routine" | "special" | "unknown"

    type indicates the type of the report

    If this is a routine report, it is routine. If this is a special report, it is special. Otherwise, it is unknown.

    example

    routine when the METAR includes METAR.

    example

    special when the METAR includes SPECI.

    see

    FMH1 section 12.6.1

  • visibility: number

    visibility represents the visibility at the time of the report. It is reported in statue miles (SM).

    see

    FMH1 section 12.6.6

    see

    FMH1 table 12-1

    see

    FMH1 chapter 6

  • visibilityType: VisibilityType

    visibilityType represents how the visibility should be understood.

    see

    VisibilityType for more informaton about how data should be interperted.

    see

    FMH1 section 12.6.6

    see

    FMH1 chapter 6

  • wind: Wind

    wind represents the wind at the time of the report.

    see

    FMH1 section 12.6.5

ReportTime

ReportTime: { day: number; hour: number; minute: number }

Type declaration

  • day: number

    day represents the day of the month of the report, in UTC.

  • hour: number

    hour represents the hour of the report, in UTC

  • minute: number

    minute represents the minute of the report, in UTC

RespectModifier

RespectModifier: "automatic" | "correction" | "unknown"

RespectModifier represents the respect modifier of a report.

RunwayVisibility

RunwayVisibility: { runway: string; visibility: number | [number, number]; visibilityType: VisibilityType }

RunwayVisibility represeants the visiblity at a specific runway

see

FMH1 section 12.6.7

Type declaration

  • runway: string

    runway is the name of the runway, for example "27L" or "13".

  • visibility: number | [number, number]

    visibility is the visibility in feet, or the range of visibilities.

  • visibilityType: VisibilityType

    visibilityType represents how the visibility should be understood.

    see

    VisibilityType for more informaton about how data should be interperted.

    see

    FMH1 section 12.6.6

    see

    FMH1 chapter 6

VisibilityType

VisibilityType: "more" | "less" | "normal"

VisibilityType represents the visibility type. "more" means that the visibility is higher than the specified number. "less" means that the visibility is less than the reported number. "normal" means that the visibility is equal to the reported number.

Wind

Wind: { calm: boolean; direction: WindDirection; gust: number; speed: number; variance: null | [number, number] }

Type declaration

  • calm: boolean

    calm is true if the winds are calm (reporting 00000KT in the METAR).

  • direction: WindDirection

    direction is the direction, in degrees, that the wind is blowing. If winds are calm, the direction is -1.

  • gust: number

    guest represents the gust speed of the wind.

  • speed: number

    speed is the wind speed.

  • variance: null | [number, number]

    variance is the directional variance of the wind. If a directional variance is not specified, it is null. Otherwise, it is the

WindDirection

WindDirection: number | "calm" | "variable"

WindDirection represents a direction of the wind. It is normally a number representing the direction of the wind in degrees. It can also be "calm" if there are no winds, or "variable" if winds are variable but under 6 knots.

Functions

parseMETAR

  • Parses a US METAR

    Parameters

    • metarStr: string

      the string of the METAR

    Returns METARReport

    the parsed METAR

Legend

Generated using TypeDoc