source: LMDZ.3.3/tags/version0/libf/bibio/initdynav.F @ 285

Last change on this file since 285 was 285, checked in by (none), 23 years ago

This commit was manufactured by cvs2svn to create tag 'version0'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1      subroutine initdynav(infile,day0,anne0,tstep,t_ops,t_wrt
2     .                     ,nq,fileid)
3
4       USE IOIPSL
5
6      implicit none
7
8C
9C   Routine d'initialisation des ecritures des fichiers histoires LMDZ
10C   au format IOIPSL. Initialisation du fichier histoire moyenne.
11C
12C   Appels succesifs des routines: histbeg
13C                                  histhori
14C                                  histver
15C                                  histdef
16C                                  histend
17C
18C   Entree:
19C
20C      infile: nom du fichier histoire a creer
21C      day0,anne0: date de reference
22C      tstep : frequence d'ecriture
23C      t_ops: frequence de l'operation pour IOIPSL
24C      t_wrt: frequence d'ecriture sur le fichier
25C      nq: nombre de traceurs
26C
27C   Sortie:
28C      fileid: ID du fichier netcdf cree
29C
30C   L. Fairhead, LMD, 03/99
31C
32C =====================================================================
33C
34C   Declarations
35#include "dimensions.h"
36#include "paramet.h"
37#include "comconst.h"
38#include "comvert.h"
39#include "comgeom.h"
40#include "temps.h"
41#include "ener.h"
42#include "logic.h"
43#include "description.h"
44#include "serre.h"
45
46C   Arguments
47C
48      character*(*) infile
49      integer*4 day0, anne0
50      real tstep, t_ops, t_wrt
51      integer fileid
52      integer nq
53      integer thoriid, zvertiid
54
55C   Variables locales
56C
57      integer tau0
58      real zjulian
59      character*3 str
60      character*10 ctrac
61      integer iq
62      real rlong(iip1,jjp1), rlat(iip1,jjp1)
63      integer ii,jj
64      integer zan
65C
66C  Initialisations
67C
68      pi = 4. * atan (1.)
69      str='q  '
70      ctrac = 'traceur   '
71C
72C  Appel a histbeg: creation du fichier netcdf et initialisations diverses
73C         
74
75      zan = anne0
76      CALL ymds2ju(zan, 1, 1, 0.0, zjulian)
77      zjulian = zjulian + day0
78      tau0 = 0
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, jjp1, rlat,
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  Geopotentiel
121C
122      call histdef(fileid, 'phi', 'geopotentiel moyenne', '-',
123     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
124     .             32, 'ave(X)', t_ops, t_wrt)
125C
126C  Traceurs
127C
128      IF(nq.GE.1) THEN
129        DO iq=1,nq
130          IF ( iq.LE.9 ) THEN
131            WRITE(str(2:2),'(i1.1)') iq
132            write(ctrac(9:9),'(i1.1)') iq
133          ELSE
134            WRITE(str(2:3),'(i2.2)') iq
135            write(ctrac(9:10),'(i2.2)') iq
136          ENDIF
137          call histdef(fileid, str, ctrac, '-',
138     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
139     .             32, 'ave(X)', t_ops, t_wrt)
140        enddo
141      endif
142C
143C  Masse
144C
145      call histdef(fileid, 'masse', 'masse', 'kg',
146     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
147     .             32, 'ave(X)', t_ops, t_wrt)
148C
149C  Pression au sol
150C
151      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa',
152     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
153     .             32, 'ave(X)', t_ops, t_wrt)
154C
155C  Pression au sol
156C
157      call histdef(fileid, 'phis', 'geopotentiel au sol', '-',
158     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
159     .             32, 'ave(X)', t_ops, t_wrt)
160C
161C  Fin
162C
163      call histend(fileid)
164      return
165      end
Note: See TracBrowser for help on using the repository browser.