source: LMDZ4/trunk/libf/bibio/writehist.F @ 1203

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

Réintegration dans le tronc des modifications issues de la branche LMDZ-dev
comprises entre la révision 1074 et 1145
Validation: une simulation de 1 jour en séquentiel sur PC donne les mêmes
résultats entre la trunk et la dev
LF

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