oggm.shop.gcm_climate.process_gcm_data#
- oggm.shop.gcm_climate.process_gcm_data(gdir, prcp=None, temp=None, year_range=('1961', '1990'), scale_stddev=True, filesuffix='', output_filesuffix='', time_unit=None, calendar=None, source='', apply_bias_correction=True)[source]#
Applies the anomaly method to GCM climate data
This function can be applied to any GCM data, if it is provided in a suitable
xarray.DataArray
. See Parameter description for format details.For CESM-LME a specific function
tasks.process_cesm_data()
is available which does the preprocessing of the data and subsequently calls this function.- Parameters:
- gdir
oggm.GlacierDirectory
where to write the data
- prcp
xarray.DataArray
- monthly total precipitation [mm month-1]Coordinates:lat float64lon float64time: cftime object
- temp
xarray.DataArray
- monthly temperature [K]Coordinates:lat float64lon float64time cftime object
- year_rangetuple of str
the year range for which you want to compute the anomalies. Default is (‘1961’, ‘1990’)
- scale_stddevbool
whether or not to scale the temperature standard deviation as well
- filesuffixstr
same as output_filesuffix but deprecated.
- output_filesuffixstr
append a suffix to the filename (useful for ensemble experiments).
- time_unitstr
The unit conversion for NetCDF files. It must be adapted to the length of the time series. The default is to choose it ourselves based on the starting year. For example: ‘days since 0850-01-01 00:00:00’
- calendarstr
If you use an exotic calendar (e.g. ‘noleap’)
- sourcestr
For metadata: the source of the climate data
- apply_bias_correctionboolean
if a bias-correction should be applied. Default is True, only set it to False if the GCM has already been externally bias-corrected to the applied observational calibration dataset (true for ISIMIP 3b that is bias-corrected to W5E5). !!! We assume that temp is in Kelvin and convert to CELSIUS !!!
- gdir
Notes
- Files written to the glacier directory:
- gcm_data.nc
The monthly GCM climate timeseries stored in a netCDF file.