pcmdi_metrics.effective_resolution.process_effective_resolution

pcmdi_metrics.effective_resolution.process_effective_resolution(params)[source]

Compute effective-resolution metrics from input file paths.

Opens the input, calls compute_effective_resolution, and writes the NetCDF, JSON and, if requested, PNG output. The JSON is written through pcmdi_metrics.io.base.Base, so it carries the standard PMP provenance block.

Parameters:

params (dict) – User parameters. Recognised keys: model, exp, member (labels); input_file (path, glob or list for the wind data) and optional input_file_v when the meridional wind lives in separate files; uvar, vvar; levels in hPa; start and end time bounds; ntrunc, gridtype, plev_name; the criterion keys fit_window, fit_anchor, steepening_factor, wavenumber_ratio, min_wavenumber, n_confirm; grid_box_distance_km to override the derived value; output_dir; the switches save_netcdf, save_json, plot; and debug.

Returns:

dict – The same {model: {member: {...}}} metrics dict written to JSON.

Examples

>>> metrics = process_effective_resolution(
...     {
...         "model": "HadGEM3-GC31-HM",
...         "exp": "highresSST-present",
...         "member": "r1i1p1f1",
...         "input_file": "/path/to/ua_6hrPlevPt_*.nc",
...         "input_file_v": "/path/to/va_6hrPlevPt_*.nc",
...         "start": "2014-03-01",
...         "end": "2014-03-31",
...         "output_dir": "./output",
...     }
... )