Skip to contents

Renames columns in the ERA5 reference data table (`dt_ref`) within a `metamet` object so they correspond to the column names in the primary observation table (`dt`). The mapping is based on the `dt_meta` metadata table.

Usage

rename_era5(mm)

Arguments

mm

A `metamet` object containing at least `dt`, `dt_meta`, `dt_site`, and `dt_ref`.

Value

The updated `metamet` object `mm`, with ERA5 reference data columns renamed to be consistent with observations.

Details

- Sets the `site` column in `dt_ref` using the value from `dt_site`. - Matches column names in `dt` to those in `dt_ref` using the `name_era5` field in `dt_meta`. - Reorders and renames columns in `dt_ref` to match the structure of `dt`.

See also

- add_era5 for populating ERA5 reference data

Examples

# mm <- rename_era5(mm)