Weather forecast retrieval gathers relevant gridded weather forecasts to ingest into physically based models for water supply forecasts
Project description
Weather Forecast Retrieval
Weather forecast retrieval gathers relevant gridded weather forecasts to ingest into physically based models for water supply forecasts
Current atmospheric models implemented:
Install
pip install weather-forecast-retrieval
System dependencies
nccopy
nccopy is used during the conversion in grib2nc. To install the netCDF-C libraries that are specific for your system. See the instructions from Unidata
wgrib2
To use the grib2nc command/function you will have to have wgrib2 installed on the host computer.
This is easiest done by following NOAA instructions. After completing their instructions, make wgrib2 accessible by cd into the source code and attempt to install it under your ~/bin with:
ln wgrib2/wgrib2 ~/bin/wgrib2
Docker
The retrieval aspect of weather_forecast_retieval has been built into a Docker image based on the Python 3 Alpine linux image. This allows for a docker deployment to run and retrieve HRRR data and convert to netcdf if needed. To use, first build the image
docker build -t usdaarsnwrc/weather_forecast_retieval .
Grab a coffee as this has to compile pandas from source (10+ minutes of compile time). Once completed, modify or create a new docker-compose.yml and modify the volume attachments as necessary. There are 2 volumes to attach, a data drive mounted to /data and the config file folders at /code/config. To setup the download, the config file is passed to docker-compose:
docker-compose run weather_forecast_retrieval /code/config/hrrr.ini
Command line usage
get_hrrr_archive
usage: get_hrrr_archive [-h] -s START_DATE -e END_DATE -o SAVE_DIR
[-f FORECASTS]
Command line tool for downloading HRRR grib files from the University of Utah
optional arguments:
-h, --help show this help message and exit
-s START_DATE, --start START_DATE
Datetime to start, ie 2018-07-22 12:00
-e END_DATE, --end END_DATE
Datetime to end, ie 2018-07-22 13:00
-o SAVE_DIR, --output SAVE_DIR
Path to save the downloaded files to
-f FORECASTS, --forecasts FORECASTS
Number of forecasts to get
The following command line will download data for a single hour and output into the ~/Downloads folder to the file ~/Downloads/hrrr.20180722/hrrr.t12z.wrfsfcf01.grib2:
get_hrrr_archive -s '2018-07-22 12:00' -e '2018-07-22 12:10' -o tests/RME/output/
convert_grib2nc
run_hrrr_retrieval
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weather_forecast_retrieval-0.6.13.tar.gz.
File metadata
- Download URL: weather_forecast_retrieval-0.6.13.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30853f7c2602697c5975321ad07bbf1ed11f527bef8760e11d6fa9e0082fd9fd
|
|
| MD5 |
2c1bdd784793143c5f09da0fcf18ad88
|
|
| BLAKE2b-256 |
8b6b03c09720366d94fb0c792b365e36d3de144d7403e8099d31cca6c5f01a6d
|
File details
Details for the file weather_forecast_retrieval-0.6.13-py2.py3-none-any.whl.
File metadata
- Download URL: weather_forecast_retrieval-0.6.13-py2.py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4bd249b54102dc82bad21c9f17aa377d73152bb26e72105cb50ce4a4987976f
|
|
| MD5 |
87ee42ccf617b0e92d9733b9ac2752ad
|
|
| BLAKE2b-256 |
6ad09d0b2aaf0605c820eed6559809016394bdc3303684f3bbc54ad134afb5e6
|