cdm.lib.tables.tables_hdlr

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

Module Contents

Functions

load_tables(log_level='DEBUG')

NEEDS DOCUMENTING

from_glamod(table_filename, gitlinkroot=None, element_col=1, type_col=2, field_separator='\t', skip_lines=3)

Get tables from GLAMOD Git repo and format to nested dictionary with: {cdm_name: {'data_type':value}}

Attributes

module_path

table_path

module_path[source]
table_path[source]
load_tables(log_level='DEBUG')[source]

NEEDS DOCUMENTING

Parameters

log_level

Returns

  • logger.error

  • tables

from_glamod(table_filename, gitlinkroot=None, element_col=1, type_col=2, field_separator='\t', skip_lines=3)[source]

Get tables from GLAMOD Git repo and format to nested dictionary with: {cdm_name: {'data_type':value}}

Parameters
  • table_filename (table filename in repo directory) –

  • gitlinkroot (url to directory where tables are stored) –

  • element_col (column with element names (first is 1)) –

  • type_col (column with element data typs (first is 1)) –

  • field_separator (tab as default) –

  • skip_lines (numbers of lines to skip) –

Returns

Return type

NEEDS DOCUMENTING