access_nri_intake.aliases#
Aliasing support for intake catalogs to provide user-friendly field names and value mappings.
RATIONALE#
This module provides aliasing functionality to make ACCESS-NRI data more discoverable by researchers familiar with CMIP vocabularies and conventions. The primary goal is to enable users who typically work with CMIP data to find raw ACCESS model outputs using familiar variable names, model names, and other CMIP-standard terminology.
For example: - CMIP users searching for “ci” (convection time fraction) will find the corresponding
raw ACCESS model variables (e.g., “fld_s05i269” in ACCESS-ESM1.6)
Users searching for “tas” (near-surface air temperature) will find the corresponding raw ACCESS model temperature fields
Users familiar with CMIP standard names can also search using intuitive aliases like “temp”, “temperature”, or “air_temperature” - all of which map to find “tas” variables
Users familiar with CMIP model names can use shortcuts like “ACCESS-ESM1” to find “ACCESS-ESM1-5” model data
Frequency specifications can use human-readable terms like “daily” instead of “1day”
This bridging functionality allows CMIP users to leverage their existing vocabulary knowledge to discover raw ACCESS model data, while maintaining full backward compatibility with existing workflows.
The aliasing works in both directions - field name aliasing (e.g., “variable” → “variable_id”) and value aliasing (e.g., “temp” → “tas”) - allowing for flexible and intuitive data discovery. The system also includes CMIP-to-ACCESS variable mappings that allow users to search for CMIP variable names and find the corresponding native ACCESS model variable names.
Bottom value returns (ie. return obj) if no conditions are met have been flagged with pragma: no cover to avoid creating unhelpful tests.
Attributes#
Classes#
Thin wrapper around an intake-esm ESMDataStore that: |
|
Wrapper around an intake dataframe catalog that provides alias support |
Module Contents#
- access_nri_intake.aliases.T#
- class access_nri_intake.aliases.AliasedESMCatalog(cat, field_aliases=None, value_aliases=None, show_warnings=True)#
Bases:
wrapt.ObjectProxy- Thin wrapper around an intake-esm ESMDataStore that:
maps public field names → canonical fields (FIELD_ALIASES)
maps value aliases → canonical values per field (VALUE_ALIASES)
- Parameters:
cat (ESMDataStore) – The underlying ESM datastore to wrap
field_aliases (dict, optional) – Mapping of user-facing field names to canonical field names
value_aliases (dict, optional) – Mapping of field names to value alias dictionaries
show_warnings (bool, default True) – Whether to show warnings when aliasing occurs
Create an object proxy around the given object.
- field_aliases#
- value_aliases#
- show_warnings = True#
- search(**kwargs)#
Search the catalog with aliased field names and values
- unwrap()#
Get the underlying dataframe catalog without aliasing
- class access_nri_intake.aliases.AliasedDataframeCatalog(cat, field_aliases=None, value_aliases=None, show_warnings=True)#
Bases:
wrapt.ObjectProxyWrapper around an intake dataframe catalog that provides alias support for catalog entries that are ESM datastores.
- Parameters:
cat (DataframeCatalog) – The underlying dataframe catalog to wrap
field_aliases (dict, optional) – Mapping of user-facing field names to canonical field names (for dataframe level)
value_aliases (dict, optional) – Mapping of field names to value alias dictionaries
show_warnings (bool, default True) – Whether to show warnings when aliasing occurs in ESM datastores
Create an object proxy around the given object.
- field_aliases#
- value_aliases#
- show_warnings = True#
- search(**kwargs)#
Search the dataframe catalog - apply aliases and wrap results
- to_source(**kwargs)#
Get ESM datastore from catalog search result - wrap with aliasing
- to_source_dict(**kwargs)#
Get dict of ESM datastores from catalog search result - wrap each with aliasing
- unwrap()#
Get the underlying dataframe catalog without aliasing
- access_nri_intake.aliases.VALUE_ALIASES#