Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downscale_core custom refmap too restrictive #338

Open
cmahony opened this issue Jan 2, 2025 · 0 comments
Open

downscale_core custom refmap too restrictive #338

cmahony opened this issue Jan 2, 2025 · 0 comments
Labels
enhancement New feature or request v1.0.0 complete before release of version 1.0.0

Comments

@cmahony
Copy link
Collaborator

cmahony commented Jan 2, 2025

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"))
@cmahony cmahony added enhancement New feature or request v1.0.0 complete before release of version 1.0.0 labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.0.0 complete before release of version 1.0.0
Projects
None yet
Development

No branches or pull requests

1 participant