/[lmdze]/trunk/dyn3d/iniadvtrac.f
ViewVC logotype

Annotation of /trunk/dyn3d/iniadvtrac.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91 - (hide annotations)
Wed Mar 26 17:18:58 2014 UTC (10 years, 2 months ago) by guez
File size: 3822 byte(s)
Removed unused variables lock_startdate and time_stamp of module
calendar.

Noticed that physiq does not change the surface pressure. So removed
arguments ps and dpfi of subroutine addfi. dpfi was always 0. The
computation of ps in addfi included some averaging at the poles. In
principle, this does not change ps but in practice it does because of
finite numerical precision. So the results of the simulation are
changed. Removed arguments ps and dpfi of calfis. Removed argument
d_ps of physiq.

du at the poles is not computed by dudv1, so declare only the
corresponding latitudes in dudv1. caldyn passes only a section of the
array dudyn as argument.

Removed variable niadv of module iniadvtrac_m.

Declared arguments of exner_hyb as assumed-shape arrays and made all
other horizontal sizes in exner_hyb dynamic. This allows the external
program test_disvert to use exner_hyb at a single horizontal position.

1 guez 18 module iniadvtrac_m
2 guez 3
3 guez 62 ! From advtrac.h, version 1.1.1.1 2004/05/19 12:53:06
4 guez 3
5 guez 62 ! iq = 1 pour l'eau vapeur
6     ! iq = 2 pour l'eau liquide
7 guez 78 ! et éventuellement iq = 3, ..., nqmx pour les autres traceurs
8 guez 62
9 guez 3 use dimens_m, only: nqmx
10    
11     implicit none
12    
13     private nqmx
14    
15 guez 78 INTEGER iadv(nqmx) ! indice du schéma d'advection pour l'eau et les traceurs
16     ! 11 means Van-Leer scheme for hadv et monotonous PPM for vadv
17 guez 62
18     integer, parameter:: allowed_adv(10) = (/0, 1, 2, 10, 12, 13, 14, 16, 17, 18/)
19     ! Allowed values for hadv and vadv:
20     ! 1: schema transport type "humidite specifique LMD"
21     ! 2: schema amont
22     ! 10: schema Van-leer (retenu pour l'eau vapeur et liquide)
23     ! 12: schema Frederic Hourdin I
24     ! 13: schema Frederic Hourdin II
25     ! 14: schema Van-leer + humidite specifique
26     ! 16: schema PPM Monotone(Collela & Woodward 1984)
27     ! 17: schema PPM Semi Monotone (overshoots autorisés)
28     ! 18: schema PPM Positif Defini (overshoots undershoots autorisés)
29     ! Pour Van-Leer plus vapeur d'eau saturée : iadv(1)=4
30    
31     INTEGER hadv(nqmx) ! indice schéma transport horizontal
32     INTEGER vadv(nqmx) ! indice schéma transport vertical
33 guez 3 character(len=8) tnom(nqmx) ! nom court du traceur
34     character(len=10) tname(nqmx) ! nom du traceur pour restart
35     character(len=13) ttext(nqmx) ! nom long du traceur pour sorties
36    
37     contains
38    
39 guez 23 subroutine iniadvtrac
40 guez 3
41     ! From dyn3d/iniadvtrac.F, version 1.3 2005/04/13 08:58:34
42    
43 guez 78 ! Authors: P. Le Van, L. Fairhead, F. Hourdin, F. Codron,
44 guez 62 ! F. Forget, M.-A. Filiberti
45 guez 3
46 guez 36 use nr_util, only: assert
47 guez 62 use jumble, only: new_unit
48 guez 3
49     ! Variables local to the procedure:
50    
51 guez 62 character(len=3) descrq(18)
52     integer iq, iostat, nq_local, unit
53 guez 3
54     !-----------------------------------------------------------------------
55    
56     print *, "Call sequence information: iniadvtrac"
57    
58     ! Initializations:
59     descrq(10)='VL1'
60     descrq(11)='VLP'
61     descrq(12)='FH1'
62     descrq(13)='FH2'
63 guez 62 descrq(14)='VLH'
64 guez 3 descrq(16)='PPM'
65     descrq(17)='PPS'
66     descrq(18)='PPP'
67    
68 guez 62 ! Choix du schéma pour l'advection dans fichier "traceur.def"
69     call new_unit(unit)
70     open(unit, file='traceur.def', status='old', action="read", &
71     position="rewind", iostat=iostat)
72     if (iostat == 0) then
73 guez 3 print *, 'Ouverture de "traceur.def" ok'
74 guez 62 read(unit, fmt=*) nq_local
75 guez 5 print *, 'nombre de traceurs ', nq_local
76 guez 23 call assert(nq_local == nqmx, "iniadvtrac nq_local")
77 guez 3
78 guez 23 do iq=1, nqmx
79 guez 62 read(unit, fmt=*) hadv(iq), vadv(iq), tnom(iq)
80     if (.not. any(hadv(iq) == allowed_adv) &
81     .or. .not. any(vadv(iq) == allowed_adv)) then
82     print *, "bad number for advection scheme"
83     stop 1
84     end if
85 guez 3 end do
86 guez 62 close(unit)
87 guez 3 else
88 guez 5 print *, 'Problème à l''ouverture de "traceur.def"'
89     print *, 'Attention : on prend des valeurs par défaut.'
90 guez 23 call assert(nqmx == 4, "iniadvtrac nqmx")
91 guez 78 hadv(:4) = (/14, 10, 10, 10/)
92     vadv(:4) = hadv(:4)
93 guez 3 tnom(1) = 'H2Ov'
94     tnom(2) = 'H2Ol'
95     tnom(3) = 'RN'
96     tnom(4) = 'PB'
97 guez 62 do iq = 1, nqmx
98     print *, hadv(iq), vadv(iq), tnom(iq)
99     end do
100 guez 3 ENDIF
101    
102 guez 62 tname = tnom
103    
104 guez 3 ! À partir du nom court du traceur et du schéma d'advection, on
105 guez 62 ! détermine le nom long :
106 guez 78 do iq = 1, nqmx
107 guez 3 if (hadv(iq) /= vadv(iq)) then
108 guez 62 if (hadv(iq) == 10 .and. vadv(iq) == 16) then
109 guez 78 iadv(iq) = 11
110 guez 3 else
111 guez 62 print *, "Bad combination for hozizontal and vertical schemes."
112     stop 1
113 guez 3 endif
114     else
115 guez 78 iadv(iq) = hadv(iq)
116 guez 3 endif
117    
118 guez 62 IF (iadv(iq) == 0) THEN
119     ttext(iq) = tnom(iq)
120 guez 3 ELSE
121 guez 62 ttext(iq)=trim(tnom(iq)) // descrq(iadv(iq))
122 guez 3 endif
123     end do
124    
125     END subroutine iniadvtrac
126    
127 guez 18 end module iniadvtrac_m

  ViewVC Help
Powered by ViewVC 1.1.21