In the following code, we assume that the raster is in 0-360 format, while there is nothing stopping it from being in -180 to 180 format.
left_xmin <- 0 - 2 * terra::xres(clim_stack) # should be -180, not 0
right_xmax <- 360 + 2 * terra::xres(clim_stack) # should be 180, not 360
In the following code, we assume that the raster is in 0-360 format, while there is nothing stopping it from being in -180 to 180 format.
left_xmin <- 0 - 2 * terra::xres(clim_stack) # should be -180, not 0
right_xmax <- 360 + 2 * terra::xres(clim_stack) # should be 180, not 360