I am trying to compute indices for the period from November 1st to the end of June. To achieve this, I shifted my data by 61 days, so that November 1st becomes January 1st, and I set the values for July to October to missing data in NetCDF files.
Since the latest version of the NetCDF wrapper does not accept the max.missing.day argument, I forked the climdex.pcic package and set max.missing.days = c(annual = 150, monthly = 31, seasonal = 92).
Now, if I leave the indices value as NULL in climpact.ncdf.wrapper.r, I do not encounter any errors, but I end up with empty NetCDF files. However, if I specify individual index names separately, I am able to calculate some annual indices, such as cdd, csdi, cwd, dtr, fd, hw, id, sdii, txge35, and wsdi.
When I try to calculate r95ptot, I receive the following error:
Error in if (cdx.meta$var.name[i] == "rxdday") { :
missing value where TRUE/FALSE needed
Calls: create.indices.from.files
Execution halted
I am using ERA5-Land data from 1985 to 2024, so I do not expect any actual missing values, except over water bodies. I have encountered the same error with other indices as well. How can I resolve this issue?
I am trying to compute indices for the period from November 1st to the end of June. To achieve this, I shifted my data by 61 days, so that November 1st becomes January 1st, and I set the values for July to October to missing data in NetCDF files.
Since the latest version of the NetCDF wrapper does not accept the
max.missing.dayargument, I forked theclimdex.pcicpackage and setmax.missing.days = c(annual = 150, monthly = 31, seasonal = 92).Now, if I leave the indices value as NULL in
climpact.ncdf.wrapper.r, I do not encounter any errors, but I end up with empty NetCDF files. However, if I specify individual index names separately, I am able to calculate some annual indices, such as cdd, csdi, cwd, dtr, fd, hw, id, sdii, txge35, and wsdi.When I try to calculate r95ptot, I receive the following error:
I am using ERA5-Land data from 1985 to 2024, so I do not expect any actual missing values, except over water bodies. I have encountered the same error with other indices as well. How can I resolve this issue?