HELP with - Environmental Agency (FCRM) free test case n.8a

72 views
Skip to first unread message

marta

unread,
Apr 29, 2020, 6:44:41 AM4/29/20
to Itzï
Hi Laurent,

first of all.. a BIG thank you for ITZI and the fact that is open source!!! I'm a PhD student and I'm looking to explore/add the pollution tracking capacity of Itzi. 

But before getting there I need to understand how the combined model works, so I've been trying to reproduce the test case n.8a as you did in your paper: http://doi.org/10.5194/gmd-10-1835-2017.

I managed to run Itzi without errors, but I've got some problems/questions:

1) 2D model: the DEM elevation doesn't change very much (btw 21m and 37m) so when I'm creating the watershed I need a threshold of at least 10k to get the majority of the area (see pic 'watershed') with an outlet point on the left of the screen (263984, 664622), and the stream in black. Is it right? Or should I create smaller watersheds and linked them somehow? (like the outlet point of an upstream watershed can be the beginning or another watershed). Also I created the friction raster map giving a different value for road/pavements and the rest;

2) Rain sequence: I went through t.create and t.register for strdb (which perfectly works with the North Carolina sample data), but in my case, after creating the raster with r.mapcalc, when I what to register them it gives this error:

t.register -i --overwrite maps=rain_0@8a,rain_1@8a,rain_2@8a,rain_3@8a,rain_4@8a,rain_5@8a start=2020-04-01 00:00:00 +0005
Gathering map information...
ERROR: Unable to execute :
SELECT  start_time  , id  , end_time  FROM raster_absolute_time WHERE id = 'rain_0@8a';
ERROR: invalid literal for int() with base 10: '00+00'

for the sake of the test I ignored this step and went for a single rain raster map = 100

3) Drainage: once I run Itzi with the drainage file from SWMM it looks like the 2 systems are interacting somehow but I don't see the shallow inundation originating from the point source.

Attached the raster with h_max after running the parameter_file_phase_1, both parameter files (phase_1 and phase_2), the SWMM file, and the statistics from Itzi.

I'm not used to read Itzi statistics but I'm pretty sure something is wrong after phase_1 already, if you could have a look and give me your feedback it would be fantastic!

thank you very much,
looking forward to hearing from you
Marta
watershed.JPG
h_max.JPG
parameter_file_phase1_and_2.JPG
simulation_8a_rain_10k.csv
simulation_8a_drainage.csv
8a_test.inp

Laurent C.

unread,
May 1, 2020, 11:57:20 PM5/1/20
to marta, Itzï
Hi Marta,

Adding the pollution tracking to Itzï seems a very interesting topic! Do you plan to couple it to the pollutants functions of SWMM?
If you wish to reproduce the EA test cases, I recommend reading the test description in the EA report SC120002 from Néelz and Pender (you can download it with the data on the EA web site). For instance, tests 8a and 8b do not have surface outlet. If you use the drainage network, it is test 8b.

About your specific questions:
1. I do not understand what you mean by needing "a threshold of at least 10k to get the majority of the area". I also do not understand what is your issue here. Could you please clarify?
2. I seems that you need the put your start date into quotation marks. However, I recommend using an input text file with the start and end time of each of your maps. It is usually easier.
3. I do not see any obvious issue in your configuration file, but there is an obvious instability during the simulation (as denoted by the high error %). You may try to follow strictly the test case 8b description (domain definition, rainfall etc.), to have a baseline to compare with.

Regards,
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 view this discussion on the web, visit https://groups.google.com/d/msgid/itzi/b586ffa4-ba36-4a43-824b-7983c579b2d2%40googlegroups.com.

marta

unread,
May 4, 2020, 5:44:36 AM5/4/20
to Itzï
Hi Laurent,

thank you very much for your quick reply. I'm planning to add to Itzi something similar to the pollutants functions of SWMM but with point source pollution. I did read the EA report from Néelz and PenderI, but my background is not related to hydrology so I may have some difficulties in understanding how to use the data. I will try to explain myself a bit better:

