pyiem.nws.products.metar_util module#

METAR formatting utilities.

pyiem.nws.products.metar_util.metar_from_dict(ob)[source]#

Format a METAR from a dictionary like pyiem.Observation.

Parameters:

ob (dict)

Return type:

str

pyiem.nws.products.metar_util.metar_format_altimeter(alti)[source]#

Format the altimeter.

Parameters:

alti (float | None)

Return type:

str | None

pyiem.nws.products.metar_util.metar_format_mslp(mslp)[source]#

Format the SLP value.

Parameters:

mslp (float | None)

Return type:

str | None

pyiem.nws.products.metar_util.metar_format_pgroup(phour, hours=1)[source]#

Format the precipitation group.

Parameters:
  • phour (float | None)

  • hours (int | None)

Return type:

str | None

pyiem.nws.products.metar_util.metar_format_sky(ob)[source]#

Format the sky conditions.

Parameters:

ob (dict) – Containing skyc{1,2,3,4} and skyl{1,2,3,4} keys

Return type:

str | None

pyiem.nws.products.metar_util.metar_format_temperature(tmpf, dwpf, tgroup=False)[source]#

Format the temperature.

Parameters:
Return type:

str | None

pyiem.nws.products.metar_util.metar_format_visibility(vsby)[source]#

Format the visibility.

Parameters:

vsby (float | None)

Return type:

str | None

pyiem.nws.products.metar_util.metar_format_weather(wxcodes)[source]#

Format the present weather strings.

Parameters:

wxcodes (list | None)

Return type:

str | None

pyiem.nws.products.metar_util.metar_format_wind(drct, sknt, gust)[source]#

Format the wind speed and direction.

Parameters:
Return type:

str