Open BramDr opened 6 months ago
After discussion with @edwinkost it was decided not to implement these changes as they are still untested. Rather, the model should exit and provide an error when unaligned regridding is detected.
Error messages added
When regridding a course resolution (netCDF) array, a factor is applied and the array is uniformly downscaled based on this factor. However, for cases where the fine resolution bounds to not match up with the coarse resolution bounds, this will not work. Rather the regridded coarse resolution array will be too large.
This branch fixes this issue by, if necessary, cropping the regridded data to the fine resolution bounds. Note that this fix is only applied to the default netcdf loading functions 'singleTryNetcdf2PCRobjCloneWithoutTime' and 'singleTryNetcdf2PCRobjClone'. In the future it would be better to reorganize the code so that this is done in a single function.