Skip to content

Defining ERA5 Datasets

Defining an ERA5Dataset is easy. All you need to define are two things:

  1. Date range, ranging from start to stop

  2. Data path, i.e. where you want to save the ERA5 Reanalysis Data

julia
DatasetFunction(
    start = Date(),
    stop  = Date(),
    path  = ...
)

Setup

julia
using ERA5Reanalysis

Example for an Hourly Dataset

See below for an example of defining an ERA5Hourly dataset:

julia
e5ds = ERA5Hourly(start=Date(2017,2,1),stop=Date(2017,2,1),path=homedir())
The ERA5Hourly Module has the following properties:
    Dataset ID        (ID) : era5hr
    Date Begin     (start) : 2017-02-01
    Date End        (stop) : 2017-02-28
    Data Directory  (path) : /home/runner/era5hr
    Mask Directory (emask) : /home/runner/emask
julia
e5ds.start
2017-02-01
julia
e5ds.stop
2017-02-28
julia
typeof(e5ds)
ERA5Hourly{String, Date}
julia
typeof(e5ds) <: ERA5Dataset
true

Note that the resultant ERA5Hourly dataset processes data by whole-months. It is not possible to specify specific days in which to download data.

Example for a Monthly Dataset

And below for an example of defining an ERA5Monthly dataset with a custom home directory:

julia
e5ds = ERA5Monthly(start=Date(2017,1,2),stop=Date(2018,5,1),path=pwd())
The ERA5Monthly Module has the following properties:
    Dataset ID        (ID) : era5mo
    Date Begin     (start) : 2017-01-01
    Date End        (stop) : 2018-12-31
    Data Directory  (path) : /home/runner/work/ERA5Reanalysis.jl/ERA5Reanalysis.jl/docs/build/datasets/era5mo
    Mask Directory (emask) : /home/runner/work/ERA5Reanalysis.jl/ERA5Reanalysis.jl/docs/build/datasets/emask
    Hour-of-Day?   (hours) : false
julia
e5ds.start
2017-01-01
julia
e5ds.stop
2018-12-31
julia
typeof(e5ds)
ERA5Monthly{String, Date}

Note that the resultant ERA5Monthly dataset processes data by years. It is not possible to specify specific months in which to download data. The same holds true for the ERA5MonthlyHour dataset.

Example for a Monthly-Hour Dataset

@example
e5ds = ERA5Monthly(start=Date(2017,1,2),stop=Date(2018,5,1),hours=[0,3,6,9,12,15,18,21])
julia
typeof(e5ds)
ERA5Monthly{String, Date}