Skip to content

Add drift removal options consistent with best practice #168

@DamienIrving

Description

@DamienIrving

Very exciting to see the recent developments regarding branch time visualization and drift removal.

As I understand it, the calculate_drift function subtracts the linear trend of the control run over the time period of the branched off forced runs. While restricting the linear fit to the time period of the control run that corresponds to the forced run is fine in many use cases, the literature on best practice for drift removal recommends a drift estimate based on the full control time series in order to minimize contamination of the drift estimate by internal variability (Sen Gupta et al., 2013).

It also often doesn't matter whether the drift estimate is based on a linear or higher order fit to the data, but in some cases it does matter and users will often want to compare and contrast a linear fit with other options like a cubic fit. Just to be safe, in the latest paper on drift in the CMIP6 ensemble the authors fit a cubic polynomial to the control experiment (Irving et al, 2021) and you can then subtract the relevant segment of that polynomial from the forced data (e.g. see Section 2.6 of Irving et al, 2019).

Long story short, it might be worth adding functionality to cmip6_preprocessing so that users can choose what polynomial they'd like to fit to the control data (linear or cubic is possibly enough options) and whether that fit is over the full control run or just the overlapping time period*. (And it would be cool if users could easily visualize the different fits to the control data).

Unfortunately all the drift removal code I wrote for our CMIP6 paper uses iris as opposed to xarray, but I could possibly help out with implementing these updates to cmip6_preprocessing if that would be useful.

*Occasionally the control runs will have a weird step change or something that you will want to avoid when fitting the polynomial, so it might actually be best to let the user specify full, overlapping or some custom period of time for the fit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions