mpas_analysis.shared.io.namelist_streams_interface.convert_namelist_to_dict

mpas_analysis.shared.io.namelist_streams_interface.convert_namelist_to_dict(fname, readonly=True)[source]

Converts a namelist file to key-value pairs in dictionary.

Parameters:
  • fname (str) – The file name of the namelist

  • readonly (bool, optional) – Should the resulting dictionary read-only?

Returns:

nml (dict) – A dictionary where keys are namelist options and values are namelist