Problemi con l iterazione e lo sviluppo dell output

122 views
Skip to first unread message

Emanuele Gionfriddo

unread,
Apr 27, 2024, 5:46:20 AM4/27/24
to caesar-lisflood
Buongiorno Tom,
sono in procinto di dover consegnare il mio lavoro di tesi per il quale ho dovuto utilizzare il CL. Nel mio lavoro dovevo analizzare un tratto di circa 4km in modalità portata del fiume Serchio nel comune di Barga qui in Toscana (in allegato alcune foto). 
Sono riuscito a scaricare i dtm in questione dalla cartoteca della regione toscana e ad elaborarli con Qgis, riuscendo ad estrapolare anche il file del bedrock, con il quale ho identificato i punti non erodibili, ai quali ho assegnato la stessa quota del dtm originale. Ho reperito anche i dati di portata nella stazione più vicina dotata di idrometro e ho caricato gli stessi in un file di input come valori di portata media giornaliera di 3 anni (2006/2007/2008); nello stesso file ho però uniformato la granulometria assegnando il valore zero ("0" a tutte le restanti colonne da 3 a 12). Il file gira ma mi trovo di fronte ad una sostanziale problematica: poiché il professore vuole che io faccia girare il modello per 20/30 anni e poi vedere come si è modellato il territorio se rispecchia la realtà indicativamente (avendo le immagini su google maps degli anni odierni) devo capire come impostare correttamente l iterazione per quel tempo, di modo che sia abbastanza veloce. Come posso fare? Altra domanda: il valore t= .... min/day rappresenta i giorni effettivi per i quali sto facendo girare il modello? Perchè l'ho tenuto acceso per 3/4 ore ma al massimo l iterazione mi gira per un t di circa 30/40 giorni (vedi immagine allegata), come posso simulare 20 anni? E soprattutto ho notato che se imposto su "recirculate sediment" mi genera anche una portata solida mentre se imposto su "flo only?" no...però io ho bisogno che il terreno si modelli, quindi spunto solo recirculate sediment?
Altra domanda: all'avvio il modello mi da i vari errori (vedi immagine allegata), è necessario che li risolva o posso procedere ugualmente? Se devo risolverli, come posso fare, che valori devo cambiare? 
 Grazie se mi saprà rispondere e darmi un aiuto
Immagine 2024-04-25 195515.png
Immagine 2024-01-31 085737.jpg

Tom

unread,
Apr 29, 2024, 7:41:15 AM4/29/24
to caesar-lisflood
Hi there - my Italian is not very good - so hopefully google translate will work well for us! :)

In simplest terms, model speed is controlled by the number of grid cells (and thus number of calculations the model needs to do). So to run for longer time periods, I would start by using larger grid cells. If you have a 2m DEM - then moving to a 4m DEM divides the number of cells by 4 already.. Looking at your screen shot there, I would try to start with using a 10m DEM and see how long it takes the model to run then - if it is quick enough then perhaps experiment with a smaller cell size (e.g 5m) and so on. 

You lose some detail of the valley floor and the channel - but model run time is nearly always a compromise between the detail and the run time. 

Emanuele Gionfriddo

unread,
Apr 29, 2024, 11:08:07 AM4/29/24
to caesar-lisflood
Non ti preoccupare per il tuo italiano, la stessa problematica vale per me con l'inglese :)
Perfetto, proverò a ridurre il dem a 4/5 m per ogni cella vedendo che succede. Passando alle altre domande che avevo posto:
  • Per quanto riguarda il resto delle domande? Il valore "t"=....min/day rappresentano i giorni effettivi per cui sto effettuando la modellazione?
  • Per quanto riguarda invece il discorso della spunta su "recirculate sediment" o "flow only?" cosa significano? Se voglio che avvenga erosione/deposizione devo far ricircolare anche i sedimenti e quindi spuntare il primo, esatto?
  • Come faccio ad ottenere una visualizzazione in output di come si è modellato il territorio?
Grazie per l'attenzione Tom.

