The TELEMAC-MASCARET system  trunk
nomvar_gaia.f
Go to the documentation of this file.
1 ! **********************
2  SUBROUTINE nomvar_gaia
3 ! **********************
4 !
5 !***********************************************************************
6 ! GAIA
7 !***********************************************************************
8 !
11 !
12 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 !
15 !
17  IMPLICIT NONE
18 !
19 !!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
20 !
21  INTEGER I,J,K
22 !
23 ! Local arrays dimensioned with fixed parameters from
24 ! DECLARATIONS_GAIA. It is not a hidden dynamic allocation.
25 !
26  CHARACTER(LEN=32) TEXTE_QSC(nsiclm)
27  CHARACTER(LEN=32) TEXTE_ES(nlaymax)
28  CHARACTER(LEN=32) TEXTE_CONC(nlaymax)
29  CHARACTER(LEN=32) TEXTE_MTRANS(nlaymax)
30  CHARACTER(LEN=32) TEXTE_TOCEMUD(nlaymax)
31  CHARACTER(LEN=32) TEXTE_PARTHE(nlaymax)
32  CHARACTER(LEN=8) MNEMO_ES(nlaymax)
33  CHARACTER(LEN=8) MNEMO_QSC(nsiclm)
34  CHARACTER(LEN=8) MNEMO_CONC(nlaymax)
35  CHARACTER(LEN=8) MNEMO_MTRANS(nlaymax)
36  CHARACTER(LEN=8) MNEMO_TOCEMUD(nlaymax)
37  CHARACTER(LEN=8) MNEMO_PARTHE(nlaymax)
38  CHARACTER(LEN=2) CLA,LAY,NP
39 !
40  CHARACTER(LEN=2) CHAR2
41 !
42 !-----------------------------------------------------------------------
43 !
44 !-----------------------------------------------------------------------
45 !
46 ! Here only English is supported, do not add NOMVAR in French
47 ! otherwise it causes issues of files compatibility in the
48 ! restart
49 !
50 ! The variables names in TEXTE have to be defined with exactly
51 ! the same order as they were defined in VARSOR
52 !
53  texte(01) = 'U CLIPPED M/S '
54  texte(02) = 'V CLIPPED M/S '
55  texte(03) = 'H CLIPPED M '
56  texte(04) = 'ZS CLIPPED M '
57  texte(05) = 'BOTTOM M '
58  texte(06) = 'CLIPPED Q M3/S/M '
59  texte(07) = 'CLIPPED QX M3/S/M '
60  texte(08) = 'CLIPPED QY M3/S/M '
61  texte(09) = 'RIGID BED M '
62  texte(10) = 'BED SHEAR STRESSN/M2 '
63  texte(11) = 'WAVE HEIGHT HM0 M '
64  texte(12) = 'PEAK PERIOD TPR5S '
65  texte(13) = 'MEAN DIRECTION DEG '
66  texte(14) = 'SOLID DISCH KG/(M*S) '
67  texte(15) = 'SOLID DISCH X KG/(M*S) '
68  texte(16) = 'SOLID DISCH Y KG/(M*S) '
69  texte(17) = 'CUMUL BED EVOL M '
70  texte(18) = 'TOTAL ROUGHNESS M '
71  texte(19) = 'SKIN FRICTION MU '
72  texte(20) = 'MEAN DIAMETER M '
73  texte(21) = 'ORBITAL WAVE VELM/S '
74  texte(22) = 'REFERENCE LEVEL M '
75  nvar = 22
76 !
77 ! Set the RATIOS name in the result file (TEXTE) and in
78 ! the steering file (MNEMO): one output array per sand class per layer
79 ! "LAY 2 SAND RAT 3" corresponds to the sand ratio of sand class 3
80 ! in the 2nd layer
81 !
83  DO i=1,nsand
84  DO j=1,nomblay
85  IF(j.LT.10) THEN
86  WRITE(lay,'(I1)') j
87  ELSEIF(j.LT.100) THEN
88  WRITE(lay,'(I2)') j
89  ELSE
90  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nomblay
91  WRITE (lu,*) ' LAYERS'
92  CALL plante(1)
93  stop
94  ENDIF
95  IF(i.LT.10) THEN
96  WRITE(cla,'(I1)') i
97  ELSEIF(i.LT.100) THEN
98  WRITE(cla,'(I2)') i
99  ELSE
100  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nsand
101  WRITE (lu,*) ' CLASSES'
102  CALL plante(1)
103  stop
104  ENDIF
105 ! Sand ratio: store all layers of class 1, then all layers of class 2, etc.
106 ! It has to be the same order as in point_gaia
107  texte(nvar+(i-1)*nomblay+j)=
108  & trim('LAY'//lay//'SAND RAT'//cla)
109  mnemo(nvar+(i-1)*nomblay+j)=trim(lay)//'A'//cla
110  ENDDO
111  ENDDO
113 !
114 ! Set the variables' names in the result file (TEXTE) and in
115 ! the steering file (MNEMO) for the arrays with NSICLA
116 ! entries -> one output array per sediment class
117  DO j=1,nsicla
118 ! Make sure that the numbers from 1 to 9
119 ! are printed with a 1 digit integer format
120  IF(j.LT.11) THEN
121  WRITE(cla,'(I1)') j
122 ! Make sure that the numbers from 10 to 100
123 ! are printed with a 2 digits integer format
124 ! This is sufficient at the moment since NISCLM = 10
125  ELSEIF(j.LT.100) THEN
126  WRITE(cla,'(I2)') j
127  ELSE
128  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nsicla
129  WRITE (lu,*) ' CLASSES'
130  CALL plante(1)
131  stop
132  ENDIF
133 ! Transport rate QSCL for the class number CLA
134 ! (sum of bedload + suspension)
135  texte(nvar+j) = trim('QS CLASS '//cla)
136  mnemo(nvar+j) = trim('QS'//cla)
137 ! Bedload transport rate (QSCL_C) for the class number CLA
138  texte_qsc(j) = trim('QS BEDLOAD CL'//cla)
139  mnemo_qsc(j) = trim('QSBL'//cla)
140  ENDDO
141 !
144 !
146  texte(nvar_qs_c+1)='QS BEDLOAD KG/(M*S) '
147 !
148  nvar_qsxc=nvar+1
149  texte(nvar_qsxc+1)='QS BEDLOAD X KG/(M*S) '
150 !
151  nvar_qsyc=nvar+2
152  texte(nvar_qsyc+1)='QS BEDLOAD Y KG/(M*S) '
153 !
154  nvar=nvar_qsyc+1
155  nvar_qscl_c = nvar
156 !
157  DO i=1,nsicla
158  texte(nvar+i) = texte_qsc(i)
159  mnemo(nvar+i) = mnemo_qsc(i)
160  ENDDO
162 !
163 ! Set the variables' names in the result file (TEXTE) and in
164 ! the steering file (MNEMO) for the arrays with NOMBLAY*NPOIN
165 ! entries -> one output array per layer
166  DO k=1,nomblay
167 ! Make sure that the numbers from 1 to 9
168 ! are printed with a 1 digit integer format
169  IF(k.LT.10) THEN
170  WRITE(lay,'(I1)') k
171 ! Make sure that the numbers from 10 to 100
172 ! are printed with a 2 digits integer format
173 ! This is sufficient at the moment since NLAYMAX = 20
174  ELSEIF(k.LT.100) THEN
175  WRITE(lay,'(I2)') k
176  ELSE
177  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nomblay
178  WRITE (lu,*) ' LAYERS'
179  CALL plante(1)
180  stop
181  ENDIF
182  ! Thickness of the layer LAY (ES)
183  texte_es(k)(1:16) = 'LAYER'//lay//' THICKNES'
184  texte_es(k)(17:32) = 'M '
185  mnemo_es(k) = trim(lay)//'ES '
186  ! Concentration of the layer LAY (LAYCONC)
187  texte_conc(k)(1:16) = 'LAYER'//lay//' CONC '
188  texte_conc(k)(17:32) = 'KG/L '
189  mnemo_conc(k) = trim(lay)//'CONC '
190  ! Mass transfer of the layer LAY (MTRANSFER)
191  texte_mtrans(k)(1:16) = 'LAYER'//lay//' MTRANS '
192  texte_mtrans(k)(17:32) = 'KG '
193  mnemo_mtrans(k) = trim(lay)//'MTRANS '
194  ! Critical erosion shear stress of the mud of the layer LAY
195  ! (TOCEMUD)
196  texte_tocemud(k)(1:16) = 'LAYER'//lay//' TOCEMU '
197  texte_tocemud(k)(17:32) = 'KG-1 S-2 M-1 '
198  mnemo_tocemud(k) = trim(lay)//'TOCEMU '
199  ! Partheniades erosion coefficient of the layer LAY (PARTHE)
200  texte_parthe(k)(1:16) = 'LAYER'//lay//' PARTHE '
201  texte_parthe(k)(17:32) = 'KG M-2 S-1 '
202  mnemo_parthe(k) = trim(lay)//'PARTHE '
203  ENDDO
204 !
205  DO i=1,nomblay
206  texte(nvar+i) = texte_es(i)
207  mnemo(nvar+i) = mnemo_es(i)
208  texte(nvar+nomblay+i) = texte_conc(i)
209  mnemo(nvar+nomblay+i) = mnemo_conc(i)
210  ENDDO
211  nvar_laythi = nvar
213  nvar=nvar+2*nomblay
214 !
216  DO i=1,max(4,npriv)
217  WRITE(np,'(I1)') i
218  texte(nvar_priv+i)=trim('PRIVE '//np//' ')
219  ENDDO
220  nvar=nvar+max(4,npriv)
221 !
222 ! IF NAMES OF PRIVATE VARIABLES GIVEN
223 !
224  IF(n_names_priv.GT.0) THEN
225  DO i=1,n_names_priv
227  ENDDO
228  ENDIF
229 !
231 ! 2 3RD FRACTION MEANS FRACTION OF MUD OF CLASS 3 IN 2ND LAYER
232 !
233  DO i=1,nmud
234  DO j=1,nomblay
235  IF(j.LT.10) THEN
236  WRITE(lay,'(I1)') j
237  ELSEIF(j.LT.100) THEN
238  WRITE(lay,'(I2)') j
239  ELSE
240  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nomblay
241  WRITE (lu,*) ' LAYERS'
242  CALL plante(1)
243  stop
244  ENDIF
245  IF(i.LT.10) THEN
246  WRITE(cla,'(I1)') i
247  ELSEIF(i.LT.100) THEN
248  WRITE(cla,'(I2)') i
249  ELSE
250  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nmud
251  WRITE (lu,*) ' CLASSES'
252  CALL plante(1)
253  stop
254  ENDIF
255 ! RATIO MUD: ALL LAYERS OF CLASS 1, THEN ALL LAYERS OF CLASS 2, ETC.
256 ! SAME ORDER AS IN POINT_GAIA
257  texte(nvar_ratiom+(i-1)*nomblay+j)=
258  & trim('LAY'//lay//'RAT MUD'//cla)
259  mnemo(nvar_ratiom+(i-1)*nomblay+j)=trim(lay)//'R'//cla
260  ENDDO
261  ENDDO
263 !
265 ! 2 3RD FRACTION MEANS FRACTION OF MUD OF CLASS 3 IN 2ND LAYER
266 !
267  DO i=1,nsand
268  DO j=1,nomblay
269  IF(j.LT.10) THEN
270  WRITE(lay,'(I1)') j
271  ELSEIF(j.LT.100) THEN
272  WRITE(lay,'(I2)') j
273  ELSE
274  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nomblay
275  WRITE (lu,*) ' LAYERS'
276  CALL plante(1)
277  stop
278  ENDIF
279  IF(i.LT.10) THEN
280  WRITE(cla,'(I1)') i
281  ELSEIF(i.LT.100) THEN
282  WRITE(cla,'(I2)') i
283  ELSE
284  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nsand
285  WRITE (lu,*) ' CLASSES'
286  CALL plante(1)
287  stop
288  ENDIF
289 ! MASS_S: ALL LAYERS OF CLASS 1, THEN ALL LAYERS OF CLASS 2, ETC.
290 ! SAME ORDER AS IN POINT_GAIA
291  texte(nvar_mass_s+(i-1)*nomblay+j)=
292  & trim('LAY'//lay//'MAS SAND'//cla)
293  mnemo(nvar_mass_s+(i-1)*nomblay+j)=trim(lay)//'S'//cla
294  ENDDO
295  ENDDO
297 !
299 ! 2 3RD FRACTION MEANS FRACTION OF MUD OF CLASS 3 IN 2ND LAYER
300 !
301  DO i=1,nmud
302  DO j=1,nomblay
303  IF(j.LT.10) THEN
304  WRITE(lay,'(I1)') j
305  ELSEIF(j.LT.100) THEN
306  WRITE(lay,'(I2)') j
307  ELSE
308  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nomblay
309  WRITE (lu,*) ' LAYERS'
310  CALL plante(1)
311  stop
312  ENDIF
313  IF(i.LT.10) THEN
314  WRITE(cla,'(I1)') i
315  ELSEIF(i.LT.100) THEN
316  WRITE(cla,'(I2)') i
317  ELSE
318  WRITE (lu,*) 'NOMVAR_GAIA: NOT IMPLEMENTED FOR ',nmud
319  WRITE (lu,*) ' CLASSES'
320  CALL plante(1)
321  stop
322  ENDIF
323 ! MASS_M: ALL LAYERS OF CLASS 1, THEN ALL LAYERS OF CLASS 2, ETC.
324 ! SAME ORDER AS IN POINT_GAIA
325  texte(nvar_mass_m+(i-1)*nomblay+j)=
326  & trim('LAY'//lay//'MASS MUD'//cla)
327  mnemo(nvar_mass_m+(i-1)*nomblay+j)=trim(lay)//'M'//cla
328  ENDDO
329  ENDDO
331 !
332  DO i=1,nomblay
333  texte(nvar+i) = texte_mtrans(i)
334  mnemo(nvar+i) = mnemo_mtrans(i)
335  texte(nvar+nomblay+i) = texte_tocemud(i)
336  mnemo(nvar+nomblay+i) = mnemo_tocemud(i)
337  texte(nvar+2*nomblay+i) = texte_parthe(i)
338  mnemo(nvar+2*nomblay+i) = mnemo_parthe(i)
339  ENDDO
340  nvar_mtrans = nvar
343  nvar=nvar+nomblay*3
344 !
345  DO i=1,nvar
346  textpr(i)=texte(i)
347  ENDDO
348 !
349 !-----------------------------------------------------------------------
350 !
351 ! OTHER NAMES FOR OUTPUT VARIABLES (STEERING FILE)
352 !
353 ! VELOCITY U
354  mnemo(1) = 'U '
355 ! VELOCITY V
356  mnemo(2) = 'V '
357 ! WATER DEPTH
358  mnemo(3) = 'H '
359 ! FREE SURFACE
360  mnemo(4) = 'S '
361 ! BOTTOM
362  mnemo(5) = 'B '
363 ! SCALAR FLOW RATE
364  mnemo(6) = 'Q '
365 ! SCALAR FLOW RATE X
366  mnemo(7) = 'I '
367 ! SCALAR FLOW RATE Y
368  mnemo(8) = 'J '
369 ! RIGID BED
370  mnemo(9) = 'R '
371 ! MEAN BOTTOM FRICTION
372  mnemo(10) = 'TOB '
373 ! WAVE HEIGHT
374  mnemo(11) = 'W '
375 ! PEAK PERIOD
376  mnemo(12) = 'X '
377 ! WAVE DIRECTION
378  mnemo(13) = 'THETAW '
379 ! SOLID DISCHARGE
380  mnemo(14) = 'M '
381 ! SOLID DISCHARGE X
382  mnemo(15) = 'N '
383 ! SOLID DISCHARGE Y
384  mnemo(16) = 'P '
385 ! EVOLUTION
386  mnemo(17) = 'E '
387 ! KS
388  mnemo(18) = 'KS '
389 ! MU
390  mnemo(19) = 'MU '
391 ! D50
392  mnemo(20) = 'D50 '
393 ! WAVE ORBITAL VELOCITY
394  mnemo(21) = 'UWB '
395 ! REFERENCE LEVEL FOR NESTPOR
396  mnemo(22) = 'ZRL '
397 ! BEDLOAD TRANSPORT RATE
398  mnemo(nvar_qs_c+1) = 'QSBL '
399 ! BEDLOAD TRANSPORT RATE X
400  mnemo(nvar_qsxc+1) = 'QSBLX '
401 ! BEDLOAD TRANSPORT RATE Y
402  mnemo(nvar_qsyc+1) = 'QSBLY '
403 ! PRIVATE VARIABLE 1
404  mnemo(nvar_priv+1) = 'A '
405 ! PRIVATE VARIABLE 2
406  mnemo(nvar_priv+2) = 'G '
407 ! PRIVATE VARIABLE 3
408  mnemo(nvar_priv+3) = 'L '
409 ! PRIVATE VARIABLE 4
410  mnemo(nvar_priv+4) = 'O '
411 !
412 !-----------------------------------------------------------------------
413 ! CLANDESTINES VARIABLES
415  IF(varcl%N.GT.0) THEN
416  DO i=1,varcl%N
417  texte(nvar_varcl+i)='VAR CLA '
418  textpr(nvar_varcl+i)='VAR CLA '
419  mnemo(nvar_varcl+i)='VC '
420  ENDDO
421  ENDIF
422  nvar=nvar+varcl%N
423 !
424 !-----------------------------------------------------------------------
425 !
426 ! DIFFERENTIATORS
427 !
429  IF(nadvar.GT.0) THEN
430  DO i=1,nadvar
433  WRITE(char2,'(I2)') i
434  mnemo(nvar_advar+i) = 'AD'//adjustl(char2)//' '
435  ENDDO
436  ENDIF
438 !
439 !-----------------------------------------------------------------------
440 !
441  IF(nvar.LT.maxvar) THEN
442  DO i=nvar+1,maxvar
443  mnemo(i) =' '
444  texte(i) =' '
445  textpr(i)=' '
446  ENDDO
447  ENDIF
448 !
449 !-----------------------------------------------------------------------
450 !
451  IF(nvar.GT.maxvar) THEN
452  IF(lng.EQ.1) THEN
453  WRITE(lu,*) 'NOMVAR_GAIA : MAXVAR DOIT VALOIR AU MOINS ',
454  & nvar
455  ENDIF
456  IF(lng.EQ.2) THEN
457  WRITE(lu,*) 'NOMVAR_GAIA: MAXVAR SHOULD BE AT LEAST ',
458  & nvar
459  ENDIF
460  CALL plante(1)
461  stop
462  ENDIF
463 !
464 !-----------------------------------------------------------------------
465 !
466  RETURN
467  END
integer, target nomblay
Number of bed load model layers = NUMSTRAT+1 to take the active layer into account.
type(bief_obj), target varcl
Block of clandestine variables.
integer nvar
Index in varsor for output variables.
character(len=32), dimension(maxvar) names_advar
Names of differenting arrays (given by user)
character(len=32), dimension(maxvar) texte
Name of output variable.
integer, parameter maxvar
Maximum number of output variables.
integer nsand
Total number of sand.
integer, parameter nsiclm
Maximum number of sediment classes.
integer, target nsicla
Number of sediment classes of bed material (less than NISCLM)
integer nmud
Total number of muds.
integer, parameter nlaymax
Maximum number of layers on the mesh.
character(len=32), dimension(4) names_prive
Names of private arrays (given by user)
character(len=8), dimension(maxvar) mnemo
Mnemo of variables for graphic printouts (b for bottom, etc.)
subroutine nomvar_gaia
Definition: nomvar_gaia.f:4
integer npriv
Number of private arrays, number of private arrays with given name.
integer nadvar
Number of differentiating arrays, and those with a given name.
integer nvar_ratios
Index in varsor for output variables.
character(len=32), dimension(maxvar) textpr
Name of variable in previous computation file.