API reference¶
This page provides an auto-generated summary of mesmers’ API.
Top-level functions¶
Train mesmer¶
|
Derive global trend (emissions + volcanoes) parameters from specified ensemble type with specified method. |
|
Derive global variability parameters for a specified method. |
|
Derive local trends (i.e., forced response) parameters for given ESM for given set of targets and predictors. |
|
Derive local variability (i.e., natural variabiliy) parameters. |
Create emulations¶
|
Create global trend (emissions + volcanoes) emulations for specified ensemble type and method. |
|
Create global variablity emulations for specified method. |
|
Create local trends (i.e., forced response) emulations for given parameter set and predictors. |
|
Create local variablity emulations. |
|
Merge global trend and global variability emulations of the same scenarios. |
|
Merge local trends and local variability temperature emulations of the same scenarios and targets. |
|
Make climate realisations based on pre-calculated MESMER parameters |
Individual methods and utils¶
Train mesmer¶
|
Derive AR parameters of global variability under the assumption that gv does not depend on the scenario. |
|
Derive smooth global trend of variable from single ESM ic ensemble with LOWESS smoother. |
|
Derive global trend (emissions + volcanoes) parameters from single ESM ic ensemble by adding volcanic spikes to LOWESS trend. |
|
Derive parameters for AR(1) process with spatially-correlated innovations. |
|
Find suitable localization radius for empirical covariance matrix and derive localized empirical cov matrix. |
|
Create single array of predictors, single array of targets, and single array of weights. |
Create emulations¶
|
Draw global variablity emulations from an AR process. |
|
Create local trends with OLS with grid-point-specific predictors |
|
Create local variablity emulations with AR(1) process with spatially-correlated innovations. |
|
Create local variablity emulations with OLS. |
IO¶
Load CMIP-ng data¶
Extract time, longitude, latitude, and 3d weights from file from ETHZ cmip-ng archive. |
|
|
Find filname in ETHZ cmip-ng archive. |
|
Load ESM runs from cmip-ng archive at ETHZ. |
|
Load file in ETHZ cmip-ng archive. |
|
Load ESM hfds runs from cmip-ng archive at ETHZ. |
|
Load ESM tas runs from cmip-ng archive at ETHZ. |
Preprocess datasets to manage to combine historical, ssp585, and ssp534-over into single time series. |
Load constant files¶
|
smooth, exponentially decaying Gaspari-Cohn correlation function |
|
Find edges of gridcells, given their centers. |
|
Loads or creates (if not available yet) distance matrix and Gaspari-Cohn correlation matrix. |
|
Load constant files. |
|
Sample with 10 times higher resolution. |
Load constant files¶
|
Load saved MESMER output (parameters or emulations). |
Load observations¶
|
Load observations which you previously downloaded. |
|
Load spatially infilled tblend observations. |
|
Load observed global stratospheric aerosol optical depth time series. |
Save mesmer bundle¶
|
Save all the information required to draw MESMER emulations to disk |
Utils¶
|
Convert dictionary to array. |
|
Separate historical and future time periods into separate keys in dictionary. |
|
Extract all land grid points and area weights in regions and in land-sea mask for given threshold. |
|
Extract selected time period. |