All Projects → nawendt → gribr

nawendt / gribr

Licence: BSD-2-Clause license
GRIB interface for R using ECMWF ecCodes

Programming Languages

r
7636 projects
c
50402 projects - #5 most used programming language
M4
1887 projects
shell
77523 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to gribr

gis4wrf
QGIS toolkit 🧰 for pre- and post-processing 🔨, visualizing 🔍, and running simulations 💻 in the Weather Research and Forecasting (WRF) model 🌀
Stars: ✭ 137 (+661.11%)
Mutual labels:  weather, meteorology, atmospheric-modelling, grib, atmospheric-science
mptrac
Massive-Parallel Trajectory Calculations (MPTRAC) is a Lagrangian particle dispersion model for the analysis of atmospheric transport processes in the troposphere and stratosphere.
Stars: ✭ 19 (+5.56%)
Mutual labels:  climate, meteorology, atmospheric-modelling, atmospheric-science
grib
Golang GRIB2 parser
Stars: ✭ 41 (+127.78%)
Mutual labels:  weather, meteorology, grib
WRF-Install-Script
Install WRF with required libraries
Stars: ✭ 43 (+138.89%)
Mutual labels:  meteorology, atmospheric-modelling, atmospheric-science
grib-rs
GRIB format parser for Rust
Stars: ✭ 23 (+27.78%)
Mutual labels:  weather, meteorology, grib
wxee
A Python interface between Earth Engine and xarray for processing time series data
Stars: ✭ 113 (+527.78%)
Mutual labels:  weather, climate
climateR
An R 📦 for getting point and gridded climate data by AOI
Stars: ✭ 93 (+416.67%)
Mutual labels:  weather, climate
online-python-training
Repo for materials associated with the Online Python Training (OPT) project
Stars: ✭ 49 (+172.22%)
Mutual labels:  meteorology, atmospheric-science
python-awips
A framework for querying AWIPS meteorological datasets from an EDEX Data Server.
Stars: ✭ 31 (+72.22%)
Mutual labels:  weather, meteorology
AnimatedEnvironmentLayer
A custom arcgis js api layer to display GRIB data formatted as json as animated particles on a canvas
Stars: ✭ 41 (+127.78%)
Mutual labels:  weather, grib
wetterdienst
Open weather data for humans
Stars: ✭ 190 (+955.56%)
Mutual labels:  weather, meteorology
nmc met io
提供对MICAPS文件, 卫星云图, 天气雷达等数据的读写, 并访问CIMISS和MICAPS CASSANDRA数据库文件等.
Stars: ✭ 77 (+327.78%)
Mutual labels:  weather, meteorology
HydroData
An R 📦 for finding and getting geospatial earth systems data
Stars: ✭ 30 (+66.67%)
Mutual labels:  weather, climate
cfdm
A Python reference implementation of the CF data model
Stars: ✭ 24 (+33.33%)
Mutual labels:  climate, atmospheric-science
WorldWeather
The largest three-dimensional web-based interactive browser of satellite, weather, climate, and other time-aware geospatial data on the web, built upon NASA's revolutionary WorldWind technology.
Stars: ✭ 49 (+172.22%)
Mutual labels:  weather, climate
MiMA
Model of an idealized Moist Atmosphere: Intermediate-complexity General Circulation Model with full radiation
Stars: ✭ 28 (+55.56%)
Mutual labels:  atmospheric-modelling, atmospheric-science
open-earth-compiler
development repository for the open earth compiler
Stars: ✭ 50 (+177.78%)
Mutual labels:  weather, climate
wind-js-server
Service to expose Grib2 wind forecast data as JSON
Stars: ✭ 98 (+444.44%)
Mutual labels:  weather, grib
improver
IMPROVER is a library of algorithms for meteorological post-processing.
Stars: ✭ 76 (+322.22%)
Mutual labels:  weather, meteorology
climate-app
Climate App é uma aplicação responsável por mostrar dados climáticos (temperatura atual, umidade, velocidade do vento etc) de uma determinada cidade em tempo real. A obtenção desses dados foi feita através da open-weather-api.
Stars: ✭ 40 (+122.22%)
Mutual labels:  weather, climate

gribr

GRIB interface for R using the ECMWF ecCodes package.

Anaconda-Server Badge Anaconda-Server Badge

Travis-CI Build Status codecov

License

Purpose

