Skip to content

build_renewable_profiles not actually checking for water depth #1516

@Eric-Nitschke

Description

@Eric-Nitschke

Checklist

  • I am using the current main branch or the latest release. Please indicate.
  • I am running on an up-to-date pypsa-earth environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

When checking build_renewable_profiles.py for how the offshore raster is implemented as part of Issue #1511 I've realized something:
build_renewable_profiles.py isn't actually checking for water depth.

The code works as follows:

  • it adds an excluder raster to the cutout, where only cells are allowed where the provided value is larger than -config["max_depth"]
  • as default, config["max_depth"]: 50
  • the provided value stems from paths.gebco, which leads to data/gebco/GEBCO_2021_TID.nc
  • data/gebco/GEBCO_2021_TID.nc does not include the GEBCO Grid data, which provides seabed-data. Instead it provides Type Identifiers (TID), which tell you, how the seabed was measured. I've attached an image of how a section of the dataset looks down below. You can get the same output using the following code. Depending on your RAM might need to make the slices even smaller:
import xarray as xr

ds = xr.open_dataset(r"data\gebco\GEBCO_2021_TID.nc") 
ds["tid"].sel(lon=slice(-20,20),lat=slice(30,80)).plot()
Image
  • since all TIDs are equal or greater than 0, the whole offshore area will automatically fulfill the depth requirement.

Unless I've misread some of the code, this simply does not do what is supposed to. To fix this, the bundle_config needs to be adjusted, to actually include the seabed data.

EDIT:
This is what the data is supposed to look like (from GEBCO):

Image

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