The TELEMAC-MASCARET system  trunk
mean_grain_size_gaia.f
Go to the documentation of this file.
1 ! *******************************
2  SUBROUTINE mean_grain_size_gaia
3 ! *******************************
4 !
5 !
6 !***********************************************************************
7 ! GAIA
8 !***********************************************************************
9 !
11 !
12 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 !
15  USE bief
18  & nsand,nomblay,num_isand_icla
19 !
21  IMPLICIT NONE
22 !
23 !-----------------------------------------------------------------------
24 !
25  INTEGER I,J
26 !
27 !-----------------------------------------------------------------------
28 !
29 ! UNLADM IS NEEDED FOR HUNZIKER
30 !
31 ! NOTE THAT MASS FRACTION AND VOLUME FRACTION ARE THE SAME WHEN
32 ! THERE ARE ONLY SANDS
33  DO j=1,npoin
34  acladm%R(j) = 0.d0
35  unladm%R(j) = 0.d0
36  DO i=1,nsand
37  IF(ratio_sand(i,1,j).GT.0.d0) THEN
38  acladm%R(j) = acladm%R(j) + dcla(num_isand_icla(i))
39  & *ratio_sand(i,1,j)
40  ENDIF
41  acladm%R(j)=max(acladm%R(j),0.d0)
42  ENDDO
43  IF(acladm%R(j).LE.0.d0) acladm%R(j) = dcla(num_isand_icla(1))
44  ENDDO
45  IF(nomblay.GT.1) THEN
46  DO j=1,npoin
47  DO i=1,nsand
48  IF(ratio_sand(i,2,j).GT.0.d0) THEN
49  unladm%R(j) = unladm%R(j) + dcla(num_isand_icla(i))
50  & *ratio_sand(i,2,j)
51  ENDIF
52  unladm%R(j)=max(unladm%R(j),0.d0)
53  ENDDO
54  IF(unladm%R(j).LE.0.d0) unladm%R(j) = acladm%R(j)
55  ENDDO
56  ENDIF
57 !
58 !-----------------------------------------------------------------------
59 !
60  RETURN
61  END
type(bief_obj), target acladm
Mean diameter of active-layer.
subroutine mean_grain_size_gaia
double precision, dimension(nsiclm), target dcla
Sediment diameter for each class It is only relevant for non-cohesive sediments. For the bedload...
double precision, dimension(:,:,:), allocatable, target ratio_sand
Ratio of sand to all sands, for isand,ilayer,ipoin.
type(bief_obj), target unladm
Mean diameter of under-layer.
integer, pointer npoin
Number of 2d points in the mesh.
Definition: bief.f:3