begin options
{% if length_units is defined %}  length_units {{length_units}}
{% endif %}
{%- if nogrb is defined %}  nogrb
{% endif %}
{%- if xorigin is defined %}  xorigin {{xorigin}}
{% endif %}
{%- if yorigin is defined %}  yorigin {{yorigin}}
{% endif %}
{%- if angrot is defined %}  angrot {{angrot}}
{% endif -%}
end options

begin dimensions
  nlay {{nlay}}
  ncpl {{ncpl}}
  nvert {{nvert}}
end dimensions

begin griddata
  top
{% for x in top %}    {{x}}
{% endfor %}  botm{% if botm_layered %} layered{% endif %}
{% for x in botm %}    {{x}}
{% endfor %}{% if idomain is defined %}  idomain{% if idomain_layered %} layered{% endif %}
{% for x in idomain %}    {{x}}
{% endfor -%}
{% endif -%}
end griddata