Skip to content

An Introduction to ERA5Regions

What is an ERA5Region and why do we need it?

By default, ERA5Reanalysis.jl will conduct downloads, or analyse data over, the entire globe. However, most of the time we would rather perform these tasks over specified regions of interest. In ERA5Reanalysis, we do this by specifying an ERA5Region, which is built on top of the GeoRegion functionality in GeoRegions.jl.

Why not just use GeoRegions directly?

The functionality of ERA5Regions and the basic manipulations are very similar to those of GeoRegions. However, in ERA5Reanalysis.jl, we must additionally specify the resolution of the data that needs to be downloaded and/or analyzed, and therefore we build an ERA5Region as a container of a GeoRegion.

Setup

julia
using ERA5Reanalysis

The ERA5Region Type

Missing docstring.

Missing docstring for ERA5Region{ST<:AbstractString, FT<:Real}. Check Documenter's build log for details.

The package GeoRegions.jl is automatically reexported by ERA5Reanalysis.jl, so one can define or retrieve a GeoRegion and its information directly without needing to explicitly call GeoRegions.jl in the REPL. Once a GeoRegion has been retrieved, we can use it to define an ERA5Region, which will also contain information on the horizontal resolution at which the dataset will be downloaded/analyzed.

ERA5Reanalysis.ERA5Region Method
julia
ERA5Region(
    geo :: GeoRegion;
    resolution :: Real = 0,
    ST = String,
    FT = Float64
) -> ereg :: ERA5Region

Argument

  • geo : A GeoRegion structure type

Keyword Argument

  • resolution : The spatial resolution that ERA5 reanalysis data will be downloaded/analyzed, and 360 must be a multiple of resolution
source

Basic Examples

Here, we define ERA5Regions that cover the same domain based on the same GeoRegion, but using different spatial resolution.

julia
geo = GeoRegion("AR6_SEA")
The GeoRegion AR6_SEA has the following properties:
    Region ID     (ID) : AR6_SEA
    Parent ID    (pID) : GLB
    Name        (name) : Southeast Asia
    Bounds   (N,S,E,W) : 19.5, -10.0, 155.0, 93.0
    Rotation       (θ) : 0.0
    File Path   (path) : /home/runner/.julia/packages/GeoRegions/bKYHS/src/.files/AR6/AR6_SEA.json
    Centroid (geometry.centroid) : [116.04213907785336, 3.4787414965986394]
    Shape       (geometry.shape) : Vector{Point{2, Float64}}(6)

Default resolution (0.25°):

julia
ereg1 = ERA5Region(geo)
The ERA5Region wrapper on the Longitude/Latitude Grid for the "AR6_SEA" GeoRegion has the following properties:
    Region ID             (ID) : AR6_SEA
    Name            (geo.name) : Southeast Asia
    Resolution    (resolution) : 0.25
    Folder ID         (string) : AR6_SEAx0.25
    Bounds     (geo.[N,S,E,W]) : 19.5, -10.0, 155.0, 93.0
    Rotation           (geo.θ) : 0.0
    File Path       (geo.path) : /home/runner/.julia/packages/GeoRegions/bKYHS/src/.files/AR6/AR6_SEA.json
    Shape (geo.geometry.shape) : Vector{Point{2, Float64}}(6)

Custom resolution (1.0°):

julia
ereg2 = ERA5Region(geo, resolution=1.0)
The ERA5Region wrapper on the Longitude/Latitude Grid for the "AR6_SEA" GeoRegion has the following properties:
    Region ID             (ID) : AR6_SEA
    Name            (geo.name) : Southeast Asia
    Resolution    (resolution) : 1.0
    Folder ID         (string) : AR6_SEAx1.00
    Bounds     (geo.[N,S,E,W]) : 19.5, -10.0, 155.0, 93.0
    Rotation           (geo.θ) : 0.0
    File Path       (geo.path) : /home/runner/.julia/packages/GeoRegions/bKYHS/src/.files/AR6/AR6_SEA.json
    Shape (geo.geometry.shape) : Vector{Point{2, Float64}}(6)

Valid Resolutions

The resolution must be a value such that 360 is a multiple of resolution. For example, resolution = 1.3 is not valid because 360 is not divisible by 1.3.

@example
ereg3 = ERA5Region(geo, resolution=1.3)