cf.InteriorRing¶
- class cf.InteriorRing(*args, **kwargs)[source]¶
An interior ring array with properties.
If a cell is composed of multiple polygon parts, an individual polygon may define an “interior ring”, i.e. a region that is to be omitted from, as opposed to included in, the cell extent. In this case an interior ring array is required that records whether each polygon is to be included or excluded from the cell, and is supplied by an interior ring variable in CF-netCDF. The interior ring array spans the same domain axis constructs as its coordinate array, with the addition of an extra dimension that indexes the parts for each cell. For example, a cell describing the land area surrounding a lake would require two polygon parts: one defines the outer boundary of the land area; the other, recorded as an interior ring, is the lake boundary, defining the inner boundary of the land area.
NetCDF interface
The netCDF variable name may be accessed with the
nc_set_variable,nc_get_variable,nc_del_variable, andnc_has_variablemethods.The netCDF variable group structure may be accessed with the
nc_set_variable,nc_get_variable,nc_variable_groups,nc_clear_variable_groups, andnc_set_variable_groupsmethods.The dataset chunks may be accessed with the
nc_dataset_chunksizes,nc_set_dataset_chunksizes, andnc_clear_datset_chunksizesmethods.The name of the netCDF dimension spanned by the interior ring variable’s data (which does not correspond to a domain axis construct) may be accessed with the
nc_set_dimension,nc_get_dimension,nc_del_dimension, andnc_has_dimensionmethods.Added in version (cfdm): 1.8.0
Initialisation
- Parameters:
- properties:
dict, optional Set descriptive properties. The dictionary keys are property names, with corresponding values.
Properties may also be set after initialisation with the
set_propertiesandset_propertymethods.- Parameter example:
properties={'standard_name': 'altitude'}
- data: data_like, optional
Set the data.
A data_like object is any object that can be converted to a
Dataobject, i.e.numpyarray_like objects,Dataobjects, and cf instances that containDataobjects.The data also may be set after initialisation with the
set_datamethod.- source: optional
Convert source, which can be any type of object, to a
InteriorRinginstance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
InteriorRingAPI. Any parameters that can not be retrieved from source in this way are assumed to have their default value.Note that if
xis also aInteriorRinginstance thencf.InteriorRing(source=x)is equivalent tox.copy().- copy:
bool, optional If True (the default) then deep copy the input parameters prior to initialisation. By default the parameters are not deep copied.
- properties:
Methods¶
Methods
Deprecated at version 3.0.0, use |
|
|
|
The |
|
Always False. |
|
Always False. |
|
Always False. |
|
The add_offset CF property. |
|
Test whether all data elements evaluate to True. |
|
Test whether all data are element-wise equal to other, broadcastable data. |
|
Test whether any data elements evaluate to True. |
|
Apply masking as defined by the CF conventions. |
|
Take the trigonometric inverse cosine of the data element- wise. |
|
Take the inverse hyperbolic cosine of the data element-wise. |
|
Take the trigonometric inverse sine of the data element-wise. |
|
Take the inverse hyperbolic sine of the data element-wise. |
|
Take the trigonometric inverse tangent of the data element- wise. |
|
Take the inverse hyperbolic tangent of the data element-wise. |
|
A numpy array deep copy of the data. |
|
Deprecated at version 3.0.0. |
|
Deprecated at version 3.0.0. |
|
Deprecated at version 3.0.0. |
|
A binary (0 and 1) missing data mask of the data array. |
|
The calendar CF property. |
|
The ceiling of the data, element-wise. |
|
Partition the data array. |
|
Remove all properties. |
|
Limit the values in the data. |
|
Close all files referenced by the construct. |
|
The comment CF property. |
|
Join a together sequence of |
|
Convert reference time data values to have new units. |
|
Return a deep copy. |
|
Take the trigonometric cosine of the data element-wise. |
|
Take the hyperbolic cosine of the data element-wise. |
|
Count the non-masked elements of the data. |
|
Count the masked elements of the data. |
|
Return the commands that would create the construct. |
|
Get or set the cyclicity of an axis. |
|
The |
|
An independent numpy array of date-time objects. |
|
Return an element of the data array as a standard Python scalar. |
|
The day of each date-time data array element. |
|
Remove the data. |
|
Remove properties. |
|
Remove a property. |
|
Deprecated at version 3.0.0, use method |
|
Alias for |
|
Deprecated at version 3.0.0. |
|
The |
|
A full description of the interior ring variable. |
|
Whether two instances are the same. |
|
True if two constructs are equal, False otherwise. |
|
The exponential of the data, element-wise. |
|
Deprecated at version 3.0.0, use |
|
The directories of files containing parts of the data. |
|
Return the data array missing data value. |
|
Replace masked elements with a fill value. |
|
Flatten axes of the data. |
|
Flip (reverse the direction of) data dimensions. |
|
Floor the data array, element-wise. |
|
Return the data. |
|
Return the name of the file or files containing the data. |
|
The names of files containing the original data and metadata. |
|
Get a CF property. |
|
Get quantization metadata. |
|
Get a quantize-on-write instruction. |
|
Deprecated at version 3.0.0, use method |
|
Expand the data by adding a halo. |
|
Whether the mask is hard (True) or soft (False). |
|
Whether or not there are cell bounds. |
|
Whether or not the construct has data. |
|
Whether a property has been set. |
|
Deprecated at version 3.0.0, use |
|
Deprecated at version 3.0.0, use |
|
Deprecated at version 3.0.0, use method |
|
The history CF property. |
|
The hour of each date-time data array element. |
|
An identity for the InteriorRing object. |
|
Return all possible identities. |
|
Return the canonical identity. |
|
Deprecated at version 3.0.0, use |
|
Expand the shape of the data array. |
|
Inspect the object for debugging. |
|
Deprecated at version 3.7.0, use |
|
Whether or not a given axis is cyclic. |
|
Deprecated at version 3.7.0, use |
|
Deprecated at version 3.7.0, use |
|
Deprecated at version 3.7.0, use |
|
Deprecated at version 3.7.0, use |
|
True if a given axis is periodic. |
|
True if the data array is scalar. |
|
The leap_month CF property. |
|
The leap_year CF property. |
|
The logarithm of the data array. |
|
The long_name CF property. |
|
The mask of the data array. |
|
Mask the array where invalid values occur. |
|
Mask the array where invalid values occur (NaN or inf). |
|
Alias for |
|
Whether or not the construct identity satisfies conditions. |
|
Whether or not the data has a given dimensionality. |
|
Whether or not the netCDF variable name satisfies conditions. |
|
Whether or not properties satisfy conditions. |
|
Whether or not the construct has given units. |
|
Alias for |
|
The maximum of the data array. |
|
The unweighted mean the data array. |
|
The unweighted average of the maximum and minimum of the data array. |
|
Alias for |
|
The minimum of the data array. |
|
The minute of each date-time data array element. |
|
The missing_value CF property. |
|
The month of each date-time data array element. |
|
The month_lengths CF property. |
|
Deprecated at version 3.0.0, use method 'identity' instead. |
|
Clear the dataset chunking strategy for the data. |
|
Remove the netCDF dimension group hierarchy. |
|
Clear the HDF5 chunking strategy for the data. |
|
Remove the netCDF variable group hierarchy. |
|
Get the dataset chunking strategy for the data. |
|
Remove the netCDF dimension name. |
|
Remove the netCDF variable name. |
|
Return the netCDF dimension group hierarchy. |
|
Return the netCDF dimension name. |
|
Return the netCDF variable name. |
|
Whether the netCDF dimension name has been set. |
|
Whether the netCDF variable name has been set. |
|
Get the HDF5 chunking strategy for the data. |
|
Set the dataset chunking strategy. |
|
Set the netCDF dimension name. |
|
Set the netCDF dimension group hierarchy. |
|
Set the HDF5 chunking strategy. |
|
Set the netCDF variable name. |
|
Set the netCDF variable group hierarchy. |
|
Return the netCDF variable group hierarchy. |
|
The number of data dimensions. |
|
Override the calendar of date-time units. |
|
Override the units. |
|
Pad an axis with missing data. |
|
Return or set the period of the data. |
|
Persist data into memory. |
|
Return all properties. |
|
The absolute difference between the maximum and minimum of the data array. |
|
Change the chunk structure of the data. |
|
The reference date-time of units of elapsed time. |
|
Deprecated at version 3.0.0, use method |
|
Replace a file directory in-place. |
|
Round the data to the nearest integer, element-wise. |
|
Roll the data along one or more axes. |
|
Round the data to the given number of decimals. |
|
The number of non-missing data elements in the data array. |
|
The scale_factor CF property. |
|
Alias for |
|
The second of each date-time data array element. |
|
Deprecated at version 3.0.0. |
|
Set the data. |
|
Set properties. |
|
Set a property. |
|
Deprecated at version 3.0.0, use method |
|
A tuple of the data array's dimension sizes. |
|
Take the trigonometric sine of the data element-wise. |
|
Take the hyperbolic sine of the data element-wise. |
|
The number elements in the data. |
|
Remove size one axes from the data array. |
|
The unweighted sample standard deviation of the data array. |
|
The standard_name CF property. |
|
Return a new variable whose data is subspaced. |
|
The sum of the data array. |
|
Interchange two axes of an array. |
|
Take the trigonometric tangent of the data element-wise. |
|
Take the hyperbolic tangent of the data array. |
|
Convert the data to a |
|
Bring data on disk into memory. |
|
Change the data array units. |
|
Permute the axes of the data array. |
|
Truncate the data, element-wise. |
|
Uncompress the construct. |
|
The unique elements of the data. |
|
The units CF property. |
|
Deprecated at version 3.0.0, use |
|
The valid_max CF property. |
|
The valid_min CF property. |
|
The valid_range CF property. |
|
Alias for |
|
The unweighted sample variance of the data array. |
|
A numpy array view of the data. |
|
Set data array elements depending on a condition. |
|
The year of each date-time data array element. |