oggm.tasks.historical_delta_method

oggm.tasks.historical_delta_method(gdir, ref_filesuffix='', hist_filesuffix='', output_filesuffix='', ref_year_range=None, delete_input_files=True, scale_stddev=True, replace_with_ref_data=True)[source]

Applies the anomaly method to historical climate data.

This function can be used to prolongate historical time series, for example by bias-correcting CERA-20C to ERA5 or ERA5-Land.

The timeseries must be already available in the glacier directory

Parameters
gdiroggm.GlacierDirectory

where to write the data

ref_filesuffixstr

the filesuffix of the historical climate data to take as reference

hist_filesuffixstr

the filesuffix of the historical climate data to apply to the reference

output_filesuffixstr

the filesuffix of the output file (usually left empty - i.e. this file will become the default)

ref_year_rangetuple of str

the year range for which you want to compute the anomalies. The default is to take the entire reference data period, but you could also choose (‘1961’, ‘1990’) for example

delete_input_filesbool

delete the input files after use - useful for operational runs where you don’t want to carry too many files

scale_stddevbool

whether or not to scale the temperature standard deviation as well (you probably want to do that)

replace_with_ref_databool

the default is to paste the bias-corrected data where no reference data is available, i.e. creating timeseries which are not consistent in time but “better” for recent times (e.g. CERA-20C until 1980, then ERA5). Set this to False to present this and make a consistent time series of CERA-20C (but bias corrected to the reference data, so “better” than CERA-20C out of the box).

Notes

Files written to the glacier directory:
climate_historical.nc

The historical monthly climate timeseries stored in a netCDF file.