polaris.analysis.manifest.range_key

polaris.analysis.manifest.range_key(facets)[source]

Get the zero-padded range of years a product covers, if it covers one

The range is what keeps two analyses of the same simulation from colliding, in a published file name and in a gallery, so it is written the same way everywhere: the convention ncclimo already uses in its own file names.

Parameters:

facets (dict) – A product’s facets, or an entry of the merged manifest, which may or may not have start_year and end_year

Returns:

key (str or None) – The range as <start>-<end>, or None for a product that covers no particular range of years