Functions of the cf module

Input and output

cf.close_files Close open files containing sub-arrays of master data arrays.
cf.close_one_file Close an arbitrary open file containing a sub-array of a master data array.
cf.dump Print a description of an object.
cf.open_files Return the open files containing sub-arrays of master data arrays.
cf.open_files_threshold_exceeded Return True if the total number of open files is greater than the
cf.pickle Write a binary pickled representation of an object to a file.
cf.read Read fields from files into cf.Field objects.
cf.write Write fields to a CF-netCDF or CFA-netCDF file.
cf.unpickle Return the reconstituted (unpickled) object from a binary pickle file.

Aggregation

cf.aggregate Aggregate fields into as few fields as possible.

Mathematical operations

cf.clip Return a new variable with clipped (limited) data array values.
cf.collapse Return new fields with dimensions collapsed by statistical operations.
cf.cos Return a new variable with the trigonometric cosine of the data array values.
cf.sin Return a new variable with the trigonometric sine of the data array values.

Data array manipulations

cf.expand_dims Return a new variable with an inserted size 1 axis.
cf.flip Return a new variable with flipped data array axes.
cf.squeeze Return a new variable with size 1 dimensions removed.
cf.transpose Return a new variable with permuted data array dimensions.
cf.unsqueeze Return a new variable with size 1 axes inserted into the data array.

Comparison

cf.equals True if and only if two objects are logically equal.
cf.equivalent True if and only if two objects are logically equivalent.

cf.eq Return a comparison object for a variable for being equal to a value.
cf.ge Return a comparison object for a variable for being greater than or equal to a value.
cf.gt Return a comparison object for a variable for being strictly greater than a value.
cf.le Return a comparison object for a variable for being less than or equal to a value.
cf.lt Return a comparison object for a variable for being strictly less than a value.
cf.ne Return a comparison object for a variable for being equal to a value.
cf.set Return a comparison object for a variable for being equal to any member of a collection.
cf.wi Return a comparison object for a variable for being within a range.
cf.wo Return a comparison object for a variable for being without a range.

cf.year Return a comparison object for the year of a datetime variable.
cf.month Return a comparison object for the month of the year of a datetime variable.
cf.day Return a comparison object for the day of the month of a datetime variable.
cf.hour Return a comparison object for the hour of the day of a datetime variable.
cf.minute Return a comparison object for the minute of the hour of a datetime variable.
cf.second Return a comparison object for the second of the minute of a datetime variable.

cf.dteq Return a comparison object for a datetime variable being equal to a date and time.
cf.dtge Return a comparison object for a datetime variable being not earlier than a date and time.
cf.dtgt Return a comparison object for a datetime variable being later than a date and time.
cf.dtle Return a comparison object for a datetime variable being not later than a date and time.
cf.dtlt Return a comparison object for a datetime variable being earlier than a date and time.
cf.dtne Return a comparison object for a datetime variable being not equal to a date and time.

Datetime

cf.dt Return a datetime variable for a given date and time.

cf.year Return a comparison object for the year of a datetime variable.
cf.month Return a comparison object for the month of the year of a datetime variable.
cf.day Return a comparison object for the day of the month of a datetime variable.
cf.hour Return a comparison object for the hour of the day of a datetime variable.
cf.minute Return a comparison object for the minute of the hour of a datetime variable.
cf.second Return a comparison object for the second of the minute of a datetime variable.

cf.dteq Return a comparison object for a datetime variable being equal to a date and time.
cf.dtge Return a comparison object for a datetime variable being not earlier than a date and time.
cf.dtgt Return a comparison object for a datetime variable being later than a date and time.
cf.dtle Return a comparison object for a datetime variable being not later than a date and time.
cf.dtlt Return a comparison object for a datetime variable being earlier than a date and time.
cf.dtne Return a comparison object for a datetime variable being not equal to a date and time.

Retrieval and setting of constants

cf.ATOL Return or set the value of absolute tolerance for testing numerically tolerant equality.
cf.CHUNKSIZE Return or set the chunk size for data storage and processing.
cf.FM_THRESHOLD Return or set the minimum amount of memory to be kept free as a temporary work space.
cf.MINNCFM Return or set the number of chunks of memory to be kept free as a temporary work space.
cf.OF_FRACTION Return or set the number of concurrently open files above which files containing data arrays may be automatically closed.
cf.RTOL Return or set the default value of relative tolerance for testing numerically tolerant equality.
cf.TEMPDIR Return or set the directory for internally generated temporary files.

Miscellaneous

cf.abspath Return a normalized absolute version of a file name.
cf.dirname Return the directory name of a file.
cf.flat Return an iterator over an arbitrarily nested sequence.
cf.pathjoin Join two file path components intelligently.
cf.relpath Return a relative filepath to a file.