NcCloser: NetCDF file closer for 'startR'

View source: R/NcCloser.R

NcCloserR Documentation

NetCDF file closer for 'startR'

Description

This is a file closer function for NetCDF files, intended for use as parameter 'file_closer' in a Start() call. This function complies with the input/output interface required by Start() defined in the documentation for the parameter 'file_closer'.

This function uses the function NcClose() in the package 'easyNCDF', which in turn uses nc_close() in the package 'ncdf4'.

Usage

NcCloser(file_object)

Arguments

file_object

An open connection to a NetCDF file, optionally with additional header information. See details in the documentation of the parameter 'file_closer' of the function Start().

Value

This function returns NULL.

See Also

NcOpener NcDataReader NcDimReader NcVarReader

Examples

data_path <- system.file('extdata', package = 'startR')
path_obs <- file.path(data_path, 'obs/monthly_mean/tos/tos_200011.nc') 
connection <- NcOpener(path_obs)
NcCloser(connection)

startR documentation built on Sept. 12, 2023, 5:07 p.m.

Related to NcCloser in startR...