downscale_core custom refmap too restrictive
climr_downscale() currently has unnecessary barriers to downscaling a user-provided refmap (i.e., not from input_refmap()).
first, the name of the DEM layer is required to be "dem2_WNA". could we make this more flexible?
also, it is required that isTRUE(attr(refmap, "builder") == "climr"). this is easily added to a user script, but it seems unnecessary.
currently a user needs two extra lines to bypass these restrictions:
mosaic.raw <- rast("//objectstore2.nrs.bcgov/ffec/Climatologies/climr_mosaic/climr_mosaic.tif")
names(mosaic.raw)[length(names(mosaic.raw))] <- "dem2_WNA"
attr(mosaic.raw, "builder") <- "climr" # necessary to trick the package into thinking this is climr input
climr.all <- downscale_core(grid, refmap = mosaic.raw, vars = list_vars(set="Monthly"))
@kdaust consider for this release but not essential
There are a few complexities here, so I'm suggesting we wait for the next minor release
roger that.
I added a known issues vignette but we should still resolve this.