Science Score: 59.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
2 of 7 committers (28.6%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (20.0%) to scientific vocabulary
Keywords
Repository
Interface to the public ECMWF API Web Services
Basic Info
- Host: GitHub
- Owner: bluegreen-labs
- License: other
- Language: R
- Default Branch: master
- Homepage: https://bluegreen-labs.github.io/ecmwfr/
- Size: 14.4 MB
Statistics
- Stars: 124
- Watchers: 6
- Forks: 34
- Open Issues: 2
- Releases: 7
Topics
Metadata Files
README.md
ecmwfr 
Programmatic interface to the two European Centre for Medium-Range Weather Forecasts API services. The package provides easy access to all available Data Stores from within R, matching and expanding upon the ECMWF python tools. Support is provided for the Climate Data Store, the Atmosphere Data Store and the Early Warning Data Store (from the Copernicus Emergency Management Services).
How to cite this package
You can cite this package like this "we obtained data from the European Centre for Medium-Range Weather Forecasts API using the ecmwf R package (Hufkens, Stauffer, and Campitelli 2019)". Here is the full bibliographic reference to include in your reference list (don't forget to update the 'last accessed' date):
Hufkens, K., R. Stauffer, & E. Campitelli. (2019). ecmwfr: Programmatic interface to the two European Centre for Medium-Range Weather Forecasts API services. Zenodo. https://doi.org/10.5281/zenodo.2647531.
Installation
stable release
To install the current stable release use a CRAN repository:
r
install.packages("ecmwfr")
library("ecmwfr")
development release
To install the development releases of the package run the following commands:
r
if(!require(remotes)){install.packages("remotes")}
remotes::install_github("bluegreen-labs/ecmwfr")
library("ecmwfr")
Vignettes are not rendered by default, if you want to include additional documentation please use:
r
if(!require(remotes)){install.packages("remotes")}
remotes::install_github("bluegreen-labs/ecmwfr", build_vignettes = TRUE)
library("ecmwfr")
breaking changes (>= 2.0.0)
querying data
With the introduction of version 2.0.0 and the migration to the new API some
changes to the package were implemented which will cause breaking changes. In particular
the wf_request() function(s) now use a default ecmwfr user field due to the
consolidation of the API, with a single sign-on across all services and the use
of a Personal Access Token (PAT) rather than user and password credentials.
In order to migrate to version >=2.0.0 you will have to provide a new PAT using wf_set_key() and remove the user argument from any wf_request() call, i.e.:
```r
The original v1.x.x call
wfrequest( request, user = "yourid" )
The new v2.x.x call
wf_request( request ) ```
The requests themselves should translate mostly without intervention and remain nested lists of parameters.
netCDF data format
In comparison with the original services the new API regresses in terms of netCDF support. Those relying on common netCDF support such as ecosystem modellers will find this troubling. Note that both CDS and ADS have different policies and use different methods. Note that this regression in usability is not caused by this package. Please forward any issues you have with formatting of the data to the ECMWF using the public forum. We suggest to fall back to grib files, and convert internally if netCDF driver files are needed. Sadly, consistency for now is not, and will not be, guaranteed it seems.
Use:
Create a ECMWF account by self
registering. Once your user account has been verified you can get your API token (or key in ecmwfr) by visiting one of the Data Stores user profiles, for example the CDS user profile.
The API Token is a UUID and should look something like:
API: abcd1234-foo-bar-98765431-XXXXXXXXXX
This API Token gives you access to all Data Store services, including the climate atmosphere and emergency management services. This information is required to be able to retrieve data via the ecmwfr package. Use the
ecmwfr wf_set_key function to store
your login information in the system keyring (see below).
In order to download the data, you will also need to accept the licence agreement on the bottom of the user profile page.
Setup
Before using the package in R to download data you have to save your login
information. The package does not allow you to use your key inline in scripts
to limit security issues when sharing scripts on github or otherwise.
The following lines should NEVER be included in any script and run only once at setup.
``` r
set a key to the keychain
wfsetkey(key = "abcd1234-foo-bar-98765431-XXXXXXXXXX")
you can retrieve the key using
wfgetkey()
the output should be the key you provided
"abcd1234-foo-bar-98765431-XXXXXXXXXX"
Alternatively you can input your login info with an interactive request
if you do not put in the key directly
wfsetkey()
you will get a command line request to provide the required details
```
Before you can download any data you have to make sure to accept the terms and conditions here: Before downloading and processing data from CDS please make sure you accept the terms and conditions in the profile pages of your Data Store of choice.
Data Requests
To download data use the wf_request
function, and a request string syntax. The simplest way to get the requests is
to go to the Data Store website which offers an interactive interface to create
these requests e.g., for the CDS ERA-5 reanalysis data:
After formatting the request online copy the API request python code to your script. The request should include the dataset, request and target field (if available).
Instead of json formatting as shown in the online form the ecmwfr package
uses a R lists for all the arguments. This makes changing variables less prone
to error, although overall we suggest not to manually create requests and use
the RStudio Addin to translate the python json request to R as shown below.
Just select the whole query, including the dataset and target fields, and click on the Addins > ECMWF Python to list. The original python query is listed below so you can try this routine yourself.
```python
The full python query, which you can translate to an R
list using the Addin
dataset = "reanalysis-era5-pressure-levels" request = { 'producttype': ['reanalysis'], 'variable': ['temperature'], 'year': ['2000'], 'month': ['04'], 'day': ['04'], 'time': ['00:00'], 'pressurelevel': ['850'], 'dataformat': 'netcdf', 'downloadformat': 'unarchived', 'area': [70, -20, 60, 30] } ```
This will give you a request as an annotated list. If no target file is
specified in the original request a target field will be added to the list
with a default name TMPFILE. Replace this filename with something that matches
your preference and the specified data format. In this case the default name
was changed to era5-demo.nc, a netcdf file. This formatted request can now be
used by the wf_request function to query and download the
data. By default the process is verbose, and will give you plenty of feedback
on progress.
``` r
This is an example of a request as converted from
request <- list( datasetshortname = "reanalysis-era5-pressure-levels", producttype = "reanalysis", variable = "temperature", year = "2000", month = "04", day = "04", time = "00:00", pressurelevel = "850", dataformat = "netcdf", downloadformat = "unarchived", area = c(70, -20, 60, 30), target = "era5-demo.nc" )
If you have stored your user login information
in the keyring by calling cdssetkey you can
call:
file <- wf_request( request = request, # the request transfer = TRUE, # download the file path = "." # store data in current working directory ) ```
The Data Store services are quite fast, however, if you request a lot of
variables, multiple levels, and data over several years these requests
might take quite a while! You can check the scope of your query and if
it is out of bounds in the right hand Request Validation panel when
formatting your original data request in the web interface.
Note: If you need to download larger amounts of data it is suggested to split the downloads, e.g., download the data in chunks (e.g., month-by-month, or year-by-year). A progress indicator will keep you informed on the status of your request. Keep in mind that all data downloaded will be buffered in memory limiting the downloads to ~6GB on low end systems.
ERA5 demo
The above request uses ERA-5 reanalysis data on pressure levels.
dataset: downloading ERA-5 reanalysis on pressure level(s)product_type: (deterministic) reanalysis datavariable/pressure_level: requesting temperature on 850 hectopascalyear/month/day: April 4, 2000 (one day in this example)time: valid at 00:00 UTC (date/time always in UTC),area: custom subset covering northern Europeformat: output format NetCDFtarget: local output fileera5-demo.nc
The data set as specified above can be downloaded calling the
wf_request function, and upon request returns the location of the
NetCDF file on your system. The file variable can then be used directly
for further processing (note: should the download be interupted the job ID in your
download queue is returned and the job can be resumed using wf_transfer()).
Once the retrieval has finished you should now be the owner of a NetCDF containing
the requested information located in the current working directory, called era5-demo.nc.
We can quickly visualize this data using the terra geospatial library using:
```r
Open NetCDF file and plot the data
(trap read error on mac - if gdal netcdf support is missing)
r <- terra::rast(file) terra::plot(r, main = "ERA-5 Reanalysis Demo (2m Temperature 850 hPa)") maps::map("world", add = TRUE) ```
File and system based keychains
On linux you can opt to use a file based keyring, instead of a GUI based keyring manager. This is helpful for headless setups such as servers. For this option to work linux users must set an environmental option.
r
options(keyring_backend="file")
You will be asked to provide a password to encrypt the keyring with.
Upon the start of each session you will be asked to provide this
password, unlocking all ecmwfr credentials for this session. Should
you ever forget the password just delete the file at:
~/.config/r-keyring/ecmwfr.keyring and re-enter all your credentials.
Date specification
For those familiar with the old ECMWF mars syntax: CDS/ADS/CEMS does not accept
date = "2000-01-01/to/2000-12-31" specifications. It is possible to
specify one specific date via date = "2000-01-01" or multiple days via
date = ["2000-01-01","2000-01-02","2000-10-20"] or
date = "YYYY-MM-DD/YYYY-MM-DD".
Citation
Hufkens, K., R. Stauffer, & E. Campitelli. (2019). ecmwfr: Programmatic interface to the two European Centre for Medium-Range Weather Forecasts API services. Zenodo. https://doi.org/10.5281/zenodo.2647531.
Acknowledgements
This project is maintained by BlueGreen Labs (BV). This project was in the past partially supported by the Belgian Science Policy office COBECORE project (BELSPO; grant BR/175/A3/COBECORE), a "Fonds voor Wetenschappelijk Onderzoek" travel grant (FWO; V438318N) and the Marie Skłodowska-Curie Action (H2020 grant 797668). Logo design elements are taken from the FontAwesome library according to these terms, where the globe element was inverted and intersected.
Owner
- Name: BlueGreen Labs
- Login: bluegreen-labs
- Kind: organization
- Email: info@bluegreenlabs.org
- Location: Melsele, Belgium
- Website: http://bluegreenlabs.org
- Repositories: 17
- Profile: https://github.com/bluegreen-labs
BlueGreen open science labs & consulting, providing environmental research infrastructure and editorial solutions.
CodeMeta (codemeta.json)
{
"@context": [
"https://doi.org/10.5063/schema/codemeta-2.0",
"http://schema.org"
],
"@type": "SoftwareSourceCode",
"identifier": "ecmwfr",
"description": "Programmatic interface to the European Centre for Medium-Range\n Weather Forecasts dataset web services (ECMWF; <https://www.ecmwf.int/>)\n and Copernicus's Climate Data Store (CDS; \n <https://cds.climate.copernicus.eu>). Allows for easy downloads of weather \n forecasts and climate reanalysis data in R.",
"name": "ecmwfr: Interface to 'ECMWF' and 'CDS' Data Web Services",
"codeRepository": "https://github.com/bluegreen-labs/ecmwfr",
"issueTracker": "https://github.com/bluegreen-labs/issues",
"license": "https://spdx.org/licenses/AGPL-3.0",
"version": "1.2.3",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"version": "3.6.3",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 3.6.3 (2020-02-29)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"author": [
{
"@type": "Person",
"givenName": "Koen",
"familyName": "Hufkens",
"email": "koen.hufkens@gmail.com",
"@id": "https://orcid.org/0000-0002-5070-8109"
}
],
"contributor": [
{
"@type": "Person",
"givenName": "Reto",
"familyName": "Stauffer",
"email": "Reto.Stauffer@uibk.ac.at",
"@id": "https://orcid.org/0000-0002-3798-5507"
},
{
"@type": "Person",
"givenName": "Elio",
"familyName": "Campitelli",
"email": "elio.campitelli@cima.fcen.uba.ar",
"@id": "https://orcid.org/0000-0002-7742-9230"
}
],
"copyrightHolder": {},
"funder": {},
"maintainer": [
{
"@type": "Person",
"givenName": "Koen",
"familyName": "Hufkens",
"email": "koen.hufkens@gmail.com",
"@id": "https://orcid.org/0000-0002-5070-8109"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "covr",
"name": "covr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=covr"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
{
"@type": "SoftwareApplication",
"identifier": "raster",
"name": "raster",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=raster"
},
{
"@type": "SoftwareApplication",
"identifier": "maps",
"name": "maps",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=maps"
},
{
"@type": "SoftwareApplication",
"identifier": "ncdf4",
"name": "ncdf4",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ncdf4"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "rlang",
"name": "rlang",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rlang"
},
{
"@type": "SoftwareApplication",
"identifier": "rstudioapi",
"name": "rstudioapi",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rstudioapi"
},
{
"@type": "SoftwareApplication",
"identifier": "jsonlite",
"name": "jsonlite",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=jsonlite"
}
],
"softwareRequirements": [
{
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 3.4"
},
{
"@type": "SoftwareApplication",
"identifier": "httr",
"name": "httr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=httr"
},
{
"@type": "SoftwareApplication",
"identifier": "keyring",
"name": "keyring",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=keyring"
},
{
"@type": "SoftwareApplication",
"identifier": "memoise",
"name": "memoise",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=memoise"
},
{
"@type": "SoftwareApplication",
"identifier": "getPass",
"name": "getPass",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=getPass"
},
{
"@type": "SoftwareApplication",
"identifier": "curl",
"name": "curl",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=curl"
}
],
"releaseNotes": "https://github.com/khufkens/ecmwfr/blob/master/NEWS.md",
"readme": "https://github.com/khufkens/ecmwfr/blob/master/README.md",
"fileSize": "168.647KB",
"contIntegration": [
"https://travis-ci.org/khufkens/ecmwfr",
"https://codecov.io/gh/khufkens/ecmwfr"
],
"citation": [
{
"@type": "CreativeWork",
"datePublished": "2019",
"author": [
{
"@type": "Person",
"givenName": "Koen",
"familyName": "Hufkens"
},
{
"@type": "Person",
"givenName": "Reto",
"familyName": "Stauffer"
},
{
"@type": "Person",
"givenName": "Elio",
"familyName": "Campitelli"
}
],
"name": "The ecwmfr package: an interface to ECMWF API endpoints",
"identifier": "10.5281/zenodo.2647541",
"url": "https://khufkens.github.io/ecmwfr/",
"@id": "https://doi.org/10.5281/zenodo.2647541",
"sameAs": "https://doi.org/10.5281/zenodo.2647541"
}
],
"relatedLink": "https://CRAN.R-project.org/package=ecmwfr",
"developmentStatus": "https://www.repostatus.org/#active"
}
GitHub Events
Total
- Create event: 2
- Release event: 1
- Issues event: 17
- Watch event: 21
- Delete event: 3
- Issue comment event: 30
- Push event: 24
- Pull request event: 11
- Fork event: 4
Last Year
- Create event: 2
- Release event: 1
- Issues event: 17
- Watch event: 21
- Delete event: 3
- Issue comment event: 30
- Push event: 24
- Pull request event: 11
- Fork event: 4
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Koen Hufkens | k****s@g****m | 565 |
| Elio Campitelli | e****i@g****m | 63 |
| Reto Stauffer | r****r@u****t | 28 |
| Raphaël Nussbaumer | r****s@g****m | 5 |
| Martin Morlot | m****t@g****m | 1 |
| David LeBauer | d****r@a****u | 1 |
| Darío Hereñú | m****a@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 115
- Total pull requests: 62
- Average time to close issues: 3 months
- Average time to close pull requests: 6 days
- Total issue authors: 46
- Total pull request authors: 9
- Average comments per issue: 3.77
- Average comments per pull request: 1.68
- Merged pull requests: 58
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 22
- Pull requests: 13
- Average time to close issues: 7 days
- Average time to close pull requests: 3 days
- Issue authors: 11
- Pull request authors: 3
- Average comments per issue: 1.23
- Average comments per pull request: 0.69
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- khufkens (39)
- eliocamp (18)
- Rafnuss (7)
- retostauffer (4)
- victofs (2)
- danielreispereira (2)
- Gizem-9395 (2)
- princess97 (2)
- Marc-Girondot (1)
- ainsliej (1)
- mpaulacaldas (1)
- ErikKusch (1)
- pedroalencar1 (1)
- jmertic (1)
- sofialafuente (1)
Pull Request Authors
- khufkens (29)
- eliocamp (28)
- Rafnuss (4)
- paocorrales (2)
- retostauffer (2)
- olivroy (2)
- kant (1)
- dlebauer (1)
- martindoublem (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- cran 1,399 last-month
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 12
(may contain duplicates) - Total versions: 21
- Total maintainers: 1
proxy.golang.org: github.com/bluegreen-labs/ecmwfr
- Documentation: https://pkg.go.dev/github.com/bluegreen-labs/ecmwfr#section-documentation
- License: other
-
Latest release: v2.0.3+incompatible
published about 1 year ago
Rankings
cran.r-project.org: ecmwfr
Interface to 'ECMWF' and 'CDS' Data Web Services
- Homepage: https://github.com/bluegreen-labs/ecmwfr
- Documentation: http://cran.r-project.org/web/packages/ecmwfr/ecmwfr.pdf
- License: AGPL-3
-
Latest release: 2.0.3
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.6 depends
- R6 * imports
- curl * imports
- getPass * imports
- httr * imports
- keyring * imports
- memoise * imports
- covr * suggests
- jsonlite * suggests
- knitr * suggests
- maps * suggests
- ncdf4 * suggests
- raster * suggests
- rlang * suggests
- rmarkdown * suggests
- rstudioapi * suggests
- terra * suggests
- testthat * suggests
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite