Description Usage Arguments Value Examples
View source: R/get_data_filename.R
Gets the filename of a forecast file from the date, cycle and lead time. A template can be passed as an argument.
1 2 3 4 | get_data_filename(data_date, data_cycle,
data_source = "operational meps", experiment_name = NULL,
parameter = NULL, lead_time = NULL, members = seq(0, 9),
static_path = "", template = "harmoneps_grib")
|
data_date |
The required forecast date. Maybe YYYYMMDD or YYYY-MM-DD or any date object. |
data_cycle |
The forecast cycle. Can be numeric or a string. |
data_source |
If "operational meps" (the default) will find MEPS data.
Otherwise "expt" must be used and |
experiment_name |
The experiment name - can be used in |
parameter |
If the parameter is in a surfex file, for example, it must be given so that the correct file is found. Otherwise an extracted file is assumed. |
lead_time |
The lead time must be given in hours for NetCDF. If
|
members |
The members to get filenames for if |
static_path |
The static path for filenames. The full path is assumed to
be |
template |
A template for filenames. Standard templates are
"harmoneps_grib", "harmoneps_grib_fp", "haramoneps_grib_sfx", and the same
with "harmonie" in place of "harmoneps" for deterministic files. |
The full path(s) to the forecast file(s).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | get_data_filename(20180101, 0)
get_data_filename(20180101, 0, parameter = "SST")
get_data_filename("2018-01-01", "06")
my_static_path <- "/lustre/storeB/users/andrewts/surfacePerturbations/grib"
my_expt <- "MEPS_summer2017_sfcPertRef"
my_template <- file.path(
"${YYYY}${MM}${DD}${HH}",
"${experiment_name}",
"mbr${MBR3}/fc${YYYY}${MM}${DD}${HH}+${LDT3}.grib"
)
get_data_filename(
20170527, 0, data_source = "expt",
static_path = my_static_path,
experiment_name = my_expt,
template = my_template,
lead_time = 3, members = seq(0, 10)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.