Generate a list for passing to the output_format_opts
argument of
read_forecast and read_obs. sqlite_opts
is the general
set of options, also suitable for forecast data, and fctable_opts
and
obstable_opts
have specific defaults to be used with
read_forecast and read_obs respectively.
Usage
sqlite_opts(
path = NULL,
template = "fctable_det",
index_cols = c("fcst_dttm", "lead_time", "SID"),
synchronous = c("off", "normal", "full", "extra"),
journal_mode = c("delete", "truncate", "persist", "memory", "wal", "off"),
remove_model_elev = FALSE
)
fctable_opts(
path = NULL,
template = "fctable",
index_cols = c("fcst_dttm", "lead_time", "SID"),
synchronous = c("off", "normal", "full", "extra"),
journal_mode = c("delete", "truncate", "persist", "memory", "wal", "off"),
remove_model_elev = FALSE
)
obstable_opts(
path = NULL,
template = "obstable",
index_cols = "auto",
synchronous = c("off", "normal", "full", "extra"),
journal_mode = c("delete", "truncate", "persist", "memory", "wal", "off")
)
Arguments
- path
If not NULL, sqlite files are generated and written to the directory specified here.
- template
The template for the filenames of the sqlite files. See
show_file_templates
for available built in templates - for point forecast sqlite files, these are templates beginning "fctable_". The default is "fctable_det".- index_cols
The columns to index by. In the case of
obstable_opts
, setting index cols to "auto" (the default) will automatically assign the index columns.- synchronous
The synchronus setting for sqlite files. The defualt is "off", but could also be "normal", "full", or "extra". See https://www.sqlite.org/pragma.html#pragma_synchronous for more information.
- journal_mode
The journal mode for the sqlite files. The default is "delete", but can also be "truncate", "persist", "memory", "wal", or "off". See https://www.sqlite.org/pragma.html#pragma_journal_mode for more information.
- remove_model_elev
Set to TRUE to not include model elevation in the sqlite output files. For multi model ensembles, members having different model elevations from each other will make it impossible to include all members in the same row and thus break unique constraints for the row indexing.
Examples
sqlite_opts()
#> $path
#> NULL
#>
#> $template
#> [1] "fctable_det"
#>
#> $index_cols
#> [1] "fcst_dttm" "lead_time" "SID"
#>
#> $synchronous
#> [1] "off"
#>
#> $journal_mode
#> [1] "delete"
#>
#> $remove_model_elev
#> [1] FALSE
#>
sqlite_opts(path = tempdir())
#> $path
#> [1] "/tmp/RtmpPXKEvU"
#>
#> $template
#> [1] "fctable_det"
#>
#> $index_cols
#> [1] "fcst_dttm" "lead_time" "SID"
#>
#> $synchronous
#> [1] "off"
#>
#> $journal_mode
#> [1] "delete"
#>
#> $remove_model_elev
#> [1] FALSE
#>
sqlite_opts(path = tempdir(), template = "fctable_eps_all_leads")
#> $path
#> [1] "/tmp/RtmpPXKEvU"
#>
#> $template
#> [1] "fctable_eps_all_leads"
#>
#> $index_cols
#> [1] "fcst_dttm" "lead_time" "SID"
#>
#> $synchronous
#> [1] "off"
#>
#> $journal_mode
#> [1] "delete"
#>
#> $remove_model_elev
#> [1] FALSE
#>