• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Jupyter Notebook
  • Created over 5 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An R Framework for Climate Data Access and Post-processing

R Framework for Climate Data Access and Post-processing

Binder

climate4R is a bundle of R packages for transparent climate data access, post-processing (including data collocation and bias correction / downscaling) and visualization. climate4R builds on two main data structures (grid and station, including metadata) to deal with gridded and point data from observations, reanalysis, seasonal forecasts and climate projections. It considers ensemble members as a basic dimension of the data structures. Moreover, climate4R is transparently (and remotely) connected to the Santander Climate Data Gateway, offering several state-of-the-art datasets (including CMIP5 and CORDEX subsets).

  • climate4R is formed by the following four core packages (all in GitHub): loadeR , transformeR, downscaleR and visualizeR. These packages are fully documented in the corresponding GitHub wikis.

  • climate4R capabilities are further extended by providing support to physical units handling (convertR package) and geoprocessing tasks (geoprocessoR package).

  • Compatibility with some external packages has been achieved by wrapping packages, thus enhancing climate4R with new functionalities (e.g. ETCCDI extreme climate indices via the climdex package).

  • Semantic provenance (metadata) information for climate4R products can be generated using METACLIP via the metaclipR package.

  • Conda and docker climate4R installations available. The docker file also includes the jupyter framework. This is the base layer for the climate4R Hub (a cloud-based computing facility to run climate4R notebooks at IFCA/CSIC Cloud Services).

References and Examples

The formal reference of climate4R is:


M. Iturbide, J. Bedia, S. Herrera, J. Baño-Medina, J. Fernández, M.D. Frías, R. Manzanas, D. San-Martín, E. Cimadevilla, A.S. Cofiño and JM Gutiérrez (2019) The R-based climate4R open framework for reproducible climate data access and post-processing. Environmental Modelling & Software, 111, 42-54. DOI: /10.1016/j.envsoft.2018.09.009


Additional references for specific components of climate4R (with worked examples) are Cofiño et al. 2018 (seasonal forecasting ), Frías et al. 2018 (visualization), Bedia et al. 2019 (data provenance) and Bedia et al. 2019a (statistical downscaling). Other publications describing applications in sectoral impact studies (also with worked out examples) are Bedia et al. (2018) (fire danger) or Iturbide et al. (2018) (Species distribution models), among others.

Moreover, there is a notebook repository including several illustrative notebooks with worked-out examples (which are companion material of several papers).

Installation

The climate4R framework relies on a wealth of other R packages and bindings to third-party libraries. Therefore, the recommended installation is through the conda package below, which ensures the proper installation of all dependencies.

Installation using miniconda:

Miniconda is a free minimal installer for conda. The conda recipe installs an up-to-date version of the different packages composing the climate4R framework, along with the associated library dependencies (udunits, openjdk, netcdf Java etc.), avoiding potential problems like the R-java configuration etc. Note that the appropriate miniconda distribution must be installed (go to the miniconda installers page) before running the following commands. We recommend starting from a clean environment (named climate4R in this example):

conda create --name climate4R
conda activate climate4R

In this environment, install climate4R by issuing:

mamba install -y -c conda-forge -c r -c defaults -c santandermetgroup r-climate4r

Activate the conda environment to work with climate4R. Deactivate the environment with:

conda deactivate

Direct package installation from github:

Individual packages can be installed directly from the github sources.

    > library(devtools)
    > install_github(c("SantanderMetGroup/loadeR.java",
                 "SantanderMetGroup/climate4R.UDG",
                 "SantanderMetGroup/loadeR",
                 "SantanderMetGroup/transformeR",
                 "SantanderMetGroup/visualizeR",
                 "SantanderMetGroup/downscaleR"))

NOTE: installation of specific package versions

In case a particular paper notebook is to be replicated, the installation of specific version tags can be done by just explicitly indicating the tag number in the repo name. For example:

   > devtools::install_github("SantanderMetGroup/[email protected]")

