API reference#

This page provides an auto-generated summary of the py-cordex API.

Top-level functions#

cordex_domain(domain_id[, dummy, ...])

Creates an xarray dataset containg the domain grid definitions.

domain_info(domain_id[, tables])

Returns a dictionary containg the domain grid definitions.

create_dataset(nlon, nlat, dlon, dlat, ...)

Create domain dataset from grid information.

transform(x, y, src_crs[, trg_crs])

Coordinate transformation using pyproj.

transform_coords(ds[, src_crs, trg_crs, ...])

Transform X and Y coordinates of a Dataset.

transform_bounds(ds[, src_crs, trg_crs, ...])

Transform linear X and Y bounds of a Dataset.

cell_area(ds[, R, attrs])

Compute cell areas for a regular spherical grid.

Preprocessing#

preprocessing.rename_cordex(ds[, rename_dict])

Homogenizes cordex datasets to common naming conventions.

preprocessing.replace_coords(ds[, domain])

Replace spatial coordinates with coordinates according to archive specifications.

preprocessing.cordex_dataset_id(ds[, sep, ...])

Creates a unique string id for e.g. saving files to disk from CORDEX output.

preprocessing.promote_empty_dims(ds)

Convert empty dimensions to actual coordinates.

preprocessing.remap_lambert_conformal(ds[, ...])

Remap lambert conformal grid to rotated pole grid

preprocessing.sort_ds_dict_by_attr(ds_dict, attr)

Sorts the dataset dict by a certain attribute.

preprocessing.member_id_to_dset_id(ds_dict)

Expand the member coordinate into the dataset id

preprocessing.attr_to_coord(ds, attr[, expand])

Promote a dataset attribute to a coordinate.

Cmorization#

cmor.cmorize_variable(ds, out_name, ...[, ...])

Cmorizes a variable.

cmor.to_cftime(date[, calendar])

Convert date to cftime object

cmor.season(date)

Determines the meteorological season.

cmor.season_bounds(date)

Determines the temporal bounds of the meteorological season.

cmor.mid_of_month(ds)

Determine the mid of the current month.

cmor.month_bounds(ds[, bounds_dim])

Returns the bounds of the current month.

CMOR Tables#

tables.cordex_cmor_table(table[, table_dir])

fetch a experimental cordex cmor table

Regions within Euro-Cordex#

regions.germany

VG2500 Deutschland Verwaltungsgrenzen

regions.prudence

Prudence regions in Europe.

Tutorial#

tutorial.open_dataset(name[, cache, ...])

Open a dataset from the online repository (requires internet).

tutorial.ensemble()

Retrieve a mini CORDEX test ensemble.

Dataset#

Dataset.cx.domain_id

Returns the domain_id.

Dataset.cx.grid_mapping

Returns the grid_mapping variable.

Dataset.cx.info()

Return domain info in CORDEX format.

Dataset.cx.guess()

Guess which domain this could be.

Dataset.cx.map([projection])

Create a simple overview map.