def _enrich_with_par(par_nml, par_file):
    """Enrich a par namelist with the content of a file."""
    par_new = f90nml.read(str(par_file))
    for section, content in par_new.items():
        if section not in par_nml:
            par_nml[section] = {}
        for par, value in content.items():
            try:
                content[par] = value.strip()
            except AttributeError:
                pass
        par_nml[section].update(content)
def _enrich_with_par ( par_nml , par_file ) : par_new = f90nml . read ( str ( par_file ) ) for section , content in par_new . items ( ) : if section not in par_nml : par_nml [ section ] = { } for par , value in content . items ( ) : try : content [ par ] = value . strip ( ) except AttributeError : pass par_nml [ section ] . update ( content )
Enrich a par namelist with the content of a file.