Skip to content

Commit

Permalink
Merge pull request #20 from addelany/main
Browse files Browse the repository at this point in the history
fix fdom dates for current data and horizon
  • Loading branch information
addelany authored Aug 23, 2024
2 parents 1ffddee + 30774a2 commit 5a4cde5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/fdom_dwh/helper_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,13 @@ generate_fDOM_forecast <- function(forecast_date, # a recommended argument so yo

message('Make forecast dataframe')

forecast_date_adjust <- forecast_date - lubridate::days(1)

#establish forecasted dates
forecasted_dates <- seq(from = ymd(forecast_date), to = ymd(forecast_date) + forecast_horizon, by = "day")

#get current fdom value
curr_fdom <- current_value(dataframe = targets,variable = var, start_date = forecast_date)
curr_fdom <- current_value(dataframe = targets,variable = var, start_date = forecast_date_adjust)

#set up df of different initial conditions for IC uncert
ic_df <- tibble(date = rep(as.Date(forecast_date), times = n_members),
Expand Down
2 changes: 1 addition & 1 deletion model_code/fdom_dwh/model_workflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ forecast_date <- Sys.Date()
site <- "fcre"
forecast_depths <- 'focal'

forecast_horizon <- 16
forecast_horizon <- 35
n_members <- 31
calibration_start_date <- ymd("2022-11-11")
model_id <- "fdom_AR_dwh"
Expand Down

0 comments on commit 5a4cde5

Please sign in to comment.