The TELEMAC-MASCARET system  trunk
layers_p_gaia.f
Go to the documentation of this file.
1 ! *******************
2  SUBROUTINE layers_p_gaia
3 ! *******************
4 !
5  &(path_pre,file_pre,jg)
6 !
7 !***********************************************************************
8 ! GAIA
9 !***********************************************************************
10 !
12 !
13 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 !
19  USE bief
20  USE bief_def
22 
23  IMPLICIT NONE
24 !
25 !!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
26 !
27  INTEGER, INTENT(IN) :: JG
28  CHARACTER(*), INTENT(IN ) :: PATH_PRE,FILE_PRE
29 !
30 !!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
31 !
32  CHARACTER(LEN=100) :: DEBUGFILE
33  CHARACTER(LEN=7) :: OCSTR
34  INTEGER I,K,J
35  DOUBLE PRECISION DEPTH, AT, MYFRA, BSUM
36  INTEGER :: ID
37 !
38 !----------------------------------------------------------------
39 !
41 !
42  WRITE(unit=ocstr, fmt='(I7)') outputcounter
43  DO i=1,7
44  IF(ocstr(i:i)==' ') ocstr(i:i)='0'
45  ENDDO
46  at = dt*lt/percou
47 !
48 ! GLOBAL NUMBERS TO GLOBAL NUMBERS
49  j = jg
50  IF(ncsize>1) j = global_to_local_point(jg,mesh)
51 !
52  WRITE(unit=debugfile, fmt='(A,A,A,A,I8,A,G15.8,A)')
53  & path_pre,ocstr,'_',file_pre,
54  & jg,'_T_',at,'.LAY.CSV'
55  DO i=1,len_trim(debugfile)
56  IF(debugfile(i:i)==' ') debugfile(i:i)='_'
57  END DO
58 !
59  IF(j > 0) THEN !0 IF NODE IS NOT ON THIS PARTITION
60  CALL get_free_id(id)
61  OPEN(id, file=debugfile , status='UNKNOWN')
62  rewind id
63  WRITE(id,*)"J K FD50(I) AT Z AVAIL(J,K,I) X Y D50 TAU H"
64 !
65  depth = zf%R(j)
66 !
67  !LAYER TOP
68  DO k=1,nlayer%I(j)
69 !
70  bsum = 0.d0
71  DO i=1,nsicla
72  bsum = dcla(i)*avail(j,k,i) + bsum
73  ENDDO
74 !
75  DO i=1,nsicla
76  WRITE (id,'(I8,1X,I4,1X,7(G15.8,1X))')
77  & jg,(nlayer%I(j)-k+1),dcla(i),at,depth,
78  & avail(j,k,i),x(j),y(j), bsum, tob%R(j), z%R(j)
79  ENDDO
80  depth = depth - es(j,k)
81 
82  ENDDO
83 !
84 ! RIGID BED
85 !
86  DO i=1,nsicla
87  bsum = dcla(i)*avail(j,nlayer%I(j),i) + bsum
88  ENDDO
89 !
90  DO i=1,nsicla
91  myfra = 0.d0
92  IF (i==1) myfra = 1.d0
93  WRITE (id,'(I8,1X,I4,1X,7(G15.8,1X))')
94  & jg,0,dcla(i),at,depth,myfra,x(j),y(j),bsum
95  ENDDO
96 !
97  CLOSE(id)
98  ENDIF
99 !
100 !----------------------------------------------------------------
101 !
102  RETURN
103  END SUBROUTINE layers_p_gaia
type(bief_obj), target tob
Bed shear stress [n/m2].
subroutine layers_p_gaia(PATH_PRE, FILE_PRE, JG)
Definition: layers_p_gaia.f:7
type(bief_obj), target nlayer
Number of layers for each point.
double precision, dimension(:), pointer x
2d coordinates of the mesh
double precision, target dt
Time step It may be different from the one in TELEMAC because of the morphological factor...
double precision, dimension(:,:), allocatable, target es
Layer thicknesses as double precision.
double precision, dimension(:), pointer y
integer ncsize
Definition: bief_def.f:49
integer function global_to_local_point(IPOIN, MESH)
double precision, dimension(nsiclm), target dcla
Sediment diameter for each class It is only relevant for non-cohesive sediments. For the bedload...
integer, target nsicla
Number of sediment classes of bed material (less than NISCLM)
type(bief_obj), target z
Free surface elevation.
integer, target lt
Numero du pas de temps.
integer percou
COUPLING PERIOD USED IN CVSM TO CALCULATE THE TIME, SHOULD COME FROM TELEMAC ONE DAY.
type(bief_obj), target zf
Bottom elevation.
type(bief_mesh), target mesh
Mesh structure.
double precision, dimension(:,:,:), allocatable, target avail
Sediment fraction for each layer, class, point.
Definition: bief.f:3