Emanuele Gionfriddo

unread,
Apr 29, 2024, 12:46:13 PM4/29/24
to caesar-lisflood
Buonasera Tom, mi porto avanti con un'altra domanda prima che tu risponda alle precedenti, così rispondi in una sola volta a tutto.
Un altro modo per velocizzare il modello (ricordo che devo simulare circa 20 anni di processo idrologico) potrebbe essere quello di inserire i dati di input di 2 anni (o meglio ancora di 1 solo anno) piuttosto che i valori di portata di 3 anni che ho inserito adesso? (In allegato trovi il mio file attuale per quanto riguarda l'idrologia, sono 3 anni di valori di portata in cui in ogni stringa è presente il valore medio giornaliero in m^3/sec.). In poche parole, "snellire" il file di input dell'idrologia, aiuta a velocizzare il periodo di esecuzione ? Fammi sapere, grazie.
Saluti, e grazie per l'attenzione,
Emanuele.

input hydrology - Ponte di Campia 2006-7-8.txt

Tom

unread,
Apr 29, 2024, 4:20:29 PM4/29/24
to caesar-lisflood
1. Yes. 
2. Time is the modelled time - the simulated time. 
3. Flow only checked will only run the hydraulics (flow)
4. You can recirculate sediment - this will simply add sediment that leaves the end of the reach back into the top. if your input is water only (no sediment) then this can be a useful option, 

Emanuele Gionfriddo

unread,
Apr 30, 2024, 2:12:56 AM4/30/24
to caesar-lisflood
Buongiorno Tom,
ho operato come mi hai detto e qualche ora di tempo l'ho guadagnata, ma non così tanto da potermi ritenere soddisfatto e soprattutto da poter raggiungere in breve tempo l'obbiettivo di far girare il modello per 20 anni. 
Son passato da un DEM con celle di dimensione 2x2 a celle prima 4x4 e infine 5x5; ho tenuto il pc acceso a lavorare tutta la notte e, come puoi vedere dalla foto allegata, sono arrivato a modellare circa 50 giorni: troppo poco comunque, in questo tempo! Cos'altro posso fare per velocizzare l analisi? Operare sul DEM aumentando ulteriormente le maglie delle singole celle purtroppo non credo sia produttivo perchè perdo davvero troppo dettaglio, avendo il fiume in questo piccolo tratto di estensione una larghezza massima di 25/30m in alcuni tratti, diventerebbe troppo dispersivo nei confronti del canale stesso e non rappresenterei la realtà, cosa che già così non so se possa andar bene. 
Cos altro posso fare per velocizzare i tempi di esecuzione? Caricare solo un anno di valori giornalieri di dati idrologici (rispetto ai 3 anni con cui circola ora) può essere un'idea oppure modificare il file di input idrologico non cambierebbe nulla per quanto riguarda la velocità di esecuzione del modello?
Altra domanda: come vedi dalla prima foto allegata (l'ho cerchiato in rosso) il flusso d'acqua inizia a generarsi da un punto che non sta sul bordo della superficie (o meglio 3 punti --> vedi seconda foto allegata --> setting dei parametri nella scheda dell'idrologia) : come faccio a capire quali sono le coordinate X-Y esatte da inserire nell'input affinché il flusso venga generato dal bordo a nord della griglia pur sempre rimanendo all'interno del canale reale?
Fammi sapere, grazie mille

Immagine 2024-04-30 074425.png
Immagine 2024-04-30 080523.png

tom.co...@gmail.com

unread,
Apr 30, 2024, 8:39:34 AM4/30/24
to caesar-...@googlegroups.com

OK first – from your screenshots you have some relics of the resampling. I would recommend re-doing that using bilinear as the method for changing the grid resolution.

  1. I went from a DEM with 2x2 cells to 4x4 cells and finally 5x5 cells; I kept the PC on to work all night and, as you can see from the attached photo, I got to model about 50 days: too little anyway, in this time! What else can I do to speed up the analysis? Operating on the DEM by further increasing the meshes of the individual cells unfortunately I don't think is productive because I really lose too much detail, having the river in this small stretch of extension a maximum width of 25/30m in some stretches, it would become too dispersive towards the canal itself and I would not represent reality, which I already don't know if it can be good.

I think you could afford to run this at 10m resolution with a 20-30m wide channel.. 50 days overnight isn’t too bad – Perhaps 1-2 years per day so its getting there. We have sims that take a month sometimes!!

  1. What else can I do to speed up turnaround times? Can uploading only one year of daily values of hydrological data (compared to the 3 years it is circulating now) be an idea, or would modifying the hydrological input file not change anything in terms of the speed of execution of the model?

Just having events doesn’t really work well as the model is optimised to speed up during low flows anyway.

By the way – what value do you have for the “in out difference” (Flow model tab I think)

Another question: as you can see from the first attached photo (I circled it in red) the water flow starts to be generated from a point that is not on the edge of the surface (or rather 3 points --> see second attached photo --> setting of the parameters in the hydrology sheet): how do I understand what are the exact X-Y coordinates to be inserted in the input so that the flow is generated from the northern edge of the grid while still remaining inside the real channel?

Its fine if it starts there. Stops it leaking off the top of the DEM

--
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/2dbe266f-3c5e-4104-b162-7968ad2b051en%40googlegroups.com.

Emanuele Gionfriddo

unread,
Apr 30, 2024, 11:01:47 AM4/30/24
to caesar-lisflood
     1. Ho eseguito il ricampionamento sia del DEM che del file del bedrock passando a celle 5x5 con Qgis, non saprei fare diversamente.
     2. Per quanto riguarda il tempo di modellazione no, a fare 1 anno al giorno non ci arriverà mai di questo passo, ho lasciato tutta la notte e fino adesso il pc acceso e sono trascorsi appena 62 giorni, veramente troppo poco. Proverò a fare qualche simulazione aumentando ancora la dimensione delle celle, ma devo sentire anche il professore se è d'accordo.
     3. Per quanto riguarda gli eventi idrologici intendevo i valori di portata, non ho inserito niente che riguardi la pioggia. Secondo te se inserisco i valori di portata media giornaliera di 1 solo anno rispetto che 3 anni cambia qualcosa?
     4.  Il valore della "differenza dentro/fuori" ho lasciato quello impostato di default leggendo la tua wiki, quindi ho messo 5. Devo cambiarlo? (in allegato trovi gli altri parametri e i valori della scheda flow model). Anche per il "courant number" leggevo nella tua wiky che deve essere compreso tra 0.3 (dim. delle celle più piccole) e 0.7 (dim.delle celle più grandi). Per ora l'ho impostato su 0.4-0.5. Cambio anche quello? 

Se ci sono altri valori di parametri da modificare fammi sapere, in allegato ti ho lasciato le schede del setting dei vari parametri così come li ho impostati per questa simulazione.

Immagine 2024-04-30 165923.png
Immagine 2024-04-30 170000.png
Immagine 2024-04-30 165321.png

tom.co...@gmail.com

unread,
Apr 30, 2024, 11:05:25 AM4/30/24
to caesar-...@googlegroups.com

Parameters look OK – though I would add a couple of zero’s to lateral erosion rate to make it much smaller.

 

Check how QGis does resampling – as if there is an option to use bilinear then that will give better results.

Emanuele Gionfriddo

unread,
May 2, 2024, 1:05:34 PM5/2/24
to caesar-lisflood
Ho provveduto a sistemare i parametri e ora faccio il ricampionamento bilineare. Vediamo come gira.
Un'altra domanda: come faccio ad estrapolare una mappa (dtm) in output dal modello da poter visualizzare poi su QGis e confrontare il dtm prima di eseguire la modellazione con il post produzione? Mi spiego meglio: c'è un modo per estrarre il dtm post modellazione oltre agli screen delle sole immagini 2d?

Tom Coulthard

unread,
May 2, 2024, 3:23:20 PM5/2/24
to caesar-...@googlegroups.com
Yeah - super easy. The save menu option at the top has options to save elevations and other things as text files that can be imported into GIS. They’re in .asc format even though the extension is .txt

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> on behalf of Emanuele Gionfriddo <gionfriddoga...@gmail.com>
Sent: Thursday, May 2, 2024 6:05:34 PM

Emanuele Gionfriddo

unread,
May 2, 2024, 4:46:35 PM5/2/24
to caesar-lisflood
Ok, grazie! Provo a vedere cosa mi salva.
Un altra cosa: ho provato a salvare la cartella della directory in altri 2/3 pc ma quando lancio la simulazione non mi viene visualizzato correttamente il DEM e l iterazione non inizia mai a correre. Per quale motivo? In allegato puoi vedere lo screen della visualizzazione del dem appena premo start e della cartella della directory da cui faccio girare il modello richiamando i file Dtm, bedrock e il file dell'idrologia con le portate. Volevo fare quest'operazione per poter far simulazioni su più pc diversi e ottenere prima risultati. 
Grazie se saprai darmi una risposta.
Emanuele

Immagine.png
Immagine2.png

Emanuele Gionfriddo

unread,
May 3, 2024, 9:11:13 AM5/3/24
to caesar-lisflood
Hi Tom,
sorry for bothering you again, I would like to ask you if there is a way to set the timestep of the simulation. My flow data are the daily average and I would like to do simulation with this time resolution instead of running second per second. Is it possible? This is always in order to speed up my analysis since I have to simulate 20 years and obtain a final result.
Icona di Verificata con community


Emanuele Gionfriddo

unread,
May 6, 2024, 1:19:04 PM5/6/24
to caesar-lisflood
@tom Buonasera, scusa ancora il disturbo, hai letto le mie ultime richieste? 
Ti ringrazio se potrai rispondermi.

Saluti, Emanuele.

tom.co...@gmail.com

unread,
May 8, 2024, 3:32:28 AM5/8/24
to caesar-...@googlegroups.com

Hi – OK, so the model time step is variable – it changes according to the flow model and the sediment transport model. It automatically adjusts to run as fast as possible without causing any numerical instability. If you move too much water or sediment from one cell to another than you can generate such numerical instability which causes bad / wrong results. So – unfortunately, no you can’t do that!

Tom

 

From: caesar-...@googlegroups.com <caesar-...@googlegroups.com> On Behalf Of Emanuele Gionfriddo
Sent: 06 May 2024 18:19
To: caesar-lisflood <caesar-...@googlegroups.com>
Subject: Re: Problemi con l iterazione e lo sviluppo dell output

 

@tom Buonasera, scusa ancora il disturbo, hai letto le mie ultime richieste? 

Ti ringrazio se potrai rispondermi.


Saluti, Emanuele.

Il giorno venerdì 3 maggio 2024 alle 15:11:13 UTC+2 Emanuele Gionfriddo ha scritto:

Hi Tom,
sorry for bothering you again, I would like to ask you if there is a way to set the timestep of the simulation. My flow data are the daily average and I would like to do simulation with this time resolution instead of running second per second. Is it possible? 
This is always in order to speed up my analysis since I have to simulate 20 years and obtain a final result.

 

 

Il giorno giovedì 2 maggio 2024 alle 22:46:35 UTC+2 Emanuele Gionfriddo ha scritto:

Emanuele Gionfriddo

unread,
May 8, 2024, 5:08:33 AM5/8/24
to caesar-...@googlegroups.com
@tom grazie per la risposta! E in merito a questo problema ? Cosa sai dirmi? 

Emanuele Gionfriddo

unread,
May 8, 2024, 5:10:25 AM5/8/24
to caesar-...@googlegroups.com
Mi riferisco a questa mail :

Ok, grazie! Provo a vedere cosa mi salva.
Un altra cosa: ho provato a salvare la cartella della directory in altri 2/3 pc ma quando lancio la simulazione non mi viene visualizzato correttamente il DEM e l iterazione non inizia mai a correre. Per quale motivo? In allegato puoi vedere lo screen della visualizzazione del dem appena premo start e della cartella della directory da cui faccio girare il modello richiamando i file Dtm, bedrock e il file dell'idrologia con le portate. Volevo fare quest'operazione per poter far simulazioni su più pc diversi e ottenere prima risultati. 
Grazie se saprai darmi una risposta.
Emanuele”

In allegati precedenti puoi vedere le 2 fotografia screen in questione. 

Emanuele Gionfriddo

unread,
May 21, 2024, 11:23:21 AM5/21/24
to caesar-lisflood
Buongiorno Tom,
volevo porre altre 2 domande: 
  1.  mentre il modello gira, il valore "it=...."   che scorre, cosa rappresenta? Cioè il numero che indica cos'è?
  2.  se inserisco nel file di testo dati di input di portata relativi a 3 soli anni ma voglio far girare il modello per 15/20 anni, il modello mi ricircola più volte gli stessi dati di portata o dopo 3 anni arresta il flusso?? Chiedo questo perchè in alcune simulazioni che ho effettuato mi è parso di vedere che dopo un certo tempo non scorresse più l'acqua.
Grazie, saluti

Tom Coulthard

unread,
May 21, 2024, 12:09:19 PM5/21/24
to caesar-...@googlegroups.com
While the model is spinning, the value "it=...." that flows, what does it represent? That is, the number that indicates what it is?

Iterations. That’s how many calculation steps the model takes. Different from the time step. 

If I enter in the text file flow input data relating to only 3 years but I want to run the model for 15/20 years, the model recirculates the same flow data several times or after 3 years stops the flow?? I ask this because in some simulations I made it seemed to me to see that after a certain time the water no longer flowed.

To simulate your 15-20 year run you need to edit your input file so it’s 15-20 years long. Normally copy and paste the values so it repeats in your case every three years. 

Sent: Tuesday, May 21, 2024 4:23:21 PM

Emanuele Gionfriddo

unread,
May 21, 2024, 12:17:18 PM5/21/24
to caesar-lisflood
Perfect, understood.
Another question:
I see from the questions and issues posed by the other users that they are able to extrapolate graphs and numerical erosion and deposition values at the end of the simulations. How do I do it? Where are? Is there a description or setting for these parameters? 

Thanks for your patience and availability.
Emanuele

Emanuele Gionfriddo

unread,
May 27, 2024, 7:57:04 AM5/27/24
to caesar-...@googlegroups.com
Ho tom. 
I see from the questions and issues posed by the other users that they are able to extrapolate graphs and numerical erosion and deposition values at the end of the simulations. How do I do it? Where are? Is there a description or setting for these parameters? 

Thanks for your patience and availability.
Emanuele

tom.co...@gmail.com

unread,
May 28, 2024, 3:31:03 AM5/28/24
to caesar-...@googlegroups.com

OK,

On file tab – ‘generate time series output’ will give water and sediment outputs.

https://sourceforge.net/p/caesar-lisflood/wiki/Tab%20Parameters%20%28description%20of%20model%20parameters%29/#generate-time-series-output

 

 

On the save options you can save the final DEM, then use GIS to subtract this from the original DEM to show erosion/deposition patterns – or save the elev diff more here

https://sourceforge.net/p/caesar-lisflood/wiki/Tab%20Parameters%20%28description%20of%20model%20parameters%29/#save-options

Emanuele Gionfriddo

unread,
May 28, 2024, 6:26:53 AM5/28/24
to caesar-lisflood
Ok.
 I meant if there is a way to automatically extrapolate graphs. Of the type like those in this conversation for example: https://groups.google.com/g/caesar-lisflood/c/Al3qg-w0twg/m/FIs6m3zSBQAJ , or in any case that evaluate erosion and deposition at the end of the simulation.
Thanks
Reply all
Reply to author
Forward
0 new messages