Easily read GRIB data into common R data structures.

Status

gribr is contains most of the functionaily found in the ecCodes library. Several functions exist for reading GRIB messages and extracting them. Functions are also available to help with projecting the data. All of the documentation has been written and some basic examples exist to get you started.

NOTE FOR v1.2.3+: Prior to version 2.19.0 of ecCodes, there was a bug where file handles were not closed after being opened when creating a grib index. This led to potential errors when using grib_select on multiple files. Due to this bug, gribr now requires at least ecCodes 2.19.0 beginning with v1.2.3.

Installation

Using conda (Recommended)

gribr can now be install with conda using the conda-forge channel. This is the preferred method as it simplifies things greatly and makes it possible to set up a clean environment to work in. RStudio can be pointed to use the R binary in this environment along with its associated libary, if that is what you use. To install, just run the following:

conda install -c conda-forge r-gribr
Using Package Managers or Source
  1. Prerequisites
  • gribr depends on the ECMWF ecCodes package (>=2.19.0), and the proj4 R package
  • ecCodes can be easily installed via a package manager on Linux (apt-get, yum, etc.) or MacOS (port, fink, brew). Since some repositories carry versions that are too old, you may have to install from source.
    • To install from source, download ecCodes here
  1. Set up environment (if necessary)
  • ecCodes installed in a system location: The the libraries/headers should be found by the linker/compiler without any additional environmental settings.
  • ecCodes installed in a non-system/user location: When ecCodes is installed in a non-system location (i.e., a path that is not in the ld search paths), there are some extra steps that need to be taken depending on your use case:
    • R: Prior to running R CMD INSTALL, set the ECCODES_LIBS and ECCODES_CPPFLAGS environment variables to the ecCodes library and header directories, respectively. The configure script should pick up on these variables and build the PKG_LIBS and PKG_CPPFLAGS for gribr appropriately.

    • RStudio: RStudio does not grab the envionment variables that you set on the terminal or in your shell login scripts. Instead, use .Renviron. If you do not have this file, create it in your home directory (this is where R searches for it by default). Setting ECCODES_LIBS and ECCODES_CPPFLAGS will cause RStudio to load them into the session and allow the configure script to use them.

  • NOTE: When linking to ecCodes from a non-system location, be sure to include the ECCODES_LIBS variable in your LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on OSX) environment variable. R will not otherwise be able to load the gribr shared object as it will need to know where the linked ecCodes functions are. I have found that RStudio is quite picky that the LD_LIBRARY_PATH is set in a login script. If you have trouble with this in RStudio, make sure it is set at login. One option to avoid setting/altering LD_LIBRARY_PATH is to use -Wl,-rpath=$ECCODES_LIBS in the compiler flags. I have had some luck with this using gcc.
  1. Install gribr
  • From the command line:
R CMD INSTALL /path/to/gribr --configure-vars="ECCODES_CPPFLAGS=-I/path/to/eccodes/include ECCODES_LIBS=-L/path/to/eccodes/lib"
  • From within R or RStudio:
install.packages("path/to/cloned/gribr/repo", repos = NULL, configure.vars = c("ECCODES_LIBS=-L/path/to/eccodes/lib", "ECCODES_CPPFLAGS=-I/path/to/eccodes/include"))
devtools::install_github("nawendt/gribr", args = "--configure-args='ECCODES_LIBS=-L/path/to/eccodes/lib ECCODES_CPPFLAGS=-I/path/to/eccodes/include'")

Windows Install Options

While a native Windows ecCodes library that will work with R is not available, there are ways to run gribr on Windows. The first option is to use the Windows Subsystem for Linux. Simply follow the instructions to install the latest R as you would on any other Linux system. Any other necessary libraries should be available on the package manager. Build gribr as usual and enjoy using it on Windows.

The second option is to use gribr via Cygwin. A Cygwin build of R is available through their package manager. Simply make sure to also install the dev versions of the libraries that you will need. This will likely include libraries that the R package proj4 depends on. You will have to install ecCodes from source for this. From there, install gribr from R CMD INSTALL taking care to include all the correct configure-vars. If you build ecCodes with PNG or JPEG support, you'll need to add the appropriate linker flags.

Contributing

You are welcome to contribute to this project.

Current Needs: While all improvements are welcome, here are a few specific needs:

  • Build ecCodes on Windows with MinGW

Contact

Nathan Wendt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].