If NSTORMS is large (say 1000) and only a limited about of precipitation data is available (e.g. 1 year), the one storm per year changes will cause weird netcdf errors. The code gets confused because there is no 'stm_file' found, but the error that gets thrown doesn't make that obvious. We need to fix this by "trimming" the relevant variables 'catmax', 'cattime', etc. so that they only include actual storms, not placeholder values such as "1900-01-01 00:00".
If NSTORMS is large (say 1000) and only a limited about of precipitation data is available (e.g. 1 year), the one storm per year changes will cause weird netcdf errors. The code gets confused because there is no 'stm_file' found, but the error that gets thrown doesn't make that obvious. We need to fix this by "trimming" the relevant variables 'catmax', 'cattime', etc. so that they only include actual storms, not placeholder values such as "1900-01-01 00:00".