{ "cells": [ { "cell_type": "markdown", "id": "afe66f92", "metadata": {}, "source": [ "# topoWX\n", "This downloads topoWX data using tsgettoolbox" ] }, { "cell_type": "code", "execution_count": 1, "id": "6866e649", "metadata": {}, "outputs": [], "source": [ "from tsgettoolbox import tsgettoolbox as tsget" ] }, { "cell_type": "code", "execution_count": 2, "id": "d56d5609", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Help on function topowx_daily in module tsgettoolbox.functions.topowx:\n", "\n", "topowx_daily(lat, lon, variables=None, start_date=None, end_date=None)\n", " US 30arcsecond 1948- M:Topoclimatic Daily Air Temperature Dataset.\n", " \n", " institution: USGS\n", " \n", " history: Created on: 2017-07-06, dataset version 2016.1\n", " \n", " references: http://dx.doi.org/10.1002/joc.4127\n", " , http://dx.doi.org/10.1002/2014GL062803\n", " , http://dx.doi.org/10.1175/JAMC-D-15-0276.1\n", " \n", " comment: The TopoWx ('Topography Weather') gridded dataset contains daily\n", " 30-arcsec resolution (~800-m resolution; WGS84) interpolations of minimum\n", " and maximum topoclimatic air temperature for the conterminous U.S. Using\n", " both DEM-based variables and MODIS land skin temperature as predictors of\n", " air temperature, interpolation procedures include moving window regression\n", " kriging and geographically weighted regression. To avoid artificial climate\n", " trends, all input station data are homogenized using the GHCN/USHCN\n", " Pairwise Homogenization Algorithm\n", " (http://www.ncdc.noaa.gov/oa/climate/research/ushcn/#phas).\n", " \n", " Conventions: CF-1.6\n", " \n", " source: TopoWx software version 1.3.0 (https://github.com/jaredwo/topowx)\n", " \n", " license: This work is licensed under a Creative Commons\n", " Attribution-ShareAlike 4.0 International License\n", " (https://creativecommons.org/licenses/by-sa/4.0/).\n", " \n", " Metadata_Conventions: Unidata Dataset Discovery v1.0\n", " \n", " summary: The TopoWx ('Topography Weather') dataset contains historical\n", " 30-arcsec resolution (~800-m) interpolations of daily minimum and maximum\n", " topoclimatic air temperature for the conterminous U.S. Using both DEM-based\n", " variables and MODIS land skin temperature as predictors of air temperature,\n", " interpolation procedures include moving window regression kriging and\n", " geographically weighted regression. To avoid artificial climate trends, all\n", " input station data are homogenized using the GHCN/USHCN Pairwise\n", " Homogenization Algorithm\n", " (http://www.ncdc.noaa.gov/oa/climate/research/ushcn/#phas). The following\n", " data are available in this archive: 1948-2016 daily and monthly minimum and\n", " maximum temperature, and 1981-2010 monthly normals for minimum and maximum\n", " temperature with corresponding uncertainty (kriging prediction error).\n", " Ongoing annual updates will regenerate the entire dataset incorporating\n", " both new observations and model enhancements. This will result in\n", " a continuously improved dataset. However, different versions of TopoWx will\n", " be incompatible. For instance, data from the original 1948-2012 version\n", " should not be mixed with data from the new 1948-2016 version.\n", " \n", " keywords: maximum temperature, minimum temperature, land skin temperature,\n", " MODIS, kriging, homogenization, gridded meteorological data\n", " \n", " id: topowx\n", " \n", " naming_authority: cida.usgs.gov\n", " \n", " cdm_data_type: Grid\n", " \n", " date_created: 2017-07-06\n", " \n", " creator_name: Jared Oyler\n", " \n", " creator_url: http://www.scrimhub.org\n", " \n", " creator_email: jared.oyler@psu.edu\n", " \n", " publisher_name: Office of Water Information\n", " \n", " publisher_url: https://owi.usgs.gov/\n", " \n", " publisher_email: wwatkins@usgs.gov\n", " \n", " date_issued: 2017-08-18\n", " \n", " project: TopoWx: Topoclimatic Daily Air Temperature Dataset for the\n", " Conterminous United States\n", " \n", " processing_level: Historical Gridded Meteorological Data\n", " \n", " acknowledgement: Please cite this data as: Oyler JW, Ballantyne A, Jencso\n", " K, Sweet M, Running S. Creating a Topoclimatic Daily Air Temperature\n", " Dataset for the Conterminous United States using Homogenized Station Data\n", " and Remotely Sensed Land Skin Temperature. International Journal of\n", " Climatology. http://dx.doi.org/10.1002/joc.4127\n", " \n", " geospatial_lat_min: 24.1\n", " \n", " geospatial_lat_max: 51.2\n", " \n", " geospatial_lon_min: -125\n", " \n", " geospatial_lon_max: -99.7\n", " \n", " time_coverage_start: 1948-01-01T00:00:00\n", " \n", " time_coverage_end: 2016-12-31T00:00:00\n", " \n", " time_coverage_resolution: P1D\n", " \n", " \n", " Parameters\n", " ----------\n", " lat\n", " The latitude of the point. North hemisphere is positive from 0 to 90. South\n", " hemisphere is negative from 0 to -90.\n", " \n", " lon\n", " The longitude of the point. Western hemisphere (west of Greenwich Prime\n", " Meridian) is negative 0 to -180. The eastern hemisphere (east of the Greenwich\n", " Prime Meridian) is positive 0 to 180.\n", " \n", " variables : str\n", " At the command line can supply a comma separated list of variable\n", " names. Using the Python API needs to be a Python list of strings.\n", " \n", " The current list of available topowx variables are daily minimum\n", " temperature (tmin) and daily maximum temperature (tmax).\n", " \n", " start_date : str\n", " [optional, defaults to first date in time-series, input filter]\n", " \n", " The start_date of the series in ISOdatetime format, or 'None'\n", " for beginning.\n", " \n", " end_date : str\n", " [optional, defaults to last date in time-series, input filter]\n", " \n", " The end_date of the series in ISOdatetime format, or 'None' for\n", " end.\n", "\n" ] } ], "source": [ "help(tsget.topowx_daily)" ] }, { "cell_type": "markdown", "id": "b01459c2", "metadata": {}, "source": [ "## Monthly data\n", "This is a sample code to download daily data" ] }, { "cell_type": "code", "execution_count": 3, "id": "71111d09", "metadata": {}, "outputs": [], "source": [ "topowx = tsget.topowx(lat=30, lon=-100, start_date=\"2014-01-01\", end_date=\"2015-02-01\")" ] }, { "cell_type": "code", "execution_count": 4, "id": "ddea6cef", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | daily_maximum_temperature:degC | \n", "daily_minimum_temperature:degC | \n", "
---|---|---|
2014-01-16 | \n", "15.27 | \n", "-1.87 | \n", "
2014-02-15 | \n", "17.14 | \n", "1.42 | \n", "
2014-03-16 | \n", "20.89 | \n", "4.75 | \n", "
2014-04-16 | \n", "25.56 | \n", "10.62 | \n", "
2014-05-16 | \n", "28.47 | \n", "14.71 | \n", "
2014-06-16 | \n", "30.88 | \n", "20.04 | \n", "
2014-07-16 | \n", "32.61 | \n", "20.55 | \n", "
2014-08-16 | \n", "33.63 | \n", "20.29 | \n", "
2014-09-16 | \n", "29.63 | \n", "18.60 | \n", "
2014-10-16 | \n", "27.02 | \n", "13.44 | \n", "
2014-11-16 | \n", "17.89 | \n", "4.10 | \n", "
2014-12-16 | \n", "15.36 | \n", "4.73 | \n", "
2015-01-16 | \n", "13.44 | \n", "-0.32 | \n", "
\n", " | daily_maximum_temperature:degC | \n", "daily_minimum_temperature:degC | \n", "
---|---|---|
2014-01-01 12:00:00 | \n", "16.08 | \n", "-1.42 | \n", "
2014-01-02 12:00:00 | \n", "14.13 | \n", "-1.45 | \n", "
2014-01-03 12:00:00 | \n", "11.13 | \n", "-5.06 | \n", "
2014-01-04 12:00:00 | \n", "16.52 | \n", "-2.31 | \n", "
2014-01-05 12:00:00 | \n", "13.42 | \n", "-0.69 | \n", "
... | \n", "... | \n", "... | \n", "
2015-01-27 12:00:00 | \n", "24.49 | \n", "2.29 | \n", "
2015-01-28 12:00:00 | \n", "24.96 | \n", "3.40 | \n", "
2015-01-29 12:00:00 | \n", "22.62 | \n", "5.27 | \n", "
2015-01-30 12:00:00 | \n", "12.38 | \n", "5.21 | \n", "
2015-01-31 12:00:00 | \n", "13.74 | \n", "5.57 | \n", "
396 rows × 2 columns
\n", "