access_nri_intake.catalog.translators#

Tools for translating metadata in an intake source into a metadata table to use in an intake-dataframe-catalog like the ACCESS-NRI catalog

Classes#

Cmip6Translator

CMIP6 Translator for translating metadata from the NCI CMIP6 intake datastores.

Cmip5Translator

CMIP5 Translator for translating metadata from the NCI CMIP5 intake datastores.

BarpaTranslator

Barpa Translator for translating metadata from the NCI BARPA intake datastores.

CordexTranslator

Cordex Translator for translating metadata from the NCI CORDEX intake datastores.

Era5Translator

Era5 Translator for translating metadata from the NCI ERA5 intake datastores.

CcamTranslator

Ccam Translator for translating metadata from the NCI CCAM intake datastores.

NarclimTranslator

Default Translator for translating metadata in an intake datastore into a DataFrame

EsgfTranslator

Default Translator for translating metadata in an intake datastore into a DataFrame

EsmValToolTranslator

EsmValTool Translator for translating metadata from the NCI EsmValTool intake datastores.

Module Contents#

class access_nri_intake.catalog.translators.Cmip6Translator(source, columns)#

Bases: DefaultTranslator

CMIP6 Translator for translating metadata from the NCI CMIP6 intake datastores.

Initialise a Cmip6Translator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI CMIP6 intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column

class access_nri_intake.catalog.translators.Cmip5Translator(source, columns)#

Bases: DefaultTranslator

CMIP5 Translator for translating metadata from the NCI CMIP5 intake datastores.

Initialise a Cmip5Translator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI CMIP5 intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column

class access_nri_intake.catalog.translators.BarpaTranslator(source, columns)#

Bases: DefaultTranslator

Barpa Translator for translating metadata from the NCI BARPA intake datastores.

Initialise a BarpaTranslator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI BARPA intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column

class access_nri_intake.catalog.translators.CordexTranslator(source, columns)#

Bases: DefaultTranslator

Cordex Translator for translating metadata from the NCI CORDEX intake datastores.

Initialise a CordexTranslator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI CORDEX intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column

class access_nri_intake.catalog.translators.Era5Translator(source, columns)#

Bases: DefaultTranslator

Era5 Translator for translating metadata from the NCI ERA5 intake datastores.

Initialise a Era5Translator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI ERA5 intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column

class access_nri_intake.catalog.translators.CcamTranslator(source, columns)#

Bases: DefaultTranslator

Ccam Translator for translating metadata from the NCI CCAM intake datastores.

Initialise a CcamTranslator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI CCAM intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column

class access_nri_intake.catalog.translators.NarclimTranslator(source, columns)#

Bases: DefaultTranslator

Default Translator for translating metadata in an intake datastore into a DataFrame of metadata for use in an intake-dataframe-catalog.

Initialise a BarpaTranslator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI BARPA intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column

class access_nri_intake.catalog.translators.EsgfTranslator(source, columns)#

Bases: DefaultTranslator

Default Translator for translating metadata in an intake datastore into a DataFrame of metadata for use in an intake-dataframe-catalog.

Initialise an EsgfTranslator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI Earth System Grid intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column

class access_nri_intake.catalog.translators.EsmValToolTranslator(source, columns)#

Bases: DefaultTranslator

EsmValTool Translator for translating metadata from the NCI EsmValTool intake datastores.

Initialise an EsgfTranslator

Parameters:
source: :py:class:`~intake.DataSource`

The NCI Earth System Grid intake-esm datastore

columns: list of str

The columns to translate to (these are the core columns in the intake-dataframe-catalog)

source#
columns#
translate(groupby=None)#

Return the translated DataFrame of metadata and merge into set of set of rows with unique values of the columns specified.

Parameters:
groupby: list of str, optional

Core metadata columns to group by before merging metadata across remaining core columns.

set_dispatch(core_colname, func, input_name=None)#
Set a dispatch function for a column. Typically only required when either:
  1. core_colname != input_name

  2. A custom translation function (func) is required.

Parameters:
core_colname: str

The core column name to translate to

input_name: str, optional

The name of the column in the source. If not provided, this defaults to none, and no translation will occur

func: callable

The function to translate the column