# ready-to-use model code

The folder `code` contains the ERGOM model code (`generic_ERGOM.F90`) and several config files for MOM-ERGOM (`*_table` and `input.nml`).


# generate your own code

The files in `code` were generated with the [IOW Code Generation Tool (cgt)](https://ergom.net/index.php/code-generation-tool.html) from templates (folder `templates`) and a model description (folder `textfiles`).

The templates are code and config files with placeholders where specific model information should be inserted later. The template code files are not compilable because the placeholders cannot be interpreted by compilers.

The model description textfiles contain the model equations (`processes.txt`), definitions of state variables (`tracers.txt`, `elements.txt`), constants (`constants.txt`, `auxiliaries.txt`), tagging information (`celements.txt`) and some general model information (`modelinfos.txt`).

The cgt provides two tools: a graphic user-interface (GUI) tool for editing the text files (`cgt_edit`) and a GUI tool to generate the code from templates and textfiles (`cgt`).