{% load i18n ui help %}{% comment %} One group of index parameters, checked as it changes: htmx posts the whole form with "group" and swaps in this group re-rendered (stations:indices_validate), with the name its index will be written under. Without JavaScript the form is checked when it is sent. Parameters: form (IndexParamsForm), group (a key of IndexParamsForm.UNITS), analysis, names (IndexParamsForm.output_names()). {% endcomment %}
{% if group == "plot_title" %} {% include "components/field.html" with field=form.plot_title help="param.plot_title" %} {% elif group == "wsdi_days" %} {% translate "days" as days %}{% include "components/field.html" with field=form.wsdi_days unit=days narrow=True help="param.wsdi_days" %} {% elif group == "csdi_days" %} {% translate "days" as days %}{% include "components/field.html" with field=form.csdi_days unit=days narrow=True help="param.csdi_days" %} {% elif group == "rx_days" %} {% translate "days" as days %}{% include "components/field.html" with field=form.rx_days unit=days narrow=True help="param.rx_days" %} {% elif group == "txtn_days" %} {% translate "days" as days %}{% include "components/field.html" with field=form.txtn_days unit=days narrow=True help="param.txtn_days" %} {% elif group == "hdd_base" %} {% include "components/field.html" with field=form.hdd_base unit="°C" narrow=True help="param.hdd_base" %} {% elif group == "cdd_base" %} {% include "components/field.html" with field=form.cdd_base unit="°C" narrow=True help="param.cdd_base" %} {% elif group == "gdd_base" %} {% include "components/field.html" with field=form.gdd_base unit="°C" narrow=True help="param.gdd_base" %} {% elif group == "rnnmm" %} {% translate "mm" as mm %}{% include "components/field.html" with field=form.rnnmm unit=mm narrow=True help="param.rnnmm" %} {% elif group == "spei_months" %} {% translate "months" as months %}{% include "components/field.html" with field=form.spei_months unit=months narrow=True help="param.spei_months" %} {% elif group == "custom" %}
{% translate "Custom threshold index" %}

{% translate "Counts the days each year and month when a variable is above or below a value you choose, for example the days when TX ≥ 40 °C." %}

{% help_topic "param.custom" %} {% include "components/field.html" with field=form.custom_enabled %}
{% include "components/field.html" with field=form.custom_variable %} {% include "components/field.html" with field=form.custom_operator %} {% if form.custom_variable.value == "PR" %}{% translate "mm" as unit %}{% else %}{% translate "°C" as unit %}{% endif %} {% include "components/field.html" with field=form.custom_threshold unit=unit narrow=True %}
{% endif %} {% for key, name in names.items %}{% if key == group %}

{% translate "Written as" %} {{ name }}

{% endif %}{% endfor %} {% for key, notes in form.warnings.items %}{% if key == group %}{% for note in notes %}

{% icon "warning" %}{{ note }}

{% endfor %}{% endif %}{% endfor %}