Update: Round Model Output
Description & motivation
This MR is in response to the discussions found in the following issue Proposal: Round Model Output (#1). The following changes round model output to streamline the data binning process, update a few small fish difference bins by shifting the bin value by 0.1, and fix a few minor typos in comments.
Here are the outlined changes:
- Update workflow to round model output for alligator, snail kite, Everwaders to 2 decimal places:
rest_run_process_functions.R - Update difference map labels for alligator, snail kite, Everwaders to match rounded model output:
process_definitions.R - Update marl prairie workflow to round model output to whole numbers:
marl_prairie_process_function.R - Update small fish workflow to round model output to 1 decimal place:
smallfish_workflow.R - Update small fish difference bins and labels:
process_definitions.R
Notes for peer reviewers:
@abenscoter , @shaider , @ldacunto , Can I please have a review of these changes. This should be a relatively quick review.
For more background, the updates in rest_run_process_functions.R create a flag for whether the model output should be rounded or not, and a variable for the number of digits to use in round(). Example:
round_flag <- TRUE # flag for rounding
round_digit <- 2 # number of digits to round to
if (round_flag) {
nc_stack <- round(nc_stack, digits = round_digit)
}
I thought this might give us more flexibility, since many models use the same function, in the event that we want to look at non-rounded output or change the number of digits for rounding. Small fish and Marl prairie rounding does not use the same flag and digit variable combination format since those workflows are separate.
I'm not sure of everyone's schedule so I'll chat over to make sure we are on the same page about the timeline for this review.
FYI, @sromanach
Checklist:
-
I have outlined my changes in the CHANGELOG. -
I have updated the CHANGELOG date if changes were made during review. -
My merge request represents one logical piece of work. -
My R code follows our style guidelines.
To do before merge
-
Ensure 2 authors have agreed to proposed changes in issue #1 -
Check that merge branch is up to date with target branch
To do after merge
Create a new tag using the date, version number, and description of the changes from the CHANGELOG