source: LMDZ4/trunk/libf/bibio/initdynav.F @ 1279

Last change on this file since 1279 was 1279, checked in by Laurent Fairhead, 15 years ago

Merged LMDZ4-dev branch changes r1241:1278 into the trunk
Running trunk and LMDZ4-dev in LMDZOR configuration on local
machine (sequential) and SX8 (4-proc) yields identical results
(restart and restartphy are identical binarily)
Log history from r1241 to r1278 is available by switching to
source:LMDZ4/branches/LMDZ4-dev-20091210

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.4 KB
RevLine 
[524]1!
[1279]2! $Id: initdynav.F 1279 2009-12-10 09:02:56Z fairhead $
[524]3!
4      subroutine initdynav(infile,day0,anne0,tstep,t_ops,t_wrt
[1146]5     .                     ,fileid)
[524]6
[1279]7#ifdef CPP_IOIPSL
[524]8       USE IOIPSL
[1279]9#endif
[1146]10       USE infotrac, ONLY : nqtot, ttext
[524]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"
[1279]50#include "iniprint.h"
[524]51
52C   Arguments
53C
54      character*(*) infile
[1279]55      integer day0, anne0
[524]56      real tstep, t_ops, t_wrt
57      integer fileid
58
[1279]59#ifdef CPP_IOIPSL
60! This routine needs IOIPSL to work
[524]61C   Variables locales
62C
[1279]63      integer thoriid, zvertiid
[524]64      integer tau0
65      real zjulian
66      integer iq
67      real rlong(iip1,jjp1), rlat(iip1,jjp1)
68      integer ii,jj
69      integer zan, dayref
70C
71C  Initialisations
72C
73      pi = 4. * atan (1.)
74C
75C  Appel a histbeg: creation du fichier netcdf et initialisations diverses
76C         
77
78      zan = anne0
79      dayref = day0
80      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
81      tau0 = itau_dyn
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(:,1), jjp1, rlat(1,:),
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  Temperature potentielle
124C
125      call histdef(fileid, 'theta', 'temperature potentielle', 'K',
126     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
127     .             32, 'ave(X)', t_ops, t_wrt)
128
129
130C
131C  Geopotentiel
132C
133      call histdef(fileid, 'phi', 'geopotentiel moyenne', '-',
134     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
135     .             32, 'ave(X)', t_ops, t_wrt)
136C
137C  Traceurs
138C
[1146]139        DO iq=1,nqtot
[524]140          call histdef(fileid, ttext(iq), ttext(iq), '-',
141     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
142     .             32, 'ave(X)', t_ops, t_wrt)
143        enddo
144C
145C  Masse
146C
147      call histdef(fileid, 'masse', 'masse', 'kg',
148     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
149     .             32, 'ave(X)', t_ops, t_wrt)
150C
151C  Pression au sol
152C
153      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa',
154     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
155     .             32, 'ave(X)', t_ops, t_wrt)
156C
157C  Pression au sol
158C
159      call histdef(fileid, 'phis', 'geopotentiel au sol', '-',
160     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
161     .             32, 'ave(X)', t_ops, t_wrt)
162C
163C  Fin
164C
165      call histend(fileid)
[1279]166#else
167! tell the user this routine should be run with ioipsl
168      write(lunout,*)"initdynav: Warning this routine should not be",
169     &               " used without ioipsl"
170#endif
171! of #ifdef CPP_IOIPSL
[524]172      return
173      end
Note: See TracBrowser for help on using the repository browser.