esm_catalog_utils.parse_file_cesm#

esm_catalog_utils.parse_file_cesm(path)#

Extract attributes from a CESM netCDF output file.

The returned dictionary has key-value pairs for the following keys:

  • “varname”: list of time-varying variables (excluding time:bounds) If there is no time variable in path, then all variables are included.

  • “frequency”: output frequency

  • “date_start”, “date_end”: datetime.date objects from end-points of time:bounds, if available, and end-points of time otherwise.

Parameters:

path (str or path-like) – Path of netCDF file being parsed.

Return type:

dict

Notes

Uses netCDF4 API instead of xarray API for improved performance.