Skip to content

Forcing (often?) requires padding #7

@BSchilperoort

Description

@BSchilperoort

When generating forcing, the forcing might not work correctly if there is no padding around the clonemap. This is easily fixable by adding padding, but it would be better if this padding was added automatically in the recipe.

Current workaround:

clonemap_extents = {
    "Rhine": {"latitude": (45.0, 54.0), "longitude": (3.0, 13.5)},
}

# Set the extent of the forcing data suffiently larger than the clonemap.
esmvaltool_padding = 1.5  # degrees lat/lon
x0, x1 = clonemap_extents[catchment]["longitude"]
y0, y1 = clonemap_extents[catchment]["latitude"]

forcing = ewatercycle.forcing.sources["PCRGlobWBForcing"].generate(
    dataset="ERA5",
    start_time="2001-01-01T00:00:00Z",
    end_time="2005-12-31T00:00:00Z",
    shape="Rhine.shp",
    start_time_climatology="2001-01-01T00:00:00Z",
    end_time_climatology="2005-12-31T00:00:00Z",
    extract_region={
        "start_latitude": y0 - esmvaltool_padding,
        "end_latitude": y1 + esmvaltool_padding,
        "start_longitude": x0 - esmvaltool_padding,
        "end_longitude": x1 + esmvaltool_padding,
        },
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions