Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forcing (often?) requires padding #7

Open
BSchilperoort opened this issue May 30, 2024 · 0 comments
Open

Forcing (often?) requires padding #7

BSchilperoort opened this issue May 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@BSchilperoort
Copy link
Member

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,
        },
    )
@BSchilperoort BSchilperoort added the bug Something isn't working label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant