cdm_reader_mapper.cdm_mapper.tables package¶
Common Data Model (CDM) mapping tables.
Subpackages¶
- cdm_reader_mapper.cdm_mapper.tables.cmems package
- cdm_reader_mapper.cdm_mapper.tables.common package
- cdm_reader_mapper.cdm_mapper.tables.craid package
- cdm_reader_mapper.cdm_mapper.tables.gdac package
- cdm_reader_mapper.cdm_mapper.tables.icoads package
- cdm_reader_mapper.cdm_mapper.tables.marob package
- cdm_reader_mapper.cdm_mapper.tables.pub47 package
Submodules¶
cdm_reader_mapper.cdm_mapper.tables.tables module¶
Climate Model Data (CDM) mapping table routinies.
Created on Thu Apr 11 13:45:38 2019
Module to handle C3S Climate Data Store Common Data Model (CMD) tables within the cdm tool.
@author: iregon
- cdm_reader_mapper.cdm_mapper.tables.tables.get_cdm_atts(cdm_tables=None)[source]¶
Get CDM attribute tables.
- Parameters:
cdm_tables (
strorlistofstr, optional) – List of CDM tables to retrieve. - If None, includes all tables defined in properties.cdm_tables. - If a string, treated as a single table name. - If an empty list, returns an empty mapping.- Return type:
- Returns:
dict– Dictionary mapping table names to their attribute dictionaries. Keys are table names like header or observations-*. Values are dictionaries loaded from JSON files.
- cdm_reader_mapper.cdm_mapper.tables.tables.get_imodel_maps(data_model, *sub_models, cdm_tables=None)[source]¶
Retrieve CDM attribute maps for a data model and optional submodels.
- Parameters:
data_model (
str) – The main data model name, e.g., icoads.*sub_models (
str) – Optional submodel names, e.g. r300, d721.cdm_tables (
strorlistofstr, optional) – List of CDM tables to retrieve. - If None, includes all tables defined in properties.cdm_tables. - If a string, treated as a single table name. - If an empty list, returns an empty mapping.
- Return type:
- Returns:
dict– Mapping of table names to their attribute dictionaries. Each table dictionary may have its elements normalized to lists, and tuples of (section, element) if sections exist.