Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GEODATA
-
-

[![DOI](https://zenodo.org/badge/218690319.svg)](https://zenodo.org/badge/latestdoi/218690319)

Expand Down
18 changes: 12 additions & 6 deletions src/geodata/datasets/era5.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,10 @@ def prepare_3d_era5(fn, year, month, xs, ys):
tasks_func=tasks_monthly_era5,
meta_prepare_func=prepare_meta_era5,
prepare_func=prepare_month_era5,
template=os.path.join(era5_dir, "{year}/{month:0>2}/wind_solar_hourly.nc"),
fn=os.path.join(era5_dir, "{year}/{month:0>2}/wind_solar_hourly.nc"),
#template=os.path.join(era5_dir, "{year}/{month:0>2}/wind_solar_hourly.nc"),
template=os.path.join(era5_dir, "wind_solar_hourly/{year}/{month:0>2}.nc"),
#fn=os.path.join(era5_dir, "{year}/{month:0>2}/wind_solar_hourly.nc"),
fn=os.path.join(era5_dir, "wind_solar_hourly/{year}/{month:0>2}.nc"),
product="reanalysis-era5-single-levels",
product_type="reanalysis",
keywords=[
Expand Down Expand Up @@ -543,8 +545,10 @@ def prepare_3d_era5(fn, year, month, xs, ys):
tasks_func=tasks_monthly_era5,
meta_prepare_func=prepare_meta_era5,
prepare_func=prepare_3d_era5,
template=os.path.join(era5_dir, "{year}/{month:0>2}/wind_3d_hourly.nc"),
fn=os.path.join(era5_dir, "{year}/{month:0>2}/wind_3d_hourly.nc"),
#template=os.path.join(era5_dir, "{year}/{month:0>2}/wind_3d_hourly.nc"),
template=os.path.join(era5_dir, "wind_3d_hourly/{year}/{month:0>2}.nc"),
#fn=os.path.join(era5_dir, "{year}/{month:0>2}/wind_3d_hourly.nc"),
fn=os.path.join(era5_dir, "wind_3d_hourly/{year}/{month:0>2}.nc"),
product="reanalysis-era5-complete",
product_type="reanalysis",
keywords=[131, 132],
Expand All @@ -556,8 +560,10 @@ def prepare_3d_era5(fn, year, month, xs, ys):
tasks_func=tasks_monthly_era5,
meta_prepare_func=prepare_meta_era5,
prepare_func=prepare_month_era5,
template=os.path.join(era5_dir, "{year}/{month:0>2}/wind_solar_monthly.nc"),
fn=os.path.join(era5_dir, "{year}/{month:0>2}/wind_solar_monthly.nc"),
#template=os.path.join(era5_dir, "{year}/{month:0>2}/wind_solar_monthly.nc"),
template=os.path.join(era5_dir, "wind_solar_monthly/{year}/{month:0>2}.nc"),
#fn=os.path.join(era5_dir, "{year}/{month:0>2}/wind_solar_monthly.nc"),
fn=os.path.join(era5_dir, "wind_solar_monthly/{year}/{month:0>2}.nc"),
product="reanalysis-era5-single-levels-monthly-means",
product_type="monthly_averaged_reanalysis",
keywords=[
Expand Down
9 changes: 6 additions & 3 deletions src/geodata/pvlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ def pvlib_model(
vars = [
'influx_diffuse',
'influx_direct',
'dewpoint_temperature',
#'dewpoint_temperature',
'd2m',
'temperature',
'wnd100m'
]
Expand Down Expand Up @@ -360,7 +361,8 @@ def _calculate_ghi(ds, zenith):
ghi = np.clip(
dhi + dni * np.cos(zenith),
0,
np.Inf
#np.Inf
np.inf # `np.Inf` was removed in the NumPy 2.0 release.
)

reshaped_ghi = ghi.values.reshape(
Expand Down Expand Up @@ -521,7 +523,8 @@ def _prepare_pvlib_ds(cutout, *varnames):

relative_humidity = _calculate_relative_humidity(
temperature_celsius,
_convert_celsius(ds.dewpoint_temperature),
#_convert_celsius(ds.dewpoint_temperature),
_convert_celsius(ds.d2m),
)

precipitable_water = _calculate_precipitable_water(
Expand Down
Loading