source: LMDZ4/branches/LMDZ4-dev/libf/bibio/initdynav.F @ 1161

Last change on this file since 1161 was 1114, checked in by jghattas, 15 years ago

Creation du module infotrac:

  • contient les variables de advtrac.h
  • contient la subroutine iniadvtrac renommer en infotrac_init
  • le nombre des traceurs est lu dans tracer.def en dynamique (ou par default ou recu par INCA)
  • ce module est utilise dans la dynamique et la physique
  • contient aussi la variable nbtr qui avant etait stockee dans dimphy

Le fichier advtrac.h n'existe plus.
La compilation ne prend plus en compte le nombre de traceur.

/JG

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
1!
2! $Header$
3!
4c
5c
6      subroutine initdynav(infile,day0,anne0,tstep,t_ops,t_wrt
7     .                     ,fileid)
8
9       USE IOIPSL
10       USE infotrac, ONLY : nqtot, ttext
11
12      implicit none
13
14C
15C   Routine d'initialisation des ecritures des fichiers histoires LMDZ
16C   au format IOIPSL. Initialisation du fichier histoire moyenne.
17C
18C   Appels succesifs des routines: histbeg
19C                                  histhori
20C                                  histver
21C                                  histdef
22C                                  histend
23C
24C   Entree:
25C
26C      infile: nom du fichier histoire a creer
27C      day0,anne0: date de reference
28C      tstep : frequence d'ecriture
29C      t_ops: frequence de l'operation pour IOIPSL
30C      t_wrt: frequence d'ecriture sur le fichier
31C
32C   Sortie:
33C      fileid: ID du fichier netcdf cree
34C
35C   L. Fairhead, LMD, 03/99
36C
37C =====================================================================
38C
39C   Declarations
40#include "dimensions.h"
41#include "paramet.h"
42#include "comconst.h"
43#include "comvert.h"
44#include "comgeom.h"
45#include "temps.h"
46#include "ener.h"
47#include "logic.h"
48#include "description.h"
49#include "serre.h"
50
51C   Arguments
52C
53      character*(*) infile
54      integer*4 day0, anne0
55      real tstep, t_ops, t_wrt
56      integer fileid
57      integer thoriid, zvertiid
58
59C   Variables locales
60C
61      integer tau0
62      real zjulian
63      integer iq
64      real rlong(iip1,jjp1), rlat(iip1,jjp1)
65      integer ii,jj
66      integer zan, dayref
67C
68C  Initialisations
69C
70      pi = 4. * atan (1.)
71C
72C  Appel a histbeg: creation du fichier netcdf et initialisations diverses
73C         
74
75      zan = anne0
76      dayref = day0
77      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
78      tau0 = itau_dyn
79     
80      do jj = 1, jjp1
81        do ii = 1, iip1
82          rlong(ii,jj) = rlonv(ii) * 180. / pi
83          rlat(ii,jj)  = rlatu(jj) * 180. / pi
84        enddo
85      enddo
86       
87      call histbeg(infile, iip1, rlong(:,1), jjp1, rlat(1,:),
88     .             1, iip1, 1, jjp1,
89     .             tau0, zjulian, tstep, thoriid, fileid)
90
91C
92C  Appel a histvert pour la grille verticale
93C
94      call histvert(fileid, 'sigss', 'Niveaux sigma','Pa',
95     .              llm, nivsigs, zvertiid)
96C
97C  Appels a histdef pour la definition des variables a sauvegarder
98C
99C  Vents U
100C
101      write(6,*)'inithistave',tstep
102      call histdef(fileid, 'u', 'vents u scalaires moyennes',
103     .             'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
104     .             32, 'ave(X)', t_ops, t_wrt)
105
106C
107C  Vents V
108C
109      call histdef(fileid, 'v', 'vents v scalaires moyennes',
110     .             'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
111     .             32, 'ave(X)', t_ops, t_wrt)
112
113C
114C  Temperature
115C
116      call histdef(fileid, 'temp', 'temperature moyennee', 'K',
117     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
118     .             32, 'ave(X)', t_ops, t_wrt)
119C
120C  Temperature potentielle
121C
122      call histdef(fileid, 'theta', 'temperature potentielle', 'K',
123     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
124     .             32, 'ave(X)', t_ops, t_wrt)
125
126
127C
128C  Geopotentiel
129C
130      call histdef(fileid, 'phi', 'geopotentiel moyenne', '-',
131     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
132     .             32, 'ave(X)', t_ops, t_wrt)
133C
134C  Traceurs
135C
136        DO iq=1,nqtot
137          call histdef(fileid, ttext(iq), ttext(iq), '-',
138     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
139     .             32, 'ave(X)', t_ops, t_wrt)
140        enddo
141C
142C  Masse
143C
144      call histdef(fileid, 'masse', 'masse', 'kg',
145     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
146     .             32, 'ave(X)', t_ops, t_wrt)
147C
148C  Pression au sol
149C
150      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa',
151     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
152     .             32, 'ave(X)', t_ops, t_wrt)
153C
154C  Pression au sol
155C
156      call histdef(fileid, 'phis', 'geopotentiel au sol', '-',
157     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
158     .             32, 'ave(X)', t_ops, t_wrt)
159C
160C  Fin
161C
162      call histend(fileid)
163      return
164      end
Note: See TracBrowser for help on using the repository browser.