SurfaceCurrentFeatureInstanceDCF2

class s100py.s111.v1_2.api.SurfaceCurrentFeatureInstanceDCF2(recursively_create_children=False, **kywrds)

Bases: FeatureInstanceDCF2, SurfaceCurrentFeatureInstanceBase

Inheritance diagram of SurfaceCurrentFeatureInstanceDCF2

Attributes Summary

data_dynamicity

date_time_of_first_record

DateTime.

date_time_of_last_record

DateTime.

east_bound_longitude

Eastern extent

extent

v5.0 Table 10c-11 Structure fo Feature Instance Groups (optional)

extent_dtype

grid_origin_latitude

The latitude of the grid origin.

grid_origin_longitude

Arc Degrees

grid_origin_vertical

The grid origin in the vertical dimension.

grid_spacing_latitudinal

Cell size in the Y/latitude dimension.

grid_spacing_longitudinal

Cell size in the X/longitude dimension.

grid_spacing_vertical

Cell size in the vertical dimension.

north_bound_latitude

Northern extent

num_grp

The number of data values groups contained in this instance group

num_points_latitudinal

Number of grid points in the Y/latitude dimension.

num_points_longitudinal

Number of grid points in the X/longitude dimension.

num_points_vertical

Number of grid points in the vertical dimension.

number_of_times

The total number of time records.

south_bound_latitude

Southern extent

start_sequence

Grid coordinates of the grid point to which the first in the sequence of values is to be assigned.

surface_current_group

time_record_interval

Seconds.

uncertainty_dataset

vertical_extent_maximum_z

Vertical extent of 3-D grids minimumZ, maximumZ: Minimum and maximum values of the grid’s spatial extent along the vertical direction.

vertical_extent_minimum_z

Vertical extent of 3-D grids minimumZ, maximumZ: Minimum and maximum values of the grid’s spatial extent along the vertical direction.

west_bound_longitude

Western extent

Methods Summary

add_data(key, value)

data_dynamicity_create()

Creates a value using the first item in the enumeration of data_dynamicity

date_time_of_first_record_create()

Creates a blank, empty or zero value for date_time_of_first_record

date_time_of_last_record_create()

Creates a blank, empty or zero value for date_time_of_last_record

east_bound_longitude_create()

extent_create()

get_all_keys()

Gets all the non-standard keys that are contained in this object currently as well as all the standard keys (S100/HDF5 style names) that could be added.

get_compound_dtype()

Override this method if the dtype of compound dataset items is important

get_data(key)

get_hdf5_from_file(file_obj)

get_s1xx_attr(s1xx_name)

get_standard_keys()

Returns the S100 (HDF5) names for the things that are listed in the specs for this class.

get_standard_list_properties()

Returns a list of properties that are lists (children based on S1xxCollection).

get_standard_properties()

This function autodetermines the properties implemented (which have get/set @properties and _hdf_name associated)

get_standard_properties_mapping()

This function autodetermines the HDF5 or xml names and their associated property names.

get_write_dtypes()

Override this method if the data types of attributes/groups/dataset items is important

get_write_order()

Override this method if the write order of attributes/groups/dataset items is important

grid_origin_latitude_create()

Creates a blank, empty or zero value for grid_origin_latitude

grid_origin_longitude_create()

Creates a blank, empty or zero value for grid_origin_longitude

grid_origin_vertical_create()

Creates a blank, empty or zero value for grid_origin_vertical

grid_spacing_latitudinal_create()

Creates a blank, empty or zero value for grid_spacing_latitudinal

grid_spacing_longitudinal_create()

Creates a blank, empty or zero value for grid_spacing_longitudinal

grid_spacing_vertical_create()

Creates a blank, empty or zero value for grid_spacing_vertical

initialize_properties([...])

Calls the create function for all the properties of the class.

north_bound_latitude_create()

num_grp_create()

Creates a blank, empty or zero value for num_grp

num_points_latitudinal_create()

Creates a blank, empty or zero value for num_points_latitudinal

num_points_longitudinal_create()

Creates a blank, empty or zero value for num_points_longitudinal

num_points_vertical_create()

Creates a blank, empty or zero value for num_points_vertical

number_of_times_create()

Creates a blank, empty or zero value for number_of_times

read(group_object)

Given an h5py.File or a h5py group then read the data based on the encoded S100+ spec.

read_simple_attributes(group_object)

Reads the standard simple types (strings, ints, floats, datetimes, enums) from the given group as specified by the class specs.

set_datetime_attribute(val, hdf_name, date_type)

set_enum_attribute(val, hdf_name, enum_type)

Function to set an attribute that is an enumeration type using either it's string or numeric value or enumeration instance.

set_s1xx_attr(s1xx_name, val)

south_bound_latitude_create()