1. I tried to recreate the step to run a simulation in Itzi explained in the tutorial: to create a raster mask and boundary condition maps I need to create a watershed with an outlet point, a vector map with the watershed outlet point, and then using the vector map to create 2 raster maps for boundary conditions. So I thought I needed to find a watershed and an outlet point for test 8a/8b.

2. even with the text file with start/end time of each map I get the same error, I'll try again with a completely different project and I'll see;

3. I did create a drainage network for test 8a with just 1 junction (J1) and a fake outfall point (for the sake of SWMM) for 2 reasons: i) in your paper, regarding test 8a, you mention that: "the flood is assumed to arise from two sources, a uniformly distributed rainfall and a point inflow representing a sewer outflow from a surcharging culvert."; ii) among the data available for test 8a there is an excel file named "Test8A-point-inflow" with inflow discharge (m^3/s), that I added in SWMM to my junction J1 > Inflows > Time series (see pic attached). I'm not sure I would've known how to add the inflow data to Itzi without the drainage file.

thanks again for your help, I'll start to work on test 8b as well.

Regards,
Marta
time_serie_inflow.PNG

Laurent C.

unread,
May 5, 2020, 12:58:23 AM5/5/20
to marta, Itzï
Hi Marta,

1. In case of test 8a and 8b, no need to draw a watershed. Just use the DEM after coarsening, without any mask or boundary condition. The original comes at 50cm, and the test is run at 2m. You can just change the grass region, or use r.resamp.stats to be more precise. All boundaries are closed, so the water will accumulate in the domain.
2. The GRASS temporal framework could be a bit finicky.  Sometime starting over could help.
3. Test 8a does not include a sewer model. It is just a point inflow, set with the "inflow" keyword of the itzi configuration file. Interpolating in time the inflow (with the GRASS temporal tools) could help the stability of the simulation.

I attach the INP for test 8b, but try first test 8a before attempting test 8b.

Best regards,
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.
test8b_drainage_ponding.inp

marta

unread,
May 11, 2020, 6:47:36 AM5/11/20
to Itzï
Hi Laurent,

1. All good
2. Starting over did help and I succeed in registering a strds for rain, where raster map rain_0 and rain_01 = 0; rain_400 = 400 (mm/h):
t.rast.list input=rain_serie2
name|mapset|start_time|end_time
rain_0|PERMANENT|2020-04-01 00:00:00|2020-04-01 00:01:00
rain_400|PERMANENT|2020-04-01 00:01:00|2020-04-01 00:04:00
rain_01|PERMANENT|2020-04-01 00:04:00|2020-04-01 01:23:00

3. About the inflow point, my understanding is that I need to create a strds made of raster maps having values only in the cell where the inflow point is located. These are the steps I followed:

echo '264896|664747' > inflow.txt
v.in.ascii input=~/.../inflow.txt output= inflow
v.to.rast input=inflow type=point use=val output=inf_xx value=x.xxxxx //following the excel file Test8A-point-inflow for values converted in m/s (attached)
create txt file inflow_serie with maps name + time = inflow_serie.csv  (attached)
t.create type=strds temporaltype=absolute output=inflow_serie
t.register input=inflow_serie file=~/.../inflow_serie.csv type=raster
update parameter file = parameter_file2 (attached)

Then I run itzi with parameter_file2 and this is the error I get: GrassError: Error executing: Rast_get_ith_cat (attached the full description of warning/error + an extract from Category.py) I don't have a coding background so this is as far as I can go.

4. Additional question: how do you get statistical data from the 9 output point locations? Is it something to be added to the parameter file next to "stats_file=..."?

Again thank you very much for your help and support,
Marta
parameter_file2
inflow_serie.csv
Test8A-inflow-location.csv
Error executing_Rast_get_ith_cat
category.py extract

marta

unread,
May 11, 2020, 7:04:11 AM5/11/20
to Itzï
sorry I attached the wrong file (Test8A-inflow-location), here the Test8A-point-inflow.

Kind regards
Marta
To unsubscribe from this group and stop receiving emails from it, send an email to it...@googlegroups.com.
Test8A-point-inflow.csv

Laurent C.

unread,
May 11, 2020, 7:01:31 PM5/11/20
to marta, Itzï
Hi Marta,

3. The process creating the STRDS seems OK. Could you please provide the output of:
- r.univar and r.info of one of the map of the series
- run itzi with "itzi run -vv". It will display many debug messages which can help us understand what is wrong.

4. The GRASS tool t.rast.what output the time series at the given vector points.

Regards,
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.

marta

unread,
May 12, 2020, 4:42:59 AM5/12/20
to Itzï
Hi Laurent,

of course, attached

thanks!!
M

r.info_inf_29
r.univar_inf_29
run_itzi_vv

Laurent C.

unread,
May 15, 2020, 1:33:12 PM5/15/20
to marta, Itzï
Hi Marta,

That was a tricky one but I ran into the same problem today, and I resolved it by replacing the null cells with a value (here, zero). You can do that with r.null.

Best,
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.

marta

unread,
May 19, 2020, 6:15:43 AM5/19/20
to Itzï
Hi Laurent,

yes it works! Thank you!!!

Last questions (I hope!)

I can run the entire simulation but I still have anomalies around the rain strds, If you look at the stats file (test8a_rain_inflow) I have highlighted the numbers showing anomalies. Also I created 2 charts with output values for point 1 and 7 and you can see the results are similar to yours in your paper, but volumes of water during the first minutes of simulation are too high.

Also, for some reasons, the simulation doesn't create a raster map for water depth at time 0 and 1 as it does for water velocity:
From the parameter file:
[output]
prefix = test8a_inflow
values = h, v
The water depth series starts with test8a_inflow_h_0002, while It does generate test8a_inflow_v_0000 and test8a_inflow_v_0001.
Also I noticed that the simulation intervals do not match the time series perfectly: rain series starts at minute 2 instead of 1 and the inflow series starts at minute 24 instead of 23 and they both end 1 minute later than they should (see rain_serie and inflow_serie).

If I remove the time series for rain and instead I simply use a raster map with 400 as a value for the entire simulation, I get less anomalies but the error's value at minute 1 is still high (see attached file rain=400).

LAST question, in test 8b do I need to add anything to the parameter file to allow Itzi to read the drainage data (I'm using your drainage file)? The simulation runs with all values = 0:

[time]
start_time = 2020-04-01 00:00
end_time = 2020-04-01 01:23
record_step = 00:01:00

[input]
dem = Test8DEM@PERMANENT
friction = n_b_r@PERMANENT

[output]
prefix = test8b
values = h, v

[statistics]
stats_file = test8b.csv

[drainage]
swmm_inp = test8b_drainage_ponding.inp
output = test8b_drainage

Thank you again.
Best,
Marta
test8a_rain_inflow.ods
test8a_rain_inflow_rain=400.ods
output_point_1.png
output_point_7.png
inflow_serie3
rain_serie_2.csv
parameter_file2

marta

unread,
Jun 15, 2020, 3:15:35 AM6/15/20
to Itzï
Hi Laurent,

apologies for writing to you again, the last weeks must have been very busy for you with the new Itzi release.

I've run the system few other times and the anomalies about the rain strds are significantly lower if I move it in the middle or the end of the simulation. Basically any time after the inflow has started and everything runs smoother. I'll do some other tests when I start modelling my study area (located in Glasgow).

Unfortunately still no success with the coupled model of test 8b.  do I need to add anything to the parameter file to allow Itzi to read the drainage data (I'm using your drainage file)? The simulation runs with all values = 0:

Laurent C.

unread,
Jun 15, 2020, 8:44:21 AM6/15/20
to marta, Itzï
Hi Marta,

Test 8a is a bit challenging and requires tweaking the flow routing options. See attached input file.
What is exactly your issue with test 8b?

Regards,
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.
ea2dt8a.ini
Reply all
Reply to author
Forward
0 new messages