intro story Coast / Estuary

Coast / Estuary

Coastal systems are among the most dynamic physical systems on earth and are subject to a large variety of forces. The morphodynamic changes occurring to coastlines worldwide are of great interest and importance. These changes occur as a result of the erosion of sediments, its subsequent transport as bed load or suspended load, and eventual deposition. 
 
Estuaries are partly enclosed water bodies that have an open connection to the coast. Estuaries generally have one or more branching channels, intertidal mudflats and/or salt marshes. Intertidal areas are of high ecological importance and trap sediments (sands, silts, clays and organic matter).
Within the Delft3D modelling package a large variation of coastal and estuarine physical and chemical processes can be simulated. These include waves, tidal propagation, wind- or wave-induced water level setup, flow induced by salinity or temperature gradients, sand and mud transport, water quality and changing bathymetry (morphology). Delft3D can also be used operationally e.g. storm, surge and algal bloom forecasting. 
 
On this discussion page you can post questions, research discussions or just share your experience about modelling coastal and/or estuarine systems with Delft3D FM. 
 

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 

 

Message Boards

read and write *.flo file for PART

U
Zhanxian Wang, modified 3 Years ago.

read and write *.flo file for PART

I am a newbie to the delft3D open source community, and trying to use the particle tracking module (PART) to simulate larval transport behavior. Currently PART can only model "passive" particles. However, I am trying to model two extra larvae behaviors:

1. diurnal migration - larvae only move during daytime hours.
2. selective tidal stream transport - larvae only move during flood tide

I am thinking to modify the flow results in *.flo files created from the hydrodynamic runs to simulate these two larvae behaviors. However, I could not figure out how to read and write the *.flo file. Does anyone have experience with i/o of this file? I know "ddcouple.exe" is used for post-processing the hydro com files to create input files for PART. Where can I find the source codes for ddcouple from the repository?

Thanks,
Jonathan
MJ
Michel Jeuken, modified 3 Years ago.

RE: read and write *.flo file for PART (Answer)

Jedi Knight Posts: 154 Join Date: 1/21/13 Recent Posts
You can try to change the flows, but you could also try to have a look at part10.f where the actual movement of particles is calculated.

If you what to know how the files are build up, this is briefly described in:

http://content.oss.deltares.nl/delft3d/manuals/D-Water_Quality_Input_File_Description.pdf

11.4 Binary file that are directly read by D-Water Quality

The flo-file is a flows file:

flows • ’time’ integer*4, NOQT real*4 values
• same for next time step(s)
• · · ·

And to know how these flows are defined (from which segment to what segment), you can read the flow pointers from the poi-file:

exchange pointer • 4 integer*4 ifrom, ito, ifrom-1, ito+1
• the same for all other NOQT = NOQ1+NOQ2+NOQ3 exchanges
• · · ·

The code of ddcouple is not (yet) available to open source, but the flo-files per domain are written in D3D FLOW in this routine:

https://svn.oss.deltares.nl/repos/delft3d/trunk/src/engines_gpl/flow2d3d/packages/io/src/output/wrwaqflo.f90
U
Zhanxian Wang, modified 3 Years ago.

RE: read and write *.flo file for PART

Michel,

Thanks for your response!

If DDCOUPLE is not available as open source as you said, then how could I combine the com files from a MPI hydrodynamic run on a cluster in order to run a PART simulation? Do I have to copy them to a Windows machine and combine them there?

Jonathan
MJ
Michel Jeuken, modified 3 Years ago.

RE: read and write *.flo file for PART

Jedi Knight Posts: 154 Join Date: 1/21/13 Recent Posts
We have the ability to access files on our Linux cluster from windows machines to do the coupling, but I guess you don't have that possibility. I've attached a Linux version of ddcouple to this post
U
Zhanxian Wang, modified 3 Years ago.

RE: read and write *.flo file for PART

Michel,

To me, wrwaqflo subroutine is to write the com_*.are (area) file instead of flow file com_*.flo.

Do you think you can provide me the part of codes in DDCOUPLE to read and write flo files?

Thanks,
Jonathan
MJ
Michel Jeuken, modified 3 Years ago.

RE: read and write *.flo file for PART

Jedi Knight Posts: 154 Join Date: 1/21/13 Recent Posts
You are right, qag is used for both aggregted area and flow. The aggregated flows are only calcualted here in this routine, but are written in wrwaqfil

write ( lunflo ) itim , qag (1:noq)

currently at line 622. The statement of writing again to lunflo on line 631 is only executed at the last step to add a dummy record.

The statements from the code that you would need are:

open(flo_unit_nr,file=flo_name,form='UNFORMATTED', access='STREAM',iostat=io_error)
open(flo_new_unit_nr,file=flo_name,form='UNFORMATTED', access='STREAM',iostat=io_error)

do

read(flo_unit_nr,end=100) itime,(flow(i),i=1,noq)

new_flow(i) = something(flow(i))

write (flo_new_unit_nr) itime , (new_flow(i),i=1,noq)

end do

100 continue