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

Contents of /trunk/Sources/dyn3d/iniadvtrac.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 178 - (show annotations)
Fri Mar 11 18:47:26 2016 UTC (8 years, 2 months ago) by guez
File size: 2771 byte(s)
Moved variables date0, deltat, datasz_max, ncvar_ids, point, buff_pos,
buffer, regular from module histcom_var to modules where they are
defined.

Removed procedure ioipslmpp, useless for a sequential program.

Added argument datasz_max to histwrite_real (to avoid circular
dependency with histwrite).

Removed useless variables and computations everywhere.

Changed real litteral constants from default kind to double precision
in lwb, lwu, lwvn, sw1s, swtt, swtt1, swu.

Removed unused arguments: paer of sw, sw1s, sw2s, swclr; pcldsw of
sw1s, sw2s; pdsig, prayl of swr; co2_ppm of clmain, clqh; tsol of
transp_lay; nsrf of screenp; kcrit and kknu of gwstress; pstd of
orosetup.

Added output of relative humidity.

1 module iniadvtrac_m
2
3 ! From advtrac.h, version 1.1.1.1 2004/05/19 12:53:06
4
5 ! iq = 1 pour l'eau vapeur
6 ! iq = 2 pour l'eau liquide
7 ! et \'eventuellement iq = 3, ..., nqmx pour les autres traceurs
8
9 use dimens_m, only: nqmx
10
11 implicit none
12
13 private nqmx
14
15 INTEGER iadv(nqmx) ! indice du sch\'ema d'advection pour l'eau et les traceurs
16
17 character(len=10) tname(nqmx)
18 ! nom du traceur pour fichiers restart et historiques
19
20 character(len=13) ttext(nqmx) ! nom long du traceur pour sorties
21
22 contains
23
24 subroutine iniadvtrac
25
26 ! From dyn3d/iniadvtrac.F, version 1.3 2005/04/13 08:58:34
27
28 ! Authors: P. Le Van, L. Fairhead, F. Hourdin, F. Codron,
29 ! F. Forget, M.-A. Filiberti
30
31 ! Initialisation des traceurs
32 ! Choix du sch\'ema pour l'advection dans le fichier "traceur.def"
33
34 use nr_util, only: assert
35 use jumble, only: new_unit
36
37 ! Local:
38 character(len=3) descrq(0:14)
39 integer iq, iostat, nq_local, unit
40
41 integer, parameter:: allowed_adv(5) = (/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"
51
52 ! Initializations:
53 descrq(0)=''
54 descrq(10)='VL1'
55 descrq(12)='FH1'
56 descrq(13)='FH2'
57 descrq(14)='VLH'
58
59 ! Choix du sch\'ema pour l'advection dans fichier "traceur.def"
60 call new_unit(unit)
61 open(unit, file='traceur.def', status='old', action="read", &
62 position="rewind", iostat=iostat)
63 if (iostat == 0) then
64 print *, 'Ouverture de "traceur.def" ok'
65 read(unit, fmt=*) nq_local
66 print *, 'nombre de traceurs ', nq_local
67 call assert(nq_local == nqmx, "iniadvtrac nq_local")
68
69 do iq=1, nqmx
70 read(unit, fmt=*) iadv(iq), tname(iq)
71 if (.not. any(iadv(iq) == allowed_adv)) then
72 print *, "bad number for advection scheme"
73 stop 1
74 end if
75 end do
76 close(unit)
77 else
78 print *, 'Could not open "traceur.def".'
79 print *, 'Using default values.'
80 call assert(nqmx == 4, "iniadvtrac nqmx")
81 iadv(:4) = (/14, 10, 10, 10/)
82 tname(1) = 'H2Ov'
83 tname(2) = 'H2Ol'
84 tname(3) = 'RN'
85 tname(4) = 'PB'
86 do iq = 1, nqmx
87 print *, iadv(iq), tname(iq)
88 end do
89 ENDIF
90
91 ! \`A partir du nom court du traceur et du sch\'ema d'advection, on
92 ! d\'etermine le nom long :
93 do iq = 1, nqmx
94 ttext(iq)=trim(tname(iq)) // descrq(iadv(iq))
95 end do
96
97 END subroutine iniadvtrac
98
99 end module iniadvtrac_m

  ViewVC Help
Powered by ViewVC 1.1.21