Skip to content

METARs

Look up METAR weather reports by station ICAO or by nearest station from Flow Pro scripts.

Updated View as Markdown
For humans
Flow APIFlow Pro scriptingWeather

This article covers the following platforms

Use the Weather API to find a METAR — a station’s coded weather report — by station ICAO or by the nearest station to a coordinate.

find_metar_by_icao()

Find the METAR reported by a specific station.

SignatureTypeScript contract
find_metar_by_icao(
  icao: string,
  callback: (metar: object | null) => void
): void

Parameters

NameTypeRequiredDescription
icaostringYesICAO code of the station to find.
callback(metar: object | null) => voidYesFunction that receives the METAR or null when no report is found.
ExampleJavaScript
this.$api.weather.find_metar_by_icao("KJFK", (metar) => {
  console.log(metar);
});

Returns

voidThe result is delivered to the callback.

Callback data

NameTypeDescription
metarobject | nullMatching METAR, or null when no station report is found.

find_metar_from_coords()

Find the METAR from the station nearest a coordinate.

SignatureTypeScript contract
find_metar_from_coords(
  latitude: number,
  longitude: number,
  callback: (metar: object | null) => void
): void

Parameters

NameTypeRequiredDescription
latitudenumberYesLatitude of the search position.
longitudenumberYesLongitude of the search position.
callback(metar: object | null) => voidYesFunction that receives the nearest METAR or null when none is found.
ExampleJavaScript
this.$api.weather.find_metar_from_coords(40.6413, -73.7781, (metar) => {
  console.log(metar);
});

Returns

voidThe result is delivered to the callback.

Callback data

NameTypeDescription
metarobject | nullNearest METAR, or null when no station report is found.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close