Weather forecast retrieval gathers relavant 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
Follow these command line instructions to install weather_forecast_retrieval on Ubuntu 16.04 or 18.04.
Refer to the SMRF install instructions for use of a virtual environment. Virtual Environments are recommended for python and pip install procedures to keep system clean and organized. Make sure your virtual environment is sourced before proceeding.
Ubuntu 16.04
Install necessary system packages
sudo apt update
sudo apt install python3-dev python3-pip python3-tk
sudo apt install libgrib-api-tools libgrib-api-dev
Get package from github and install
curl -L https://github.com/USDA-ARS-NWRC/weather_forecast_retrieval/archive/v0.5.2.tar.gz | tar xz
python3 -m pip install pygrib==2.0.2
cd weather_forecast_retrieval-0.5.2/
python3 -m pip install -r requirements_dev.txt
python3 setup.py install
Check install
python3 setup.py test
Ubuntu 18.04
Install necessary system packages
sudo apt update
sudo apt install python3-dev python3-pip python3-tk
sudo apt install libeccodes-dev libeccodes-tools
Get packages from github
curl -L https://github.com/USDA-ARS-NWRC/weather_forecast_retrieval/archive/v0.5.2.tar.gz | tar xz
curl -L https://github.com/jswhit/pygrib/archive/v2.0.4rel.tar.gz | tar xz
python3 -m pip install pyproj==1.9.5.1
Install packages
This requires copying the setup.cfg
that is filled out from weather_forecast_retrieval
and moving it into pygrib. This file points to the installed eccodes libraries.
cd pygrib-2.0.4rel
cp ../weather_forecast_retrieval-0.5.2/setup.cfg.pygrib ./setup.cfg
python3 setup.py build
python3 setup.py install
cd ../weather_forecast_retrieval-0.5.2/
python3 -m pip install -r requirements_dev.txt
python3 setup.py install
grib2nc
To use the grib2nc command/function you will have to have wgrib2 installed.
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 retrival 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
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
Hashes for weather_forecast_retrieval-0.6.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9320375a8ef9873a091be55b49d305bc9727c050d006df046b8be5963d80f344 |
|
MD5 | 3291b45d8d085fa83a1a63b091f561f0 |
|
BLAKE2b-256 | acdfa7592e96d0e58be8307027c60030b036941325f810ed977541be6d5188f6 |
Hashes for weather_forecast_retrieval-0.6.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7c01901dde9683542787875189cd46be78993208ae5211e067f9f1d88556de7 |
|
MD5 | fee84ea419ba0943cca08008ae67299c |
|
BLAKE2b-256 | 37aff1265732560cd19b55ccdcef3b28a54c6b05f519416211e6347a0df88162 |