pycoupler.read_header#

pycoupler.read_header(filename, to_dict=False, force_version=None, verbose=False)[source]#

Read header (any version) from LPJmL input/output file

Reads a header from an LPJmL clm file. CLM is the default format used for LPJmL input files and can also be used for output files.

Parameters:
  • filename (str) – Filename to read header from.

  • to_dict (bool, optional) – If True, return header as dictionary. If False, return as LPJmLMetaData object.

  • force_version (int, optional) – Manually set clm version. The default value NULL means that the version is determined automatically from the header. Set only if the version number in the file header is incorrect.

  • verbose (bool, optional) – If TRUE (the default), read_header provides some feedback when using default values for missing parameters. If FALSE, only errors are reported.

Returns:

A LPJmLMetaData object or a dictionary with the header information.

Return type:

LPJmLMetaData or dict