start_sequence_create()

Creates a blank, empty or zero value for start_sequence

surface_current_group_create()

time_record_interval_create()

Creates a blank, empty or zero value for time_record_interval

uncertainty_dataset_create()

vertical_extent_maximum_z_create()

Creates a blank, empty or zero value for vertical_extent_maximum_z

vertical_extent_minimum_z_create()

Creates a blank, empty or zero value for vertical_extent_minimum_z

west_bound_longitude_create()

write(hdf5_object)

write the contained data and all it's children into an HDF5 file using h5py.

write_as_xml(etree_object)

write_simple_attributes(group_object)

Attributes Documentation

data_dynamicity
date_time_of_first_record

DateTime. Time series data only

Type:

The validity time of the earliest time record. Units

date_time_of_last_record

DateTime. Time series data only

Type:

The validity time of the latest time record. Units

east_bound_longitude

Eastern extent

extent

v5.0 Table 10c-11 Structure fo Feature Instance Groups (optional)

From 4.2.1.1.1.12, The attribute extent has the value class CV_GridEnvelope that shall contain the extent of the spatial domain of the coverage. It uses the value class CV_GridEnvelope which provides the grid coordinate values for the diametrically opposed corners of the grid. The default is that this value is derived from the bounding box for the data set or tile in a multi tile data set

extent_dtype
grid_origin_latitude

The latitude of the grid origin. Arc Degrees

grid_origin_longitude

Arc Degrees

Type:

The longitude of the grid origin. Unit

grid_origin_vertical

The grid origin in the vertical dimension. Only for 3-D grids. Units specified by product specifications

grid_spacing_latitudinal

Cell size in the Y/latitude dimension. This is the Y/latitudinal component of the offset vector (8-7.1.4). Units: Arc Degrees

grid_spacing_longitudinal

Cell size in the X/longitude dimension. This is the X/longitudinal component of the offset vector (8-7.1.4). Units: Arc Degrees

grid_spacing_vertical

Cell size in the vertical dimension. Only for 3-D grids. Units specified by product specifications.

north_bound_latitude

Northern extent

num_grp

The number of data values groups contained in this instance group

num_points_latitudinal

Number of grid points in the Y/latitude dimension. (jMax)

num_points_longitudinal

Number of grid points in the X/longitude dimension. (iMax)

num_points_vertical

Number of grid points in the vertical dimension. (kMax)

number_of_times

The total number of time records. Time series data only

south_bound_latitude

Southern extent

start_sequence

Grid coordinates of the grid point to which the first in the sequence of values is to be assigned. The choice of a valid point for the start sequence is determined by the sequencing rule. Format: n, n… (comma-separated list of grid points, one per dimension – For example, 0,0)

surface_current_group
time_record_interval

Seconds. Time series data only

Type:

The interval between time records. Units

uncertainty_dataset
vertical_extent_maximum_z

Vertical extent of 3-D grids minimumZ, maximumZ: Minimum and maximum values of the grid’s spatial extent along the vertical direction. They are encoded as separate attributes

vertical_extent_minimum_z

Vertical extent of 3-D grids minimumZ, maximumZ: Minimum and maximum values of the grid’s spatial extent along the vertical direction. They are encoded as separate attributes

west_bound_longitude

Western extent

Methods Documentation

add_data(key, value)
data_dynamicity_create()

Creates a value using the first item in the enumeration of data_dynamicity

date_time_of_first_record_create()

Creates a blank, empty or zero value for date_time_of_first_record

date_time_of_last_record_create()

Creates a blank, empty or zero value for date_time_of_last_record

east_bound_longitude_create()
extent_create()
get_all_keys()

Gets all the non-standard keys that are contained in this object currently as well as all the standard keys (S100/HDF5 style names) that could be added.

Return type:

list

get_compound_dtype()

Override this method if the dtype of compound dataset items is important

Return type:

A list of dtype, None otherwise.

get_data(key)
get_hdf5_from_file(file_obj)
get_s1xx_attr(s1xx_name)
get_standard_keys()

Returns the S100 (HDF5) names for the things that are listed in the specs for this class.

Returns:

The S102 HDF5 group/attribute/dataset names from this object that will be written or read from an HDF5 file. e.g. BathymetryCoverage or westBoundLongitude etc.

For the class “Root”: [‘BathymetryCoverage’, ‘Group_F’, ‘TrackingListCoverage’]

Return type:

list

get_standard_list_properties()

Returns a list of properties that are lists (children based on S1xxCollection). Basically a way of finding which items will be named <name>_001, <name>_002 etc

Returns:

The property names that will have auto-generated names based on their index in a list.

Return type:

list

classmethod get_standard_properties()

This function autodetermines the properties implemented (which have get/set @properties and _hdf_name associated)

