The TELEMAC-MASCARET system  trunk
cvsp_write_profile_gaia.f
Go to the documentation of this file.
1 ! *****************************
2  SUBROUTINE cvsp_write_profile_gaia
3 ! *****************************
4 !
5 !***********************************************************************
6 ! GAIA V8P1 05/12/2017
7 !***********************************************************************
8 !
10 !
14 !
20 !
25 !
30 !
36 !
37 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 !
40  USE bief
43 !
45  IMPLICIT NONE
46 !
47 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
48 !
49  INTEGER I,J,K, LEOPR_LOCAL
50  DOUBLE PRECISION BSUM, SUMERR, AT
51 !
52 !-----------------------------------------------------------------------
53 !
54  IF(lt==0) WRITE(lu,*) 'CVSP_WRITE_PROFILE ON CPU ', ipid
55 !
56 !-----------------------------------------------------------------------
57 ! CHOOSE WHAT YOU WANT TO HAVE IN VSPRES
58 ! NUMBER OF PRINTOUT VARIABLES
59 !-----------------------------------------------------------------------
60 !
61  urbloc%N = 3 + nsicla ! NUMVARUR3D2RES
62 !
63  at = dt*lt/percou
64 !
65  DO i= 0, pro_max_max-1
66  DO j= 1, npoin ! D50
67  bsum = 0.d0
68  sumerr = 1.d0
69  DO k=1,nsicla
70  bsum = dcla(k)*pro_f(j,i+1,k) + bsum
71  sumerr = sumerr - pro_f(j,i+1,k)
72  ENDDO
73  IF ((i+1).LE.pro_max(j)) THEN
74  vsp_error%R(j+i*npoin) = sumerr
75  vsp_d50%R(j+i*npoin) = bsum
76  vsp_d%R(j+i*npoin) = pro_d(j,i+1,1)
77  ELSE
78  vsp_error%R(j+i*npoin) = vsp_error%R(j+(i-1)*npoin)
79  vsp_d50%R(j+i*npoin) = vsp_d50%R(j+(i-1)*npoin)
80  vsp_d%R(j+i*npoin) = vsp_d%R(j+(i-1)*npoin)
81  ENDIF
82  DO k= 1, nsicla
83  IF ((i+1).LE.pro_max(j)) THEN
84  vsp_fra(k)%R(j+i*npoin) = pro_f(j,i+1,k)
85  ELSE
86  vsp_fra(k)%R(j+i*npoin) = pro_f(j,pro_max(j),k)
87  ENDIF
88  ENDDO
89  ENDDO
90  ENDDO
91 !
92 !-----------------------------------------------------------------------
93 ! CHOOSE WHAT YOU WANT TO HAVE IN 2DHYD_AS_3D
94 ! NUMBER OF PRINTOUT VARIABLES
95 !-----------------------------------------------------------------------
96 !
97 ! URBLOC2DHYD%N = NUMVAR2DHYD
98 !
99 ! DO J= 1, NPOIN
100 ! UR2DHYD(1)%R(J) = ZF%R(J)
101 ! UR2DHYD(1)%R(J+NPOIN) = Z%R(J)
102 !
103 ! UR2DHYD(2)%R(J) = U2D%R(J)
104 ! UR2DHYD(2)%R(J+NPOIN) = UR2DHYD(2)%R(J)
105 !
106 ! UR2DHYD(3)%R(J) = V2D%R(J)
107 ! UR2DHYD(3)%R(J+NPOIN) = UR2DHYD(3)%R(J)
108 !
109 ! UR2DHYD(4)%R(J) = 0.D0
110 ! UR2DHYD(4)%R(J+NPOIN) = UR2DHYD(4)%R(J)
111 !
112 ! UR2DHYD(5)%R(J) = (U2D%R(J)**2.D0 + V2D%R(J)**2.D0)**0.5D0
113 ! UR2DHYD(5)%R(J+NPOIN) = UR2DHYD(5)%R(J)
114 !
115 ! UR2DHYD(6)%R(J) = TOB%R(J)
116 ! UR2DHYD(6)%R(J+NPOIN) = 0.D0
117 ! ENDDO
118 !
119 !-----------------------------------------------------------------------
120 ! POINT TO BIEF OBJECTS THAT WILL BE PRINTED TO
121 ! MAKE YOUR OWN DECISSION HERE
122 !-----------------------------------------------------------------------
123 !
124  urbloc3d%ADR(1)%P => vsp_d
125  urbloc3d%ADR(2)%P => vsp_d50
126  urbloc3d%ADR(3)%P => vsp_error
127  DO k = 1, nsicla
128  urbloc3d%ADR(3+k)%P => vsp_fra(k)
129  ENDDO
130 !
131 !-----------------------------------------------------------------------
132 ! POINT TO BIEF OBJECTS THAT WILL BE PRINTED TO 2DHYD_AS_3D FILE
133 ! MAKE YOUR OWN DECISSION HERE
134 !-----------------------------------------------------------------------
135 !
136 ! URBLOC2DHYD%ADR(1)%P => UR2DHYD(1)
137 ! URBLOC2DHYD%ADR(2)%P => UR2DHYD(2)
138 ! URBLOC2DHYD%ADR(3)%P => UR2DHYD(3)
139 ! URBLOC2DHYD%ADR(4)%P => UR2DHYD(4)
140 ! URBLOC2DHYD%ADR(5)%P => UR2DHYD(5)
141 ! URBLOC2DHYD%ADR(6)%P => UR2DHYD(6)
142 !
144 !
145 !-----------------------------------------------------------------------
146 ! ADD THIS TO TIME BECAUSE TECPLOT DOESN'T SUPPORT MULTIPLE TIME STAMPS IN ONE FILE.
147 !-----------------------------------------------------------------------
148 !
149  usertime= at + userprintcount / 1.0d5
150 !
151 !-----------------------------------------------------------------------
152 ! WRITE TIME STEP TO !VSPRES
153 !-----------------------------------------------------------------------
154 !
155  usertime = at
156  leopr_local = cvsmpperiod
157  IF(lt==0) leopr_local = leopr
159  & vsp_fra(1)%DIM1,
160  & gai_files(vspres)%LU,
161  & usertime,lt/percou,lispr,leopr_local,
164  & ur3d_files_labels,0,0)
165 
166 
167 !
168 !-----------------------------------------------------------------------
169 ! WRITE TIME STEP TO 2DHYD_AS_3D
170 !-----------------------------------------------------------------------
171 !
172 ! CALL WRITE_DATA(CP_FILES(3)%FMT,CP_FILES(3)%LU,
173 ! & NUMVAR2DHYD,USERTIME,LT/PERCOU,
174 ! & UR2DHYD_FILES_OUTVAR,UR2DHYD_FILES_LABELS,
175 ! & URBLOC2DHYD,UR2DHYD(1)%DIM1)
176 !
177 !-----------------------------------------------------------------------
178 !
179  RETURN
180  END
double precision userprintcount
integer lispr
LISTING PRINTOUT PERIOD.
type(bief_obj), target vsp_d50
type(bief_obj), target vsp_error
character(len=32), dimension(numvarur3d2res) ur3d_files_labels
type(bief_obj), target urbloc3d
double precision, target dt
Time step It may be different from the one in TELEMAC because of the morphological factor...
type(bief_file), dimension(maxlu_gai), target gai_files
For storing information on files.
logical, dimension(maxvar) sorimp
Listing output.
type(bief_obj), target vsp_d
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 urbloc
double precision, dimension(:,:,:), allocatable, target pro_f
Vertical sorting profile: fraction for each layer, class, point.
integer, parameter numvarur3d2res
Number of user variables to be written to file t2d_ur3d (3+nsicla)
integer cvsmpperiod
Printout Period for Full Vertical Sorting Model: PRO_D & PRO_F.
integer, target lt
Numero du pas de temps.
double precision, dimension(:,:,:), allocatable, target pro_d
Vertical sorting profile: depth for each layer, class, point.
type(bief_obj), dimension(nsiclm), target vsp_fra
integer percou
COUPLING PERIOD USED IN CVSM TO CALCULATE THE TIME, SHOULD COME FROM TELEMAC ONE DAY.
integer pro_max_max
Maximum Number of Profile SECTIONS.
integer, dimension(:), allocatable pro_max
Maximum layer number in a vertical sorting profile for each point.
integer leopr
GRAPHIC PRINTOUT PERIOD.
subroutine cvsp_write_profile_gaia
subroutine bief_desimp(FORMAT_RES, VARSOR, N, NRES, AT, LT, LISPRD, LEOPRD, SORLEO, SORIMP, MAXVAR, TEXTE, PTINIG, PTINIL, MESH, IIMP, ILEO, COMPGRAPH)
Definition: bief_desimp.f:9
integer, pointer npoin
Number of 2d points in the mesh.
logical, dimension(numvarur3d2res) ur3d_files_outvar
Definition: bief.f:3