You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to update SPI daily using the most recent data every day. However, if the ppt input data does not end on Dec. 31, process_climate_indices fails. I have tried using data files that end on other days (Dec. 31, Jan. 31, Feb. 22, etc.) but they all fail.
One solution could be to create a file that ends at the end of this year but is filled with made of up values for future days (i.e., zero), but I rather not if there is a better way.
Expected behavior
I expect SPI to be calculated for every day in the input even if the record does not end on Dec. 31.
Screenshots
Here is the call to process_climate_indices and just snippet of the error message:
process_climate_indices --index spi --periodicity daily --netcdf_precip ppt_1981-01-01_2025-01-31.nc --var_name_precip prcp --output_file_base test --scales 30 --calibration_start_year 1991 --calibration_end_year 2020 --multiprocessing all
prismcpx6 498% ./spi_daily_test.bash
2025-02-23 08:07:51 INFO Start time: 2025-02-23 08:07:51.604848
2025-02-23 08:07:51 INFO Computing 30-day SPI/Pearson
2025-02-23 08:07:51 ERROR Failed to complete
Traceback (most recent call last):
....
/climate_indices/utils.py", line 367, in transform_to_366day
all_leap[all_leap_index: (all_leap_index + 59)] = original[original_index: (original_index + 59)]
ValueError: could not broadcast input array from shape (31,) into shape (59,)
Desktop (please complete the following information):
OS: Linux
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to update SPI daily using the most recent data every day. However, if the ppt input data does not end on Dec. 31, process_climate_indices fails. I have tried using data files that end on other days (Dec. 31, Jan. 31, Feb. 22, etc.) but they all fail.
One solution could be to create a file that ends at the end of this year but is filled with made of up values for future days (i.e., zero), but I rather not if there is a better way.
Expected behavior
I expect SPI to be calculated for every day in the input even if the record does not end on Dec. 31.
Screenshots
Here is the call to process_climate_indices and just snippet of the error message:
prismcpx6 498% ./spi_daily_test.bash
2025-02-23 08:07:51 INFO Start time: 2025-02-23 08:07:51.604848
2025-02-23 08:07:51 INFO Computing 30-day SPI/Pearson
2025-02-23 08:07:51 ERROR Failed to complete
Traceback (most recent call last):
....
/climate_indices/utils.py", line 367, in transform_to_366day
all_leap[all_leap_index: (all_leap_index + 59)] = original[original_index: (original_index + 59)]
ValueError: could not broadcast input array from shape (31,) into shape (59,)
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: