RE: DEM Problem

176 views
Skip to first unread message

Max Shaw

unread,
May 27, 2024, 7:29:35 AM5/27/24
to caesar-lisflood
Hi everyone

I’m trying to operate the CEASER-Lisflood hydrological model for my dissertation project but I’m struggling with a certain technical aspect which I have been trying to tackle this past week.

I have extracted my DEM from EDINA Digimap and I am now trying to open it into the model via config file. I know that the raw DEM raster requires editing and correcting before running a model simulation. 

So far, I have converted my DEM data into an ascii raster format via QGIS which consists of a 6-line header, but still I keep getting an error message when trying to config file load. The asc file is attached. 

I keep getting the same two error messages that read “Element ‘Parms’ was not found. Line 1, position 2.” and "Data at the root level is invalid, Line 1 Position 1". I have looked at the script and cant seem to find a problem when comparing to the quickstart examples?!

I have also been trying to modify the DEM in ‘RasterEdit’ and ‘DEMedit’ but this failed on multiple attempts.  After attempting all this I’m still struggling to successfully input my DEM file into the model.  

Any help and expertise would be greatly appreciated as I’m currently at a standstill with my project. I will be very thankful for any support you can provide. 
Screenshot 2024-05-27 092556.png
Converted.ASC.xml
Screenshot 2024-05-15 201100.png

Tom Coulthard

unread,
May 27, 2024, 7:55:15 AM5/27/24
to caesar-...@googlegroups.com
Are you using the attached xml to load up the model params? Because if so it’s the wrong one - that’s an xml made by QGis not the config file for CL

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> on behalf of Max Shaw <maxsh...@gmail.com>
Sent: Monday, May 27, 2024 12:29:35 PM
To: caesar-lisflood <caesar-...@googlegroups.com>
Subject: RE: DEM Problem
 
--
You received this message because you are subscribed to the Google Groups "caesar-lisflood" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caesar-lisflo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caesar-lisflood/1c826b3a-79c8-4f13-b078-4d8b208e73c7n%40googlegroups.com.

Max Shaw

unread,
May 27, 2024, 8:57:16 AM5/27/24
to caesar-...@googlegroups.com
Sorry Tom, I attached the wrong file. This is the file I'm trying to import. Atm I'm just trying to successfully insert the DEM before I add any parametre data in.

tom.co...@gmail.com

unread,
May 28, 2024, 6:02:30 AM5/28/24
to caesar-...@googlegroups.com

Hi Max – your DEM is huge… 25 million cells.. This may be the problem – though at present its too large to load to tell!

I’d start by resampling this to 10m then work towards the finer resolution as you gain confidence in your model setup.

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Max Shaw
Sent: 27 May 2024 13:57
To: caesar-...@googlegroups.com
Subject: Re: DEM Problem

 

Sorry Tom, I attached the wrong file. This is the file I'm trying to import. Atm I'm just trying to successfully insert the DEM before I add any parametre data in.

~WRD000.jpg

Max Shaw

unread,
Jun 3, 2024, 1:00:07 PM6/3/24
to caesar-...@googlegroups.com
Hi Tom

I spent the last week trying to solve my problem before I got back to you. Firstly, I tried to obtain 10m resolution cells from EDINA Digimap and Defra Lidar Data page but this only allowed 2m res. It also only let me extract data for the entire grid tile which is why it was 25 million cells in size. I then created a polygon layer for my AOI that I created in GIS to be clipped to the DEM data in order to reduce the number of cells. I then converted the clipped DEM into ASCii format which is now 7474 cells but still I keep getting the same error message. Attached is the new converted clipped file. I would be greatly appreciative if you could have a look and let me know what you think. 

Best wishes
Max

MSc_DEM.asc

tom.co...@gmail.com

unread,
Jun 4, 2024, 4:18:07 AM6/4/24
to caesar-...@googlegroups.com

Hi Max,

OK, so a couple of things. The nodata values need to be -9999 not -8888 (which yours were for some reason..) anyway find and replace changed those. I managed to load the DEM fine in the reach mode example – but had to change the co-ordinates of the input points in the hydrology tab as they were outside of the much smaller DEM you have now. BTW,  this didn’t look quite right – like it was part of a bend rather than a reach.

image001.jpg
mysavedimage1.png

tom.co...@gmail.com

unread,
Jun 4, 2024, 4:19:18 AM6/4/24
to caesar-...@googlegroups.com
image001.jpg
image002.jpg

Max Shaw

unread,
Jun 4, 2024, 3:20:17 PM6/4/24
to caesar-...@googlegroups.com
Hi Tom

Thanks for getting back to me, it is much appreciated. The nodata values have now been set at -9999 (I think I typed 8888 and did not check) and I have changed my dem to a straighter reach lower down in the river. Attached is the file. However, when I still try to load the dem file into the model it keeps saying 'data at the root level is invalid, line 1, position 1'. When I cross reference and check my 6 line header ascii dem file with the examples I don't see any difference/problems?

converted_dem.asc

Max Shaw

