esgf_query

Two functions for querying the ESGF errata service and summarizing its results

esgf_query.analyze_erratas(fn, max_count=None, do_print=True, panel=None, variable=None)[source]

Reads the kind of AR6 metadata file which describes data used for a figure (or figure panel) and query the ESGF errata service for all corresponding datasets

Returns a dictionnary of experiment DRS with an errata, grouped that way :

>>>  d[variable][severity][errata_description] = [ ... list of experiment DRS ...]

Arg count allows to limit the number of requests to the errata service Arg variable allows to restrict the analysis to those metadata lines which are for a given variable Arg panel allows to restrict the analysis to those metadata lines which have a given panel label

Example of a metadata file line:
CMIP6.CMIP.MPI-M.MPI-ESM1-2-HR.piControl none r1i1p1f1 Amon pr gn v20190710 ssp126 a

Note : sub-experiment ids are not (yet) handled

esgf_query.query_errata_service(dataset_drs, base_url='https://errata.es-doc.org/1/')[source]

Query the errata service for erratas on a dataset DRS, such as >>> dataset_drs=”CMIP6.DAMIP.NASA-GISS.GISS-E2-1-G.hist-sol.r1i1p1f1.AERmon.bldep.gn.v20180912” and returns a list of pairs (severity, description) for relevant erratas