Skip to content

Conversation

@finozzifa
Copy link
Member

@finozzifa finozzifa commented Oct 13, 2025

Closes # (if applicable).

Changes proposed in this Pull Request

In this pull request I provide a new cutout for europe.

The cutout was generated starting from the europe-2013-sarah3-era5.nc, restricting the time span to the month of january. I used this code snippet to do it.

import pathlib
import atlite
europe_cutout_path = pathlib.Path("europe-2013-sarah3-era5.nc")
europe_cutout = atlite.Cutout(
    path=europe_cutout_path
)

# Define the time range
start_time = "2013-01-01T00:00:00.000000000"
end_time = "2013-01-31T23:00:00.000000000"

# Select the time range
time_cropped_ds = europe_cutout.sel(time=slice(start_time, end_time))

time_cropped_ds.to_file(fn="europe-jan-2013-sarah3-era5.nc")

The new cutout has the following characteristics.

Dimensions:           (x: 177, y: 131, time: 744)
Coordinates:
  * x                 (x) float64 1kB -12.0 -11.7 -11.4 -11.1 ... 40.2 40.5 40.8
  * y                 (y) float64 1kB 33.0 33.3 33.6 33.9 ... 71.4 71.7 72.0
  * time              (time) datetime64[ns] 6kB 2013-01-01 ... 2013-01-31T23:...
    lon               (x) float64 1kB dask.array<chunksize=(177,), meta=np.ndarray>
    lat               (y) float64 1kB dask.array<chunksize=(131,), meta=np.ndarray>
Data variables: (12/13)
    influx_direct     (time, y, x) float32 69MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    influx_diffuse    (time, y, x) float32 69MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    solar_altitude    (time, y, x) float64 138MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    solar_azimuth     (time, y, x) float64 138MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    height            (y, x) float32 93kB dask.array<chunksize=(131, 177), meta=np.ndarray>
    wnd100m           (time, y, x) float32 69MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    ...                ...
    roughness         (time, y, x) float32 69MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    influx_toa        (time, y, x) float32 69MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    albedo            (time, y, x) float32 69MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    temperature       (time, y, x) float64 138MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    soil temperature  (time, y, x) float64 138MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
    runoff            (time, y, x) float32 69MB dask.array<chunksize=(100, 131, 177), meta=np.ndarray>
Attributes: (12/46)
    module:                     ['era5', 'sarah']
    prepared_features:          ['height', 'influx', 'runoff', 'temperature',...
    chunksize_lat:              -1
    chunksize_time:             100
    sarah_dir:                  data
    dx:                         0.3
    ...                         ...
    instrument:                 SEVIRI > Spinning Enhanced Visible and Infrar...
    variable_id:                SIS
    license:                    The CM SAF data are owned by EUMETSAT and are...
    title:                      CM SAF Surface Solar Radiation Climate Data R...
    summary:                    This file contains data from the CM SAF Surfa...
    history:                    2022-07-09 17:18:34 GMT by grib_to_netcdf-2.2...

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • OET SPDX license header added to all touched files.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.
  • I will remember to squash merge the PR.

Copy link

@martacki martacki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer here if we could do minimal changes compared to upstream only, so that we don't get million merge conflicts in the long run.

style improvements should go there, not to the project repository

atlite:
cutout_directory: cutouts
default_cutout: europe-2023-sarah3-era5
default_cutout: europe-jan-2023-sarah3-era5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default_cutout: europe-jan-2023-sarah3-era5
default_cutout: europe-jan-2013-sarah3-era5

# base:
# module: era5
europe-2023-sarah3-era5:
europe-jan-2023-sarah3-era5:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
europe-jan-2023-sarah3-era5:
europe-jan-2013-sarah3-era5:

rule download_ember_data:
output:
[str(path) for path in DOWNLOADS.keys()]
[str(path) for path in DOWNLOADS.keys()],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if those changes are not in upstream, I'd prefer to keep them to avoid unnecessary merge conflicts later.

but you're welcome making this suggestion upstream :)

caps = pd.Series(
data=ds.indexes["bus"].get_level_values("bus").map(caps),
index=ds.indexes["bus"]
index=ds.indexes["bus"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
index=ds.indexes["bus"],
index=ds.indexes["bus"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants