aws_client
KMA AWS (Automated Weather Station) API client.
This module provides a client for accessing the Korea Meteorological Administration's AWS (방재기상관측) API for automated weather station observations.
AWS provides real-time weather data from automated weather stations focused on disaster prevention and monitoring, with more stations than ASOS.
AWSClient
¶
Client for KMA AWS API.
The AWS system provides real-time weather observations from automated weather stations for disaster prevention purposes. It typically has more observation points than ASOS and focuses on real-time monitoring.
Source code in python/src/kma_mcp/surface/aws_client.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
close()
¶
get_cloud_average(tm1=None, tm2=None, stn=0, itv=10, range_minutes=10, disp=0)
¶
Get AWS cloud data with period average (documented endpoint).
Documented endpoint: nph-aws2_min_ca2 Reference: API_ENDPOINT_Surface.md line 283-297
Parameters:
-
tm1(str | datetime | None, default:None) –Start time (optional, defaults to tm2)
-
tm2(str | datetime | None, default:None) –End time (optional, defaults to current time)
-
stn(int | str, default:0) –Station number (0 for all stations)
-
itv(int, default:10) –Time interval in minutes (default: 10)
-
range_minutes(int, default:10) –Accumulation period for average in minutes (default: 10)
-
disp(int, default:0) –Display format (0=Fortran, 1=Excel)
Returns:
Example
client = AWSClient('your_auth_key') data = client.get_cloud_average(tm2='201503221200', itv=10, range_minutes=10)
Source code in python/src/kma_mcp/surface/aws_client.py
get_cloud_data(tm1=None, tm2=None, stn=0, itv=None, sms=None, disp=0)
¶
Get AWS cloud height and amount data (documented endpoint).
Documented endpoint: nph-aws2_min_cloud Reference: API_ENDPOINT_Surface.md line 268-281
Parameters:
-
tm1(str | datetime | None, default:None) –Start time (optional, defaults to tm2)
-
tm2(str | datetime | None, default:None) –End time (optional, defaults to current time)
-
stn(int | str, default:0) –Station number (0 for all stations)
-
itv(int | None, default:None) –Time interval in minutes (optional)
-
sms(int | None, default:None) –Smoothing flag, 0 or 1 (optional)
-
disp(int, default:0) –Display format (0=Fortran, 1=Excel)
Returns:
Example
client = AWSClient('your_auth_key') data = client.get_cloud_data(tm2='202302010900', itv=10)
Source code in python/src/kma_mcp/surface/aws_client.py
get_cloud_min_max(tm1=None, tm2=None, stn=0, itv=10, range_minutes=10, disp=0)
¶
Get AWS cloud data with period min/max (documented endpoint).
Documented endpoint: nph-aws2_min_ca3 Reference: API_ENDPOINT_Surface.md line 299-312
Parameters:
-
tm1(str | datetime | None, default:None) –Start time (optional, defaults to tm2)
-
tm2(str | datetime | None, default:None) –End time (optional, defaults to current time)
-
stn(int | str, default:0) –Station number (0 for all stations)
-
itv(int, default:10) –Time interval in minutes (default: 10)
-
range_minutes(int, default:10) –Accumulation period for min/max in minutes (default: 10)
-
disp(int, default:0) –Display format (0=Fortran, 1=Excel)
Returns:
Example
client = AWSClient('your_auth_key') data = client.get_cloud_min_max(tm2='201503221200', itv=10, range_minutes=10)
Source code in python/src/kma_mcp/surface/aws_client.py
get_land_surface_temperature(tm=None, tm1=None, tm2=None, stn=0, disp=0)
¶
Get AWS land surface temperature data (documented endpoint).
Documented endpoint: nph-aws2_min_lst Reference: API_ENDPOINT_Surface.md line 254-266
Parameters:
-
tm(str | datetime | None, default:None) –Time in 'YYYYMMDDHHmm' format (optional, defaults to current time)
-
tm1(str | datetime | None, default:None) –Start time (optional, defaults to tm2)
-
tm2(str | datetime | None, default:None) –End time (optional, defaults to current time)
-
stn(int | str, default:0) –Station number (0 for all stations)
-
disp(int, default:0) –Display format (0=Fortran, 1=Excel)
Returns:
Example
client = AWSClient('your_auth_key') data = client.get_land_surface_temperature(tm2='202302010900')
Source code in python/src/kma_mcp/surface/aws_client.py
get_minutely_data(tm1=None, tm2=None, stn=0, disp=0)
¶
Get AWS minutely observation data (documented endpoint).
Documented endpoint: nph-aws2_min Reference: API_ENDPOINT_Surface.md line 241-252
Parameters:
-
tm1(str | datetime | None, default:None) –Start time in 'YYYYMMDDHHmm' format or datetime object (optional, defaults to tm2 if not provided)
-
tm2(str | datetime | None, default:None) –End time in 'YYYYMMDDHHmm' format or datetime object (optional, defaults to current time if not provided)
-
stn(int | str, default:0) –Station number (0 for all stations)
-
disp(int, default:0) –Display format: 0 = Fixed width format suitable for Fortran (default) 1 = Comma-separated format suitable for Excel
Returns:
Example
client = AWSClient('your_auth_key')
Get data for a specific time¶
data = client.get_minutely_data(tm2='202302010900')
Get data for a period¶
data = client.get_minutely_data(tm1='202302010800', tm2='202302010900')