The TELEMAC-MASCARET system  trunk
cvsp_init_from_layers_gaia.f
Go to the documentation of this file.
1 ! *************************************
3 ! *************************************
4 !
5 !
6 !***********************************************************************
7 ! GAIA V8P1 14/03/2013
8 !***********************************************************************
9 !
11 !
15 !
20 !
21 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 !
26 !
27  IMPLICIT NONE
28 !
29  INTEGER I, J, M, L
30  DOUBLE PRECISION DEPTH
31 !
32 !-----------------------------------------------------------------------
33 !
34  ALLOCATE(pro_d(npoin,pro_max_max,nsicla))
35  ALLOCATE(pro_f(npoin,pro_max_max,nsicla))
36  ALLOCATE(pro_max(npoin))
37 !
38 !-----------------------------------------------------------------------
39 !
40  DO j=1,npoin
41  depth = 0 ! INIT DEPTH OF THE VSP
42  pro_max(j) = 2* nlayer%I(j) ! 2 SECTION POINTS PER LAYER
43  l = pro_max(j)
44 !
45 !-----------------------------------------------------------------------
46 ! WATER / BOTTOM
47 !-----------------------------------------------------------------------
48 !
49  DO i=1,nsicla
50  pro_d(j,l,i) = zf%R(j)
51  pro_f(j,l,i) = avail(j,1,i)
52  ENDDO
53 !
54 !-----------------------------------------------------------------------
55 ! SECTIONS
56 !-----------------------------------------------------------------------
57 !
58  DO m=1,nlayer%I(j)-1 !FOR THE UPPER 8 LAYERS
59  depth = depth + es(j,m)
60  l = l - 1
61  DO i=1,nsicla
62  pro_d(j,l,i) = zf%R(j) - depth
63  pro_f(j,l,i) = avail(j,m,i)
64  ENDDO
65  l = l - 1
66  DO i=1,nsicla
67  pro_d(j,l,i) = zf%R(j) - depth
68  pro_f(j,l,i) = avail(j,m+1,i)
69  ENDDO
70  ENDDO
71 !
72 !-----------------------------------------------------------------------
73 ! BOTTOM / RIGID BED
74 !-----------------------------------------------------------------------
75 !
76  l = l - 1
77  DO i=1,nsicla
78  pro_d(j,l,i) = zr%R(j)
79  pro_f(j,l,i) = avail(j,nlayer%I(j),i)
80  ENDDO
81 !
82  CALL cvsp_compress_dp_gaia(j,1.d-5)
83 !
84  ENDDO
85 !
86 !-----------------------------------------------------------------------
87 !
88  RETURN
89  END SUBROUTINE cvsp_init_from_layers_gaia
type(bief_obj), target nlayer
Number of layers for each point.
type(bief_obj), target zr
Non erodable (rigid) bottom elevation.
subroutine cvsp_init_from_layers_gaia
double precision, dimension(:,:), allocatable, target es
Layer thicknesses as double precision.
subroutine cvsp_compress_dp_gaia(J, THRESHOLD)
integer, target nsicla
Number of sediment classes of bed material (less than NISCLM)
double precision, dimension(:,:,:), allocatable, target pro_f
Vertical sorting profile: fraction for each layer, class, point.
double precision, dimension(:,:,:), allocatable, target pro_d
Vertical sorting profile: depth for each layer, class, point.
integer pro_max_max
Maximum Number of Profile SECTIONS.
type(bief_obj), target zf
Bottom elevation.
integer, dimension(:), allocatable pro_max
Maximum layer number in a vertical sorting profile for each point.
double precision, dimension(:,:,:), allocatable, target avail
Sediment fraction for each layer, class, point.
integer, pointer npoin
Number of 2d points in the mesh.