installs the visualizeR package version used in Frías et al. 2018, while the following

   > devtools::install_github("SantanderMetGroup/[email protected]")

will install a more recent version of the package used in the paper by Iturbide et al. 2019.

Example of use

Examples of use of the climate4R framework are given in the reference papers above. In the following we illustrate the main functionalities of climate4R with a simple example, consisting on calculating an ETCCDI index (Summer Days) from bias corrected EURO-CORDEX data over Southern Europe. More details at the brief introduction to climate4R document in the man folder and full code at the companion jupyter notebook.


User Support

Please note that the pool of people who can provide support for climate4R packages is very small and our time for support is limited. We don't necessarily have the capacity for long, open-ended user support. Please follow these basic guidelines before posting:

  • Introduce the problem before you post any code
  • Help others reproduce the problem
  • Avoid sending the same question to multiple places

These posting guidelines at stackoverflow provide further recommendations on how to make a good question. If questions are kept short, specific and direct, there's a greater chance that someone will take on the ticket.


More Repositories

1

downscaleR

An R package for climate data bias correction and downscaling (part of the climate4R bundle)
R
103
star
2

ATLAS

Datasets, code and virtual workspace for the Climate Change ATLAS
Jupyter Notebook
82
star
3

DeepDownscaling

Deep learning approaches for statistical downscaling in climate
Jupyter Notebook
63
star
4

loadeR

A climate4R package for data access
R
13
star
5

WRF4G

WRF Modeling System on Distributed Computing Infrastructures
Python
12
star
6

transformeR

An R package for climate data post-processing (part of the climate4R bundle)
R
9
star
7

downscaleR.keras

R
6
star
8

R_VALUE

A set of R-based functions for computing several climatic indices
R
6
star
9

VALUE

The VALUE R package for downscaling model validation
R
6
star
10

wrfncxnj

WRF NetCDF eXtract aNd Join
Python
6
star
11

climate4R.indices

Climate Indices in Climate4R
R
5
star
12

visualizeR

An R package for visualization and uncertainty communication (part of the climate4R bundle)
R
4
star
13

notebooks

Notebooks of papers from the SantanderMetGroup
HTML
4
star
14

wrf-ghg-files

GHG concentration files for WRF
Python
4
star
15

calibratoR

An R package for statistical calibration of seasonal climate forecasts
R
4
star
16

Master-Data-Science

Class Material
HTML
3
star
17

WRFToolbox

Fortran
2
star
18

ansible-thredds-cluster

Ansible playbooks for deployment of THREDDS server cluster
Ruby
2
star
19

bctool

ESGF WRF Lateral Boundary Conditions extractor
Shell
2
star
20

climate4R.climdex

A climate4R package for calculation of the ETCCDI core climate indices (part of the climate4R bundle)
R
2
star
21

esgf-jdownloader

Java
1
star
22

cyclonTrackR

R
1
star
23

downscalingPortalLoadeR

Auxiliary functions (R) for the statistical downscaling portal
R
1
star
24

website-demo

Demo of the new website
Python
1
star
25

loadeR.ECOMS

R Interface for ECOMS-UDG (seasonal forecast datasets) extending climate4R
R
1
star
26

loadeR.2nc

A loadeR extension for writing grids to netCDF
R
1
star
27

climate4R.datasets

Example datasets of climate4R
R
1
star
28

geoprocessoR

An R package for geoprocessing climate4R data (part of the climate4R bundle)
R
1
star
29

esgf-getcredentials

This a client tool to export credentials from the ESGF security infrastructure
Java
1
star
30

ecomsUDG.Raccess

R package for accesing the ECOMS User Data Gateway
R
1
star
31

2022_Bano_DeepESD_GMD

Repository supporting the results presented in the manuscript on Downscaling Multi-Model Climate Projection Ensembles with Deep Learning (DeepESD): Contribution to CORDEX EUR-44
Jupyter Notebook
1
star