User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2021-02-17 14:04:39

sua87
User
From: Bern
Registered: 2017-05-26
Posts: 21

XDMF creation in cmd-line

I put this under outputs, since it is not a proper bug, but I found a minor inconvenience in Basement v3.1 (windows version): When the results are exported using the GUI, all goes well. However, when I do the same for a simulation using a bat-script, the path to the results are still hardcoded in the resulting xdmf.
Could this be implemented in the next release? It would be nice not having the change the xdmfs manually before importing the data to QGIS.
Many thanks!

Last edited by sua87 (2021-02-17 14:05:27)

Offline

#2 2021-02-22 18:28:17

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: XDMF creation in cmd-line

I am having the same issue, but I did not notice it beacuse I am never using the GUI.

I think it might be worth to be put under bugs.

Last edited by Matteo Facchini (2021-02-22 18:29:00)

Offline

#3 2021-03-01 22:53:00

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: XDMF creation in cmd-line

If I am not mistaken, the path/filename in the xdmf is the exact string provided to the "-r" flag of the results executable.

For example the call:

BMv3_BASEplane_results.exe -f .\results.json -r .\results.h5 

will results in ".\results.h5" being written into the xmdf file. However, the following call should result in only the filename "results.h5" in being written to the xdmf:

BMv3_BASEplane_results.exe -f results.json -r results.h5 

If this does not solve the issue, then please post a quick example of the problem.

Best
Matthias

EDIT:
If you call the executable from outside the scenario directory and therefore have to provide a relative or absolute path to the files, this path will be written to the xdmf. However, this behaviour is intended to give the user more control.

Offline

#4 2021-03-02 15:54:39

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: XDMF creation in cmd-line

Hey Matthias

everything works as you describe it.

What I do now (under windows 10) is to create batch files that have this line

cd path/to/dir

before the results command. By doing so I can write something like

"C:\Program Files\BASEMENT 3.1.0\bin\BMv3_BASEplane_results.exe" -f results.json -r results.h5 -o output

And the output will be written without the path!

Offline

Board footer

Powered by FluxBB