ARCCSS-extremes / climpact

Calculate the ET-SCI climate extremes indices
GNU General Public License v3.0
45 stars 31 forks source link

How to add custom scale to SPI/SPEI computation for NetCDF data? #120

Open devisdevis opened 1 month ago

devisdevis commented 1 month ago

Hello,

Please I would like to compute custom scale SPI/SPEI indices for NetCDF data in ClimPact2? Is there any detail in the documentation about the use of user-defined values for NetCDF data?

Thanks

heroldn commented 1 month ago

This isn't supported for netcdf, but the code change should be trivial. You could try changing both instances of "scale <- c(3,6,12)" in climpact.etsci-functions.r. This hasn't been tested but give it a go.

On 23/07/2024 00:48 ACST devisdevis @.***> wrote:

Hello,

Please I would like to compute custom scale SPI/SPEI indices for NetCDF data in ClimPact2? Is there any detail in the documentation about the use of user-defined values for NetCDF data?

Thanks

— Reply to this email directly, view it on GitHub https://github.com/ARCCSS-extremes/climpact/issues/120, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACW3FAJWPOLDSZW6CJSJJB3ZNUPFPAVCNFSM6AAAAABLIRKRPSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZDGMJUGIZTCNQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

devisdevis commented 1 month ago

Thanks, it works but the attribute (names) remain identical, which is confusing. What file could be tweaked to get the attributes right? Also, when I try to increase the number of SPI/SPEI scales (more than 3 scale levels like c(3,6,9,12,24)) and modify the ncdf.R in 'climdex.pcic.ncdf', it doesn't work. Any clue to solve that please?