-
Notifications
You must be signed in to change notification settings - Fork 7
Suna #1006
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
Open
ncatolico
wants to merge
242
commits into
master
Choose a base branch
from
suna
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Suna #1006
Changes from all commits
Commits
Show all changes
242 commits
Select commit
Hold shift + click to select a range
478c060
suna log file checker for pachyderm.
139ec50
Additional work on suna log file checker
4b9bb3c
suna pipeline structure
ncatolico ec0eb5c
trino data
ncatolico 14fb044
Additional updated to SUNA log checker
96c9286
Merge branch 'suna' of https://github.com/NEONScience/NEON-IS-data-pr…
1738b81
add LECO
ncatolico a05d72d
Updates to suna logged data checker.
3606247
Updates to SUNA log file checker.
26a1faf
Update to SUNA log file formatter that pulls asset information from f…
3253a73
fast forward
ncatolico 6dcb3d1
fast forward
ncatolico 2fcaea8
update to sunav2
ncatolico b6e16ab
debug
ncatolico d659133
update dates
ncatolico 5be5712
latest
ncatolico 18dd3ca
suna trino loader
ncatolico c126367
fast forward
ncatolico 3ea505c
fast forward
ncatolico b39dacc
fast forward
ncatolico 8a124f7
Updates to SUNA modules.
66b0dc6
latest
ncatolico efa81a1
latest
ncatolico 13c8203
latest
ncatolico b2df2d3
latest
ncatolico a9859eb
fast forward
ncatolico 75cbee2
latest
ncatolico 431b28e
latest
ncatolico 4982871
latest
ncatolico 8f87d5c
latest
ncatolico 1a9c472
Added code to generate SUNA log QF output file.
dd94e8c
combined suna log fill module
ncatolico d48d008
combined module git action
ncatolico 91a3f4d
combined module
ncatolico d92ba06
latest
ncatolico c5f1411
latest
ncatolico 2476643
minor
ncatolico 6f50b98
latest
ncatolico bd6f222
fast forward
ncatolico 63873b3
fix
ncatolico 4946c27
testing
ncatolico e5a94b8
update environs
ncatolico cfa9a11
more logs
ncatolico a243d3e
logs
ncatolico 6025c51
latest
ncatolico e100ec6
Update sunav2_data_parser.yaml
covesturtevant afb2bfa
Update sunav2_data_parser.yaml
covesturtevant e1ea41f
fast forward
ncatolico 696cae7
latest
ncatolico 81f23b2
fast forward
ncatolico 5646b28
Deleted parsing of L0 data within sunav2.log.fill, since we realized …
0730496
Merge branch 'master' into suna
covesturtevant c77753b
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
covesturtevant 06f552b
load and parse suna data
covesturtevant ff8d2f7
change source type in suna calibration loader to "sunav2" instead of …
covesturtevant 638456a
bug fix
covesturtevant 9666aec
fix source type
covesturtevant 155c3d8
update image
ncatolico 704b149
ignor kafka data for now
ncatolico b28f2da
latest
ncatolico 898036c
latest
ncatolico 0144981
Merge branch 'master' into suna
covesturtevant 976f388
update kafka image
covesturtevant 7e0e002
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico 3919b2e
update resource request
covesturtevant 8f8994d
update resource requests
covesturtevant a1ff444
fast forward
ncatolico 4324225
latest suna pipeline
ncatolico 1bced34
fast forward
ncatolico 390f2d5
Started work on SUNA flagging module.
e1d6a9a
nitrate latest
ncatolico 8c8ab74
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico d2c004e
update column name
ncatolico df76ba6
SUNA sensor-specific QAQC
11b4466
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
df8c415
latest
ncatolico 1a1ca7a
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico bae8aad
latest
ncatolico a91bb09
latest
ncatolico b3411bc
latest
ncatolico 9220a18
latest
ncatolico f2bb5ee
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico 46ec1c4
Updates to SUNA-specific quality flag module.
aa6b7f7
Fixed param names in header.
e375937
latest
ncatolico 41ca917
fast forward
ncatolico 9951b01
Work on .flow and docker files for suna quality flags.
8c2db63
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
dccb601
Updates to suna quality flag .flow and docker.
31cb3b2
latest
ncatolico 381a3ca
fast forward
ncatolico 4d0c318
rename dockerfile
ncatolico fe28578
renv file
ncatolico b982e99
test continuous data
ncatolico a8733f5
fast forward
ncatolico 1056388
latest
ncatolico 5a8c180
Merge branch 'master' into suna
covesturtevant bf5a842
update node selector
covesturtevant 598a6f6
point to correct site list
covesturtevant 2cca82d
Merge branch 'master' into suna
covesturtevant d568fcf
stop triggering daily cron
covesturtevant 0f097aa
fast forward
ncatolico 47da90c
udpated for dev testing
ncatolico e69bd7a
latest
ncatolico f361dd5
minor
ncatolico b1a2efe
update docker file
ncatolico ecbf4e7
update docker file
ncatolico 612f69c
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico d6f7873
flags specific pipeline
ncatolico 954fbca
update output path
ncatolico 39d7171
minor
ncatolico 5deb085
latest
ncatolico 071eb46
fast forward
ncatolico 67fd9bc
Updates to SUNA sensor specific flagging module. Determines measurmen…
1e1e4ba
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
5a22ea5
Updates to SUNA sensor specific flag module.
ce92249
latest
ncatolico 4b4f1ce
ignore problematic spec_channels for now
ncatolico 086338d
change field names back
ncatolico 326b3b4
schema update
ncatolico 8b0b9a2
latest
ncatolico d75b5b3
spec channels update
ncatolico 67564eb
update images
ncatolico 5bf1c42
minor
ncatolico a9c9ab0
latest
ncatolico f284f86
image
ncatolico bc57507
fast forward
ncatolico 1c32a70
Updated suna quality flag module to remove measuremnts where lamp has…
054e370
latest
ncatolico b90a00b
image update
ncatolico 17df9ef
latest
ncatolico b4d82d2
update image
ncatolico ca8ce76
Added check that output data and flags have same number of measuremnts.
03d73eb
updated image
ncatolico 8c3129c
test image
covesturtevant a6927e6
merge master, resolve conflicts
covesturtevant 8fba6ef
update with semver tag
covesturtevant b95b90a
fast forward
ncatolico eb55407
update expired image
ncatolico 9886b88
Merge branch 'master' into suna
covesturtevant 02522a0
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
covesturtevant 26aeb64
update image version
covesturtevant 06aa4ba
image update
ncatolico 3780a7a
minor fix
ncatolico 3d22ecf
latest
ncatolico 2b2d433
latest
ncatolico d582b02
latest
ncatolico 033e5f8
fast forward
ncatolico 1485cc0
Updated to revert plausibility flags at end of each burst.
72c2253
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
b713685
Updated change log.
4dc1f50
update image
ncatolico e28141b
Created insufficient data quality flagging module.
d571c85
Updates to flow script.
1f2d34b
Updates
3b8cb41
Created expanded uncertainty module for SUNA.
2f8ea6d
Updates to SUNA expanded uncertainty module.
5dbc533
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico 1187b1c
combined module for uncertainty
ncatolico 58e6da6
fast forward
ncatolico ee522b5
build flow image
ncatolico 5a578f5
git actions
ncatolico 036fd47
latest
ncatolico 3d1fee3
add in cal package
ncatolico d590e7a
latest
ncatolico 4a9eb21
latest
ncatolico 1bdfe3e
create docker image
ncatolico db7a283
latest
ncatolico 238d31d
combine modules
ncatolico fee1f15
fast forward
ncatolico 71a3f84
latest
ncatolico 3e2d1f9
fast forward
ncatolico bbf9fb7
fast forward
ncatolico 43af1e4
update cron
ncatolico f974ce4
fast forward
ncatolico 4fa99b1
full site list
ncatolico e99ca00
Merge branch 'master' into suna
covesturtevant 70b0372
update cal module image
covesturtevant 470c3b9
merge master, resolve conflict
covesturtevant 34dac9f
remove json version
covesturtevant d7a4a0d
update image
covesturtevant 6dd24fc
latest
ncatolico 6897331
fill date incorporated
ncatolico 06ff071
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico be62238
new function for gap filling non-regularized data
ncatolico a7ff455
combined module
ncatolico 5203a85
latest
ncatolico b102443
fix name
ncatolico e6a716a
add in file schema parameters
ncatolico 98108c3
no schema case
ncatolico 7a91b1d
added indicator for gap filling
ncatolico d5e56d6
reverting added row
ncatolico 0c61706
Updated SUNA sensor specific flagging module to pass added null fille…
6fa7b75
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
62da0a9
updates for case of blank ucrt coef file
ncatolico 4ec5d70
latest
ncatolico 38f5444
update image
ncatolico e0a9482
turn daily kafka loading back on for sunav2 so ENG can test issues
covesturtevant 8611098
fix nan
ncatolico d8bedbe
latest
ncatolico 0de87d0
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico 23401b4
fast forward
ncatolico 32315a4
latest
ncatolico 0c988f0
publication pipelines
ncatolico 7162cce
latest
ncatolico 736e55e
change minPoints to numeric
ncatolico 1610ebb
Updated SUNA specific flag script so dark measuremts caused by lamp t…
7eaa562
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ae78d24
update images
ncatolico f5e027b
Update to to SUNA flagging script to set error codes that didn't othe…
6370f37
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
c5d41aa
Changed where in script low transmittence values are quality flagged.
538bf66
Updated change log.
e42f297
dates and images updated
ncatolico 658d7fb
Update to insifficient data quality flag script that makes it the onl…
2025667
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
0d132ba
Updated suna specific flag script to set lamp warmup measuremnts to N…
016ceb3
update image
ncatolico 94855c7
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
ncatolico 95e1912
Updated light dark ratio test for dark measurements.
beec397
fast forward
ncatolico 6aa3811
latest
ncatolico 7bc4ad2
Merge branch 'master' into suna
covesturtevant dc90260
update image tags
covesturtevant ac2d5e5
fast forward
ncatolico 6f1efb7
fast forward
ncatolico b1c4632
change dev to prod for log file bucket
ncatolico b9de053
Uncomment print statements for debugging
covesturtevant 6437098
Update base image version to v1.7.0
covesturtevant 2e6eaa7
Update base image version in Dockerfile
covesturtevant 186f0f2
Update base image version in Dockerfile
covesturtevant 140f1da
Update Docker base image version to v1.7.0
covesturtevant 84aa10d
Update Dockerfile
covesturtevant 29c70cc
Update base image version in Dockerfile
covesturtevant 89bd7ec
Update base image version in Dockerfile
covesturtevant 0c0d4db
Add HQTW
covesturtevant cd20787
Update Docker image version in YAML configuration
covesturtevant 97f1049
fix L1 bucket structure
covesturtevant fc59d42
Update image version for sunav2_location_asset
covesturtevant 92495d6
Merge branch 'suna' of github.com:NEONScience/NEON-IS-data-processing…
covesturtevant 4931319
bring images to current
covesturtevant f6ecf1a
bring image to current
covesturtevant File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Dockerfile for NEON IS Data Processing - flow.gap.fill.nonrglr | ||
|
|
||
| # Start with the neon-is-base-r image. | ||
| FROM us-central1-docker.pkg.dev/neon-shared-service/neonscience/neon-is-pack-base-r:v1.7.0 | ||
|
|
||
| ARG FLOW_DIR="./flow" | ||
| ARG APP_DIR="flow.gap.fill.nonrglr" | ||
|
|
||
| # maintainer handle | ||
| MAINTAINER "Nora Catolico" ncatolico@battelleecology.org | ||
|
|
||
| # Copy the lockfile and restore known working versions of R dependency packages | ||
| COPY ${FLOW_DIR}/${APP_DIR}/renv.lock /renv.lock | ||
| RUN R -e 'renv::restore(lockfile="/renv.lock")' | ||
|
|
||
| # Create app user | ||
| RUN groupadd app && \ | ||
| useradd app -g app | ||
| WORKDIR /home/app | ||
|
|
||
| # Copy in application code | ||
| COPY ${FLOW_DIR}/${APP_DIR}/flow.gap.fill.nonrglr.R . | ||
| COPY ${FLOW_DIR}/${APP_DIR}/wrap.gap.fill.nonrglr.R . | ||
|
|
||
| # Run as app user | ||
| RUN chown app:app -R /home/app | ||
| USER app |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,249 @@ | ||
| ############################################################################################## | ||
| #' @title Gap filling module for non-regularized data in NEON IS data processing. | ||
|
|
||
| #' @author | ||
| #' Nora Catolico \email{ncatolico@battelleecology.org} \cr | ||
|
|
||
| #' @description Workflow. Bin data to generate a regular time sequence of observations. | ||
| #' General code workflow: | ||
| #' Parse input parameters | ||
| #' Read in output schemas if indicated in parameters | ||
| #' Determine datums to process (set of files/folders to process as a single unit) | ||
| #' For each datum: | ||
| #' Create output directories and copy (by symbolic link) unmodified components | ||
| #' Read regularization frequency from location file (if not in input parameters) | ||
| #' Loop through all data files | ||
| #' Regularize data in each file | ||
| #' Write out the gap filled data | ||
| #' | ||
| #' This script is run at the command line with the following arguments. Each argument must be a | ||
| #' string in the format "Para=value", where "Para" is the intended parameter name and "value" is | ||
| #' the value of the parameter. Note: If the "value" string begins with a $ (e.g. $DIR_IN), the | ||
| #' value of the parameter will be assigned from the system environment variable matching the value | ||
| #' string. | ||
| #' | ||
| #' The arguments are: | ||
| #' | ||
| #' 1. "DirIn=value", where value is the path to the input data directory. NOTE: This path must be a | ||
| #' parent of the terminal directory where the data to be gap filled reside. See argument "DirFill" | ||
| #' below to indicate the terminal directory. | ||
| #' | ||
| #' The input path is structured as follows: #/pfs/BASE_REPO/#/yyyy/mm/dd/#, where # indicates any | ||
| #' number of parent and child directories of any name, so long as they are not 'pfs', the same name | ||
| #' as the terminal directory indicated in argument "DirFill", or recognizable as the 'yyyy/mm/dd' | ||
| #' structure which indicates the 4-digit year, 2-digit month, and 2-digit day of the data contained | ||
| #' in the folder. | ||
| #' | ||
| #' For example: | ||
| #' Input path = /scratch/pfs/sunav2_fill_date_gaps/sunav2/2019/01/01 | ||
| #' | ||
| #' 2. "DirOut=value", where the value is the output path that will replace the #/pfs/BASE_REPO portion | ||
| #' of DirIn. | ||
| #' | ||
| #' 3. "DirErr=value", where the value is the output path to place the path structure of errored datums that will | ||
| #' replace the #/pfs/BASE_REPO portion of DirIn. | ||
| #' | ||
| #' 4. "DirFill=value", where value is the name of the terminal directory where the data to be | ||
| #' gap filled resides. This will be one or more child levels away from "DirIn". All files in the | ||
| #' terminal directory will be gap filled. The value may also be a vector of terminal directories, | ||
| #' separated by pipes (|). All terminal directories must be present and at the same directory level. | ||
| #' For example, "DirFill=data|flags" indicates to regularize the data files within each the data | ||
| #' and flags directories. | ||
| #' | ||
| #' #' 5. "FileSchm=value" (optional), where value is the full path to schema for data output by | ||
| #' this workflow. The value may be NA, in which case the output schema will be the same as the input | ||
| #' data. The value may be a single file, in which case it will apply to all output, or | ||
| #' multiple values in which case the argument is formatted as dir:value|dir:value... | ||
| #' where dir is one of the directories specified in DirFill and value is the path to the schema file | ||
| #' for the output of that directory. Multiple dir:value pairs are separated by pipes (|). | ||
| #' For example, "FileSchm=data:/path/to/schemaData.avsc|flags:NA" indicates that the | ||
| #' output from the data directory will be written with the schema /path/to/schemaData.avsc and the | ||
| #' output from the flags directory will be the same as the input files found in that | ||
| #' directory. | ||
| #' | ||
| #' 6. "WndwFill=value", where value is the window in minutes in which data are expected. It is formatted as a 3 character sequence, | ||
| #' representing the number of minutes over which any number of measurements are expected. | ||
| #' For example, "WndwFill=015" refers to a 15-minute interval, while "WndwAgr=030" refers to a | ||
| #' 30-minute interval. | ||
| #' | ||
| #' 7. "DirSubCopy=value" (optional), where value is the names of additional subfolders, separated by | ||
| #' pipes, at the same level as the regularization folder in the input path that are to be copied with a | ||
| #' symbolic link to the output path. | ||
| #' | ||
| #' Note: This script implements logging described in \code{\link[NEONprocIS.base]{def.log.init}}, | ||
| #' which uses system environment variables if available. | ||
| #' | ||
| #' @return gap filled data and flag output in Parquet format in DirOut, where DirOut directory | ||
| #' replaces BASE_REPO but otherwise retains the child directory structure of the input path. | ||
|
|
||
| #' @references | ||
| #' License: (example) GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 | ||
|
|
||
| #' @keywords Currently none | ||
|
|
||
| #' @examples | ||
| #' Stepping through the code in R studio | ||
| # log <- NEONprocIS.base::def.log.init(Lvl = "debug") | ||
| # arg<-c( "DirIn=~/pfs/sunav2_fill_date_gaps/sunav2/2025/06/23/CFGLOC110819", | ||
| # "DirOut=~/pfs/out ", | ||
| # "DirErr=~/pfs/out/errored_datums ", | ||
| # "DirFill=data|flags", | ||
| # "WndwFill=015", | ||
| # "FileSchm=data:/home/NEON/ncatolico/pfs/sunav2_avro_schemas/sunav2/sunav2_logfilled.avsc|flags:/home/NEON/ncatolico/pfs/sunav2_avro_schemas/sunav2/sunav2_calibration_flags.avsc|flags:/home/NEON/ncatolico/pfs/sunav2_avro_schemas/sunav2/sunav2_log_flags.avsc", | ||
| # "DirSubCopy=location|uncertainty_coef") | ||
| #' @seealso \code{\link[eddy4R.base]{def.rglr}} | ||
|
|
||
| # changelog and author contributions / copyrights | ||
| # Nora Catolico (12/4/2025) | ||
| # original creation | ||
| ############################################################################################## | ||
| library(foreach) | ||
| library(doParallel) | ||
| library(dplyr) | ||
|
|
||
| # Source the wrapper function. Assume it is in the working directory | ||
| source("./wrap.gap.fill.nonrglr.R") | ||
|
|
||
| # Pull in command line arguments (parameters) | ||
| arg <- base::commandArgs(trailingOnly = TRUE) | ||
|
|
||
| # Start logging | ||
| log <- NEONprocIS.base::def.log.init() | ||
|
|
||
| # Use environment variable to specify how many cores to run on | ||
| numCoreUse <- base::as.numeric(Sys.getenv('PARALLELIZATION_INTERNAL')) | ||
| numCoreAvail <- parallel::detectCores() | ||
| if (base::is.na(numCoreUse)){ | ||
| numCoreUse <- 1 | ||
| } | ||
| if(numCoreUse > numCoreAvail){ | ||
| numCoreUse <- numCoreAvail | ||
| } | ||
| log$debug(paste0(numCoreUse, ' of ',numCoreAvail, ' available cores will be used for internal parallelization.')) | ||
|
|
||
| # Parse the input arguments into parameters | ||
| Para <- | ||
| NEONprocIS.base::def.arg.pars( | ||
| arg = arg, | ||
| NameParaReqd = c( | ||
| "DirIn", | ||
| "DirOut", | ||
| "DirErr", | ||
| "DirFill", | ||
| "WndwFill" | ||
| ), | ||
| NameParaOptn = c( | ||
| "DirSubCopy", | ||
| "FileSchm" | ||
| ), | ||
| log = log | ||
| ) | ||
|
|
||
| # Retrieve output schema(s) | ||
| log$debug(base::paste0( | ||
| 'Output schema(s) for regularized data: ', | ||
| base::paste0(Para$FileSchm, collapse = ',') | ||
| )) | ||
| if(length(Para$FileSchm)>0){ | ||
| SchmFill <- | ||
| NEONprocIS.base::def.vect.pars.pair( | ||
| vect = Para$FileSchm, | ||
| KeyExp = Para$DirFill, | ||
| ValuDflt = 'NA', | ||
| NameCol = c('DirFill', 'FileSchmFill'), | ||
| log = log | ||
| ) | ||
| # Read in the schema(s) | ||
| SchmFill$SchmFill <- NA | ||
| for (idxSchmFill in 1:base::length(SchmFill$FileSchmFill)) { | ||
| if (SchmFill$FileSchmFill[idxSchmFill] != 'NA') { | ||
| SchmFill$SchmFill[idxSchmFill] <- | ||
| base::paste0(base::readLines(SchmFill$FileSchmFill[idxSchmFill]), | ||
| collapse = '') | ||
| } | ||
| } | ||
| }else{ | ||
| SchmFill <- NA | ||
| } | ||
|
|
||
|
|
||
| # Echo arguments | ||
| log$debug(base::paste0('Input directory: ', Para$DirIn)) | ||
| log$debug(base::paste0('Output directory: ', Para$DirOut)) | ||
| log$debug(base::paste0('Error directory: ', Para$DirErr)) | ||
| log$debug(base::paste0( | ||
| 'Terminal Directories to regularize: ', | ||
| base::paste0(Para$DirFill, collapse = ',') | ||
| )) | ||
|
|
||
| # Retrieve intervals for gap filling | ||
| WndwFill <- base::as.numeric(Para$WndwFill) | ||
| log$debug(base::paste0('Interval for gap filling, in minutes: ',base::paste0(WndwFill,collapse=','))) | ||
|
|
||
|
|
||
| # Retrieve output schema(s) | ||
| log$debug(base::paste0( | ||
| 'Output schema(s) for gap filled data: ', | ||
| base::paste0(Para$FileSchmFill, collapse = ',') | ||
| )) | ||
|
|
||
| # Retrieve optional subdirectories to copy over | ||
| DirSubCopy <- | ||
| base::unique(base::setdiff(Para$DirSubCopy, Para$DirFill)) | ||
| log$debug(base::paste0( | ||
| 'Additional subdirectories to copy: ', | ||
| base::paste0(DirSubCopy, collapse = ',') | ||
| )) | ||
|
|
||
| nameDirSub <- base::as.list(c(Para$DirFill)) | ||
| log$debug(base::paste0( | ||
| 'Expected subdirectories of each datum path: ', | ||
| base::paste0(nameDirSub, collapse = ',') | ||
| )) | ||
|
|
||
| # Find all the input paths (datums). We will process each one. | ||
| DirIn <- | ||
| NEONprocIS.base::def.dir.in(DirBgn = Para$DirIn, | ||
| nameDirSub = nameDirSub, | ||
| log = log) | ||
|
|
||
| # Process each datum | ||
| doParallel::registerDoParallel(numCoreUse) | ||
| foreach::foreach(idxDirIn = DirIn) %dopar% { | ||
|
|
||
| log$info(base::paste0('Processing datum path: ', idxDirIn)) | ||
|
|
||
| # Run the wrapper function for each datum, with error routing | ||
| tryCatch( | ||
| withCallingHandlers( | ||
| wrap.gap.fill.nonrglr(DirIn=idxDirIn, | ||
| DirOutBase=Para$DirOut, | ||
| WndwFill=WndwFill, | ||
| DirFill=Para$DirFill, | ||
| SchmFill=SchmFill, | ||
| DirSubCopy=DirSubCopy, | ||
| log=log | ||
| ), | ||
| error = function(err) { | ||
| call.stack <- base::sys.calls() # is like a traceback within "withCallingHandlers" | ||
|
|
||
| # Re-route the failed datum | ||
| NEONprocIS.base::def.err.datm( | ||
| err=err, | ||
| call.stack=call.stack, | ||
| DirDatm=idxDirIn, | ||
| DirErrBase=Para$DirErr, | ||
| RmvDatmOut=TRUE, | ||
| DirOutBase=Para$DirOut, | ||
| log=log | ||
| ) | ||
| } | ||
| ), | ||
| # This simply to avoid returning the error | ||
| error=function(err) {} | ||
| ) | ||
|
|
||
|
|
||
| return() | ||
|
|
||
| } # End loop around datum paths |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but please update the header to reflect that regularization is not performed. There is some conflicting language in a few places, likely from using flow.rglr as a template.