Skip to content

Custom ERA5 Datasets

ERA5Reanalysis.jl provides custom dataset types that are derived from the CDS datasets. Currently, we have created a custom ERA5Daily dataset, which is a daily-average of the hourly data from ERA5Hourly data.

Setup

julia
using ERA5Reanalysis

The ERA5Daily Dataset

The ERA5Daily dataset structure is used to contain information regarding daily-averaged ERA5 data. This data is not available directly from the CDS, but is computed from ERA5Hourly data.

julia
e5ds = ERA5Daily(start=Date(2015),stop=Date(2015),path=homedir())
The ERA5Daily Module has the following properties:
    Dataset ID        (ID) : era5dy
    Date Begin     (start) : 2015-01-01
    Date End        (stop) : 2015-01-31
    Data Directory  (path) : /home/runner/era5dy
    Mask Directory (emask) : /home/runner/emask
julia
typeof(e5ds)
ERA5Daily{String, Date}

Creating Daily Data from Hourly Data

In order to create the ERA5 daily datasets from an ERA5Hourly dataset, use the hourly2daily function:

julia
using ERA5Reanalysis
e5ds = ERA5Hourly(start=Date(2015),stop=Date(2015),path=datadir())
evar = SingleVariable("t2m")
ereg = ERA5Region(GeoRegion("TRP"))
hourly2daily(e5ds,evar,ereg)

This will compute the daily averages from the hourly data and save them in the appropriate directory structure.

API

ERA5Reanalysis.ERA5Daily Type
julia
ERA5Daily <: ERA5Custom

Specifies that the dataset to be analyzed contains hourly data. All fields are the same as that specified in the ERA5Dataset docstring. However, the fields sldoi, pldoi and ptype are all set to N/A because ERA5Daily is not available in, nor downloadable from, the Climate Data Store.

source
ERA5Reanalysis.ERA5Daily Method
julia
ERA5Daily(;
    start :: TimeType,
    stop  :: TimeType,
    path  :: AbstractString = homedir(),
) -> ERA5Daily <: ERA5Dataset

A function that creates an ERA5Hourly module. All possible hours are downloaded, and data is saved month-by-month.

Keyword Arguments

  • path : The specified directory in which to save the data

  • start : The date for which downloads/analysis begins, automatically rounded to the nearest month

  • stop : The date for which downloads/analysis finishes, automatically rounded to the nearest month

source