bcgov / bcgov/climr

downscale_core custom refmap too restrictive

Open
#338 4 comments 0 reactions 1 assignee Claimed by @kdaust View on GitHub
enhancement v1.0.0
Dominant language
R
Stars
19
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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"))
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.