source: LMDZ.3.3/branches/rel-1-0-patch/libf/bibio/initdynav.F @ 349

Last change on this file since 349 was 349, checked in by lmdz, 22 years ago

Regle le probleme de decalage de 1 jour au debut de chaque simulation
LF

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