Skip to content

dklinges9/mcera5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOI

mcera5

A package to download and process ERA5 data ready for use in microclimate modelling. Corresponding paper describing version 1.0 of the package here in Methods in Ecology and Evolution.

Install

You can install the package from this GitHub repository via the follow line:
remotes::install_github("dklinges9/mcera5")

Tutorial

The vignette can then be accessed via:
vignette("mcera5_vignette")

Alternatively you can navigate to the vignette manually here on the GitHub repository.

Setup

ERA5 climate data can be downloaded from the ECMWF climate data store (CDS). Note that in July 2024 the CDS migrated to a new platform, and the old platform was deprecated in Sept 2024. The following describes how to access the data using R:

  1. Register for an ECMWF account here. Upon registering you will need to accept all of the Terms and Conditions listed at the bottom of the form.

  2. Then, navigate to the CDS site here and login using the button in the top right. Once logged in, hover your mouse over your name in the top right, and click on the option "Your profile" that appears (this should bring you to this page. Here you will find your User ID (UID) and Personal Access Token, both which are required for you to remotely download data from the CDS. Make a note of these.

  3. Each CDS dataset has its own unique Terms of Use. You will need to accept these Terms for ERA5-reanalysis at this page (scroll down to "Terms of use" and accept). This same set of terms also applies for other Copernicus products, including ERA5-land.

News

7 Jan 2025: CDS has now changed the URL for the API from their temporary URL to their permanent URL, which may require an update to your .cdsapirc file in your home directory. See here for the updated URL. As of today, https://cds.climate.copernicus.eu/api is the new URL.

8 Oct 2024: modularity to handle ERA5-reanalysis and ERA5-land files downloaded from BOTH the old (legacy) CDS and the new (beta) CDS has been provided in mcera5. In addition, users must specify if they want extracted climate data to be formatted for a specific microclimate R package: microclima, NicheMapR, microclimc, microclimf, or micropoint (microclimc is the default). The branch "new_cds_time_edits" has been merged into master and will soon be deleted.

25 Sept 2024: ERA5-reanalysis and ERA5-land files downloaded from the beta CDS have a different structure to their time dimension. To extract climate data from these files (e.g. using extract_clim()), please see the developer branch "new_cds_time_edits". You can install this branch directly via:

remotes::install_github("dklinges9/mcera5", ref = "new_cds_time_edits")

Sept 2024: This package is going through a lot of development to keep up with changes as ECMWF migrates to the new Climate Data Store. These changes include lower API limits, different variable names/netCDF file structures, and different credentials (see below for details). If you are facing unexplainable errors, please bring them to my attention (see Questions, Concerns, Issues below). You can see live usage of the new CDS at this interface.

Questions, Concerns, Issues

Before emailing about a concern, please submit a reproducible example as an issue on this Github repository. To do so, navigate to the main page of this repository and click on the "Issues" tab, and then "New Issue." Provide details of the problem you are facing, provide code and data files that allow me to reproduce your problem, and specify what version of mcera5 you have installed (if you do not have the latest installation, I recommend updating the package first before reaching out, or explaining why you have a prior version). Submitting issues is the preferred method of requesting help as this provides a public record for others to view and learn from. If you do not have a GitHub account or are otherwise unable to submit an issue, then contact David Klinges at [email protected]. Please note that I receive many requests via email that can be solved by updating the package! I am also a researcher (probably like you) and may not always be able to reply to your emails promptly. Thank you for your patience and interest in using the package!

Using and citing the package

If you use this package for your research, please cite the corresponding paper:

Klinges, D. H., Duffy, J. P., Kearney, M. R., & Maclean, I. M. D. (2022). mcera5: Driving microclimate models with ERA5 global gridded climate data. Methods in Ecology and Evolution, 13(7), 1402–1411. https://doi.org/10.1111/2041-210X.13877

I am a researcher (probably like you) and developing and maintaining such software doesn't come with credit, so citing the paper is appreciated! Also if you use and like this package, please consider Starring it: on the main page of this repository, in the top right click on "Star".

Contact and Contributors

David Klinges: Maintainer, primary contact
James Duffy: Creator
Ilya Maclean: Contributor