climate_indices
climate_indices copied to clipboard
SPI calculation is unsuccessful using climate_indices, while successful with SPEI package of R for same data
while running the climate_indices python package for processing of spi, there is always a error as below. I tried with various datasets and also run the calculation using SPEI package of R and it worked successfully with the same data. Can you please figure out what the problem is? Thanks in advance.
How to craft a useful, minimal bug report
Describe the bug A clear and concise description of what the bug is.
#########################################################################################
(climate-indices) D:\Python_Practice\climate_indices_drought\climate_indices-master>process_climate_indices --index spi --periodicity monthly --netcdf_precip D:/Python_Practice/climate_indices_drought/climate_indices-master/alina_precipitation_data.nc --var_name_precip ppt --output_file_base D:/Python_Practice/climate_indices_drought/climate_indices-master/results/IMERG --scales 12 --calibration_start_year 1994 --calibration_end_year 2023
2024-05-06 13:42:19 INFO Start time: 2024-05-06 13:42:19.556274
2024-05-06 13:42:19 INFO Computing 12-month SPI/Pearson
2024-05-06 13:42:19 ERROR Invalid dimensions for variable 'ppt': ('time', 'lat', 'lon')
2024-05-06 13:42:19 ERROR Failed to complete
Traceback (most recent call last):
File "C:\Python312\Lib\site-packages\climate_indices_main_.py", line 1708, in main
compute_write_index(kwrgs)
File "C:\Python312\Lib\site-packages\climate_indices_main.py", line 809, in _compute_write_index
drop_data_into_shared_arrays_grid(dataset,
File "C:\Python312\Lib\site-packages\climate_indices_main.py", line 596, in _drop_data_into_shared_arrays_grid
raise ValueError(message)
ValueError: Invalid dimensions for variable 'ppt': ('time', 'lat', 'lon')
Traceback (most recent call last):
File "
##################################################################################################
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Version: [e.g. 22]
Additional context Add any other context about the problem here.