oggm.diagnostics.compile_prepro_diagnostics

oggm.diagnostics.compile_prepro_diagnostics#

oggm.diagnostics.compile_prepro_diagnostics(input_dir, output_dir, rgi_region=None, reference_period=None, make_plots=True, per_region_plots=True, name=None)[source]#

Diagnoses a preprocessing run and writes a report, tables and plots.

This is what the oggm_prepro_diag command does. It reads the summary files of an oggm_prepro run (see read_prepro_run()) and writes, in output_dir:

  • report.txt, the diagnostic report. Read this one first.

  • tables/*.csv, all the numbers of the report (and more).

  • plots/*.png and plots/per_region/*.png.

Parameters:
input_dirstr or Path

the directory of the run to diagnose (see read_prepro_run()).

output_dirstr or Path

where to write the report, the tables and the plots. Created if needed.

rgi_regionstr or list, optional

diagnose these RGI regions only (e.g. ‘11’).

reference_periodstr, optional

the geodetic period to compare the mass balance over, e.g. ‘2000-01-01_2020-01-01’. Defaults to cfg.PARAMS[‘geodetic_mb_period’].

make_plotsbool

write the plots (the report and the tables are always written).

per_region_plotsbool

also write one detailed figure per region (in plots/per_region).

namestr, optional

a human readable name for the run, used in the report and the plot titles.

Returns:
a dict of DataFrames - the tables of the report, so that the numbers can
be used directly.