API#

Data#

data.cmip.postprocess(ds[, to_standard_calendar])

Post process input experiment

data.cmip.load_cmip([activity_ids, ...])

Loads CMIP6 GCM dataset based on input criteria.

data.cmip.get_gcm(scenario, member_id, ...)

Load historical or future GCM into one dataset.

data.observations.open_era5(variables, ...)

Open ERA5 daily data for one or more variables for period 1979-2021

data.utils.to_standard_calendar(obj)

Convert a Dataset's calendar to the "standard calendar"

data.utils.lon_to_180(ds)

Converts longitude values to (-180, 180)

Downscaling Methods#

BCSD#

bcsd.tasks.spatial_anomalies

Returns spatial anomalies Calculate the seasonal cycle (12 timesteps) spatial anomaly associated with aggregating the fine_obs to a given coarsened scale and then reinterpolating it back to the original spatial resolution.

bcsd.tasks.fit_and_predict

Fit bcsd model on prepared CMIP data with obs at corresponding spatial scale.

bcsd.tasks.postprocess_bcsd

Downscale the bias-corrected data (fit_and_predict results) by interpolating and then adding the spatial anomalies back in.

bcsd.utils.reconstruct_finescale(ds[, ...])

Add the spatial anomalies back into the interpolated fine scale dataset.

GARD#

gard.tasks.coarsen_and_interpolate

Coarsen up obs and then interpolate it back to the original finescale grid.

gard.tasks.fit_and_predict

Prepare inputs (e.g. normalize), use them to fit a GARD model based upon specified parameters and then use that fitted model to make a prediction.

gard.tasks.read_scrf

Read spatial-temporally correlated random fields on file and subset into the correct spatial/temporal domain according to model_output.

gard.utils.get_gard_model(model_type, ...)

Based on input, return the corresponding GARD model instance

gard.utils.add_random_effects(model_output, ...)

DEEPSD#

deepsd.tasks.shift

Interpolate obs data to grid specs in xe.util.grid_global.

deepsd.tasks.normalize_gcm

Normalize gcm data based on historical data.

deepsd.tasks.inference

Run inference on normalized gcm data.

deepsd.tasks.rescale

Rescale GCM data that has been normalized based on data in obs_path.

deepsd.tasks.bias_correction

Bias correct downscaled data product.

deepsd.utils.bilinear_interpolate(ds, ...)

Bilinear inperpolate dataset to a global grid with specified step size

deepsd.utils.conservative_interpolate(ds, ...)

Conservative inperpolate dataset to a global grid with specified spacing

deepsd.utils.normalize(ds[, dims, epsilon])

Normalize dataset

MACA#

maca.tasks.bias_correction

MACA bias correction task

maca.tasks.epoch_trend

Task to calculate the epoch trends in MACA.

maca.tasks.construct_analogs

MACA analog construction

maca.tasks.split_by_region

Split dataset into separate regions

maca.tasks.combine_regions

Combine regions

maca.tasks.replace_epoch_trend

Replace epoch trend

Common Tasks#

common.tasks.make_run_parameters

Prefect task wrapper for RunParameters

common.tasks.get_obs

Task to return observation data subset from input parameters.

common.tasks.get_experiment

Prefect task that returns cmip GCM data from input run parameters.

common.tasks.rechunk

Use rechunker package to adjust chunks of dataset to a form conducive for your processing.

common.tasks.time_summary

Prefect task to create resampled data.

common.tasks.get_weights

Retrieve pre-generated regridding weights.

common.tasks.get_pyramid_weights

Retrieve pre-generated regridding pyramids weights.

common.tasks.regrid

Task to regrid a dataset to target grid.

common.tasks.pyramid

Task to create a data pyramid from an xarray Dataset

common.tasks.run_analyses

Prefect task to run the analyses on results from a downscaling run.

common.tasks.finalize

Prefect task to finalize the downscaling run.