aus400

Tools for working with the Aus400 dataset

aus400.cat

Tools for filtering and loading from the Aus400 catalogue

aus400.cat.catalogue: pandas.DataFrame

The full Aus400 catalogue, as a pandas.DataFrame. This catalogue may be filtered using filter_catalogue(), or the matching files opened as xarray.Dataset with load() or load_all().

The catalogue has the following columns:

runid

Experiment run name (e.g. u-bq574)

resolution

Data resolution (e.g. d0036) - A ‘d’ then the grid spacing in ten-thousandths of a degree

ensemble

Ensemble member

stream

Output stream (fx, cldrad, mdl, slv or spec)

variable

BARRA variable name

time

First timestamp in the file

path

Path to the file

standard_name

CF standard name

description

Description of the variable

methods

Variable processing

aus400.cat.filter_catalogue(cat: pandas.core.frame.DataFrame = None, **kwargs)

Returns a filtered view of the catalogue

By default the Aus400 catalogue is used as a starting point, if more complex filtering is required a different source may be provided.

Parameters
  • cat – Source catalogue (default catalogue)

  • resolution ('d0036' or 'd0198') – Resolution to select

  • ensemble (int) – Ensemble member to select

  • stream (str) – Output stream to select

  • variable (str) – Variable name to select

  • **kwargs – Any other column from catalogue

Returns

A filtered view of the catalogue

aus400.cat.load(cat: pandas.core.frame.DataFrame = None, **kwargs)

Load a single variable

Arguments should be used to narrow down what gets loaded from the full catalogue

Parameters

**kwargs – See filter_catalogue()

Returns

xarray.Dataset

aus400.cat.load_all(cat: pandas.core.frame.DataFrame = None, **kwargs)

Load multiple variables, e.g. from different streams or resolutions

Arguments should be used to narrow down what gets loaded from the full catalogue

Parameters

**kwargs – See filter_catalogue()

Returns

Dict[str, xarray.Dataset], with keys named like “{resolution}.{stream}.{variable}”

aus400.regrid

Regridding operations for Aus400 data

Aus400 data is on two main resolutions, ‘d0036’ - a 0.0036 degree grid spacing (equivalent to 400m at the equator) and ‘d0198’ - a 0.0198 degree grid spacing (equivalent to 2.2 km at the equator).

The Unified Model used to run the Aus400 experiment uses an Arakawa C grid. Scalar quantities are defined at grid centres, vector quantities on grid edges. Scalar quantites are on the ‘t’ grid, e.g. ‘d0036t’, and are offset half a grid spacing E-W from ‘d0036u’ and N-S from ‘d0036v’.

The default regridding uses bilinear interpolation. For custom regridding grid definitions may be found in the ‘grids/’ directory of the Aus400 published dataset, for use by e.g. ESMF_RegridWeightGen.

aus400.regrid.identify_grid(data: xarray.core.dataset.Dataset)

Identify the grid of an Aus400 variable

Parameters

data – Variable to identify

Returns

str with grid id of ‘data’

aus400.regrid.to_barra(data: xarray.core.dataset.Dataset)

Regrid an Aus400 variable to the BARRA t (scalar) grid

Parameters

data – Variable to regrid

Returns

xarray.Dataset with ‘data’ on the ‘barrat’ grid

aus400.regrid.to_d0198(data: xarray.core.dataset.Dataset)

Regrid an Aus400 variable to the 2.2km t (scalar) grid

Parameters

data – Variable to regrid

Returns

xarray.Dataset with ‘data’ on the ‘d0198t’ grid