CHLNDDEV / OceanMesh2D

A two-dimensional triangular mesh generator with pre- and post-processing utilities written in pure MATLAB (no toolboxes required) designed specifically to build models that solve shallow-water equations or wave equations in a coastal environment (ADCIRC, FVCOM, WaveWatch3, SWAN, SCHISM, Telemac, etc.).
https://github.com/sponsors/krober10nd
GNU General Public License v3.0
182 stars 65 forks source link

riverine inflow data is non-periodic water level data #253

Closed Jiangchao3 closed 3 years ago

Jiangchao3 commented 3 years ago

Is your feature request related to a problem? Please describe.

Hi @krober10nd and @WPringle

Recently, I got some new riverine inflow data for driving my adcirc model, but some of them are non-periodic water level series.

As you know, if the riverine inflow is the flux (m3/s) data, I can use the script Make_f20_volume_flow to make the f.20 input file.

I am thinking about how to make a riverine inflow file (f.19 or f.20?) using non-periodic water level series.

Any suggestions? Many thanks.

Jiangchao

WPringle commented 3 years ago

@Jiangchao3 The fort.19 and fort.20 files are designed for non-periodic entries.

You just need to specify the time step of your time series at the top of the file and then list all the water levels/fluxes in chronological order for all boundary vertices (see the links).

So just need to have a loop over the existing function for each time step or something similar to that.

Jiangchao3 commented 3 years ago

@WPringle Thanks for your kindly reply.

One thing I want to confirm is that the loop in the fort.19 or fort.20 file:

image

The user manual describes the format of fort.20 as the above figure shows, it is just for the loop for node.

Clearly, there would be two loops, one loop is for time, and another loop is for node.

Give my example, NFLBN=19, Times=377, timestep=3600, the final fort.20 file should have 1+19*377=7164 lines.

I have a doubt about the order of these two loops.

  1. time loops firstly, and then node loops: each node contains 377 values, the first 377 values for the first node. The second 377 values, the third 377 values,,,the 19th 377 values are added in sequence.

  2. node loops firstly, and then time loops: each timestep contains 19 values, the first 19 values for the first timestep. The second 19 values, the third 19 values,,, the 377th 19 values are added in sequence.

Which one is right? Looking forward to your suggestion. Many thanks.

Jiangchao

WPringle commented 3 years ago

The order of the loop is the second one. All NFLBN values for t=0 first, then all NFLBN values for t=1, ... t=N

Jiangchao3 commented 3 years ago

Noted, very thanks.

Jiangchao3 commented 3 years ago

Hi @WPringle, @krober10nd

I am trying to create a new make_f19 function to make the riverine flow input file using hourly water level data.

I am a bit confused about how to conduct this process:

If the riverine flow is flux data, I would input the vstart and vend firstly, and then choose 1 (flux) and then choose 22 (river), like the followed screenshot shows:

image

If the riverine flow uses non-periodic elevation data, how to conduct this process?

Should I still choose 1(flux) after inputting the vstart and vend, and then choose 22 (river)? If so, how should distinguish between the river flux type and river water elevation type?

Or, should I choose 2 (elevation) after inputting the vstart and vend? In this situation, the segment I want input riverine water level elevation is open ocean boundary. Maybe it will conflict with the periodic elevation boundary.

So, in a word, there are five riverine inflow boundaries for my model, three of them use flux discharge data, the other two use non-periodic water elevation data.

Looking forward to any suggestion from you. Many thanks.

Jiangchao

WPringle commented 3 years ago

So either you need to choose between a flux boundary and an elevation boundary (can't be both unless you try out the sponge boundary type). For flux should always be river (the mainland and island indicates a zero flux boundary).

For elevation we just choose the open ocean boundary. To avoid conflict with periodic elevation boundary just set the periodic values (tidal amplitudes) to zero along that boundary.

Jiangchao3 commented 3 years ago

Very clear, now I can understand the process. Let me try to transform the water level series to flux series for my riverine inflow boundary. Many thanks for your suggestion.