The TELEMAC-MASCARET system  trunk
cvsp_output_init_gaia.f
Go to the documentation of this file.
1 ! ********************************
2  SUBROUTINE cvsp_output_init_gaia
3 ! ********************************
4 !
5 !
6 !***********************************************************************
7 ! GAIA V8P1 05/12/2017
8 !***********************************************************************
9 !
11 !
15 !
20 
21 !
26 !
32 !
33 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 !
36  USE bief
40 
41  IMPLICIT NONE
42 
43  CHARACTER(LEN=32) VLABEL
44 ! CHARACTER(LEN=11) :: EXTENS
45  INTEGER I, K
46 ! INTEGER IERR
47 !
48 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
49 !
50  INTEGER CFG(2) ! FOR 3D MESH
51  cfg(1) = optass
52  cfg(2) = produc ! PRODUC=1 HARD IN LECDON
53 !
54 
55 
56 !-----------------------------------------------------------------------
57 ! CHECKING DIMENSIONS
58 !-----------------------------------------------------------------------
59  IF(numvarur3d2res.LT.nsicla+3) THEN
60  WRITE(lu,*)'NUMVARUR3D2RES IS TOO SMALL'
61  WRITE(lu,*)'PLEASE CHANGE NUMVARUR3D2RES TO ',nsicla+3
62  ENDIF
63 !-----------------------------------------------------------------------
64 ! CHECKPOINTFILE
65 !-----------------------------------------------------------------------
67 ! USRMSH_2DHYD_NPLAN = 2
68 !
69 !
70 !-----------------------------------------------------------------------
71 ! ALLOCATES A 3D MESH FOR USEROUTPU: HERE VSPRES
72 !-----------------------------------------------------------------------
73 !
74  CALL almesh(usrmsh,'USRMSH',41,spheri,cfg,
75  & gai_files(gaigeo)%FMT, gai_files(gaigeo)%LU,
76  & equa,0,nplan=usrmsh_nplan)
77 !
78  DO i =1,usrmsh%NPTFR
79  usrmsh%NBOR%I(i) = i
80  END DO
81 !
82 !-----------------------------------------------------------------------
83 ! ALLOCATES A 3D MESH FOR USEROUTPU: HERE VSPHYD
84 !-----------------------------------------------------------------------
85 !
86 ! CALL ALMESH(USRMSH_2DHYD,'USRHYD',41,SPHERI,CFG,
87 ! & SIS_FILES(SISGEO)%FMT, SIS_FILES(SISGEO)%LU,
88 ! & EQUA,0,NPLAN=USRMSH_2DHYD_NPLAN)
89 !
90 ! DO I =1,USRMSH_2DHYD%NPTFR
91 ! USRMSH_2DHYD%NBOR%I(I) = I
92 ! END DO
93 !
94 !-----------------------------------------------------------------------
95 ! SET HERE THE NAMES OF THE PRINTOUT VARIABLES FOR THE USER FILE VSPRES
96 !-----------------------------------------------------------------------
97 !
98  DO i = 1,numvarur3d2res
99  IF (i.LE.3+nsicla) THEN
100  ur3d_files_outvar(i) = .true.
101  ELSE
102  ur3d_files_outvar(i) = .false.
103  ENDIF
104  WRITE(unit=vlabel, fmt='(A5,I2,A25)') 'FRACTION_CLASS_',i-3
105  ur3d_files_labels(i) = vlabel
106  ENDDO
107 ! EXAMPLE FOR MANUALLY OVERWRITTING LEN=32
108  ur3d_files_labels(1)= 'Z [M] ' !'PROFILE_ELEVATION '
109  ur3d_files_labels(2)= 'PROFILE_D50 [M] '
110  ur3d_files_labels(3)= 'PROFILE_ERROR [-] '
111 !
112 !-----------------------------------------------------------------------
113 ! SET HERE THE NAMES OF THE PRINTOUT VARIABLES FOR THE USER FILE VSPHYD
114 !-----------------------------------------------------------------------
115 !
116 ! DO I = 1,NUMVAR2DHYD
117 ! UR2DHYD_FILES_OUTVAR(I) = .TRUE.
118 ! ENDDO
119 ! !'Z [M] AND ZF [M] '
120 ! UR2DHYD_FILES_LABELS(1)= 'Z [M] '
121 ! UR2DHYD_FILES_LABELS(2)= 'U [M/S] '
122 ! UR2DHYD_FILES_LABELS(3)= 'V [M/S] '
123 ! UR2DHYD_FILES_LABELS(4)= 'W [M/S] '
124 ! UR2DHYD_FILES_LABELS(5)= 'SCALAR VELOCITY [M/S] '
125 ! UR2DHYD_FILES_LABELS(6)= 'TAU [N/M**2] '
126 !
127 !-----------------------------------------------------------------------
128 ! ALLOCATES THE BLOCK CONNECTING A VARIABLE NAME TO ITS ARRAY
129 !-----------------------------------------------------------------------
130 !
131  CALL allblo(urbloc3d, 'URBL3D')
132 ! CALL ALLBLO(URBLOC2DHYD, 'URB2DH')
133 !
134 !-----------------------------------------------------------------------
135 ! OPENS THE FILES FOR WRITING
136 !-----------------------------------------------------------------------
137 !
138 ! I=3
139 ! IF(NCSIZE.LE.1) THEN
140 ! SCALAR
141 ! CALL OPEN_MESH(CP_FILES(I)%FMT,CP_FILES(I)%TELNAME,
142 ! & CP_FILES(I)%LU,CP_FILES(I)%ACTION,IERR)
143 ! ELSE
144 ! PARALLEL, FILE TYPE: SCAL
145 ! IF(CP_FILES(I)%TYPE(1:4).EQ.'SCAL') THEN
146 ! CALL OPEN_MESH(CP_FILES(I)%FMT,CP_FILES(I)%TELNAME,
147 ! & CP_FILES(I)%LU,CP_FILES(I)%ACTION,IERR)
148 ! PARALLEL, OTHER FILE TYPE
149 ! ELSE
150 ! CALL OPEN_MESH(CP_FILES(I)%FMT,TRIM(CP_FILES(I)%TELNAME)
151 ! & //EXTENS(NCSIZE-1,IPID),
152 ! & CP_FILES(I)%LU,CP_FILES(I)%ACTION,IERR)
153 ! ENDIF
154 ! ENDIF
155 ! CALL CHECK_CALL(IERR,'CVSP_OUTPU_INIT:OPEN_MESH')
156 
157 ! IF(IERR.NE.0) THEN
158 ! WRITE(LU,*) 'ERROR WHILE OPENING: ', CP_FILES(I)%TELNAME
159 ! WRITE(LU,*) 'IN ',CP_FILES(I)%FMT,' FORMAT '
160 ! WRITE(LU,*) 'IN ',CP_FILES(I)%ACTION,' MODE'
161 ! WRITE(LU,*) 'ERROR ',IERR
162 ! CALL PLANTE(1)
163 ! STOP
164 ! ENDIF
165 !
166 !
167 !-----------------------------------------------------------------------
168 ! WRITES THE HEADER OF THE RESFILES
169 !-----------------------------------------------------------------------
170 !
171  CALL write_header(gai_files(vspres)%FMT,
172  & gai_files(vspres)%LU,
173  & 'USEROUTPUT3D '//
174  & ' ',
175  & numvarur3d2res,
178 ! CALL WRITE_HEADER(CP_FILES(3)%FMT,
179 ! & CP_FILES(3)%LU,
180 ! & '2D HYDRAULIC PARAMETERS IN 3D '//
181 ! & ' ',
182 ! & NUMVAR2DHYD,
183 ! & UR2DHYD_FILES_LABELS,
184 ! & UR2DHYD_FILES_OUTVAR)
185 !
186 !-----------------------------------------------------------------------
187 ! WRITES THE MESH INFORMATION IN THE OUTPUT FILE :
188 !-----------------------------------------------------------------------
189 !
190  CALL write_mesh(gai_files(vspres)%FMT, ! RESULTS FILE FORMAT
191  & gai_files(vspres)%LU, ! LU FOR RESULTS FILE
192  & usrmsh,
193  & usrmsh_nplan, ! NUMBER OF PLANES /NA/
194  & mardat, ! START DATE
195  & martim,t1,t2, ! START TIME
196  & ncsize.GT.1, nptir)
197 
198 ! CALL WRITE_MESH(CP_FILES(3)%FMT, ! RESULTS FILE FORMAT
199 ! & CP_FILES(3)%LU, ! LU FOR RESULTS FILE
200 ! & USRMSH_2DHYD,
201 ! & USRMSH_2DHYD_NPLAN, ! NUMBER OF PLANES /NA/
202 ! & MARDAT, ! START DATE
203 ! & MARTIM,T1,T2, ! START TIME
204 ! & NCSIZE.GT.1, NPTIR)
205 !
206 !-----------------------------------------------------------------------
207 ! INITS OUTPUT VECTORS
208 !-----------------------------------------------------------------------
209 !
210 ! VSPRES
211  DO k = 1, nsicla
212  CALL bief_allvec(1,vsp_fra(k),'VSPFRA',41,1,1,usrmsh)
213  ENDDO
214 
215  CALL bief_allvec(1,vsp_d, 'VSP__D',41,1,1,usrmsh)
216  CALL bief_allvec(1,vsp_d50, 'VSPD50',41,1,1,usrmsh)
217  CALL bief_allvec(1,vsp_error, 'VSP_ER',41,1,1,usrmsh)
218 
219 ! VSPHYD
220 ! DO K = 1, NUMVAR2DHYD
221 ! CALL BIEF_ALLVEC(1,UR2DHYD(K),'VSPHYD',41,1,1,USRMSH_2DHYD)
222 ! ENDDO
223 !
224 !-----------------------------------------------------------------------
225 !
226  RETURN
227  END
subroutine write_mesh(FFORMAT, NFILE, MESH, NPLAN, DATE, TIME, T1, T2, PARALL, NPTIR, NGEO, GEOFORMAT, LATLONG)
Definition: write_mesh.f:8
integer produc
Matrix-vector product.
type(bief_obj), target vsp_d50
type(bief_obj), target vsp_error
character(len=32), dimension(numvarur3d2res) ur3d_files_labels
subroutine allblo(BLO, NOM)
Definition: allblo.f:7
type(bief_obj), target urbloc3d
type(bief_file), dimension(maxlu_gai), target gai_files
For storing information on files.
integer, dimension(3) martim
Original hour of time.
subroutine bief_allvec(NAT, VEC, NOM, IELM, DIM2, STATUT, MESH)
Definition: bief_allvec.f:7
subroutine cvsp_output_init_gaia
type(bief_obj), target vsp_d
integer optass
Matrix storage.
subroutine write_header(FFORMAT, NRES, TITLE, NVAR, NOMVAR, OUTVAR)
Definition: write_header.f:7
integer, target nsicla
Number of sediment classes of bed material (less than NISCLM)
logical spheri
Work in spherical coordinates (hard-coded)
type(bief_obj), pointer t2
integer, parameter numvarur3d2res
Number of user variables to be written to file t2d_ur3d (3+nsicla)
type(bief_obj), pointer t1
Aliases for work vectors in tb.
integer, target gaigeo
type(bief_obj), dimension(nsiclm), target vsp_fra
integer pro_max_max
Maximum Number of Profile SECTIONS.
subroutine almesh(MESH, NOM, IELM, SPHERI, CFG, FFORMAT, NFIC, EQUA, REFINE, NPLAN, NPMAX, NPTFRX, NELMAX, PROJECTION, LATI0, LONGI0, CONVERGENCE, RLEVEL)
Definition: almesh.f:8
character(len=20) equa
Equation solved.
logical, dimension(numvarur3d2res) ur3d_files_outvar
integer, dimension(3) mardat
Orginal date of time.
Definition: bief.f:3