{% extends "base.html" %} {% load i18n static ui help %} {% block title %}{% translate "Check and set up" %}{% endblock %} {% block head %}{% endblock %} {% block steps %}{% include "components/steps.html" %}{% endblock %} {% block content %}

{% translate "Check the files and set up the run" %}

{% blocktranslate count counter=files|length trimmed %}Climpact has read the file below. Nothing has been calculated yet.{% plural %}Climpact has read the {{ counter }} files below. Nothing has been calculated yet.{% endblocktranslate %}

{% if job_active %} {% url 'gridded:results' run.pk as results_url %}{% translate "Follow its progress" as follow_label %} {% translate "This run is being calculated." as active_message %} {% include "components/alert.html" with kind="info" title="" message=active_message action_href=results_url action_label=follow_label %} {% endif %}

{% translate "The files" %}

{% if preflight_error %} {% endif %}
{% csrf_token %} {% include "components/form_errors.html" with form=form %}

{% translate "1. Variables" %}

{% translate "Which variable in the files is which. Climpact guessed from their names and units; check them." %}

{% help_topic "gridded.variables" %}
{% include "components/field.html" with field=form.tasmax %} {% include "components/field.html" with field=form.tasmin %} {% include "components/field.html" with field=form.pr %}
{% include "gridded/_checks.html" %}

{% translate "2. What to calculate" %}

{% include "components/field.html" with field=form.task %}
  • {% translate "Indices: one netCDF file per index and frequency (monthly, annual), as Climpact for R writes them." %}
  • {% translate "Thresholds file only: the base-period percentiles of every cell, to calculate indices for other data later, e.g. a future scenario with thresholds from a historical run." %}
  • {% translate "Thresholds file, then indices: both, one after the other." %}
{% include "components/field.html" with field=form.thresholds_source help="gridded.thresholds_file" %}
{% if local %}{% include "components/field.html" with field=form.thresholds_path %} {% else %} {% blocktranslate asvar thresholds_hint with size=max_upload_mb %}netCDF, up to {{ size }} MB.{% endblocktranslate %} {% include "components/dropzone.html" with field=form.thresholds_upload hint=thresholds_hint %} {% if form.thresholds_uploaded %}

{% blocktranslate with name=form.thresholds_uploaded %}Loaded: {{ name }}. Choose another file to replace it.{% endblocktranslate %}

{% endif %} {% endif %}

{% translate "A thresholds file is only for data with no day in its base period (enter that base period below), as in Climpact for R." %}

{% translate "3. Base period" %}

{% translate "Base period" %}

{% translate "The years the percentile thresholds are calculated from. WMO's reference period is 1971 to 2000." %}

{% help_topic "gridded.base_period" %}
{% include "components/field.html" with field=form.base_start narrow=True %} {% include "components/field.html" with field=form.base_end narrow=True %}

{% translate "4. Output" %}

{% include "components/field.html" with field=form.template help="gridded.output" %}
{% include "components/field.html" with field=form.thresholds_name %}
{% include "components/field.html" with field=form.institution help="gridded.institution" %} {% include "components/field.html" with field=form.institution_id narrow=True %}
{% if form.copy_to %}{% include "components/field.html" with field=form.copy_to %}{% endif %}

{% translate "5. Indices" %}

{{ form.indices.label }}

{% translate "All are chosen; leave them all to calculate every index, as Climpact for R does when the list is empty. The heatwave, SPI and SPEI indices (marked) take most of the time." %}

{% help_topic "gridded.indices" %} {% with field=form.indices %}{% include "components/field_errors.html" %}{% endwith %}
{% for group in index_groups %}
{{ group.label }} {% for item in group.items %} {% endfor %}
{% endfor %}
{% icon "sliders" %}{% translate "Index parameters" %}{% icon "chevron-down" %}

{% translate "The parameters of the indices named after a number. The defaults are those of Climpact for R's gridded calculation." %}

{% include "components/field.html" with field=form.wsdi_days narrow=True help="param.wsdi_days" %} {% include "components/field.html" with field=form.csdi_days narrow=True help="param.csdi_days" %} {% include "components/field.html" with field=form.rx_days narrow=True help="param.rx_days" %} {% include "components/field.html" with field=form.txtn_days narrow=True help="param.txtn_days" %} {% include "components/field.html" with field=form.hdd_base narrow=True help="param.hdd_base" %} {% include "components/field.html" with field=form.cdd_base narrow=True help="param.cdd_base" %} {% include "components/field.html" with field=form.gdd_base narrow=True help="param.gdd_base" %} {% include "components/field.html" with field=form.rnnmm narrow=True help="param.rnnmm" %}

{% translate "Excess Heat Factor: Nairn and Fawcett (2013). Climpact for R's screen also lists Perkins and Alexander (2013), but its calculation accepts only Nairn and Fawcett." %}

{% icon "sliders" %}{% translate "Advanced: memory, speed and temporary files" %}{% icon "chevron-down" %}
{% if form.workers %}{% include "components/field.html" with field=form.workers narrow=True help="gridded.workers" %}{% endif %} {% include "components/field.html" with field=form.max_values narrow=True help="gridded.max_values" %} {% include "components/field.html" with field=form.rechunk %} {% if form.tmp_dir %}{% include "components/field.html" with field=form.tmp_dir %}{% endif %}
{% turnstile %}
{% translate "Start the calculation" as run_label %} {% include "components/button.html" with label=run_label type="submit" icon="play" size="lg" %}

{% translate "Gridded calculations can take from a minute to many hours, depending on the size of the grid and the computer. They run in the background: you can close this page and come back to it from Your calculations." %}

{% include "gridded/_retention.html" %}
{% csrf_token %} {% translate "Forget this run" as delete_label %} {% include "components/button.html" with label=delete_label type="submit" variant="ghost" size="sm" icon="close" %} {% translate "Choose other files" %}
{% endblock %}