Skip to content

Command line script and Python package to get weather and hydrologic time-series from Internet services.

License

Notifications You must be signed in to change notification settings

timcera/tsgettoolbox

Repository files navigation

Tests Test Coverage Latest release BSD-3 clause license PyPI - Python Version

tsgettoolbox - Quick Guide

The 'tsgettoolbox' is a Python script and library to get time-series data from different web services. The tsgettoolbox will work with Python and 3.10+.

Documentation

Reference documentation is at tsgettoolbox_documentation.

Installation

At the command line:

$ pip install tsgettoolbox

Usage Summary - Command Line

Just run 'tsgettoolbox --help' to get a list of subcommands. To get detailed help for a particular sub-command, for instance 'coops', type 'tsgettoolbox coops --help'.

Sub-command Spatial Extent Time Extent Type Time Interval Description
cdec US/CA varies station E,H,D,M California Department of Water Resources
coops global varies station 1T,6T,H, D,M Center for Operational Oceanographic Products and Services
cpc DISCONTINUED US varies region W Climate Prediction Center
daymet NAmerica 1980- grid 1km D,M daily meteorology by the Oak Ridge National Laboratory
fawn US/FL varies station 15T,H,D, M Florida Automated Weather
hydstra_ts varies varies station E,H,D,M Kisters Hydstra Webservice - time series values
hydstrsa_catalog varies varies station -NA- Kisters Hydstra Webservice - variable catalog
hydrstra_stations varies varies station -NA- Kisters Hydstra Webservice - station list
ldas DEPRECATED use ldas_* functions below instead global varies grid varies Land Data Assimilation System
ldas_gldas_noah global 2000- grid 0.25deg 3H GLDAS NOAH hydrology model results
ldas_gldas_noah_v2_0 global 1948- 2014 grid 0.25deg 3H GLDAS NOAH hydrology model
ldas_gldas_noah_v2_1 global 2000- grid 0.25deg 3H GLDAS NOAH hydrology model
ldas_grace NAmerica 2002- grid 0.125deg 7D Groundwater and soil moisture from GRACE
ldas_merra global 1980- grid 0.5x 0.625deg H MERRA-2 Land surface
ldas_nldas_fora NAmerica 1979- grid 0.125deg H NLDAS Weather Forcing A (surface)
ldas_nldas_noah NAmerica 1979- grid 0.125deg H NLDAS NOAH hydrology model
ldas_nldas_vic NAmerica 1979- grid 0.125deg H NLDAS VIC hydrology model
ldas_smerge global 1997- grid 0.125deg D SMERGE-Noah-CCI root zone soil
metdata NAmerica 1980- grid 4km D Daily data from METDATA based on PRISM.
modis global 2000- grid 250m, 500m, 1000m 4D,8D,16 D,A MODIS derived data
ncei_ghcnd_ftp global varies station D NCEI Global Historical Climatology Network - Daily (GHCND) from FTP server.
ncei_ghcnd global varies station D NCEI Global Historical Climatology Network - Daily (GHCND) from web services.
ncei_gsod global varies station D NCEI Global Summary of the Day (GSOD)
ncei_gsom global varies station M NCEI Global Summary of the Month (GSOM)
ncei_gsoy global varies station A NCEI Global Summary of Year
ncei_normal_ann global varies station A NCEI annual normals
ncei_normal_dly global varies station D NCEI daily normals
ncei_normal_hly global varies station H NCEI hourly normals
ncei_normal_mly global varies station M NCEI monthly normals
ncei_precip_15 global varies station 15T NCEI 15 minute precipitation
ncei_precip_hly global varies station H NCEI hourly precipitation
ncei_annual global varies station A NCEI annual data summaries
ncei_ghcndms global varies station M NCEI GHCND Monthly Summaries (GHCNDMS)
ncei_ish global varies station H NCEI Integrated Surface hourly
ndbc US varies station 6T,10T, 15T,H,D National Data Buoy Center
nwis DEPRECATED use nwis_* functions below instead. US varies station varies USGS National Water
nwis_iv US varies station E USGS NWIS Instantaneous Values
nwis_dv US varies station D USGS NWIS Daily Values
nwis_site US varies station -NA- USGS NWIS Site Database
nwis_gwlevels US varies station varies USGS NWIS Groundwater
nwis_measurements US varies station varies USGS NWIS Measurements
nwis_peak US varies station varies USGS NWIS Peak
nwis_stat US varies station varies USGS NWIS Statistic
epa_wqp US varies station varies US EPA Water Quality
rivergages US varies station varies USACE river gages
swtwc DISCONTINUED US/OK varies station varies USACE Southwest Division, Tulsa Water Control
terraclimate global varies grid 1/24deg M Monthly data from TerraClimate
terraclimate19611990 DISCONTINUED global varies grid 1/24deg M Monthly normals using TerraClimate monthly data from 1961 to 1990
terraclimate19812010 global varies grid 1/24deg M Monthly normals using TerraClimate monthly data from 1981 to 2010
terraclimate19912020 global varies grid 1/24deg M Monthly normals using TerraClimate monthly data from 1991 to 2020
terraclimate2C DISCONTINUED global varies grid 1/24deg M Monthly normals using TerraClimate with 2deg C hotter climate
terraclimate4C DISCONTINUED global varies grid 1/24deg M Monthly normals using TerraClimate with 4deg C hotter climate
twc US/OK varies station D Texas Weather Connection (TWC) data
unavco US varies station varies UNAVCO well data
Time Interval Code Description
E Event
T Minute
H Hourly
D Daily
M Monthly
A Annual

Usage Summary - Python Library

To use the tsgettoolbox in a project:

from tsgettoolbox import tsgettoolbox
df = tsgettoolbox.nwis_dv(sites="02329500", startDT="2000-01-01")

Refer to the API Documentation at tsgettoolbox_api.

Usage Summary - Command Line

tsgettoolbox nwis_dv --sites 02329500 --startDT 2000-01-01

Refer to the command line documentation at tsgettoolbox_cli.

Development

Development is managed on bitbucket or github. https://bitbucket.org/timcera/tsgettoolbox/overview. https://github.com/timcera/tsgettoolbox

About

Command line script and Python package to get weather and hydrologic time-series from Internet services.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 9