Skip to content

Commit

Permalink
Merge pull request #3281 from Sweetdevil144/develop
Browse files Browse the repository at this point in the history
Fixed Bugs
  • Loading branch information
mdietze authored Mar 31, 2024
2 parents 6425b3c + 7b9e9e7 commit 1bf1582
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/styler-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- uses: actions/checkout@v4
with:
set-safe-directory: false
- uses: r-lib/actions/pr-fetch@master
- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v2
- name: Install styler
run: |
Rscript -e 'install.packages("styler")'
Expand All @@ -39,7 +39,7 @@ jobs:
git add \*.R
git add \*.Rmd
if [ "$(git diff --name-only --cached)" != "" ]; then git commit -m 'automated syle update' ; fi
- uses: r-lib/actions/pr-push@master
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions models/sipnet/R/met2model.SIPNET.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ met2model.SIPNET <- function(in.path, in.prefix, outfolder, start_date, end_date
PEcAn.logger::logger.severe(paste0("No files found matching ", in.prefix, "; cannot process data."))
}

# This function is supposed to process netcdf files, so we'll search for files the the extension .nc and use those first.
# This function is supposed to process netcdf files, so we'll search for files with the extension .nc and use those first.
nc_file = grep("\\.nc$", matching_files)
if (length(nc_file) > 0) {
if (grepl("\\.nc$", in.prefix)) {
Expand All @@ -54,7 +54,7 @@ met2model.SIPNET <- function(in.path, in.prefix, outfolder, start_date, end_date
} else { # no .nc files found... it could be that the extension was left off, or some other problem
PEcAn.logger::logger.warn("No files found with extension '.nc'. Using the first file in the list below:")
PEcAn.logger::logger.warn(matching_files)
in.prefix <- matching_files[i]
in.prefix <- matching_files[1]
}
} else { # Default behavior
out.file <- paste(in.prefix, strptime(start_date, "%Y-%m-%d"),
Expand Down

0 comments on commit 1bf1582

Please sign in to comment.