nc_history: Adds a date-stamped comment to a NetCDF file's "history"...

Description Usage Arguments Details

View source: R/nc_history.R

Description

It's good practice to add a comment to a NetCDF file's "history" attribute whenever the file's contents are changed. This is a convenience function that makes it easy to do so from R.

Usage

1

Arguments

nc

An object of class 'ncdf4' (as returned by 'nc_open') corresponding to the file whose history is to be updated.

comment

The string to add to the history attribute.

Details

If a history attribute already exists, the comment is prepended to it and separated by a carriage return. A datestamp (produced by date()) is added to the beginning of the comment.


sethmcg/climod documentation built on Nov. 19, 2021, 11:12 p.m.