pysiral.sentinel3.l1_adapter
Classes
Base class (mostly for type checking). |
|
Base class (mostly for type checking). |
Module Contents
- class pysiral.sentinel3.l1_adapter.Sentinel3CODAL2Wat(cfg, raise_on_error=False)
Bases:
pysiral.l1preproc.Level1PInputHandlerBaseBase class (mostly for type checking).
- l1 = None
- filepath = None
- nc = None
- timer = None
- get_l1(filepath, polar_ocean_check=None)
Create a Level-1 data container from Sentinel-3 CODA L2WAT files :param filepath: The full file path to the netCDF file :param polar_ocean_check: :return: The parsed (or empty) Level-1 data container
- static interp_1hz_to_20hz(variable_1hz, time_1hz, time_20hz, **kwargs)
Computes a simple linear interpolation to transform a 1Hz into a 20Hz variable :param variable_1hz: an 1Hz variable array :param time_1hz: 1Hz reference time :param time_20hz: 20 Hz reference time :return: the interpolated 20Hz variable
- static parse_sentinel3_l1b_xml_header(filename)
Reads the XML header file of a Sentinel 3 L1b Data set and returns the contents as an OrderedDict
- _parse_xml_manifest(filepath)
Parse the Sentinel-3 XML header file and extract key attributes for filtering :param filepath: the filepath for the netcdf :return: None
- _get_xml_content(section_name, tag)
Returns the generalProductInformation content of the xml manifest :return: dictionary
- _read_input_netcdf(filepath)
Read the netCDF file via xarray :param filepath: The full filepath to the netCDF file :return: none
- _set_input_file_metadata()
Populates the product info segment of the Level1Data object with information from the global attributes of the netCDF and content of the xml manifest :return: None
- _set_l1_data_groups()
Fill all data groups of the Level-1 data object with the content of the netCDF file. This is just the overview method, see specific sub-methods below :return: None
- _set_time_orbit_data_group()
Transfer the time orbit parameter from the netcdf to l1 data object :return: None
- _set_waveform_data_group()
- Transfer of the waveform group to the Level-1 object. This includes
the computation of waveform power in Watts
the computation of the window delay in meter for each waveform bin
extraction of the waveform valid flag
- Returns:
None
- _set_range_correction_group()
Transfer the range corrections defined in the l1p config file to the Level-1 object NOTE: The range corrections are all in 1 Hz and must be interpolated to 20Hz :return: None
- _set_surface_type_group()
Transfer of the surface type flag to the Level-1 object NOTE: In the current state (TEST dataset), the surface type flag is only 1 Hz. A nearest neighbour
interpolation is used to get the 20Hz surface type flag.
- Returns:
None
- _set_classifier_group()
Transfer the classifiers defined in the l1p config file to the Level-1 object. NOTE: It is assumed that all classifiers are 20Hz In addition, a few legacy parameter are computed based on the waveform counts that is only available at this stage. Computation of other parameter such as sigma_0, leading_edge_width, … are moved to the post-processing :return: None
- property empty
Default return object, if nodata should be returned :return: Representation of an empty object (None)
- class pysiral.sentinel3.l1_adapter.Sentinel3L2SeaIce(cfg, raise_on_error=False)
Bases:
pysiral.l1preproc.Level1PInputHandlerBaseBase class (mostly for type checking).
- nc = None
- filepath = None
- l1 = None
- timer = None
- get_l1(filepath, polar_ocean_check=None)
Create a Level-1 data container from Sentinel-3 CODA L2WAT files :param filepath: The full file path to the netCDF file :param polar_ocean_check: :return: The parsed (or empty) Level-1 data container
- static interp_01_hz_to_20_hz(variable_01_hz, time_01_hz, time_20_hz, **kwargs)
Computes a simple linear interpolation to transform a 1Hz into a 20Hz variable :param variable_01_hz: an 1Hz variable array :param time_01_hz: 1Hz reference time :param time_20_hz: 20 Hz reference time :return: the interpolated 20Hz variable
- static parse_sentinel3_l1b_xml_header(filename)
Reads the XML header file of a Sentinel 3 L1b Data set and returns the contents as an OrderedDict
- _parse_xml_manifest(filepath)
Parse the Sentinel-3 XML header file and extract key attributes for filtering :param filepath: the filepath for the netcdf :return: None
- _get_xml_content(section_name, tag)
Returns the generalProductInformation content of the xml manifest :return: dictionary
- static _read_input_netcdf(filepath) xarray.Dataset | None
Read the netCDF file via xarray :param filepath: The full filepath to the netCDF file :return: none
- _set_input_file_metadata()
Populates the product info segment of the Level1Data object with information from the global attributes of the netCDF and content of the xml manifest :return: None
- _set_l1_data_groups()
Fill all data groups of the Level-1 data object with the content of the netCDF file. This is just the overview method, see specific sub-methods below :return: None
- _set_time_orbit_data_group()
Transfer the time orbit parameter from the netcdf to l1 data object :return: None
- _set_waveform_data_group()
- Transfer of the waveform group to the Level-1 object. This includes
the computation of waveform power in Watts
the computation of the window delay in meter for each waveform bin
extraction of the waveform valid flag
- Returns:
None
- _set_range_correction_group()
Transfer the range corrections defined in the l1p config file to the Level-1 object NOTE: The range corrections are all in 1 Hz and must be interpolated to 20Hz :return: None
- _set_surface_type_group()
Transfer of the surface type flag to the Level-1 object
- Returns:
None
- _set_classifier_group()
Transfer the classifiers defined in the l1p config file to the Level-1 object. NOTE: It is assumed that all classifiers are 20Hz In addition, a few legacy parameter are computed based on the waveform counts that is only available at this stage. Computation of other parameter such as sigma_0, leading_edge_width, … are moved to the post-processing :return: None
- property empty
Default return object, if nodata should be returned :return: Representation of an empty object (None)