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#
CMIP6 Translator for translating metadata from the NCI CMIP6 intake datastores. |
|
CMIP5 Translator for translating metadata from the NCI CMIP5 intake datastores. |
|
Barpa Translator for translating metadata from the NCI BARPA intake datastores. |
|
Cordex Translator for translating metadata from the NCI CORDEX intake datastores. |
|
Era5 Translator for translating metadata from the NCI ERA5 intake datastores. |
|
Ccam Translator for translating metadata from the NCI CCAM intake datastores. |
|
Default Translator for translating metadata in an intake datastore into a |
|
Default Translator for translating metadata in an intake datastore into a |
|
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:
core_colname != input_name
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:
core_colname != input_name
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:
core_colname != input_name
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:
core_colname != input_name
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:
core_colname != input_name
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:
core_colname != input_name
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:
core_colname != input_name
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:
core_colname != input_name
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:
core_colname != input_name
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