|
1 | | -from __future__ import absolute_import |
| 1 | +#!/usr/bin/env python |
| 2 | +# -*- coding: utf-8 -*- |
| 3 | + |
| 4 | +############################################################################### |
| 5 | +# Copyright Kitware Inc. and Epidemico Inc. |
| 6 | +# |
| 7 | +# Licensed under the Apache License, Version 2.0 ( the "License" ); |
| 8 | +# you may not use this file except in compliance with the License. |
| 9 | +# You may obtain a copy of the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, software |
| 14 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | +# See the License for the specific language governing permissions and |
| 17 | +# limitations under the License. |
| 18 | +############################################################################### |
2 | 19 |
|
| 20 | +from __future__ import absolute_import |
3 | 21 | from ftplib import FTP |
4 | 22 | import logging |
5 | 23 | import os |
@@ -32,6 +50,31 @@ class AirNowGRIB2HourlyProcessor(GeoDataMosaicProcessor): |
32 | 50 | "airnow_aqi_combined"] |
33 | 51 | img_patterns = ["", "_pm25", "_combined"] |
34 | 52 | layer_titles = ["Ozone", "PM25", "Combined Ozone & PM25"] |
| 53 | + description = """ |
| 54 | +U.S. Environmental Protection Agency’s (EPA) nationwide, voluntary program, |
| 55 | +AirNow(www.airnow.gov), provides real-time air quality data and forecasts to |
| 56 | +protect public health across the United States, Canada, and parts of Mexico. |
| 57 | +AirNowreceives real-time ozone and PM2.5data from over 2,000 monitors and |
| 58 | +collects air quality forecasts for more than 300 cities. |
| 59 | +
|
| 60 | +As part of the Global Earth Observation System of Systems (GEOSS) |
| 61 | +(www.epa.gov/geoss) program, the AirNow API system broadens access to AirNowdata |
| 62 | + and data products. AirNow API produces data products in several standard data |
| 63 | +formats and makes them available via FTP and web services. This document |
| 64 | +describes the GRIB2 file formats. |
| 65 | +
|
| 66 | +All data provided by AirNow API are made possible by the efforts of more than |
| 67 | +120 local, state, tribal, provincial, and federal government agencies |
| 68 | +(www.airnow.gov/index.cfm?action=airnow.partnerslist). These data are not fully |
| 69 | +verified or validated and should be considered preliminary and subject to |
| 70 | +change. Data and information reported to AirNow from federal, state, local, and |
| 71 | +tribal agencies are for the express purpose of reporting and forecasting the |
| 72 | +Air Quality Index (AQI). As such, they should not be used to formulate or |
| 73 | +support regulation, trends, guidance, or any other government or public |
| 74 | +decision making. Official regulatory air quality data must be obtained from |
| 75 | +EPA’s Air Quality System (AQS) (www.epa.gov/ttn/airs/airsaqs). See the AirNow |
| 76 | +Data Exchange Guidelines at http://airnowapi.org/docs/DataUseGuidelines.pdf. |
| 77 | +""" |
35 | 78 |
|
36 | 79 | def download(self, auth_account=AIRNOW_ACCOUNT, days=1): |
37 | 80 | """ |
@@ -118,7 +161,8 @@ def run(self, days=1): |
118 | 161 | with open(os.path.join( |
119 | 162 | script_dir, 'resources/airnow.sld')) as sld: |
120 | 163 | self.set_default_style(layer_name, layer_name, sld.read()) |
121 | | - self.update_geonode(layer_name, title=layer_title, store=layer_name) |
| 164 | + self.update_geonode(layer_name, title=layer_title, |
| 165 | + description=self.description, store=layer_name) |
122 | 166 | self.truncate_gs_cache(layer_name) |
123 | 167 | self.cleanup() |
124 | 168 |
|
|
0 commit comments