Learn R Programming

ncdfCF (version 0.2.1)

CFResource: CF resource object

Description

This class contains the connection details to the netCDF resource.

Arguments

Public fields

error

Error message, or empty string. Create a netCDF resource

This is called when opening a netCDF resource. You should never have to call this directly.

Active bindings

friendlyClassName

(read-only) A nice description of the class.

handle

The handle to the netCDF resource.

uri

The URI of the netCDF resource, either a local filename or the location of an online resource.

Methods


Method new()

Usage

CFResource$new(uri)

Arguments

uri

The URI of the netCDF resource.

Returns

An instance of this class.


Method finalize()

Clean up open resources

This method is called automatically when the instance is deleted, ensuring that file handles are properly closed.

Usage

CFResource$finalize()


Method close()

Close an open resource

Closing an open netCDF resource. It should rarely be necessary to call this method directly. Get the netCDF handle to a group

Every group in a netCDF file has its own handle. The handle returned by this method is valid only for the named group.

Usage

CFResource$close()


Method group_handle()

Usage

CFResource$group_handle(group_name)

Arguments

group_name

The absolute path to the group.

Returns

The handle to the group


Method clone()

The objects of this class are cloneable with this method.

Usage

CFResource$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

There is a single instance for every netCDF resource, owned by the CFDataset instance. The instance is shared by other objects, specifically NCGroup and CFVariable instances, for access to the underlying resource for reading of data.