source: LMDZ.3.3/tags/IPSL-CM4_v2x1/libf/bibio/writehist.F @ 469

Last change on this file since 469 was 353, checked in by lmdzadmin, 22 years ago

2 changements pour les fichiers histoire:

  • utilisation de l'entree "rectilineaire" de IOIPSL pour ne plus avoir

a

lancer ncregular a chaque fois

  • le calendrier des fichiers histoire est maintenant base sur la date d'initialisation de la simulation plutot que sur la date de depart du

job

en cours

LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1      subroutine writehist( histid, histvid, nq, time, vcov,
2     ,                          ucov,teta,phi,q,masse,ps,phis)
3
4      USE ioipsl
5      implicit none
6
7C
8C   Ecriture du fichier histoire au format IOIPSL
9C
10C   Appels succesifs des routines: histwrite
11C
12C   Entree:
13C      histid: ID du fichier histoire
14C      histvid:ID du fichier histoire pour les vents V (appele a disparaitre)
15C      nqmx: nombre maxi de traceurs
16C      time: temps de l'ecriture
17C      vcov: vents v covariants
18C      ucov: vents u covariants
19C      teta: temperature potentielle
20C      phi : geopotentiel instantane
21C      q   : traceurs
22C      masse: masse
23C      ps   :pression au sol
24C      phis : geopotentiel au sol
25C     
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
47C   Arguments
48C
49
50      INTEGER histid, nq, histvid
51      REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm)
52      REAL teta(ip1jmp1,llm),phi(ip1jmp1,llm)                   
53      REAL ps(ip1jmp1),masse(ip1jmp1,llm)                   
54      REAL phis(ip1jmp1)                 
55      REAL q(ip1jmp1,llm,nq)
56      integer time
57
58
59C   Variables locales
60C
61      integer iq, ii, ll
62      integer ndexu(ip1jmp1*llm),ndexv(ip1jm*llm),ndex2d(ip1jmp1)
63      character*3 str
64      logical ok_sync
65      integer itau_w
66C
67C  Initialisations
68C
69      str='q  '
70      ndexu = 0
71      ndexv = 0
72      ndex2d = 0
73      ok_sync =.TRUE.
74      itau_w = itau_dyn + time
75C
76C  Appels a histwrite pour l'ecriture des variables a sauvegarder
77C
78C  Vents U
79C
80      call histwrite(histid, 'ucov', itau_w, ucov,
81     .               iip1*jjp1*llm, ndexu)
82
83C
84C  Vents V
85C
86      call histwrite(histvid, 'vcov', itau_w, vcov,
87     .               iip1*jjm*llm, ndexv)
88
89C
90C  Temperature potentielle
91C
92      call histwrite(histid, 'teta', itau_w, teta,
93     .                iip1*jjp1*llm, ndexu)
94C
95C  Geopotentiel
96C
97      call histwrite(histid, 'phi', itau_w, phi,
98     .                iip1*jjp1*llm, ndexu)
99C
100C  Traceurs
101C
102      IF(nq.GE.1) THEN
103        DO iq=1,nq
104          IF ( iq.LE.9 ) THEN
105            WRITE(str(2:2),'(i1.1)') iq
106          ELSE
107            WRITE(str(2:3),'(i2.2)') iq
108          ENDIF
109          call histwrite(histid, str, itau_w, q(:,:,iq),
110     .                   iip1*jjp1*llm, ndexu)
111        enddo
112      endif
113C
114C  Masse
115C
116      call histwrite(histid, 'masse', itau_w, masse, iip1*jjp1, ndex2d)
117C
118C  Pression au sol
119C
120      call histwrite(histid, 'ps', itau_w, ps, iip1*jjp1, ndex2d)
121C
122C  Geopotentiel au sol
123C
124      call histwrite(histid, 'phis', itau_w, phis, iip1*jjp1, ndex2d)
125C
126C  Fin
127C
128      if (ok_sync) then
129        call histsync(histid)
130        call histsync(histvid)
131      endif
132      return
133      end
Note: See TracBrowser for help on using the repository browser.