unread,
Jun 5, 2024, 6:08:57 AM6/5/24
to caesar-lisflood
Hi Tom. I clipped my dem in arcgis as opposed to qgis for my new reach file and converted the clipped raster to ascii thinking this would now open in the model. The same message keeps popping up which is attatched. Any suggestions? 

Best wishes
Max.

con_arc_dem.asc
Screenshot 2024-06-05 110822.png

tom.co...@gmail.com

unread,
Jun 5, 2024, 8:11:17 AM6/5/24
to caesar-...@googlegroups.com

Max – its working fine for me!

Used this config file in the reach mode quickstart examples… make sure all your files are in the same folder as the .exe.

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Max Shaw
Sent: 05 June 2024 11:09
To: caesar-lisflood <caesar-...@googlegroups.com>
Subject: Re: DEM Problem

 

Hi Tom. I clipped my dem in arcgis as opposed to qgis for my new reach file and converted the clipped raster to ascii thinking this would now open in the model. The same message keeps popping up which is attatched. Any suggestions? 

 

Best wishes

Max.

On Tuesday, June 4, 2024 at 8:20:17 PM UTC+1 Max Shaw wrote:

Hi Tom

 

Thanks for getting back to me, it is much appreciated. The nodata values have now been set at -9999 (I think I typed 8888 and did not check) and I have changed my dem to a straighter reach lower down in the river. Attached is the file. However, when I still try to load the dem file into the model it keeps saying 'data at the root level is invalid, line 1, position 1'. When I cross reference and check my 6 line header ascii dem file with the examples I don't see any difference/problems?

 

On Tue, Jun 4, 2024 at 9:19 AM <tom.co...@gmail.com> wrote:

Image removed by sender.

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Max Shaw
Sent: 03 June 2024 18:00
To: caesar-...@googlegroups.com
Subject: Re: DEM Problem

 

Hi Tom

 

I spent the last week trying to solve my problem before I got back to you. Firstly, I tried to obtain 10m resolution cells from EDINA Digimap and Defra Lidar Data page but this only allowed 2m res. It also only let me extract data for the entire grid tile which is why it was 25 million cells in size. I then created a polygon layer for my AOI that I created in GIS to be clipped to the DEM data in order to reduce the number of cells. I then converted the clipped DEM into ASCii format which is now 7474 cells but still I keep getting the same error message. Attached is the new converted clipped file. I would be greatly appreciative if you could have a look and let me know what you think. 

 

Best wishes

Max

 

On Tue, May 28, 2024 at 11:02 AM <tom.co...@gmail.com> wrote:

Hi Max – your DEM is huge… 25 million cells.. This may be the problem – though at present its too large to load to tell!

I’d start by resampling this to 10m then work towards the finer resolution as you gain confidence in your model setup.

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Max Shaw
Sent: 27 May 2024 13:57
To: caesar-...@googlegroups.com
Subject: Re: DEM Problem

 

Sorry Tom, I attached the wrong file. This is the file I'm trying to import. Atm I'm just trying to successfully insert the DEM before I add any parametre data in.

~WRD000.jpg
image001.jpg
reach2.xml

Max Shaw

unread,
Jun 5, 2024, 10:28:25 AM6/5/24
to caesar-lisflood
Hi Tom, all my files used for this project are in the 'CAESER-Lisflood 2.0.exe' folder and it still keeps saying the same error 'line 1, position 1'. Am I missing something very obvious here? Attatched is an image of my working directory.  I'm following all the correct steps and it still wont accept my DEM file?
Screenshot 2024-06-05 152658.png

Tom Coulthard

unread,
Jun 5, 2024, 11:48:33 AM6/5/24
to caesar-...@googlegroups.com
Random one - but are the language settings on your pc UK? I’ve had an issue before when set to French where the . Is replaced by the , 

Sent: Wednesday, June 5, 2024 3:28:25 PM
To: caesar-lisflood <caesar-...@googlegroups.com>
Subject: Re: DEM Problem
 

Max Shaw

unread,
Jun 5, 2024, 12:42:08 PM6/5/24
to caesar-...@googlegroups.com
Hi tom, I read this on the discussion page and double checked for that but it didn't seem to be the problem. 

I've done every step required to successfully load the DEM file in. It is in the ascii 6 header form which was converted in arcgis. The number of cells has been reduced and the resolution is now at 10m cells. All my work is in the .exe directory of the C-L download file. The dem file I'm using is now a 'straight' reach and not on a meander. I have successfully clipped a polygon layer pertaining to my AOI from the environment agencies 'LIDAR Composite Digital Terrain Model (DTM) 10m' zip file. 

I would like to express my gratitude for the help you have given me thus far. It is becoming frustrating for myself as I can't progress with my project. I have attached two ascii files that keep saying the same error message. One is the raster converted to asc in arcGIS and the other is the conversion in QGIS. I would greatly appreciate any further support you can provide in helping me load my DEM. 

Kind regards
Max.

Screenshot 2024-06-05 172745.png
converted_clipped_dem.asc
QGIS_converted_clippedDEM.asc

Tom Coulthard

unread,
Jun 5, 2024, 1:20:42 PM6/5/24
to caesar-...@googlegroups.com
Hi Max - the file is fine if I could get it to load with no changes or issues. Tried it on a different PC? 

