4 |
|
|
5 |
! iq = 1 pour l'eau vapeur |
! iq = 1 pour l'eau vapeur |
6 |
! iq = 2 pour l'eau liquide |
! iq = 2 pour l'eau liquide |
7 |
! et éventuellement iq = 3, ..., nqmx pour les autres traceurs |
! et \'eventuellement iq = 3, ..., nqmx pour les autres traceurs |
8 |
|
|
9 |
use dimens_m, only: nqmx |
use dimens_m, only: nqmx |
10 |
|
|
12 |
|
|
13 |
private nqmx |
private nqmx |
14 |
|
|
15 |
INTEGER iadv(nqmx) ! indice du schéma d'advection pour l'eau et les traceurs |
INTEGER iadv(nqmx) ! indice du sch\'ema d'advection pour l'eau et les traceurs |
|
! 11 means Van-Leer scheme for hadv et monotonous PPM for vadv |
|
|
|
|
|
integer, parameter:: allowed_adv(10) = (/0, 1, 2, 10, 12, 13, 14, 16, 17, 18/) |
|
|
! Allowed values for hadv and vadv: |
|
|
! 1: schema transport type "humidite specifique LMD" |
|
|
! 2: schema amont |
|
|
! 10: schema Van-leer (retenu pour l'eau vapeur et liquide) |
|
|
! 12: schema Frederic Hourdin I |
|
|
! 13: schema Frederic Hourdin II |
|
|
! 14: schema Van-leer + humidite specifique |
|
|
! 16: schema PPM Monotone(Collela & Woodward 1984) |
|
|
! 17: schema PPM Semi Monotone (overshoots autorisés) |
|
|
! 18: schema PPM Positif Defini (overshoots undershoots autorisés) |
|
|
! Pour Van-Leer plus vapeur d'eau saturée : iadv(1)=4 |
|
|
|
|
|
INTEGER hadv(nqmx) ! indice schéma transport horizontal |
|
|
INTEGER vadv(nqmx) ! indice schéma transport vertical |
|
16 |
|
|
17 |
character(len=10) tname(nqmx) |
character(len=10) tname(nqmx) |
18 |
! nom du traceur pour fichiers restart et historiques |
! nom du traceur pour fichiers restart et historiques |
29 |
! F. Forget, M.-A. Filiberti |
! F. Forget, M.-A. Filiberti |
30 |
|
|
31 |
! Initialisation des traceurs |
! Initialisation des traceurs |
32 |
! Choix du schéma pour l'advection dans le fichier "traceur.def" |
! Choix du sch\'ema pour l'advection dans le fichier "traceur.def" |
33 |
|
|
34 |
use nr_util, only: assert |
use nr_util, only: assert |
35 |
use jumble, only: new_unit |
use jumble, only: new_unit |
36 |
|
|
37 |
! Variables local to the procedure: |
! Local: |
38 |
|
character(len=3) descrq(0:14) |
|
character(len=3) descrq(18) |
|
39 |
integer iq, iostat, nq_local, unit |
integer iq, iostat, nq_local, unit |
40 |
|
|
41 |
|
integer, parameter:: allowed_adv(10) = (/0, 10, 12, 13, 14/) |
42 |
|
! Allowed values for iadv: |
43 |
|
! 10: schema Van-leer (retenu pour l'eau vapeur et liquide) |
44 |
|
! 12: schema Frederic Hourdin I |
45 |
|
! 13: schema Frederic Hourdin II |
46 |
|
! 14: schema Van-leer + humidite specifique |
47 |
|
|
48 |
!----------------------------------------------------------------------- |
!----------------------------------------------------------------------- |
49 |
|
|
50 |
print *, "Call sequence information: iniadvtrac" |
print *, "Call sequence information: iniadvtrac" |
51 |
|
|
52 |
! Initializations: |
! Initializations: |
53 |
|
descrq(0)='' |
54 |
descrq(10)='VL1' |
descrq(10)='VL1' |
|
descrq(11)='VLP' |
|
55 |
descrq(12)='FH1' |
descrq(12)='FH1' |
56 |
descrq(13)='FH2' |
descrq(13)='FH2' |
57 |
descrq(14)='VLH' |
descrq(14)='VLH' |
|
descrq(16)='PPM' |
|
|
descrq(17)='PPS' |
|
|
descrq(18)='PPP' |
|
58 |
|
|
59 |
! Choix du schéma pour l'advection dans fichier "traceur.def" |
! Choix du sch\'ema pour l'advection dans fichier "traceur.def" |
60 |
call new_unit(unit) |
call new_unit(unit) |
61 |
open(unit, file='traceur.def', status='old', action="read", & |
open(unit, file='traceur.def', status='old', action="read", & |
62 |
position="rewind", iostat=iostat) |
position="rewind", iostat=iostat) |
67 |
call assert(nq_local == nqmx, "iniadvtrac nq_local") |
call assert(nq_local == nqmx, "iniadvtrac nq_local") |
68 |
|
|
69 |
do iq=1, nqmx |
do iq=1, nqmx |
70 |
read(unit, fmt=*) hadv(iq), vadv(iq), tname(iq) |
read(unit, fmt=*) iadv(iq), tname(iq) |
71 |
if (.not. any(hadv(iq) == allowed_adv) & |
if (.not. any(iadv(iq) == allowed_adv)) then |
|
.or. .not. any(vadv(iq) == allowed_adv)) then |
|
72 |
print *, "bad number for advection scheme" |
print *, "bad number for advection scheme" |
73 |
stop 1 |
stop 1 |
74 |
end if |
end if |
75 |
end do |
end do |
76 |
close(unit) |
close(unit) |
77 |
else |
else |
78 |
print *, 'Problème à l''ouverture de "traceur.def"' |
print *, 'Probl\`eme à l''ouverture de "traceur.def"' |
79 |
print *, 'Attention : on prend des valeurs par défaut.' |
print *, 'Attention : on prend des valeurs par d\'efaut.' |
80 |
call assert(nqmx == 4, "iniadvtrac nqmx") |
call assert(nqmx == 4, "iniadvtrac nqmx") |
81 |
hadv(:4) = (/14, 10, 10, 10/) |
iadv(:4) = (/14, 10, 10, 10/) |
|
vadv(:4) = hadv(:4) |
|
82 |
tname(1) = 'H2Ov' |
tname(1) = 'H2Ov' |
83 |
tname(2) = 'H2Ol' |
tname(2) = 'H2Ol' |
84 |
tname(3) = 'RN' |
tname(3) = 'RN' |
85 |
tname(4) = 'PB' |
tname(4) = 'PB' |
86 |
do iq = 1, nqmx |
do iq = 1, nqmx |
87 |
print *, hadv(iq), vadv(iq), tname(iq) |
print *, iadv(iq), tname(iq) |
88 |
end do |
end do |
89 |
ENDIF |
ENDIF |
90 |
|
|
91 |
! À partir du nom court du traceur et du schéma d'advection, on |
! \`A partir du nom court du traceur et du sch\'ema d'advection, on |
92 |
! détermine le nom long : |
! d\'etermine le nom long : |
93 |
do iq = 1, nqmx |
do iq = 1, nqmx |
94 |
if (hadv(iq) /= vadv(iq)) then |
ttext(iq)=trim(tname(iq)) // descrq(iadv(iq)) |
|
if (hadv(iq) == 10 .and. vadv(iq) == 16) then |
|
|
iadv(iq) = 11 |
|
|
else |
|
|
print *, "Bad combination for hozizontal and vertical schemes." |
|
|
stop 1 |
|
|
endif |
|
|
else |
|
|
iadv(iq) = hadv(iq) |
|
|
endif |
|
|
|
|
|
IF (iadv(iq) == 0) THEN |
|
|
ttext(iq) = tname(iq) |
|
|
ELSE |
|
|
ttext(iq)=trim(tname(iq)) // descrq(iadv(iq)) |
|
|
endif |
|
95 |
end do |
end do |
96 |
|
|
97 |
END subroutine iniadvtrac |
END subroutine iniadvtrac |