Query NCDC Global Historical Climatology Network dataset for daily climate data. More...
Functions | |
def | findStationsWithinBoundingBox |
Find stations that lie within a bounding box. | |
def | findStationNearestToCoordinates |
Determine identifier of station nearest to longitude, latitude coordinates. | |
def | getClimateDataForStation |
Fetch climate timeseries data for a GHCN daily station. | |
Variables | |
string | HOST 'www1.ncdc.noaa.gov' |
string | URL_PROTO '/pub/data/ghcn/daily/all/{station_id}.dly' |
tuple | _SRS int(4326) |
int | _BUFF_LEN 4096 |
Query NCDC Global Historical Climatology Network dataset for daily climate data.
This software is provided free of charge under the New BSD License. Please see the following license information:
Copyright (c) 2013, University of North Carolina at Chapel Hill All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
def ecohydroworkflowlib.climatedata.ghcndquery.findStationNearestToCoordinates | ( | config, | |
longitude, | |||
latitude | |||
) |
Determine identifier of station nearest to longitude, latitude coordinates.
config | ConfigParser containing the section 'GHCND' and option 'PATH_OF_STATION_DB' |
longitude | Float representing WGS84 longitude |
latitude | Float representing WGS84 latitude |
config | ConfigParser containing the section 'GHCND' and option 'PATH_OF_STATION_DB' |
longitude | Float representing WGS84 longitude |
latitude | Float representing WGS84 latitude |
def ecohydroworkflowlib.climatedata.ghcndquery.findStationsWithinBoundingBox | ( | config, | |
bbox | |||
) |
Find stations that lie within a bounding box.
config | ConfigParser containing the section 'GHCND' and option 'PATH_OF_STATION_DB' |
bbox | A dict containing keys: minX, minY, maxX, maxY, srs, where srs='EPSG:4326' |
def ecohydroworkflowlib.climatedata.ghcndquery.getClimateDataForStation | ( | config, | |
outputDir, | |||
outFilename, | |||
stationID, | |||
overwrite = True |
|||
) |
Fetch climate timeseries data for a GHCN daily station.
config | A Python ConfigParser (not currently used) |
outputDir | String representing the absolute/relative path of the directory into which output DEM should be written |
outDEMFilename | String representing the name of the DEM file to be written |
stationID | String representing unique identifier of station |
overwrite | Boolean value indicating whether or not the file indicated by filename should be overwritten. If False and filename exists, IOError exception will be thrown with errno.EEXIST |
overwrite | Boolean value indicating whether or not the file indicated by filename should be overwritten. If False and filename exists, IOError exception will be thrown with errno.EEXIST |
IOError if outputDir is not a writable directory IOError if outFilename already exists and overwrite is False (see above)
int ecohydroworkflowlib.climatedata.ghcndquery._BUFF_LEN 4096 |
tuple ecohydroworkflowlib.climatedata.ghcndquery._SRS int(4326) |
string ecohydroworkflowlib.climatedata.ghcndquery.HOST 'www1.ncdc.noaa.gov' |
string ecohydroworkflowlib.climatedata.ghcndquery.URL_PROTO '/pub/data/ghcn/daily/all/{station_id}.dly' |