diff --git a/README.md b/README.md index 2b1b912a..f12f83ba 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ GEODATA -- +- [![DOI](https://zenodo.org/badge/218690319.svg)](https://zenodo.org/badge/latestdoi/218690319) diff --git a/src/geodata/datasets/era5.py b/src/geodata/datasets/era5.py index 08f464ca..8131c4e9 100644 --- a/src/geodata/datasets/era5.py +++ b/src/geodata/datasets/era5.py @@ -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=[ @@ -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], @@ -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=[ diff --git a/src/geodata/pvlib.py b/src/geodata/pvlib.py index 1509a5cb..2853d2b1 100644 --- a/src/geodata/pvlib.py +++ b/src/geodata/pvlib.py @@ -226,7 +226,8 @@ def pvlib_model( vars = [ 'influx_diffuse', 'influx_direct', - 'dewpoint_temperature', + #'dewpoint_temperature', + 'd2m', 'temperature', 'wnd100m' ] @@ -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( @@ -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(