The TELEMAC-MASCARET system  trunk
nametrac_khione.f
Go to the documentation of this file.
1 ! **************************
2  SUBROUTINE nametrac_khione
3 ! **************************
4 !
5  & (nametrac,ntrac)
6 !
7 !
8 !***********************************************************************
9 ! KHIONE V7P3
10 !***********************************************************************
11 !
12 !brief Add tracers needed for the modelling of frazil ice
13 !
14 !history F. SOUILLE (EDF)
15 !+ 30/09/2019
16 !+ V8P0
17 !+ Fixed name and unit of frazil (conc to volumic fraction)
18 !
19 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 !| NAMETRAC |<->| ARRAY OF NAMES OF TRACERS
21 !| NTRAC |<->| MODIFYING NUMBER OF TRACER IF NECESARY
22 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 !
27 ! USE INTERFACE_KHIONE, EX_NAMETRAC_KHIONE => NAMETRAC_KHIONE
28 !
29  IMPLICIT NONE
30 !
31 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
32 !
33  INTEGER , INTENT(INOUT):: NTRAC
34  CHARACTER(LEN=32), INTENT(INOUT):: NAMETRAC(*)
35 !
36 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
37 !
38  INTEGER :: IFRA,I,K
39  CHARACTER(LEN=2) :: CHAR2
40  LOGICAL :: FOUND
41 !
42 !-----------------------------------------------------------------------
43 !
44  found = .false.
45 !
46 !-----------------------------------------------------------------------
47 !
48 ! ADDING TRACERS WHEN RELEVANT
49 !
50 ! THERMAL BUDGET
51  IF( (thermal_budget) .OR. (clogging) ) THEN
52  found = .true.
53 !
54 ! ~~> TEMPERATURE
55  CALL addtracer(nametrac,ntrac,
56  & ind_t,.true.,
57  & 'TEMPERATURE ',
58  & 'TEMPERATURE ',
59  & ' oC ')
60 !
61 ! ~~> SALINITY
62  IF(salinity) THEN
63  CALL addtracer(nametrac,ntrac,
64  & ind_s,.true.,
65  & 'SALINITE ',
66  & 'SALINITY ',
67  & ' ppt ' )
68  ENDIF
69 !
70 ! ~~> FRAZIL MULTI-CLASS
71  ifra = 1
72  IF(nc_fra.GT.1) THEN
73 !
74  WRITE(lu,*) 'MULTI-CLASS IS NOT VALIDATED YET',
75  & 'USE IT AT YOUR OWN RISK'
76 !
77  ind_fra = ntrac+1
78  DO i=1,nc_fra
79  WRITE(char2,'(I2)') ifra
80  ifra = ifra + 1
81  CALL addtracer(nametrac,ntrac,k,.true.,
82  & 'FRASIL ' //adjustl(char2)//' ',
83  & 'FRAZIL ' //adjustl(char2)//' ',
84  & 'VOLUME FRACTION ')
85  ENDDO
86 
87 ! ~~> FRAZIL MONO-CLASS
88  ELSE
89  CALL addtracer(nametrac,ntrac,
90  & ind_fra,.true.,
91  & 'FRASIL ',
92  & 'FRAZIL ',
93  & 'VOLUME FRACTION ')
94  ENDIF
95 !
96 ! ~~> FRAZIL PRECIPITATION
97  IF(prec) THEN
98  CALL addtracer(nametrac,ntrac,
99  & ind_pre,.true.,
100  & 'FRASIL PRECIPITA',
101  & 'FRAZIL PRECIPITA',
102  & 'SURFAC FRACTION ')
103  CALL addtracer(nametrac,ntrac,
104  & ind_thi,.true.,
105  & 'EPAISSEUR COUV. ',
106  & 'COVER THICKNESS ',
107  & ' M ')
108  ENDIF
109 !
110 ! STATIC ICE COVER
111  ELSEIF( (icover_impact) .OR. (bd_ice) ) THEN
112 !
113  found = .true.
114 !
115 ! ~~> TEMPERATURE
116  CALL addtracer(nametrac,ntrac,
117  & ind_t,.true.,
118  & 'TEMPERATURE ',
119  & 'TEMPERATURE ',
120  & ' oC ')
121 !
122 ! ~~> SALINITY
123  IF(salinity) THEN
124  CALL addtracer(nametrac,ntrac,
125  & ind_s,.true.,
126  & 'SALINITE ',
127  & 'SALINITY ',
128  & ' ppt ' )
129  ENDIF
130 !
131  ENDIF
132 !
133 !-----------------------------------------------------------------------
134 !
135 ! UNKNOWN PROCESS
136 !
137  IF(.NOT.found ) THEN
138  WRITE(lu,*) 'NAMETRAC_KHIONE: NO ACTIVE PROCESSES'
139  CALL plante(1)
140  stop
141  ENDIF
142 !
143 !-----------------------------------------------------------------------
144 !
145  RETURN
146  END SUBROUTINE
subroutine nametrac_khione(NAMETRAC, NTRAC)
subroutine addtracer(NAMETRAC, MTRAC, ITRAC, ADD, NAME1, NAME2, UNIT0)
Definition: addtracer.f:7