source: LMDZ4/branches/V3_test/libf/bibio/initdynav.F @ 1417

Last change on this file since 1417 was 704, checked in by Laurent Fairhead, 18 years ago

Inclusion des modifs de Y. Meurdesoif pour la version V3
LF

  • 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     .                     ,nq,fileid)
8
9       USE IOIPSL
10
11      implicit none
12
13C
14C   Routine d'initialisation des ecritures des fichiers histoires LMDZ
15C   au format IOIPSL. Initialisation du fichier histoire moyenne.
16C
17C   Appels succesifs des routines: histbeg
18C                                  histhori
19C                                  histver
20C                                  histdef
21C                                  histend
22C
23C   Entree:
24C
25C      infile: nom du fichier histoire a creer
26C      day0,anne0: date de reference
27C      tstep : frequence d'ecriture
28C      t_ops: frequence de l'operation pour IOIPSL
29C      t_wrt: frequence d'ecriture sur le fichier
30C      nq: nombre de traceurs
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#include "advtrac.h"
51
52C   Arguments
53C
54      character*(*) infile
55      integer*4 day0, anne0
56      real tstep, t_ops, t_wrt
57      integer fileid
58      integer nq
59      integer thoriid, zvertiid
60
61C   Variables locales
62C
63      integer tau0
64      real zjulian
65      integer iq
66      real rlong(iip1,jjp1), rlat(iip1,jjp1)
67      integer ii,jj
68      integer zan, dayref
69C
70C  Initialisations
71C
72      pi = 4. * atan (1.)
73C
74C  Appel a histbeg: creation du fichier netcdf et initialisations diverses
75C         
76
77      zan = anne0
78      dayref = day0
79      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
80      tau0 = itau_dyn
81     
82      do jj = 1, jjp1
83        do ii = 1, iip1
84          rlong(ii,jj) = rlonv(ii) * 180. / pi
85          rlat(ii,jj)  = rlatu(jj) * 180. / pi
86        enddo
87      enddo
88       
89      call histbeg(infile, iip1, rlong(:,1), jjp1, rlat(1,:),
90     .             1, iip1, 1, jjp1,
91     .             tau0, zjulian, tstep, thoriid, fileid)
92
93C
94C  Appel a histvert pour la grille verticale
95C
96      call histvert(fileid, 'sigss', 'Niveaux sigma','Pa',
97     .              llm, nivsigs, zvertiid)
98C
99C  Appels a histdef pour la definition des variables a sauvegarder
100C
101C  Vents U
102C
103      write(6,*)'inithistave',tstep
104      call histdef(fileid, 'u', 'vents u scalaires moyennes',
105     .             'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
106     .             32, 'ave(X)', t_ops, t_wrt)
107
108C
109C  Vents V
110C
111      call histdef(fileid, 'v', 'vents v scalaires moyennes',
112     .             'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
113     .             32, 'ave(X)', t_ops, t_wrt)
114
115C
116C  Temperature
117C
118      call histdef(fileid, 'temp', 'temperature moyennee', 'K',
119     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
120     .             32, 'ave(X)', t_ops, t_wrt)
121C
122C  Temperature potentielle
123C
124      call histdef(fileid, 'theta', 'temperature potentielle', 'K',
125     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
126     .             32, 'ave(X)', t_ops, t_wrt)
127
128
129C
130C  Geopotentiel
131C
132      call histdef(fileid, 'phi', 'geopotentiel moyenne', '-',
133     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
134     .             32, 'ave(X)', t_ops, t_wrt)
135C
136C  Traceurs
137C
138        DO iq=1,nq
139          call histdef(fileid, ttext(iq), ttext(iq), '-',
140     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
141     .             32, 'ave(X)', t_ops, t_wrt)
142        enddo
143C
144C  Masse
145C
146      call histdef(fileid, 'masse', 'masse', 'kg',
147     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
148     .             32, 'ave(X)', t_ops, t_wrt)
149C
150C  Pression au sol
151C
152      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa',
153     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
154     .             32, 'ave(X)', t_ops, t_wrt)
155C
156C  Pression au sol
157C
158      call histdef(fileid, 'phis', 'geopotentiel au sol', '-',
159     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
160     .             32, 'ave(X)', t_ops, t_wrt)
161C
162C  Fin
163C
164      call histend(fileid)
165      return
166      end
Note: See TracBrowser for help on using the repository browser.