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