{ "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", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
daily_maximum_temperature:degCdaily_minimum_temperature:degC
2014-01-1615.27-1.87
2014-02-1517.141.42
2014-03-1620.894.75
2014-04-1625.5610.62
2014-05-1628.4714.71
2014-06-1630.8820.04
2014-07-1632.6120.55
2014-08-1633.6320.29
2014-09-1629.6318.60
2014-10-1627.0213.44
2014-11-1617.894.10
2014-12-1615.364.73
2015-01-1613.44-0.32
\n", "
" ], "text/plain": [ " daily_maximum_temperature:degC daily_minimum_temperature:degC\n", "2014-01-16 15.27 -1.87\n", "2014-02-15 17.14 1.42\n", "2014-03-16 20.89 4.75\n", "2014-04-16 25.56 10.62\n", "2014-05-16 28.47 14.71\n", "2014-06-16 30.88 20.04\n", "2014-07-16 32.61 20.55\n", "2014-08-16 33.63 20.29\n", "2014-09-16 29.63 18.60\n", "2014-10-16 27.02 13.44\n", "2014-11-16 17.89 4.10\n", "2014-12-16 15.36 4.73\n", "2015-01-16 13.44 -0.32" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "topowx" ] }, { "cell_type": "markdown", "id": "76da46fb", "metadata": {}, "source": [ "## Daily data\n", "This is a sample code to download daily data" ] }, { "cell_type": "code", "execution_count": 5, "id": "a2689beb", "metadata": { "scrolled": true }, "outputs": [], "source": [ "topowx_daily = tsget.topowx_daily(\n", " lat=30, lon=-100, start_date=\"2014-01-01\", end_date=\"2015-02-01\"\n", ")" ] }, { "cell_type": "code", "execution_count": 6, "id": "d5dc094a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
daily_maximum_temperature:degCdaily_minimum_temperature:degC
2014-01-01 12:00:0016.08-1.42
2014-01-02 12:00:0014.13-1.45
2014-01-03 12:00:0011.13-5.06
2014-01-04 12:00:0016.52-2.31
2014-01-05 12:00:0013.42-0.69
.........
2015-01-27 12:00:0024.492.29
2015-01-28 12:00:0024.963.40
2015-01-29 12:00:0022.625.27
2015-01-30 12:00:0012.385.21
2015-01-31 12:00:0013.745.57
\n", "

396 rows × 2 columns

\n", "
" ], "text/plain": [ " daily_maximum_temperature:degC \\\n", "2014-01-01 12:00:00 16.08 \n", "2014-01-02 12:00:00 14.13 \n", "2014-01-03 12:00:00 11.13 \n", "2014-01-04 12:00:00 16.52 \n", "2014-01-05 12:00:00 13.42 \n", "... ... \n", "2015-01-27 12:00:00 24.49 \n", "2015-01-28 12:00:00 24.96 \n", "2015-01-29 12:00:00 22.62 \n", "2015-01-30 12:00:00 12.38 \n", "2015-01-31 12:00:00 13.74 \n", "\n", " daily_minimum_temperature:degC \n", "2014-01-01 12:00:00 -1.42 \n", "2014-01-02 12:00:00 -1.45 \n", "2014-01-03 12:00:00 -5.06 \n", "2014-01-04 12:00:00 -2.31 \n", "2014-01-05 12:00:00 -0.69 \n", "... ... \n", "2015-01-27 12:00:00 2.29 \n", "2015-01-28 12:00:00 3.40 \n", "2015-01-29 12:00:00 5.27 \n", "2015-01-30 12:00:00 5.21 \n", "2015-01-31 12:00:00 5.57 \n", "\n", "[396 rows x 2 columns]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "topowx_daily" ] } ], "metadata": { "kernelspec": { "display_name": "venv_tsgettoolbox", "language": "python", "name": "venv_tsgettoolbox" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.13" } }, "nbformat": 4, "nbformat_minor": 5 }