Renames one or more variables and/or dimensions in an existing netCDF file, optionally writing the result to a new file.
Arguments
- filename
Character string giving the path to the input netCDF file.
- oldnames
Character vector with the current names of variables or dimensions to rename.
- newnames
Character vector with the replacement names. Must be in the same order and of the same length as `oldnames`.
- output
Optional character string giving the path to the output file. If omitted, `overwrite = TRUE` must be used and the original file is replaced.
- verbose
Logical. If `TRUE`, print the renaming operations performed.
- overwrite
Logical. If `TRUE`, allow overwriting an existing output file. Use this when modifying the original file in place.