Systemverkleinerung zur Rechenzeitverkürzung/en: Unterschied zwischen den Versionen

Aus TALSIM Docs
(Die Seite wurde neu angelegt: „Test“)
 
(Die Seite wurde neu angelegt: „Especially gridded models in TALSIM-NG often include many system elements and time series. A large number of system elements and time series means a long calcu…“)
 
(2 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
<languages/>
<languages/>
<div lang="de" dir="ltr" class="mw-content-ltr">
{{Navigation|vorher=|hoch=Parameterschätzung und Kalibrierung|nachher=Kalibrierung des Bodenwasserhaushaltes}}
Gerade bei gerasterten Modellen in TALSIM-NG kommen schnell viele Elemente und Zeitreihen zusammen. Eine große Anzahl an Elemente und Zeitreihen bedeutet eine lange Rechenzeit. Zur Rechenzeitverkürzung und zur einfacheren Handhabung kann es notwendig sein das betrechtete Modelsystem zu verkleinern. Beispielsweise bei der Kalibrierung möchte man schnell Ergebnisse für das betrachtete Teileinzugsgebiete erhalten, ohne dabei bei jedem Kallibrierungslauf das Gesamtsystem zu berechnen. Wie ein rasterbasiertes Modell verkleinert werden kann, wird im Folgenden erklärt.
Especially gridded models in TALSIM-NG often include many system elements and time series. A large number of system elements and time series means a long calculation time. To shorten the calculation time and for easier handling, it may be necessary to reduce the size of the model system. For example, during calibration, it is important to quickly obtain results for the specific sub-catchment without having to compute the entire system for each calibration run. The downscaling of a grid-based model is explained in the following.
</div>


==Approach==


<div lang="de" dir="ltr" class="mw-content-ltr">
# Simulate project in the TALSIM-NG GUI so that the time series are stored locally in the project folder and do not have to be obtained from the server for each simmulation. Once the simulation is complete, the time series are stored in <code>C:\Talsim-NG\Customers\''[ProjektName]''\projectData\''[UserName]''\dataBase\''[UserName]''_zre</code> <br> Die Text passages in the path in square brackets depend on the user and the project.
== Vorgehen ==
# Export the data set to the [[Special:MyLanguage/ASCII-Datensatz|ASCII]] format.
</div>
# Change the path in the [[Special:MyLanguage/EXT-Datei|EXT-File]]. The path must lead to the folder where the time series are located. [[Datei:ChangeEXTPath.png|mini|Paths in the EXT that point to the time series folders]]
# In this step, a list of the keys that are relevant for the downsized system is created. The list should be created in Excel. It must contain all keys of the system elements ([[Special:MyLanguage/Einzugsgebiet|sub-basin]], [[Special:MyLanguage/Transportstrecke|transport reach]], [[Special:MyLanguage/Einleitung|point source]] etc.) that are located in the subsystem under consideration. There are two ways to create the list:
## In the user interface, select the last transport element of the sub-basin and use ''Right click - Select upstream elements'' to select all system elements above. Then open ''System - Edit element - Sub-Basin'' in the toolbar and copy the list of keys. Afterwards, the process must be repeated for all other system element types present in the sub-area.
## If the model has been created with Talsim.GridIO and the system has been transferred to a GIS project as described in [[Special:MyLanguage/ASCII Dateien in GIS Projekt laden|Load Talsim.GridIO files into GIS project]] the relevant elements can also be obtained via the attribute tables of the cells and transport elements.
#Copy and paste [[Special:MyLanguage/SYS-Datei|SYS-File]] into Excel without specifying a separator.
# Using <code>MID()</code> the key can be extracted from each SYS line in Excel.[[Datei:MatchKey.png|mini|Search for the rows containing relevant system elements in Excel]]
# Using <code>MATCH()</code> or <code>VLOOKUP()</code> and a filter in Excel, only the relevant SYS rows can be displayed.
# In the last step, the manipulated SYS lines are copied to the [[Special:MyLanguage/SYS-Datei|SYS-Datei]] eingefügt


<div lang="de" dir="ltr" class="mw-content-ltr">
Steps 5 to 8 can also be performed using scripting languages such as Python or R.
# Projekt in der TALSIM-NG GUI simulieren, damit die Zeitreihen lokal im Projektordner gespeichert werden und nicht bei jeder Simmulation vom Server bezogen werden müsse. Die Zeitreihen liegen nach der Simulation in <code>C:\Talsim-NG\Customers\''[ProjektName]''\projectData\''[UserName]''\dataBase\''[UserName]''_zre</code> <br> Die Textstellen in eckigen Klammern hängen vom Nutzer und vom Projekt ab.
# Exportieren des Datensatzes in das [[Special:MyLanguage/ASCII-Datensatz|ASCII]] Format.
# Änderung des Pfades in der [[Special:MyLanguage/EXT-Datei|EXT-Datei]]. Der Pfad muss auf den Ordner schauen, in dem die Zeitreihen liegen. [[Datei:ChangeEXTPath.png|mini|Pfade in der EXT die auf die Zeitreihenordner verweisen]]
# In diesem Schritt wird eine Liste der Keys angelegt, die für das verkleinerte System relevant sind. Die Liste sollte in Excel angelegt werden. Sie muss alle Keys der Systemelemente ([[Special:MyLanguage/Einzugsgebiet|Einzugsgebiete]], [[Special:MyLanguage/Transportstrecke|Transportstrecken]], [[Special:MyLanguage/Einleitung|Einleitungen]] etc.) enthalten, die in dem betrachteten Teilsystem liegen. Hier sind zwei Wege möglich:
## In der Benutzeroberfläche das letzte Transportelement des Teilgebiets auswählen und mit ''Rechtsklick - Select upstream elements'' alle Systemelemente oberhalb auswählen. Anschließend in der Symbolleiste ''System - Edit element - Sub-Basin'' öffnen und die Liste der Keys kopieren. Anschließend muss der Prozess für alle anderen im Teilgebiet vorhandenen Systemelementtypen wiederholt werden.
## Wenn das Modell mit Talsim.GridIO erstellt wurde und das System wie unter [[Special:MyLanguage/ASCII Dateien in GIS Projekt laden|ASCII Dateien in GIS Projekt laden]] beschrieben in eine GIS-Projekt übertragen wurde, lassen sich die relevanten Elemente auch über die Attributtabellen der Zellen und Transportelemente erhalten.
# [[Special:MyLanguage/SYS-Datei|SYS-Datei]] kopieren und in Excel einfügen, ohne ein Trennzeichen anzugeben.
# Mittels <code>MID()</code> kann aus jeder SYS Zeile in Excel der Key extrahiert werden.[[Datei:MatchKey.png|mini|Finden der Zeilen die relevante Systemelemente enthalten in Excel]]
# Über <code>MATCH()</code> bzw. <code>VLOOKUP()</code> und einen Filter in Excel können nur die relevanten SYS Zeilen angezeigt werden.
# Im letzten Schritt werden die manipulierten SYS Zeilen in die [[Special:MyLanguage/SYS-Datei|SYS-Datei]] eingefügt
</div>
 
<div lang="de" dir="ltr" class="mw-content-ltr">
Die Arbeitsschritte 5 bis 8 lassen sich auch mit Skriptsprachen wie Python oder R ausführen.
</div>

Aktuelle Version vom 13. September 2022, 09:59 Uhr

Sprachen:

Especially gridded models in TALSIM-NG often include many system elements and time series. A large number of system elements and time series means a long calculation time. To shorten the calculation time and for easier handling, it may be necessary to reduce the size of the model system. For example, during calibration, it is important to quickly obtain results for the specific sub-catchment without having to compute the entire system for each calibration run. The downscaling of a grid-based model is explained in the following.

Approach

  1. Simulate project in the TALSIM-NG GUI so that the time series are stored locally in the project folder and do not have to be obtained from the server for each simmulation. Once the simulation is complete, the time series are stored in C:\Talsim-NG\Customers\[ProjektName]\projectData\[UserName]\dataBase\[UserName]_zre
    Die Text passages in the path in square brackets depend on the user and the project.
  2. Export the data set to the ASCII format.
  3. Change the path in the EXT-File. The path must lead to the folder where the time series are located.
    Paths in the EXT that point to the time series folders
  4. In this step, a list of the keys that are relevant for the downsized system is created. The list should be created in Excel. It must contain all keys of the system elements (sub-basin, transport reach, point source etc.) that are located in the subsystem under consideration. There are two ways to create the list:
    1. In the user interface, select the last transport element of the sub-basin and use Right click - Select upstream elements to select all system elements above. Then open System - Edit element - Sub-Basin in the toolbar and copy the list of keys. Afterwards, the process must be repeated for all other system element types present in the sub-area.
    2. If the model has been created with Talsim.GridIO and the system has been transferred to a GIS project as described in Load Talsim.GridIO files into GIS project the relevant elements can also be obtained via the attribute tables of the cells and transport elements.
  5. Copy and paste SYS-File into Excel without specifying a separator.
  6. Using MID() the key can be extracted from each SYS line in Excel.
    Search for the rows containing relevant system elements in Excel
  7. Using MATCH() or VLOOKUP() and a filter in Excel, only the relevant SYS rows can be displayed.
  8. In the last step, the manipulated SYS lines are copied to the SYS-Datei eingefügt

Steps 5 to 8 can also be performed using scripting languages such as Python or R.