wx_code_to_numeric#
- metpy.plots.wx_code_to_numeric(codes)#
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 (Sequence[str]) – String values of METAR weather codes
- Returns:
numpy.ndarray
– numeric codes of current weather symbols from the wx_code_map for use in plotting.