Skip to content

Commit

Permalink
Verification scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
leneoMET committed Sep 15, 2022
1 parent 203db07 commit 0214a52
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
File renamed without changes.
42 changes: 21 additions & 21 deletions Rscripts/forecast_max_min.R → verification/forecast_max_min.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@ T2m_to_min_max_mean <- function(fcst, fcst_func){
####################
## EXAMPLE OF USE ##
####################

# READ FORECAST TEMPERATURE (3 HOURLY)
t2m <- read_point_forecast(
start_date = 20200401,
end_date = 20200531,
lead_time = seq(0,72,3),
fcst_model = "ec",
fcst_type = "det",
parameter = "T2m",
by = "1d",
file_path = "~/Documents/BMD2022/data/FCTABLE/deterministic" # must correspond to path.out in fcsttosqlite.R
)

## CONVERT FORECAST TEMPERATURE FROM KELVIN TO DEGREES CELSIUS
t2m <- scale_point_forecast(t2m, -273.15, new_units = "degC")

## REMOVE MISSING DATA FROM EC
t2m$ec <- t2m$ec %>% filter(ec_det<10^36)

## FIND MAXIMUM TEMPERATURE
tmax.fcst <- T2m_to_min_max_mean(t2m, "max")
#
# # READ FORECAST TEMPERATURE (3 HOURLY)
# t2m <- read_point_forecast(
# start_date = 20200401,
# end_date = 20200531,
# lead_time = seq(0,72,3),
# fcst_model = "ec",
# fcst_type = "det",
# parameter = "T2m",
# by = "1d",
# file_path = "~/Documents/BMD2022/data/FCTABLE/deterministic" # must correspond to path.out in fcsttosqlite.R
# )
#
# ## CONVERT FORECAST TEMPERATURE FROM KELVIN TO DEGREES CELSIUS
# t2m <- scale_point_forecast(t2m, -273.15, new_units = "degC")
#
# ## REMOVE MISSING DATA FROM EC
# t2m$ec <- t2m$ec %>% filter(ec_det<10^36)
#
# ## FIND MAXIMUM TEMPERATURE
# tmax.fcst <- T2m_to_min_max_mean(t2m, "max")

0 comments on commit 0214a52

Please sign in to comment.