Returns:

Names of the properties implemented.

For eample class “Root” might have (for S102): [‘bathymetry_coverage’, ‘feature_information’, ‘tracking_list_coverage’]

Return type:

list

get_standard_properties_mapping()

This function autodetermines the HDF5 or xml names and their associated property names. Keys are the s100 (HDF5 spelling) strings and the values are the python style naming.

Returns:

dictionary of xml element names as keys and property names as values.

For the class “Root”: {‘BathymetryCoverage’: ‘bathymetry_coverage’, ‘Group_F’: ‘feature_information’, ‘TrackingListCoverage’: ‘tracking_list_coverage’}

Return type:

dict

get_write_dtypes()

Override this method if the data types of attributes/groups/dataset items is important

Return type:

A list of tuples having key names and type, None otherwise.

get_write_order()

Override this method if the write order of attributes/groups/dataset items is important

Return type:

A list of key names if order is important, None otherwise.

grid_origin_latitude_create()

Creates a blank, empty or zero value for grid_origin_latitude

grid_origin_longitude_create()

Creates a blank, empty or zero value for grid_origin_longitude

grid_origin_vertical_create()

Creates a blank, empty or zero value for grid_origin_vertical

grid_spacing_latitudinal_create()

Creates a blank, empty or zero value for grid_spacing_latitudinal

grid_spacing_longitudinal_create()

Creates a blank, empty or zero value for grid_spacing_longitudinal

grid_spacing_vertical_create()

Creates a blank, empty or zero value for grid_spacing_vertical

initialize_properties(recursively_create_children=False, overwrite=True)

Calls the create function for all the properties of the class. Default values will be created for each attribute that is expected to be contained in this object.

For example, say a class has simple attributes of ESPG code (int) and locatilty (str) and then a class made from S1xxObject called “extents” which has east and west inside it.

Calling initialize_properties(recursively_create_children=False) would result in EPSG=0, locality=”” and an instance of the “extents” class but NO value (nothing would be written to HDF5) for east, west.

Calling initialize_properties(recursively_create_children=True) would result in EPSG=0, locality=”” and an instance of the “extents” class but with east=0.0 and wesst=0.0 as well.

Calling initialize_properties(recursively_create_children=True, overwrite=False) with an esiting dataset, say locality=”test” would result in EPSG=0 being made, locality=”test” being retained and an instance of the “extents” class with east=0.0 and wesst=0.0 as well.

Parameters:
  • recursively_create_children – True = Create children for any child data that would have other children False = Only create data for immediate children of this instance

  • overwrite – True = Overwrite existing data with new default data False = Keep existing data if it exists but create new data otherwise

Return type:

None

north_bound_latitude_create()
num_grp_create()

Creates a blank, empty or zero value for num_grp

num_points_latitudinal_create()

Creates a blank, empty or zero value for num_points_latitudinal

num_points_longitudinal_create()

Creates a blank, empty or zero value for num_points_longitudinal

num_points_vertical_create()

Creates a blank, empty or zero value for num_points_vertical

number_of_times_create()

Creates a blank, empty or zero value for number_of_times

read(group_object)

Given an h5py.File or a h5py group then read the data based on the encoded S100+ spec.

Parameters:

group_object – The group (an h5py.File is a group too) to read from.

Return type:

None

read_simple_attributes(group_object)

Reads the standard simple types (strings, ints, floats, datetimes, enums) from the given group as specified by the class specs.

Parameters:

group_object – The group (an h5py.File is a group too) to read from.

Return type:

None

set_datetime_attribute(val, hdf_name, date_type)
set_enum_attribute(val, hdf_name, enum_type)

Function to set an attribute that is an enumeration type using either it’s string or numeric value or enumeration instance.

Parameters:
  • val – The value as a string, int or Enum().

  • hdf_name – The S100 name (hdf5 spelling).

  • enum_type – The class of enumeration to use if an instance needs to be created.

Return type:

None

set_s1xx_attr(s1xx_name, val)
south_bound_latitude_create()
start_sequence_create()

Creates a blank, empty or zero value for start_sequence

surface_current_group_create()
time_record_interval_create()

Creates a blank, empty or zero value for time_record_interval

uncertainty_dataset_create()
vertical_extent_maximum_z_create()

Creates a blank, empty or zero value for vertical_extent_maximum_z

vertical_extent_minimum_z_create()

Creates a blank, empty or zero value for vertical_extent_minimum_z

west_bound_longitude_create()
write(hdf5_object)

write the contained data and all it’s children into an HDF5 file using h5py.

Parameters:

group_object – An h5py.File or an h5py group object

Return type:

None

write_as_xml(etree_object)
write_simple_attributes(group_object)
__init__(recursively_create_children=False, **kywrds)