Skip to content

Commit

Permalink
change maptools to suntools
Browse files Browse the repository at this point in the history
  • Loading branch information
istfer committed Nov 1, 2023
1 parent f5756af commit 9624d3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/data.atmosphere/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Imports:
jsonlite,
lubridate (>= 1.6.0),
magrittr,
maptools,
MASS,
mgcv,
ncdf4 (>= 1.15),
Expand All @@ -53,6 +52,7 @@ Imports:
sf,
sp,
stringr (>= 1.1.0),
suntools,
terra,
testthat (>= 2.0.0),
tibble,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ met_temporal_downscale.Gaussian_ensemble <- function(in.path, in.prefix, outfold
day <- as.POSIXct(sprintf("%s 12:00:00", date), tz = tz)
sequence <- seq(from = day, length.out = span, by = "days")

sunrise <- maptools::sunriset(lon.lat, sequence, direction = "sunrise",
sunrise <- suntools::sunriset(lon.lat, sequence, direction = "sunrise",
POSIXct.out = TRUE)
sunset <- maptools::sunriset(lon.lat, sequence, direction = "sunset",
sunset <- suntools::sunriset(lon.lat, sequence, direction = "sunset",
POSIXct.out = TRUE)
solar_noon <- maptools::solarnoon(lon.lat, sequence, POSIXct.out = TRUE)
solar_noon <- suntools::solarnoon(lon.lat, sequence, POSIXct.out = TRUE)

data.frame(date = as.Date(sunrise$time), sunrise = as.numeric(format(sunrise$time, "%H%M")),
solarnoon = as.numeric(format(solar_noon$time, "%H%M")),
Expand Down

0 comments on commit 9624d3d

Please sign in to comment.