pysiral.core.flags

Attributes

__author__

ESA_SURFACE_TYPE_DICT

SURFACE_TYPE_DICT

WAVEFORM_CLASSIFICATION_BIT_DICT

Classes

Hemispheres

Enum for hemispheres.

DataRecordType

Enum for processing levels with a corresponding pysiral processor

PysiralProcessingLevels

Enum for processing levels with a corresponding pysiral processor

ProductProcessingLevels

Enum for processing levels.

DurationType

Enum for duration names for dateperiod.DatePeriod objects.

RadarModes

SurfaceType

Container for surface type information.

IceType

Container for ice type information

FlagContainer

ANDCondition

ORCondition

Module Contents

pysiral.core.flags.__author__ = 'Stefan Hendricks'
pysiral.core.flags.ESA_SURFACE_TYPE_DICT
pysiral.core.flags.SURFACE_TYPE_DICT
pysiral.core.flags.WAVEFORM_CLASSIFICATION_BIT_DICT
class pysiral.core.flags.Hemispheres

Bases: enum.StrEnum

Enum for hemispheres.

NORTH = 'nh'
SOUTH = 'sh'
GLOBAL = 'global'
classmethod get_choices() List[str]
class pysiral.core.flags.DataRecordType

Bases: enum.StrEnum

Enum for processing levels with a corresponding pysiral processor

CLIMATE_DATA_RECORD = 'cdr'
INTERIM_CLIMATE_DATA_RECORD = 'icdr'
NON_TIME_CRITICAL = 'ntc'
NEAR_REAL_TIME = 'nrt'
REPROCESSED = 'rep'
classmethod get_choices() List[str]
class pysiral.core.flags.PysiralProcessingLevels

Bases: enum.StrEnum

Enum for processing levels with a corresponding pysiral processor

LEVEL1 = 'l1'
LEVEL2 = 'l2'
LEVEL3 = 'l3'
class pysiral.core.flags.ProductProcessingLevels

Bases: enum.StrEnum

Enum for processing levels.

LEVEL1_PREPROCESSED = 'l1p'
LEVEL2 = 'l2'
LEVEL2_INTERMEDIATE = 'l2i'
LEVEL2_PREPROCESSED = 'l2p'
LEVEL3_COLLATED = 'l3c'
LEVEL3_SUPERCOLLATED = 'l3s'
classmethod get_choices() List[str]

Returns a list of all processing level choices.

class pysiral.core.flags.DurationType

Bases: enum.StrEnum

Enum for duration names for dateperiod.DatePeriod objects.

P1D = 'day'
P7D = 'isoweek'
P1M = 'month'
classmethod get_choices() List[str]
class pysiral.core.flags.RadarModes

Bases: object

flag_dict
classmethod get_flag(mode_name: str) int | None
classmethod get_name(flag: int) str | None
name(index: int) str
property num: int
class pysiral.core.flags.SurfaceType

Bases: object

Container for surface type information.

Possible classifications (Adapted from CryoSat-2 conventions)
  • unknown

  • ocean

  • closed sea/lakes

  • lead

  • large lead/polynya

  • sea ice (general sea ice class, not to be confused with ice type)

  • continental ice

  • land

surface_type_dict
_surface_type_flags = []
_surface_type = None
name(flag_value: int) str

Return the flag name for a give flag value

Parameters:

flag_value

Returns:

set_flag(flag: numpy.ndarray) None
add_flag(flag: numpy.ndarray, type_str: str) None

Add a surface type flag (boolean array)

Parameters:
  • flag

  • type_str

Returns:

has_flag(type_str: str) bool
get_by_name(name: str) FlagContainer
append(annex: SurfaceType) None
set_subset(subset_list)
fill_gaps(corrected_n_records, indices_map)

API gap filler method. Note: Gaps will be filled with the nodata=unkown (8) surface_type

invalid_n_records(n: int) bool

Check if flag array has the correct length

_get_type_id(name: str) int
property flag: numpy.ndarray
property n_records: int
property dimdict: collections.OrderedDict

Returns dictionary with dimensions

property parameter_list: List[str]
property lead: FlagContainer
property ocean: FlagContainer
property sea_ice: FlagContainer
property land: FlagContainer
class pysiral.core.flags.IceType

Bases: object

Container for ice type information

Possible classifications
  • young thin ice

  • first year ice

  • multi-year ice

  • wet ice

_ICE_TYPE_DICT
_ice_type_flag = None
class pysiral.core.flags.FlagContainer(flag: numpy.ndarray = None)

Bases: object

_flag = None
set_flag(flag: numpy.ndarray) None
abstractmethod add(flag: numpy.ndarray) None
property indices: numpy.ndarray
property flag: numpy.ndarray
property num: int
class pysiral.core.flags.ANDCondition(**kwargs)

Bases: FlagContainer

add(flag: numpy.ndarray | bool) None
class pysiral.core.flags.ORCondition(**kwargs)

Bases: FlagContainer

add(flag: numpy.ndarray | bool) None