<!--
/*****************************************************************************/
/*  Copyright 2019 WSL Institute for Snow and Avalanche Research  SLF-DAVOS  */
/*****************************************************************************/
/* This file is part of INIshell.
INIshell is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

INIshell is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with INIshell.  If not, see <http://www.gnu.org/licenses/>.
*/
-->

<!--
This is an example simulation configured to be controlled by INIshell.
It is included from "weissfluhjoch.xml". The whole <workflow> ... </workflow> node
could also be put into "weißfluhjoch.xml" instead of <include file="workflow_wfj.xml"/>.
-->

<inishell_include> <!-- marks this file as an INIshell include file -->
	<workflow> <!-- control elements go in the workflow part of the XML, and therefore in INIshell's workflow panel -->
		<section caption="Weißfluhjoch">
			<element type="label" caption="&lt;b&gt;Weißfluhjoch 1996&lt;/b&gt;"/>
			<element type="label" caption="End date:"/>
			<element id="end_date_wfj" type="datetime" default="1996-06-17T00:00"/> <!-- a date picker that can be referenced by it's ID via %end_date_wfj -->
			<element type="label" caption="INI file:"/>
			<element id="ini_wfj" type="text" default="simulations/example_simulation/io_res5exp.ini"/> <!-- hardcoded INI file path referenced by %ini_wfj -->
			<element caption="Run experiment" type="button">
				<command>snowpack -c %ini_wfj -e %end_date_wfj</command> <!-- 1st command the button runs (a system command) -->
				<command>setpath(%meteo_out, simulations/example_simulation/output)</command> <!-- 2nd command the button runs (referencing an INIshell control) -->
			</element>
			<element type="label" caption="&lt;hr&gt;Open niViz in browser:"/>
			<element type="button" caption="Open niViz">
				<command>openurl(https://run.niviz.org)</command>
			</element>
			<element type="label" caption="Drag a simulation result into niViz from the listing below (*.smet file, *.pro file):"/>
			<element type="path" id="meteo_out"/> <!-- this ID is referenced abve by the 2nd command of the 1st button -->
		</section>
	</workflow> <!-- end of the included workflow; other XMLs may include additional tabs -->
</inishell_include>
