dims [product xxxxx] do not match the length of object [xxxxx]
Closed this issue · 12 comments
I am working with CMIP5 climate projection data to generate climate indices. I was able to successfully generated required indices for the baseline period (1976-2005) using ncdf.wrapper. However, when try to create the thresholds file for the baseline period in order to use for the future period using ncdf.threshold.wrapper, it gives below error.
dims [product 8230750] do not match the length of object [8237064]
Calls: create.thresholds.from.file ... parLapplyLBFiltered -> local.filter.func -> lapply -> FUN
Execution halted
Could you pls help me to solve this issue...
Thank you. I am using the same file for both indices and thresholds calculations. Attached are the scripts and provided the link to my input file.
climpact2.ncdf.thresholds.wrapper_nex_bl.r.txt
climpact2.ncdf.wrapper_nex_bl.r.txt
Input NC file (1.3GB): https://1drv.ms/u/s!AuqzBPgEu8sXhbtcLF0cEqBFX9as8g?e=f10MLs
Thank you for your effort. I have several future time periods such as 2030s (2016-2045), 2050s (2036-2065) and 2080s (2066-2095). All these files have 30 years data. As you have suggested, I may try to run combining them.
Hello akssinghe and heroldn,
I have faced the same problem.
dims [product xx] do not match the length of object [xx]
Calls: create.thresholds.from.file ... parLapplyLBFiltered -> local.filter.func -> lapply -> FUN
I am wondering if this problem has already been solved.
Cheers,
Mark
HI Heroldn, sorry for the delay reply.
I think I have already solved this problem. The code is as follow using cdo:
cdo setcalendar,365_day input.nc output.nc
It can solve the bug
dims [product 8230750] do not match the length of object [8237064]
Calls: create.thresholds.from.file ... parLapplyLBFiltered -> local.filter.func -> lapply -> FUN
I hope this code can also help other researchers who have experienced the same problem.
Cheers,
Mark
But I take it your data is actually on a 360_day calendar? I'm not sure what side effects this would have. Possibly it will start counting the 5 days of the start of the next year as a part of the previous year.
I have exampled my original model data and the calculate files using climpact, and all of them are on 365_day calendar. The preprocesses (e.g. delete month=2,day=29) are needed if the data calendar is gregorian, noleap, etc. Moreover, I have already removed all 360_day calendar model data to avoid potential problem. Then we can change the time calendar to 365_day.
If my method have any problems, please do not hesitate to contact with me.
Mark
Yes, I have removed any models that have a 360_day calendar.