Skip to content
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

Add option param_defs for read_grid() #22

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion R/verify_spatial.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
#' accumulated parameters (e.g. precipitation). NULL signifies that the field is accumulated
#' from the start of the model run. Otherwise this should be a string containing a numerical value
#' and a time unit, e.g. "15m" or "1h".
#' @param fc_param_defs A list of parameter definitions that includes the file
#' format to be read. By default the built in list ‘harp_params’
#' is used. Modifications and additions to this list can be made
#' using ‘modify_param_def’ and ‘add_param_def’ respectively.
#' @param ob_file_path The top level path for the forecast files to read.
#' @param ob_file_template The file type to generate the template for. Can be
#' "harmoneps_grib", "harmeoneps_grib_fp", "harmoneps_grib_sfx", "meps_met",
Expand Down Expand Up @@ -95,6 +99,7 @@ verify_spatial <- function(dttm,
fc_domain = harpSpatial_conf$fc_domain, #NULL,
fc_interp_method = harpSpatial_conf$fc_interp_method, #"closest",
fc_accumulation = harpSpatial_conf$fc_accumulation, #NULL,
fc_param_defs = getExportedValue("harpIO", "harp_params"),
ob_file_path = harpSpatial_conf$ob_file_path, #"",
ob_file_template = harpSpatial_conf$ob_file_template, #"",
ob_file_format = harpSpatial_conf$ob_file_format, #"hdf5",
Expand Down Expand Up @@ -211,7 +216,8 @@ verify_spatial <- function(dttm,
do.call(harpIO::read_grid,
c(list(file_name = fcfile, file_format = fc_file_format,
parameter = parameter, lead_time = lead_time,
file_format_opts = fc_file_opts)))
file_format_opts = fc_file_opts,
param_defs = fc_param_defs)))
)
}
} else {
Expand Down