-
Notifications
You must be signed in to change notification settings - Fork 253
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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 viaconda 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 todata/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()

- 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):

ekatef
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working