{% extends "base.html" %} {% load i18n static ui %} {% block title %}{% translate "Check the stations" %}{% endblock %} {% block steps %}{% include "components/steps.html" %}{% endblock %} {% block content %}

{% translate "Check the stations" %}

{% if run.source == "sample" %}{% translate "Climpact's sample batch is loaded and checked. Choose the options below and start." %}{% elif run.metadata_name %}{% blocktranslate with name=run.metadata_name %}Loaded from {{ name }}. Every station it lists has been checked; nothing has been calculated yet.{% endblocktranslate %}{% else %}{% translate "Your files are loaded. Add the metadata file that lists the stations." %}{% endif %}

{% if job_active %} {% url 'batch:results' run.pk as results_url %}{% translate "Follow its progress" as follow_label %} {% translate "This batch 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 %} {% for problem in report.upload_problems %} {% include "components/alert.html" with kind="warning" title="" message=problem %} {% endfor %} {% if report.metadata_problem_count %} {% endif %} {% for warning in report.metadata_warnings %} {% include "components/alert.html" with kind="warning" title="" message=warning %} {% endfor %} {% if stations %}

{% translate "Stations" %}

{% translate "Listed" as listed_label %}{% include "components/stat.html" with label=listed_label value=counts.listed %} {% translate "Ready" as ready_label %}{% include "components/stat.html" with label=ready_label value=counts.ready %} {% translate "File missing" as missing_label %}{% include "components/stat.html" with label=missing_label value=counts.missing %} {% translate "With problems" as invalid_label %}{% include "components/stat.html" with label=invalid_label value=counts.invalid %}
{% if report.extra_files %}

{% blocktranslate count counter=report.extra_files|length with names=report.extra_files|join:", " trimmed %}Not in the metadata file, so not used: {{ names }}.{% plural %}Not in the metadata file, so not used: {{ names }}.{% endblocktranslate %}

{% endif %}
{% icon "table" %}{% translate "Index parameters from the metadata file" %}{% icon "chevron-down" %}
{% for station in stations %}{% with p=station.params %} {% endwith %}{% endfor %}
{% translate "Each station's parameters, as the metadata file gives them" %}
{% translate "Station" %} wsdincsdin Tb_HDDTb_CDDTb_GDD rxndayrnnmmtxtnSPEI
{{ station.name }}{{ p.wsdi_days }}{{ p.csdi_days }}{{ p.hdd_base }}{{ p.cdd_base }}{{ p.gdd_base }}{{ p.rx_days }}{{ p.rnnmm }}{{ p.txtn_days }}{{ p.spei_months }}

{% translate "As in Climpact for R, batch runs calculate no custom index." %}

{% endif %}
{% icon "upload" %}{% translate "Add or replace files" %}{% icon "chevron-down" %}
{% csrf_token %} {% include "components/form_errors.html" with form=add_form %} {% blocktranslate asvar files_hint with size=max_upload_mb %}Up to {{ size }} MB in all.{% endblocktranslate %} {% include "components/dropzone.html" with field=add_form.station_files hint=files_hint multiple=True %}

{{ add_form.station_files.help_text }}

{% include "components/field.html" with field=add_form.metadata_file help="batch.metadata_file" %} {% turnstile %}
{% translate "Load and check again" as add_label %} {% include "components/button.html" with label=add_label type="submit" variant="secondary" icon="refresh" %}

{% translate "Options and start" %}

{% csrf_token %} {% include "components/form_errors.html" with form=options %} {% include "batch/_options.html" %} {% if counts.ready %}{% turnstile %}{% endif %}
{% if counts.ready %} {% blocktranslate count counter=counts.ready asvar run_label trimmed %}Calculate {{ counter }} station{% plural %}Calculate {{ counter }} stations{% endblocktranslate %} {% include "components/button.html" with label=run_label type="submit" icon="play" size="lg" %} {% else %} {% translate "No station is ready" as run_label %} {% include "components/button.html" with label=run_label type="submit" icon="play" size="lg" disabled=True %} {% endif %}
{% if counts.ready and not_ready %}

{% blocktranslate count counter=not_ready trimmed %}{{ counter }} station with a missing file or problems will be left out, and listed with its reasons in the results and the zip.{% plural %}{{ counter }} stations with missing files or problems will be left out, and listed with their reasons in the results and the zip.{% endblocktranslate %}

{% elif not counts.ready %}

{% translate "Load the missing files, or correct the files with problems and load them again, to start." %}

{% endif %}
{% include "batch/_retention.html" %}
{% csrf_token %} {% translate "Delete these files now" as delete_label %} {% include "components/button.html" with label=delete_label type="submit" variant="ghost" size="sm" icon="close" %} {% translate "Start again with another batch" %}
{% endblock %}