.. _namelists-section: Namelist and Runscript Templates -------------------------------- The namelists and run jobs for **int2lm** and **COSMO**, as well as for **icontools** and **ICON** are dynamically generated using templates located in the ``cases/`` directory. These templates are essentially text files containing "normal" namelist parameters alongside Python variables enclosed in curly braces. During runtime, these template files are read by their respective jobs. The resulting strings are formatted through Python's ``.format()`` function, facilitating the substitution of Python variables with their corresponding value. Subsequently, the formatted strings are then saved as the actual namelist and run scripts in the run directory of their respective jobs. .. code-block:: cases/example/example_namelist.cfg -> [read file] -> "namelist_var = '{cfg.prefix}{cfg.suffix}'" -> ["".format(cfg)] -> "namelist_var = 'pref_suff.nc'" -> [write to disk] -> int2lm/run/example_namelist A special case is ``INPUT_ART`` for **int2lm** and ``INPUT_GHG`` for **COSMO** . These namelists are generated by :func:`jobs.tools.write_int2lm_input_art.main` and :func:`jobs.tools.write_cosmo_input_ghg.main` from ``.csv``-files containing all necessary information. ---------------------------------------------------- .. autofunction:: jobs.tools.write_int2lm_input_art.main ---------------------------------------------------- .. autofunction:: jobs.tools.write_cosmo_input_ghg.main