The TELEMAC-MASCARET system  trunk
cvsp_p_gaia.f
Go to the documentation of this file.
1 ! **********************
2  SUBROUTINE cvsp_p_gaia
3 ! **********************
4 !
5  &(path_pre,file_pre,jg)
6 !
7 !***********************************************************************
8 ! GAIA V8P1 16/05/2017
9 !***********************************************************************
10 !
12 !
16 !
21 !
26 !
30 !
31 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 !
38  USE bief
39  USE bief_def
41 !
43  IMPLICIT NONE
44 !
45 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
46 !
47  INTEGER , INTENT(IN) :: JG
48  CHARACTER(*), INTENT(IN) :: PATH_PRE
49  CHARACTER(*), INTENT(IN) :: FILE_PRE
50 !
51 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
52 !
53  CHARACTER(LEN=100) DEBUGFILE
54  CHARACTER(LEN=7) OCSTR
55  INTEGER I, K, J
56  DOUBLE PRECISION AT, BSUM
57  INTEGER :: ID
58 !
59 !-----------------------------------------------------------------------
60 !
61  at = dt*lt/percou
62  j = jg
64 !
65 ! GLOBAL NUMBERS TO LOCAL NUMBERS
66 !
67  IF(ncsize.GT.1) THEN
69  ENDIF
70 !
71  WRITE(unit=ocstr, fmt='(I7)') outputcounter
72  DO i=1,7
73  IF(ocstr(i:i)==' ') ocstr(i:i)='0'
74  ENDDO
75 !
76  WRITE(unit=debugfile, fmt='(A,A,A,A,I8,A,G15.8,A)')
77  & path_pre,ocstr,'_',file_pre,
78  & jg,'_T_',at,'_VSP.CSV'
79 
80  DO i=1,len_trim(debugfile)
81  IF(debugfile(i:i)==' ') debugfile(i:i)='_'
82  ENDDO
83 !
84  IF(j > 0) THEN
85  CALL get_free_id(id)
86  OPEN(id, file=debugfile, status='UNKNOWN' )
87  rewind id
88  WRITE(id,*)
89  &"J K FD50(I) AT PRO_D(K_I) PRO_F(K_I) X Y D50 ALT TOB HEIGHT"
90 !
91  DO k=1,pro_max(j)
92  bsum = 0.d0
93  DO i=1,nsicla
94  bsum = dcla(i)*pro_f(j,pro_max(j)+1-k,i) + bsum
95  ENDDO
96 !
97  DO i=1,nsicla
98  IF(k.EQ.1) THEN
99 ! FULL OUTPUT WITH COORDINATES ETC. ON SURFACE
100  WRITE (id,'(I8,1X,I4,1X,10(G20.12,1X))')
101  & jg,pro_max(j)+1-k,dcla(i),at,
102  & pro_d(j,pro_max(j)+1-k,i),
103  & pro_f(j,pro_max(j)+1-k,i),x(j),y(j),
104  & bsum,es(j,1),tob%R(j), z%R(j)
105  ELSE
106 ! FOLLOWING SECTIONS
107  WRITE (id,'(I8,1X,I4,1X,5(G20.12,1X))')
108  & jg,pro_max(j)+1-k,dcla(i),at,
109  & pro_d(j,pro_max(j)+1-k,i),
110  & pro_f(j,pro_max(j)+1-k,i)
111  ENDIF
112  ENDDO
113  ENDDO
114 !
115  bsum = 0.d0
116  DO i=1,nsicla
117  bsum = dcla(i)*pro_f(j,1,i) + bsum
118  ENDDO
119 !
120  CLOSE(id)
121 !
122  ENDIF
123 !
124 !-----------------------------------------------------------------------
125 !
126  RETURN
127  END SUBROUTINE cvsp_p_gaia
type(bief_obj), target tob
Bed shear stress [n/m2].
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.
subroutine cvsp_p_gaia(PATH_PRE, FILE_PRE, JG)
Definition: cvsp_p_gaia.f:7
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)
double precision, dimension(:,:,:), allocatable, target pro_f
Vertical sorting profile: fraction for each layer, class, point.
type(bief_obj), target z
Free surface elevation.
integer, target lt
Numero du pas de temps.
double precision, dimension(:,:,:), allocatable, target pro_d
Vertical sorting profile: depth for each layer, class, point.
integer percou
COUPLING PERIOD USED IN CVSM TO CALCULATE THE TIME, SHOULD COME FROM TELEMAC ONE DAY.
type(bief_mesh), target mesh
Mesh structure.
integer, dimension(:), allocatable pro_max
Maximum layer number in a vertical sorting profile for each point.
Definition: bief.f:3