begin options
{% if budget_file is defined %}  budget fileout {{budget_file}}
{% endif %}
{%- if head_file is defined %}  head fileout {{head_file}}
{% endif %}
{%- if concentration_file is defined %}  concentration fileout {{concentration_file}}
{% endif %}
{%- if headprintrecord is defined %}  head print_format columns {{columns}} width {{width}} digits {{digits}} {{format}}
{% endif -%}
end options

{% for i, perioddict in periods.items() %}begin period {{i}}
{% for key, value in perioddict.items() %}  {{key}} {{value}}
{% endfor -%}
end period
{% endfor %}