I'm trying to compute the total amount of suspended sediment that passes through a transect in my domain over the simulation time series. Originally, I was using the velocity data compiled with the grid shape and suspended sediment concentration to compute the fluxes. That seemed overly complicated. So I dug back into the manual and saw that sediment.in has a flag for tracer volume flux (mud and sand), how handy! :

Code: Select all

```
Aout(MHUTav) == T ! Huon_mud_01, ... tracer volume flux, <Huon*t>
Aout(MHVTav) == T ! Hvom_mud_01, ... tracer volume flux, <Hvom*t>
```

However, the grid shapes are not the same size. Below is the shape of the flux variables for 2497 time-steps and 5 sigma layers (my grid is 100x100):

Code: Select all

```
f.variables['Huon_mud_01'].shape
(2497, 5, 100, 99)
f.variables['Hvom_mud_01'].shape
(2497, 5, 99, 100)
```

Code: Select all

```
Huon_sand_01 = 0.5 * (Huon_sand_01[:,:,1:,:] + Huon_sand_01[:,:,:-1,:]) # u ==> psi
Hvom_sand_01 = 0.5 * (Hvom_sand_01[:,:,:,1:] + Hvom_sand_01[:,:,:,:-1]) # v ==> psi
```

The response has agreeable dimensions between the u and v values, so I can start performing the calculations to get the along and cross channel flux. But, from my understanding the psi grid is the node, not the center (rho) of the cell. So, I don't think this is the translation I need to perform.

Does anyone have guidance (or examples in python, matlab, or anything else?) on how to compute the flux across a transect? I think I've overthought this one...

Thanks in advance!