i7aof.topo¶
Topography datasets and helpers. See i7aof.topo for developer details.
- i7aof.topo.get_topo(config, logger)¶
Get the topography object.
- Parameters:
config (mpas_tools.config.MpasConfigParser) – Configuration options.
logger (logging.Logger) – Logger for output from building mapping files and remapping datasets
- Returns:
The topography object.
- Return type:
- class i7aof.topo.topo_base.TopoBase(config, logger)¶
Bases:
object
A base class for a topography data.
- config¶
Configuration options.
- Type:
mpas_tools.config.MpasConfigParser
- logger¶
Logger for the class.
- Type:
logging.Logger
- horiz_res_str¶
The horizontal resolution string (e.g. ‘1km’, ‘2km’, ‘4km’, ‘8km’).
- Type:
str
- check(ds)¶
Check that the fields in the topography dataset are as expected.
- Parameters:
ds (xarray.Dataset) – The dataset to check.
- Raises:
ValueError – If the dataset does not contain the expected fields.
- download_and_preprocess_topo()¶
Download the original topography file, preprocess and check that the required fields are present. Subclasses should implement this method to download the data and preprocess it (e.g. rename variables and define fraction fields). Then, they should call this method to check the results.
- get_preprocessed_topo_path()¶
Get the path to the preprocessed topography file before remapping
- Returns:
The path to the preprocessed topography
- Return type:
str
- get_topo_on_ismip_path()¶
Get the path to the topography file.
- Returns:
The path to the topography on the ISMIP grid
- Return type:
str
- remap_topo_to_ismip()¶
Remap the topography to the ISMIP grid.”
- renormalize_topo_fields(in_filename, out_filename)¶
Renormalize the topography fields (those that aren’t fractions) by the appropriate area fractions.
- Parameters:
in_filename (str) – The input filename to preprocess.
out_filename (str) – The output filename after preprocessing.
- class i7aof.topo.bedmachine.BedMachineAntarcticaV3(config, logger)¶
Bases:
TopoBase
A class for remapping and reading Bedmachine Antarctica v3 data
See https://nsidc.org/data/nsidc-0756/versions/3 for more information about Bedmachine Antarctica v3 topography data.
- download_and_preprocess_topo()¶
Download the original topography file.
- get_preprocessed_topo_path()¶
Get the path to the preprocessed topography file before remapping
- get_topo_on_ismip_path()¶
Get the path to the topography file.
- remap_topo_to_ismip()¶
Remap the topography to the ISMIP grid.”
- class i7aof.topo.bedmap.Bedmap3(config, logger)¶
Bases:
TopoBase
A class for remapping and reading Bedmap3 data
See https://doi.org/10.5285/2d0e4791-8e20-46a3-80e4-f5f6716025d2 and https://doi.org/10.1038/s41597-025-04672-y for more information about Bedmap3 topography data.
- download_and_preprocess_topo()¶
Download the original topography file.
- get_preprocessed_topo_path()¶
Get the path to the preprocessed topography file before remapping
- get_topo_on_ismip_path()¶
Get the path to the topography file.
- remap_topo_to_ismip()¶
Remap the topography to the ISMIP grid.”