Skip to main content

Weather forecast retrieval gathers relavant gridded weather forecasts to ingest into physically based models for water supply forecasts

Project description

Weather Forecast Retrieval

GitHub version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weather_forecast_retrieval-0.6.2.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weather_forecast_retrieval-0.6.2-py2.py3-none-any.whl (24.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file weather_forecast_retrieval-0.6.2.tar.gz.

File metadata

  • Download URL: weather_forecast_retrieval-0.6.2.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8

File hashes

Hashes for weather_forecast_retrieval-0.6.2.tar.gz
Algorithm Hash digest
SHA256 9320375a8ef9873a091be55b49d305bc9727c050d006df046b8be5963d80f344
MD5 3291b45d8d085fa83a1a63b091f561f0
BLAKE2b-256 acdfa7592e96d0e58be8307027c60030b036941325f810ed977541be6d5188f6

See more details on using hashes here.

File details

Details for the file weather_forecast_retrieval-0.6.2-py2.py3-none-any.whl.

File metadata

  • Download URL: weather_forecast_retrieval-0.6.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8

File hashes

Hashes for weather_forecast_retrieval-0.6.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a7c01901dde9683542787875189cd46be78993208ae5211e067f9f1d88556de7
MD5 fee84ea419ba0943cca08008ae67299c
BLAKE2b-256 37aff1265732560cd19b55ccdcef3b28a54c6b05f519416211e6347a0df88162

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page