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

Add Alberta planning subregions to available study areas #2

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

chrismallon
Copy link

Code was added to allow users to select subregions of Alberta used in land-use planning as study areas to run LandWeb. Study areas can be selected by their names: 'Smoky', 'Cold', and 'Bistcho'.

} else if (grepl("Bistcho", P(sim)$runName)) {
ml <- processPSR(ml, config::get('studyarea'), dataDir, sim$canProvs, P(sim)$bufferDist, asStudyArea = TRUE)
} else if (grepl("Cold", P(sim)$runName)) {
ml <- processPSR(ml, config::get('studyarea'), dataDir, sim$canProvs, P(sim)$bufferDist, asStudyArea = TRUE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these can be handled with single grepl call since they are the same lines of code.

NOTE: do NOT use config::get() anywhere except the 01-init.R script because you will have to deal with race conditions.

Is there a reason you aren't using runName mechanism to pass the study area name?

Copy link
Member

@achubaty achubaty May 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suggest using PSR in the runName, so we grep "PSR" at the top level here, and deal with the specific PSR (i.e., <blah>) in processPSR() -- see FMU code

Copy link
Member

@achubaty achubaty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR is incomplete. need to also ensure adjustments made for downstream postprocessing (i.e., ensuring polygons have Name and shinyLabel attributes).

I see the goal is to be able to run a single PSR, but it may be worth adding all PSRs to the Alberta runs so results can be accessed there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants