forked from CPRA-MP/ICM_Hydro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TSSolids.f
63 lines (49 loc) · 3.02 KB
/
TSSolids.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
cc**********************Start Subroutine for TSS Solids*****************************************
Subroutine TSSOLIDS(mm,iab,jnb,j,k,dz,dzh,dref,sedclass) !face densities from node densities
use params
!>> Check if link is marsh overland flow link, if so use CSS in marsh and add sediment to marsh cumulative sediment flux term
if (linkt(iab) == 8) then
!>> Only calculate marsh sediment exchange if depth in marsh is greater than 0.3 m (assumed surge conditions)
if (Eh(j,1)-Bedm(j) > 0.3) then
!>> calculate average concentration at interface between marshes (directionality of flow is needed to apply upwind factor correctly)
if (Q(iab,1) >= 0.0) then
Cssface = CSSh(jus(abs(icc(j,k))),1,sedclass)
else
Cssface = CSSh(jds(abs(icc(j,k))),1,sedclass)
endif
!>> add sediment flux from this marsh link to the cumulative sediment flux for marsh in this comparment (QSsumh)
QSSumh(sedclass) = QSsumh(sedclass)
& + sicc(j,k)*(Q(abs(icc(j,k)),1))*Cssface
endif
!>> If link is not marsh overland flow link, use CSS in open water and add sediment flux to open water cumulative sediment flux term
else
!>> calculate concentration at interface between compartments (directionality of flow is needed)
if (Q(iab,1) >= 0.0) then
Cssface = CSS(jus(abs(icc(j,k))),1,sedclass)
else
Cssface = CSS(jds(abs(icc(j,k))),1,sedclass)
endif
!! update cssface for Atchafalya diversion links to have a SWR of 0.5 of sand - MP project # 03b.DI.04
!if (iab == 3859) then
! Cssface_new = 0.5*Cssface
! Cssface = Cssface_new
!endif
!
!>> Calculate incoming flux for sand
!>> van Rijn suspended sand flux (in g/sec) entering compartment from current link inflows and their respective van Rijn equilibrium flow CSS from previous timestep
!>> sand flux out of compartment is set by equilibrium rate in vanRijn subroutine and this will only collect incoming sand fluxes
if (sedclass == 1) then
QSsum(sedclass) = QSsum(sedclass)
& + sicc(j,k)*Q(abs(icc(j,k)),1)*Cssface
!>> Overland marsh links do not transport sand - cancels out previous calculation for marsh links
QSsumh(sedclass) = 0.0 ! do not transport sand across marsh links
else
!>> add sediment flux from this link to the cumulative sediment flux for the compartment (QSsum)
QSSum(sedclass) = QSSum(sedclass)
& + sicc(j,k)*(Q(abs(icc(j,k)),1))*Cssface !face exchange
& + fe*EAOL(iab)*(CSS(j,1,sedclass)-CSS(jnb,1,sedclass)) !Diffusion
endif
endif
return
end
c***********************End Subroutine for TSS SOLIDS*******************************************