climakitae package#


Module contents#

class climakitae.Select(**params)#

Bases: DataParametersWithPanes

params(_data_warning=String, _station_data_info=String, area_average=Selector, area_subset=Selector, cached_area=ListSelector, data_type=Selector, downscaling_method=Selector, extended_description=Selector, latitude=Range, longitude=Range, resolution=Selector, scenario_historical=ListSelector, scenario_ssp=ListSelector, simulation=ListSelector, station=ListSelector, time_slice=Range, timescale=Selector, units=Selector, variable=Selector, variable_id=ListSelector, variable_type=Selector, name=String) Parameters of ‘Select’ ======================  Parameters changed from their default values are marked in red. Soft bound values are marked in cyan. C/V= Constant/Variable, RO/RW = ReadOnly/ReadWrite, AN=Allow None

Name Value Type Bounds Mode 

area_subset None Selector V RW cached_area None ListSelector V RW latitude (32.5, 42) Range (10, 67) V RW longitude (-125.5, -114) Range (-156.82317, -84.18701) V RW variable_type ‘Variable’ Selector V RW time_slice (1980, 2015) Range (1950, 2100) V RW resolution ‘9 km’ Selector V RW timescale ‘monthly’ Selector V RW scenario_historical [‘Historical Climate’] ListSelector V RW area_average ‘No’ Selector V RW downscaling_method ‘Dynamical’ Selector V RW data_type ‘Gridded’ Selector V RW station None ListSelector V RW _station_data_info ‘’ String V RW scenario_ssp None ListSelector V RW simulation None ListSelector V RW variable None Selector V RW units None Selector V RW extended_description None Selector V RW variable_id None ListSelector V RW _data_warning ‘’ String V RW

Parameter docstrings: =====================

area_subset: < No docstring available > cached_area: < No docstring available > latitude: < No docstring available > longitude: < No docstring available > variable_type: Choose between variable or AE derived index time_slice: < No docstring available > resolution: < No docstring available > timescale: < No docstring available > scenario_historical: < No docstring available > area_average: Compute an area average? downscaling_method: < No docstring available > data_type: < No docstring available > station: < No docstring available > _station_data_info: Information about the bias correction process and resolution scenario_ssp: < No docstring available > simulation: < No docstring available > variable: < No docstring available > units: < No docstring available > extended_description: < No docstring available > variable_id: < No docstring available > _data_warning: Warning if user has made a bad selection

name = 'Select'#
climakitae.export(data, filename='dataexport', format='NetCDF', mode='auto')#

Save xarray data as either a NetCDF or CSV in the current working directory, or stream the export file to an AWS S3 scratch bucket and give download URL. Default behavior is for the code to automatically determine the output destination based on whether file is small enough to fit in HUB user partition, this can be overridden using the mode parameter.

  • data (DataArray or Dataset) – Data to export, as output by e.g. climakitae.Select().retrieve().

  • filename (str, optional) – Output file name (without file extension, i.e. “my_filename” instead of “”). The default is “dataexport”.

  • format (str, optional) – File format (“NetCDF” or “CSV”). The default is “NetCDF”.

  • mode (str, optional) – Save location logic for NetCDF file (“auto”, “local”, “s3”). The default is “auto”


Read data into memory


xr_da (xarray.DataArray)


da_computed (xarray.DataArray)

climakitae.view(data, lat_lon=True, width=None, height=None, cmap=None)#

Create a generic visualization of the data

Visualization will depend on the shape of the input data. Works much faster if the data has already been loaded into memory.

  • data (DataArray) – Input data

  • lat_lon (bool, optional) – Reproject to lat/lon coords? Default to True.

  • width (int, optional) – Width of plot Default to hvplot default

  • height (int, optional) – Height of plot Default to hvplot.image default

  • cmap (matplotlib colormap name or AE colormap names) – Colormap to apply to data Default to “ae_orange” for mapped data or color-blind friendly “categorical_cb” for timeseries data.



UserWarning – Warn user that the function will be slow if data has not been loaded into memory