Check that the unit of a variable in a NetCDF file is equivalent to the expected unit.
Source:R/check_met_input.R
check_unit.RdCheck that the unit of a variable in a NetCDF file is equivalent to the expected unit.
Arguments
- variable
Name of target variable, as a length 1 character
- nc
NetCDF object containing target variable
- variable_table
`data.frame` linking standard names to their units. Must contain columns "cf_standard_name" and "units". Default is [pecan_standard_met_table].
- warn_unknown
Logical. If `TRUE` (default), throw a warning for variables not in `variable_table`. Otherwise, ignore unknown variables.