Tutorial: Run simulation error

48 views
Skip to first unread message

eikene...@gmail.com

unread,
Mar 23, 2019, 1:33:36 PM3/23/19
to Itzï
Hi,

I'm trying to go through the tutorial and finding it hard to run the simulation after having created the parameters file. I have tried using both a xml file (called simulation_test.xml) and a txt file (called titzi.txt) without any luck as one can see below. Im new to both itzi and scripting in general. Does anyone know what the error might be? 

GRASS 7.6.0 (nc_spm_08_grass7):~ > itzi run /home/ubuntu/grassdata/nc_spm_08_grass7/simulation_test.xml
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/itzi", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/.local/lib/python2.7/site-packages/itzi/itzi.py", line 53, in main
    args.func(args)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/itzi/itzi.py", line 262, in itzi_run
    conf = ConfigReader(conf_file)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/itzi/configreader.py", line 36, in __init__
    self.set_entry_values()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/itzi/configreader.py", line 74, in set_entry_values
    self.read_param_file()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/itzi/configreader.py", line 93, in read_param_file
    f = params.read(self.config_file)
  File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /home/ubuntu/grassdata/nc_spm_08_grass7/simulation_test.xml, line: 1
'{\\rtf1\\ansi\\ansicpg1252\\cocoartf1671\n'
[Raster MASK present]

GRASS 7.6.0 (nc_spm_08_grass7):~ > itzi run /home/ubuntu/grassdata/nc_spm_08_grass7/titzi.txt
ERROR: accepted combinations: duration alone, start_time and duration, start_time and end_time                    
[Raster MASK present]



Here is the content of the parameters file I wrote manually:

[time]
duration = 02:00:00
record_step = 00:05:00

[input]
dem = elev_lid792_5m@PERMANENT
friction = n@PERMANENT
rain = rain@PERMANENT
bctype = bctype@PERMANENT
bcval = bcvalue@PERMANENT

[output]
prefix = nc_itzi_tutorial
values = h, wse, v, vdir, boundaries

[statistics]
stats_file = nc_itzi_tutorial.csv 


Best regards,
Sindre

Laurent C.

unread,
Mar 23, 2019, 7:19:30 PM3/23/19
to eikene...@gmail.com, Itzï
Hi Sindre,

By the look of the error it seems that you wrote the parameter file as a formatted document (RTF?). You should use a plain text file.
Do NOT use a word processor.
DO use a text editor like notepad, gedit, VScode etc.

I hope this help.

Laurent


--
You received this message because you are subscribed to the Google Groups "Itzï" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itzi+uns...@googlegroups.com.
To post to this group, send email to it...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/itzi/7a391062-a5ee-44ab-a08c-d3f5c33668a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

eikene...@gmail.com

unread,
Mar 26, 2019, 11:49:11 AM3/26/19
to Itzï
Hi Laurent,

That was it, thank you! I will probably be back with more questions soon since I am planning to do an analysis of flood in Bergen, Norway in my masters thesis:)

Sindre
Reply all
Reply to author
Forward
0 new messages