Update NEE and LE gap-fill functions#3883
Open
Amedieus wants to merge 7 commits intoPecanProject:developfrom
Open
Update NEE and LE gap-fill functions#3883Amedieus wants to merge 7 commits intoPecanProject:developfrom
Amedieus wants to merge 7 commits intoPecanProject:developfrom
Conversation
mdietze
requested changes
Apr 3, 2026
| @@ -0,0 +1,589 @@ | |||
| utils::globalVariables(c( | |||
Member
There was a problem hiding this comment.
I'd strongly recommend agains setting global variables
| #' | ||
| #' @param site.dir character: path to the site information table. | ||
| #' @param n_sites numeric: number of sites to keep from the site table, | ||
| #' the total number of sites is 241. |
Member
There was a problem hiding this comment.
I'd drop this specific number, as it's likely to change in the future
| #' @return character vector of selected site IDs. Example: 'Site ID' CA-ARB | ||
| #' | ||
| #' @author Yang Gu | ||
| read_site_ids <- function(site.dir, n_sites = 40) { |
Member
There was a problem hiding this comment.
Remember that this code is becoming part of the overall PEcAn codebase, and in that context site_id means something different. I'd recommend a slight renaming to include fluxnet in the function name
| #' @return data.frame containing filtered predictor/flux data. | ||
| #' | ||
| #' @author Yang Gu | ||
| read_pred_data <- function(pred.var.dir, site_ids) { |
Member
There was a problem hiding this comment.
similar request to make the function name more specific, such as read_flux_gapfill_covariates
| #' } | ||
| #' | ||
| #' @author Yang Gu | ||
| build_sitecov_df <- function(resimet.df, |
Member
There was a problem hiding this comment.
Suggested change
| build_sitecov_df <- function(resimet.df, | |
| build_fluxnet_sitecov_df <- function(resimet.df, |
| #' @author Yang Gu | ||
| #' @importFrom foreach %dopar% | ||
| #' @export | ||
| xgb_gapfill <- function(site.dir, |
Member
There was a problem hiding this comment.
Suggested change
| xgb_gapfill <- function(site.dir, | |
| xgb_flux_gapfill <- function(site.dir, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Motivation and Context
Review Time Estimate
Types of changes
Checklist: