climate_indices
climate_indices copied to clipboard
Possibility to avoid reorder dimension process in SPEI?
I want to calculate SPEI using data from TERRACLIMATE. All the input (precipitation and pet) have been prepared using NCO, following standard dimension order time,lat,lon
that acceptable by climate-indices
During the calculation, the script try to force the input to be the expected dimension lat,lon,time
by climate-indices
, which required ncpdq
to do that and always killed before completed the reorder.
I assume all the input for SPEI or other indices, generating by data provider or by CDO/NCO are always/usually in time,lat,lon
which is categorised as accepted order by by climate-indices
. Is there a way to avoid the process to reorder into lat,lon,time
?
Or all input data in lat,lon,time
are mandatory to continue the analysis?
Notes: for small study case/area is working fine, the problem is appear if the area or the input size is bigger.
Yes, @bennyistanto unfortunately, that aspect of the processing is hard-coded in the main processing script. It used to work flawlessly but at some point, there were changes made to NCO and/or pynco which broke things on Windows, and since then it's been no fun for Windows users. For example, see #396 and https://github.com/monocongo/climate_indices/issues/387#issuecomment-613691037
My suggestion is that we remove this "optimization" and replace it with a warning message to users such as "re-order your data and try again or you will have a slow execution". I will be happy to be rid of NCO -- it's a powerful tool on its own but it's not been easy to work with via pynco due to numerous Windows-related errors.
Resolved by PR #487