Sent: Wednesday, June 5, 2024 5:41:54 PM
To: caesar-...@googlegroups.com <caesar-...@googlegroups.com>
Subject: Re: DEM Problem
 

Tom Coulthard

unread,
Jun 5, 2024, 1:24:56 PM6/5/24
to caesar-...@googlegroups.com
All the files need to be in the same folder.. the .exe, the xml, the discharge input, the .asc dem. 

Sent: Wednesday, June 5, 2024 3:28:25 PM
To: caesar-lisflood <caesar-...@googlegroups.com>
Subject: Re: DEM Problem
 

Max Shaw

unread,
Jun 5, 2024, 1:37:44 PM6/5/24
to caesar-...@googlegroups.com
Hi tom, I've ensured that all the files are in the same folder. Still the same error message....

tom.co...@gmail.com

unread,
Jun 6, 2024, 5:17:35 AM6/6/24
to caesar-...@googlegroups.com

See if this works. This set up worked for me – with your DEM.. if its not working I’d try and find a different PC and try that.

con_arc_dem.zip

 

 

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Max Shaw
Sent: 05 June 2024 18:38
To: caesar-...@googlegroups.com
Subject: Re: DEM Problem

 

Hi tom, I've ensured that all the files are in the same folder. Still the same error message....

 

On Wed, Jun 5, 2024 at 6:24 PM Tom Coulthard <tom.co...@gmail.com> wrote:

All the files need to be in the same folder.. the .exe, the xml, the discharge input, the .asc dem. 


From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> on behalf of Max Shaw <maxsh...@gmail.com>
Sent: Wednesday, June 5, 2024 3:28:25 PM
To: caesar-lisflood <caesar-...@googlegroups.com>
Subject: Re: DEM Problem

 

Hi Tom, all my files used for this project are in the 'CAESER-Lisflood 2.0.exe' folder and it still keeps saying the same error 'line 1, position 1'. Am I missing something very obvious here? Attatched is an image of my working directory.  I'm following all the correct steps and it still wont accept my DEM file?

On Wednesday, June 5, 2024 at 1:11:17 PM UTC+1 Tom wrote:

Max – its working fine for me!

Used this config file in the reach mode quickstart examples… make sure all your files are in the same folder as the .exe.

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Max Shaw
Sent: 05 June 2024 11:09
To: caesar-lisflood <caesar-...@googlegroups.com>
Subject: Re: DEM Problem

 

Hi Tom. I clipped my dem in arcgis as opposed to qgis for my new reach file and converted the clipped raster to ascii thinking this would now open in the model. The same message keeps popping up which is attatched. Any suggestions? 

 

Best wishes

Max.

On Tuesday, June 4, 2024 at 8:20:17 PM UTC+1 Max Shaw wrote:

Hi Tom

 

Thanks for getting back to me, it is much appreciated. The nodata values have now been set at -9999 (I think I typed 8888 and did not check) and I have changed my dem to a straighter reach lower down in the river. Attached is the file. However, when I still try to load the dem file into the model it keeps saying 'data at the root level is invalid, line 1, position 1'. When I cross reference and check my 6 line header ascii dem file with the examples I don't see any difference/problems?

 

On Tue, Jun 4, 2024 at 9:19 AM <tom.co...@gmail.com> wrote:

Image removed by sender. Image removed by sender.

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Max Shaw
Sent: 03 June 2024 18:00
To: caesar-...@googlegroups.com
Subject: Re: DEM Problem

 

Hi Tom

 

I spent the last week trying to solve my problem before I got back to you. Firstly, I tried to obtain 10m resolution cells from EDINA Digimap and Defra Lidar Data page but this only allowed 2m res. It also only let me extract data for the entire grid tile which is why it was 25 million cells in size. I then created a polygon layer for my AOI that I created in GIS to be clipped to the DEM data in order to reduce the number of cells. I then converted the clipped DEM into ASCii format which is now 7474 cells but still I keep getting the same error message. Attached is the new converted clipped file. I would be greatly appreciative if you could have a look and let me know what you think. 

 

Best wishes

Max

 

On Tue, May 28, 2024 at 11:02 AM <tom.co...@gmail.com> wrote:

Hi Max – your DEM is huge… 25 million cells.. This may be the problem – though at present its too large to load to tell!

I’d start by resampling this to 10m then work towards the finer resolution as you gain confidence in your model setup.

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Max Shaw
Sent: 27 May 2024 13:57
To: caesar-...@googlegroups.com
Subject: Re: DEM Problem

 

Sorry Tom, I attached the wrong file. This is the file I'm trying to import. Atm I'm just trying to successfully insert the DEM before I add any parametre data in.

~WRD000.jpg
image001.jpg

Max Shaw

unread,
Jun 9, 2024, 12:06:56 PM6/9/24
to caesar-...@googlegroups.com
Hi Tom. I can't actually believe it but the problem has been my laptop. I have just come to the university library to access their computers and the dem is loading fine both in your attached zip file and through my USB files. I'd like to express my gratitude for helping me out. Problem solved!

Best wishes
Max

Reply all
Reply to author
Forward
0 new messages