io.icebridge

Read altimetry data files from NASA Operation IceBridge (OIB)

Source code

General Methods

grounding_zones.io.icebridge.from_file(input_file, subset=None, format=None)[source]

Wrapper function for reading Operation IceBridge data files

Parameters:
input_file: str

Full path of input file to be read

subset: np.ndarray or None

Subsetting array of indices to be read from input file

format: str or None

Format of input file

  • 'ATM': Airborne Topographic Mapper Level-2 icessn

  • 'ATM1b': Airborne Topographic Mapper Level-1b QFIT

  • 'LVIS': Land, Vegetation and Ice Sensor Level-2

  • 'LVGH': Land, Vegetation and Ice Sensor Global Hawk Level-2

Returns:
dinput: dict

variables from input file

  • lat: latitude (degrees)

  • lon: longitude (degrees)

  • data: elevation (meters)

  • time: seconds since J2000 epoch

file_lines: int

Number of lines within the input file

HEM: str

Hemisphere of the input file ('N' or 'S')

grounding_zones.io.icebridge.file_length(input_file, input_subsetter, HDF5=False, QFIT=False)[source]

Retrieves the number of data points in a file

Parameters:
input_file: str

Full path of input file to be read

input_subsetter: np.ndarray or None

Subsetting array of indices to be read from input file

HDF5: bool, default False

Input file is HDF5 format

QFIT: bool, default False

Input file is QFIT binary format

Returns:
file_lines: int

Number of lines within the input file

grounding_zones.io.icebridge.read_ATM_ITRF_file(header=True, delimiter=',')[source]

Reads ITRF convention lookup table for ATM campaigns

Parameters:
header: bool, default True

Input file has a header line

delimiter: str, default ‘,’

Column delimiter of input file

Returns:
data: dict

ITRF conventions

grounding_zones.io.icebridge.get_ITRF(short_name: str, year: int, month: int = 0, HEM: str = 'N')[source]

Get the ITRF realization for an Operation IceBridge dataset

Parameters:
short_name: str

Name of Operation IceBridge dataset

year: int

Year of acquisition of dataset

month: int, default 0

Month of acquisition of dataset

HEM: str, default ‘N’

Region of dataset

  • 'N': Northern Hemisphere

  • 'S': Southern Hemisphere

grounding_zones.io.icebridge.convert_ITRF(data, ITRF)[source]

Convert an Operation IceBridge dataset to a ITRF realization

Parameters:
data: dict

Operation IceBridge dataset

ITRF: str

ITRF Realization of input dataset

grounding_zones.io.icebridge.read_ATM_qfit_file(input_file, input_subsetter)[source]

Reads ATM Level-1b QFIT data files

Parameters:
input_file: str

Full path of input QFIT file to be read

input_subsetter: np.ndarray or None

Subsetting array of indices to be read from input file

Returns:
ATM_L1b_input: dict

Level-1b variables from input file

  • lat: latitude of each shot

  • lon: longitude of each shot

  • data: elevation of each shot

  • time: seconds since J2000 epoch of each shot

file_lines: int

Number of lines within the input file

HEM: str

Hemisphere of the input file ('N' or 'S')

grounding_zones.io.icebridge.read_ATM_icessn_file(input_file, input_subsetter)[source]

Reads ATM Level-2 icessn data files

Parameters:
input_file: str

Full path of input icessn file to be read

input_subsetter: np.ndarray or None

Subsetting array of indices to be read from input file

Returns:
ATM_L2_input: dict

Level-2 variables from input file

  • lat: latitude of each segment

  • lon: longitude of each segment

  • data: elevation of each segment

  • error: estimated elevation uncertainty of each segment

  • time: seconds since J2000 epoch of each segment

  • track: track number of each segment

file_lines: int

Number of lines within the input file

HEM: str

Hemisphere of the input file ('N' or 'S')

grounding_zones.io.icebridge.read_LVIS_ascii_file(input_file: str | Path | BytesIO)[source]

Reads LVIS Level-2 ascii data files

Parameters:
input_file: str

Full path of input LVIS file to be read

Returns:
ILVIS2_MDS: dict

Complete set of Level-2 variables from ascii file

grounding_zones.io.icebridge.read_LVIS_HDF5_file(input_file, input_subsetter)[source]

Reads LVIS Level-2 HDF5 data files

Parameters:
input_file: str

Full path of input LVIS file to be read

input_subsetter: np.ndarray or None

Subsetting array of indices to be read from input file

Returns:
LVIS_L2_input: dict

Level-2 variables from input file

  • lat: latitude of each waveform

  • lon: longitude of each waveform

  • data: average elevation of each waveform

  • error: estimated elevation uncertainty of each waveform

  • time: seconds since J2000 epoch of each waveform

file_lines: int

Number of lines within the input file

HEM: str

Hemisphere of the input file ('N' or 'S')

grounding_zones.io.icebridge.write_LVIS_HDF5_file(ILVIS2_MDS: dict, LDS_VERSION: str, filename: str | Path | None = None, lineage: str | Path | None = None)[source]

Writes LVIS Level-2 data to HDF5 files

Parameters:
ILVIS2_MDS: dict

Complete set of LVIS Level-2 variables

LDS_VERSION: str

Version of the LVIS Data Structure (1.04 or 2.0.2)

filename: str or pathlib.Path or None

Output HDF5 filename

lineage: str or pathlib.Path or None

Original LVIS filename or lineage information