From ea3b5b8a82f196c225c280bb6960a9fe2d33412f Mon Sep 17 00:00:00 2001 From: billchen24 Date: Thu, 28 Aug 2025 11:40:32 -0700 Subject: [PATCH 1/5] [fix] update file paths in weather_data_config for ERA5 data --- src/geodata/datasets/era5.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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=[ From ebb8b4d80e27ead24a7761445cc18c795540c96c Mon Sep 17 00:00:00 2001 From: billchen24 Date: Thu, 28 Aug 2025 11:48:33 -0700 Subject: [PATCH 2/5] [fix]: update pvlib_model variable name 'd2m' and correct np.Inf usage --- src/geodata/pvlib.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/geodata/pvlib.py b/src/geodata/pvlib.py index 1509a5cb..edc2087a 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( From 21a8c616b955cdf7f68945206bbeb56d2dd19066 Mon Sep 17 00:00:00 2001 From: billchen24 Date: Thu, 28 Aug 2025 16:51:04 -0700 Subject: [PATCH 3/5] [fix]: update pvlib 'd2m' variable --- src/geodata/pvlib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/geodata/pvlib.py b/src/geodata/pvlib.py index edc2087a..8d874248 100644 --- a/src/geodata/pvlib.py +++ b/src/geodata/pvlib.py @@ -523,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( From 165b234800ef9aa927b83021b41b26c007dc8f92 Mon Sep 17 00:00:00 2001 From: billchen24 Date: Thu, 28 Aug 2025 17:34:02 -0700 Subject: [PATCH 4/5] [fix] misnamed function --- src/geodata/pvlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/geodata/pvlib.py b/src/geodata/pvlib.py index 8d874248..2853d2b1 100644 --- a/src/geodata/pvlib.py +++ b/src/geodata/pvlib.py @@ -524,7 +524,7 @@ def _prepare_pvlib_ds(cutout, *varnames): relative_humidity = _calculate_relative_humidity( temperature_celsius, #_convert_celsius(ds.dewpoint_temperature), - convert_celsius(ds.d2m), + _convert_celsius(ds.d2m), ) precipitable_water = _calculate_precipitable_water( From 63b4c9e55bef12042c6a1364500e5acad1d68161 Mon Sep 17 00:00:00 2001 From: BillChen24 <81694441+BillChen24@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:14:46 -0800 Subject: [PATCH 5/5] Fix formatting issues in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)