wx_code_to_numeric

metpy.plots.wx_code_to_numeric(codes)[source]

Determine the numeric weather symbol value from METAR code text.

A robust method to identifies the numeric value for plotting the correct symbol from a decoded METAR current weather group. The METAR codes should be strings with no missing values or NaN strings (empty strings are okay).

For example, if from a Pandas Dataframe sfc_df.wxcodes.fillna(‘’)

Parameters

codes (Array like containing string values of METAR weather codes) –

Returns

  • array of numeric codes of current weather symbols from the wx_code_map for use in

  • plotting.