We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
act.utils.decode_present_weather classification tables
* ACT version: 1.4.2
* Python version: 3.9.16
* Operating System: Windows 10

### Description

I was working on decoding the FD70 present weather codes for the ATMOS FD70. It appears the FD70 uses both the WMO 4680 and 4677 in the numeric code. For it's metar code it uses WMO 4678. 

When the code encountered a value of 88, for snow pellets, which it adopted from the 4677 table, it errors and stops. Suggestion would possible be adding in some of the WMO4677 to fill number gaps if applicable. 

### What I Did

```
input: 
act.utils.decode_present_weather(ds,variable='present_wx0')
output:

  File D:\anaconda3\lib\site-packages\act\utils\inst_utils.py:133 in <listcomp>
    wx_type = [weather[d] for d in data.values]

KeyError: 88

```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `act/utils/inst_utils.py`
Content:
```
1 """
2 Functions containing utilities for instruments.
3 
4 """
5 
6 
7 def decode_present_weather(ds, variable=None, decoded_name=None):
8     """
9     This function is to decode codes reported from automatic weather stations suchas the PWD22.
10     This is based on WMO Table 4680.
11 
12     Parameters
13     ----------
14     ds : xarray.Dataset
15         ACT or Xarray dataset from which to convert codes
16     variable : string
17         Variable to decode
18     decoded_name : string
19         New variable name to store updated labels
20 
21     Returns
22     -------
23     ds : xarray.Dataset
24         Returns dataset with new decoded data
25 
26     References
27     ----------
28     WMO Manual on Code Volume I.1 A-360.
29     https://library.wmo.int/doc_num.php?explnum_id=10235
30 
31     """
32 
33     # Check to ensure that a variable name is passed
34     if variable is None:
35         raise ValueError('You must specify a variable')
36 
37     if variable not in ds:
38         raise ValueError('Variable not in the dataset')
39 
40     # Define the weather hash
41     weather = {
42         0: 'No significant weather observed',
43         1: 'Clouds generally dissolving or becoming less developed during the past hour',
44         2: 'State of the sky on the whole unchanged during the past hour',
45         3: 'Clouds generally forming or developing during the past hour',
46         4: 'Haze or smoke, or dust in suspension in the air, visibility >= 1 km',
47         5: 'Haze or smoke, or dust in suspension in the air, visibility < 1 km',
48         10: 'Mist',
49         11: 'Diamond dust',
50         12: 'Distant lightning',
51         18: 'Squalls',
52         20: 'Fog',
53         21: 'Precipitation',
54         22: 'Drizzle (not freezing) or snow grains',
55         23: 'Rain (not freezing)',
56         24: 'Snow',
57         25: 'Freezing drizzle or freezing rain',
58         26: 'Thunderstorm (with or without precipitation)',
59         27: 'Blowing or drifting snow or sand',
60         28: 'Blowing or drifting snow or sand, visibility >= 1 km',
61         29: 'Blowing or drifting snow or sand, visibility < 1 km',
62         30: 'Fog',
63         31: 'Fog or ice fog in patches',
64         32: 'Fog or ice fog, has become thinner during the past hour',
65         33: 'Fog or ice fog, no appreciable change during the past hour',
66         34: 'Fog or ice fog, has begun or become thicker during the past hour',
67         35: 'Fog, depositing rime',
68         40: 'Precipitation',
69         41: 'Precipitation, slight or moderate',
70         42: 'Precipitation, heavy',
71         43: 'Liquid precipitation, slight or moderate',
72         44: 'Liquid precipitation, heavy',
73         45: 'Solid precipitation, slight or moderate',
74         46: 'Solid precipitation, heavy',
75         47: 'Freezing precipitation, slight or moderate',
76         48: 'Freezing precipitation, heavy',
77         50: 'Drizzle',
78         51: 'Drizzle, not freezing, slight',
79         52: 'Drizzle, not freezing, moderate',
80         53: 'Drizzle, not freezing, heavy',
81         54: 'Drizzle, freezing, slight',
82         55: 'Drizzle, freezing, moderate',
83         56: 'Drizzle, freezing, heavy',
84         57: 'Drizzle and rain, slight',
85         58: 'Drizzle and rain, moderate or heavy',
86         60: 'Rain',
87         61: 'Rain, not freezing, slight',
88         62: 'Rain, not freezing, moderate',
89         63: 'Rain, not freezing, heavy',
90         64: 'Rain, freezing, slight',
91         65: 'Rain, freezing, moderate',
92         66: 'Rain, freezing, heavy',
93         67: 'Rain (or drizzle) and snow, slight',
94         68: 'Rain (or drizzle) and snow, moderate or heavy',
95         70: 'Snow',
96         71: 'Snow, light',
97         72: 'Snow, moderate',
98         73: 'Snow, heavy',
99         74: 'Ice pellets, slight',
100         75: 'Ice pellets, moderate',
101         76: 'Ice pellets, heavy',
102         77: 'Snow grains',
103         78: 'Ice crystals',
104         80: 'Shower(s) or Intermittent Precipitation',
105         81: 'Rain shower(s) or intermittent rain, slight',
106         82: 'Rain shower(s) or intermittent rain, moderate',
107         83: 'Rain shower(s) or intermittent rain, heavy',
108         84: 'Rain shower(s) or intermittent rain, violent',
109         85: 'Snow shower(s) or intermittent snow, slight',
110         86: 'Snow shower(s) or intermittent snow, moderate',
111         87: 'Snow shower(s) or intermittent snow, heavy',
112         89: 'Hail',
113         90: 'Thunderstorm',
114         91: 'Thunderstorm, slight or moderate, with no precipitation',
115         92: 'Thunderstorm, slight or moderate, with rain showers and/or snow showers',
116         93: 'Thunderstorm, slight or moderate, with hail',
117         94: 'Thunderstorm, heavy, with no precipitation',
118         95: 'Thunderstorm, heavy, with rain showers and/or snow showers',
119         96: 'Thunderstorm, heavy, with hail',
120         99: 'Tornado',
121         -9999: 'Missing',
122     }
123 
124     # If a decoded name is not passed, make one
125     if decoded_name is None:
126         decoded_name = variable + '_decoded'
127 
128     # Get data and fill nans with -9999
129     data = ds[variable]
130     data = data.fillna(-9999)
131 
132     # Get the weather type for each code
133     wx_type = [weather[d] for d in data.values]
134 
135     # Massage the data array to set back in the dataset
136     data.values = wx_type
137     if 'long_name' in data.attrs:
138         data.attrs['long_name'] = data.attrs['long_name'] + ' Decoded'
139     else:
140         data.attrs['long_name'] = 'Decoded present weather values'
141     if 'valid_min' in data.attrs:
142         del data.attrs['valid_min']
143     if 'valid_max' in data.attrs:
144         del data.attrs['valid_max']
145 
146     ds[decoded_name] = data
147 
148     return ds
149
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/act/utils/inst_utils.py b/act/utils/inst_utils.py
--- a/act/utils/inst_utils.py
+++ b/act/utils/inst_utils.py
@@ -6,8 +6,8 @@
 
 def decode_present_weather(ds, variable=None, decoded_name=None):
     """
-    This function is to decode codes reported from automatic weather stations suchas the PWD22.
-    This is based on WMO Table 4680.
+    This function is to decode codes reported from automatic weather stations such as the PWD22.
+    This is based on WMO Table 4680 as well as a supplement table for WMO table 4677.
 
     Parameters
     ----------
@@ -37,8 +37,8 @@
     if variable not in ds:
         raise ValueError('Variable not in the dataset')
 
-    # Define the weather hash
-    weather = {
+    # Define the weather hash for WMO table 4680.
+    weather_4680 = {
         0: 'No significant weather observed',
         1: 'Clouds generally dissolving or becoming less developed during the past hour',
         2: 'State of the sky on the whole unchanged during the past hour',
@@ -121,6 +121,18 @@
         -9999: 'Missing',
     }
 
+    # Define the weather hash for WMO table 4677.
+    weather_4677 = {
+        88: 'Shower(s) of snow pellets or small hail, with or without rain or rain and snow mixed, moderate or heavy',
+    }
+
+    # Join weather tables
+    weather_combined = dict(weather_4680)
+    weather_combined.update(weather_4677)
+
+    # Sort keys to be in order
+    weather = dict(sorted(weather_combined.items()))
+
     # If a decoded name is not passed, make one
     if decoded_name is None:
         decoded_name = variable + '_decoded'

{"golden_diff": "diff --git a/act/utils/inst_utils.py b/act/utils/inst_utils.py\n--- a/act/utils/inst_utils.py\n+++ b/act/utils/inst_utils.py\n@@ -6,8 +6,8 @@\n \n def decode_present_weather(ds, variable=None, decoded_name=None):\n     \"\"\"\n-    This function is to decode codes reported from automatic weather stations suchas the PWD22.\n-    This is based on WMO Table 4680.\n+    This function is to decode codes reported from automatic weather stations such as the PWD22.\n+    This is based on WMO Table 4680 as well as a supplement table for WMO table 4677.\n \n     Parameters\n     ----------\n@@ -37,8 +37,8 @@\n     if variable not in ds:\n         raise ValueError('Variable not in the dataset')\n \n-    # Define the weather hash\n-    weather = {\n+    # Define the weather hash for WMO table 4680.\n+    weather_4680 = {\n         0: 'No significant weather observed',\n         1: 'Clouds generally dissolving or becoming less developed during the past hour',\n         2: 'State of the sky on the whole unchanged during the past hour',\n@@ -121,6 +121,18 @@\n         -9999: 'Missing',\n     }\n \n+    # Define the weather hash for WMO table 4677.\n+    weather_4677 = {\n+        88: 'Shower(s) of snow pellets or small hail, with or without rain or rain and snow mixed, moderate or heavy',\n+    }\n+\n+    # Join weather tables\n+    weather_combined = dict(weather_4680)\n+    weather_combined.update(weather_4677)\n+\n+    # Sort keys to be in order\n+    weather = dict(sorted(weather_combined.items()))\n+\n     # If a decoded name is not passed, make one\n     if decoded_name is None:\n         decoded_name = variable + '_decoded'\n", "issue": "act.utils.decode_present_weather classification tables\n* ACT version: 1.4.2\r\n* Python version: 3.9.16\r\n* Operating System: Windows 10\r\n\r\n### Description\r\n\r\nI was working on decoding the FD70 present weather codes for the ATMOS FD70. It appears the FD70 uses both the WMO 4680 and 4677 in the numeric code. For it's metar code it uses WMO 4678. \r\n\r\nWhen the code encountered a value of 88, for snow pellets, which it adopted from the 4677 table, it errors and stops. Suggestion would possible be adding in some of the WMO4677 to fill number gaps if applicable. \r\n\r\n### What I Did\r\n\r\n```\r\ninput: \r\nact.utils.decode_present_weather(ds,variable='present_wx0')\r\noutput:\r\n\r\n  File D:\\anaconda3\\lib\\site-packages\\act\\utils\\inst_utils.py:133 in <listcomp>\r\n    wx_type = [weather[d] for d in data.values]\r\n\r\nKeyError: 88\r\n\r\n```\r\n\n", "before_files": [{"content": "\"\"\"\nFunctions containing utilities for instruments.\n\n\"\"\"\n\n\ndef decode_present_weather(ds, variable=None, decoded_name=None):\n    \"\"\"\n    This function is to decode codes reported from automatic weather stations suchas the PWD22.\n    This is based on WMO Table 4680.\n\n    Parameters\n    ----------\n    ds : xarray.Dataset\n        ACT or Xarray dataset from which to convert codes\n    variable : string\n        Variable to decode\n    decoded_name : string\n        New variable name to store updated labels\n\n    Returns\n    -------\n    ds : xarray.Dataset\n        Returns dataset with new decoded data\n\n    References\n    ----------\n    WMO Manual on Code Volume I.1 A-360.\n    https://library.wmo.int/doc_num.php?explnum_id=10235\n\n    \"\"\"\n\n    # Check to ensure that a variable name is passed\n    if variable is None:\n        raise ValueError('You must specify a variable')\n\n    if variable not in ds:\n        raise ValueError('Variable not in the dataset')\n\n    # Define the weather hash\n    weather = {\n        0: 'No significant weather observed',\n        1: 'Clouds generally dissolving or becoming less developed during the past hour',\n        2: 'State of the sky on the whole unchanged during the past hour',\n        3: 'Clouds generally forming or developing during the past hour',\n        4: 'Haze or smoke, or dust in suspension in the air, visibility >= 1 km',\n        5: 'Haze or smoke, or dust in suspension in the air, visibility < 1 km',\n        10: 'Mist',\n        11: 'Diamond dust',\n        12: 'Distant lightning',\n        18: 'Squalls',\n        20: 'Fog',\n        21: 'Precipitation',\n        22: 'Drizzle (not freezing) or snow grains',\n        23: 'Rain (not freezing)',\n        24: 'Snow',\n        25: 'Freezing drizzle or freezing rain',\n        26: 'Thunderstorm (with or without precipitation)',\n        27: 'Blowing or drifting snow or sand',\n        28: 'Blowing or drifting snow or sand, visibility >= 1 km',\n        29: 'Blowing or drifting snow or sand, visibility < 1 km',\n        30: 'Fog',\n        31: 'Fog or ice fog in patches',\n        32: 'Fog or ice fog, has become thinner during the past hour',\n        33: 'Fog or ice fog, no appreciable change during the past hour',\n        34: 'Fog or ice fog, has begun or become thicker during the past hour',\n        35: 'Fog, depositing rime',\n        40: 'Precipitation',\n        41: 'Precipitation, slight or moderate',\n        42: 'Precipitation, heavy',\n        43: 'Liquid precipitation, slight or moderate',\n        44: 'Liquid precipitation, heavy',\n        45: 'Solid precipitation, slight or moderate',\n        46: 'Solid precipitation, heavy',\n        47: 'Freezing precipitation, slight or moderate',\n        48: 'Freezing precipitation, heavy',\n        50: 'Drizzle',\n        51: 'Drizzle, not freezing, slight',\n        52: 'Drizzle, not freezing, moderate',\n        53: 'Drizzle, not freezing, heavy',\n        54: 'Drizzle, freezing, slight',\n        55: 'Drizzle, freezing, moderate',\n        56: 'Drizzle, freezing, heavy',\n        57: 'Drizzle and rain, slight',\n        58: 'Drizzle and rain, moderate or heavy',\n        60: 'Rain',\n        61: 'Rain, not freezing, slight',\n        62: 'Rain, not freezing, moderate',\n        63: 'Rain, not freezing, heavy',\n        64: 'Rain, freezing, slight',\n        65: 'Rain, freezing, moderate',\n        66: 'Rain, freezing, heavy',\n        67: 'Rain (or drizzle) and snow, slight',\n        68: 'Rain (or drizzle) and snow, moderate or heavy',\n        70: 'Snow',\n        71: 'Snow, light',\n        72: 'Snow, moderate',\n        73: 'Snow, heavy',\n        74: 'Ice pellets, slight',\n        75: 'Ice pellets, moderate',\n        76: 'Ice pellets, heavy',\n        77: 'Snow grains',\n        78: 'Ice crystals',\n        80: 'Shower(s) or Intermittent Precipitation',\n        81: 'Rain shower(s) or intermittent rain, slight',\n        82: 'Rain shower(s) or intermittent rain, moderate',\n        83: 'Rain shower(s) or intermittent rain, heavy',\n        84: 'Rain shower(s) or intermittent rain, violent',\n        85: 'Snow shower(s) or intermittent snow, slight',\n        86: 'Snow shower(s) or intermittent snow, moderate',\n        87: 'Snow shower(s) or intermittent snow, heavy',\n        89: 'Hail',\n        90: 'Thunderstorm',\n        91: 'Thunderstorm, slight or moderate, with no precipitation',\n        92: 'Thunderstorm, slight or moderate, with rain showers and/or snow showers',\n        93: 'Thunderstorm, slight or moderate, with hail',\n        94: 'Thunderstorm, heavy, with no precipitation',\n        95: 'Thunderstorm, heavy, with rain showers and/or snow showers',\n        96: 'Thunderstorm, heavy, with hail',\n        99: 'Tornado',\n        -9999: 'Missing',\n    }\n\n    # If a decoded name is not passed, make one\n    if decoded_name is None:\n        decoded_name = variable + '_decoded'\n\n    # Get data and fill nans with -9999\n    data = ds[variable]\n    data = data.fillna(-9999)\n\n    # Get the weather type for each code\n    wx_type = [weather[d] for d in data.values]\n\n    # Massage the data array to set back in the dataset\n    data.values = wx_type\n    if 'long_name' in data.attrs:\n        data.attrs['long_name'] = data.attrs['long_name'] + ' Decoded'\n    else:\n        data.attrs['long_name'] = 'Decoded present weather values'\n    if 'valid_min' in data.attrs:\n        del data.attrs['valid_min']\n    if 'valid_max' in data.attrs:\n        del data.attrs['valid_max']\n\n    ds[decoded_name] = data\n\n    return ds\n", "path": "act/utils/inst_utils.py"}], "after_files": [{"content": "\"\"\"\nFunctions containing utilities for instruments.\n\n\"\"\"\n\n\ndef decode_present_weather(ds, variable=None, decoded_name=None):\n    \"\"\"\n    This function is to decode codes reported from automatic weather stations such as the PWD22.\n    This is based on WMO Table 4680 as well as a supplement table for WMO table 4677.\n\n    Parameters\n    ----------\n    ds : xarray.Dataset\n        ACT or Xarray dataset from which to convert codes\n    variable : string\n        Variable to decode\n    decoded_name : string\n        New variable name to store updated labels\n\n    Returns\n    -------\n    ds : xarray.Dataset\n        Returns dataset with new decoded data\n\n    References\n    ----------\n    WMO Manual on Code Volume I.1 A-360.\n    https://library.wmo.int/doc_num.php?explnum_id=10235\n\n    \"\"\"\n\n    # Check to ensure that a variable name is passed\n    if variable is None:\n        raise ValueError('You must specify a variable')\n\n    if variable not in ds:\n        raise ValueError('Variable not in the dataset')\n\n    # Define the weather hash for WMO table 4680.\n    weather_4680 = {\n        0: 'No significant weather observed',\n        1: 'Clouds generally dissolving or becoming less developed during the past hour',\n        2: 'State of the sky on the whole unchanged during the past hour',\n        3: 'Clouds generally forming or developing during the past hour',\n        4: 'Haze or smoke, or dust in suspension in the air, visibility >= 1 km',\n        5: 'Haze or smoke, or dust in suspension in the air, visibility < 1 km',\n        10: 'Mist',\n        11: 'Diamond dust',\n        12: 'Distant lightning',\n        18: 'Squalls',\n        20: 'Fog',\n        21: 'Precipitation',\n        22: 'Drizzle (not freezing) or snow grains',\n        23: 'Rain (not freezing)',\n        24: 'Snow',\n        25: 'Freezing drizzle or freezing rain',\n        26: 'Thunderstorm (with or without precipitation)',\n        27: 'Blowing or drifting snow or sand',\n        28: 'Blowing or drifting snow or sand, visibility >= 1 km',\n        29: 'Blowing or drifting snow or sand, visibility < 1 km',\n        30: 'Fog',\n        31: 'Fog or ice fog in patches',\n        32: 'Fog or ice fog, has become thinner during the past hour',\n        33: 'Fog or ice fog, no appreciable change during the past hour',\n        34: 'Fog or ice fog, has begun or become thicker during the past hour',\n        35: 'Fog, depositing rime',\n        40: 'Precipitation',\n        41: 'Precipitation, slight or moderate',\n        42: 'Precipitation, heavy',\n        43: 'Liquid precipitation, slight or moderate',\n        44: 'Liquid precipitation, heavy',\n        45: 'Solid precipitation, slight or moderate',\n        46: 'Solid precipitation, heavy',\n        47: 'Freezing precipitation, slight or moderate',\n        48: 'Freezing precipitation, heavy',\n        50: 'Drizzle',\n        51: 'Drizzle, not freezing, slight',\n        52: 'Drizzle, not freezing, moderate',\n        53: 'Drizzle, not freezing, heavy',\n        54: 'Drizzle, freezing, slight',\n        55: 'Drizzle, freezing, moderate',\n        56: 'Drizzle, freezing, heavy',\n        57: 'Drizzle and rain, slight',\n        58: 'Drizzle and rain, moderate or heavy',\n        60: 'Rain',\n        61: 'Rain, not freezing, slight',\n        62: 'Rain, not freezing, moderate',\n        63: 'Rain, not freezing, heavy',\n        64: 'Rain, freezing, slight',\n        65: 'Rain, freezing, moderate',\n        66: 'Rain, freezing, heavy',\n        67: 'Rain (or drizzle) and snow, slight',\n        68: 'Rain (or drizzle) and snow, moderate or heavy',\n        70: 'Snow',\n        71: 'Snow, light',\n        72: 'Snow, moderate',\n        73: 'Snow, heavy',\n        74: 'Ice pellets, slight',\n        75: 'Ice pellets, moderate',\n        76: 'Ice pellets, heavy',\n        77: 'Snow grains',\n        78: 'Ice crystals',\n        80: 'Shower(s) or Intermittent Precipitation',\n        81: 'Rain shower(s) or intermittent rain, slight',\n        82: 'Rain shower(s) or intermittent rain, moderate',\n        83: 'Rain shower(s) or intermittent rain, heavy',\n        84: 'Rain shower(s) or intermittent rain, violent',\n        85: 'Snow shower(s) or intermittent snow, slight',\n        86: 'Snow shower(s) or intermittent snow, moderate',\n        87: 'Snow shower(s) or intermittent snow, heavy',\n        89: 'Hail',\n        90: 'Thunderstorm',\n        91: 'Thunderstorm, slight or moderate, with no precipitation',\n        92: 'Thunderstorm, slight or moderate, with rain showers and/or snow showers',\n        93: 'Thunderstorm, slight or moderate, with hail',\n        94: 'Thunderstorm, heavy, with no precipitation',\n        95: 'Thunderstorm, heavy, with rain showers and/or snow showers',\n        96: 'Thunderstorm, heavy, with hail',\n        99: 'Tornado',\n        -9999: 'Missing',\n    }\n\n    # Define the weather hash for WMO table 4677.\n    weather_4677 = {\n        88: 'Shower(s) of snow pellets or small hail, with or without rain or rain and snow mixed, moderate or heavy',\n    }\n\n    # Join weather tables\n    weather_combined = dict(weather_4680)\n    weather_combined.update(weather_4677)\n\n    # Sort keys to be in order\n    weather = dict(sorted(weather_combined.items()))\n\n    # If a decoded name is not passed, make one\n    if decoded_name is None:\n        decoded_name = variable + '_decoded'\n\n    # Get data and fill nans with -9999\n    data = ds[variable]\n    data = data.fillna(-9999)\n\n    # Get the weather type for each code\n    wx_type = [weather[d] for d in data.values]\n\n    # Massage the data array to set back in the dataset\n    data.values = wx_type\n    if 'long_name' in data.attrs:\n        data.attrs['long_name'] = data.attrs['long_name'] + ' Decoded'\n    else:\n        data.attrs['long_name'] = 'Decoded present weather values'\n    if 'valid_min' in data.attrs:\n        del data.attrs['valid_min']\n    if 'valid_max' in data.attrs:\n        del data.attrs['valid_max']\n\n    ds[decoded_name] = data\n\n    return ds\n", "path": "act/utils/inst_utils.py"}]}