read_ed_metheader.Rd
Read a ED_MET_DRIVER_HEADER file into a list-like object that can be manipulated within R. Returns a list of file formats.
read_ed_metheader(filename, check = TRUE, check_files = TRUE)
filename | File name (including path) of met driver header file, as character |
---|---|
check | Logical, whether or not to check file for correctness (default
= |
check_files | Logical. If |
List of ED met input parameters. See Details.
The output is an unnamed list with each element corresponding to a single file format. Each file format contains the following elements:
path_prefix
-- Path and prefix of files
nlon
-- Number of longitude grid cells
nlat
-- Number of latitude grid cells
dx
-- Size of longitude grid cell
dy
-- Size of latitude grid cell
xmin
-- Minimum longitude
ymin
-- Minimum latitude
variables
-- Data frame of variables, with the columns described below.
Starred columns are required for writing. This table is left joined with
met_variable_description and met_flag_description.
variable
-- Variable name
description
-- Variable description
unit
-- Variable unit
update_frequency
-- Update frequency (seconds) or scalar values if
flag=4
flag
-- Variable flags.
flag_description
-- Description of variable flag
The formatting of a meteorlogy header file is as follows (from the ED GitHub Wiki):
<number of file formats> # Repeat lines below this number of times <path and prefix of files> <nlon>, <nlat>, <dx>, <dy>, <xmin>, <ymin> <number of variables> <list of variable names> <list of update frequencies (seconds) or scalar values if flag=4> <list of variable flags>
The variables in the third row are defined as follows: