/[lmdze]/trunk/dyn3d/writehist.f
ViewVC logotype

Diff of /trunk/dyn3d/writehist.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/libf/bibio/writehist.f revision 56 by guez, Tue Jan 10 19:02:02 2012 UTC trunk/Sources/dyn3d/writehist.f revision 178 by guez, Fri Mar 11 18:47:26 2016 UTC
# Line 1  Line 1 
1  !  module writehist_m
2  ! $Id: writehist.F 1403 2010-07-01 09:02:53Z fairhead $  
3  !    implicit none
4        subroutine writehist(time,vcov,ucov,teta,phi,q,masse,ps,phis)  
5    contains
6        use dimens_m, only: nqmx, llm, jjm  
7        USE iniadvtrac_m, ONLY: ttext    subroutine writehist(time, vcov, ucov, teta, phi, masse, ps)
8        use com_io_dyn, only: histid,histvid,histuid  
9        use paramet_m, only: ip1jm, ip1jmp1, iip1, jjp1      ! From writehist.F 1403 2010-07-01 09:02:53Z
10        use temps, only: itau_dyn      ! Écriture du fichier histoire au format IOIPSL
11        use histwrite_m, only: histwrite      ! Appels successifs des routines histwrite
12        use histcom, only: histsync      ! L. Fairhead, LMD, 03/99
13    
14        implicit none      use dimens_m, only: llm
15        use com_io_dyn, only: histid, histvid, histuid
16  C      use paramet_m, only: ip1jm, ip1jmp1
17  C   Ecriture du fichier histoire au format IOIPSL      use temps, only: itau_dyn
18  C      use histwrite_m, only: histwrite
19  C   Appels succesifs des routines: histwrite      use histsync_m, only: histsync
20  C      use covnat_m, only: covnat
21  C   Entree:  
22  C      time: temps de l'ecriture      ! Entree:
23  C      vcov: vents v covariants      ! time: temps de l'ecriture
24  C      ucov: vents u covariants      ! vcov: vents v covariants
25  C      teta: temperature potentielle      ! ucov: vents u covariants
26  C      phi : geopotentiel instantane      ! teta: temperature potentielle
27  C      q   : traceurs      ! phi : geopotentiel instantane
28  C      masse: masse      ! masse: masse
29  C      ps   :pression au sol      ! ps :pression au sol
30  C      phis : geopotentiel au sol  
31  C            ! Arguments
32  C  
33  C   L. Fairhead, LMD, 03/99      REAL vcov(ip1jm, llm), ucov(ip1jmp1, llm)
34  C      REAL teta(ip1jmp1, llm), phi(ip1jmp1, llm)
35  C =====================================================================      REAL, intent(in):: ps(ip1jmp1), masse(ip1jmp1, llm)
36  C      integer time
37  C   Declarations  
38        ! This routine needs IOIPSL to work
39  C      ! Variables locales
40  C   Arguments  
41  C      logical ok_sync
42        integer itau_w
43        REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm)      REAL vnat(ip1jm, llm), unat(ip1jmp1, llm)
44        REAL teta(ip1jmp1,llm),phi(ip1jmp1,llm)                    
45        REAL ps(ip1jmp1),masse(ip1jmp1,llm)                        !---------------------------------------------------------------------
46        REAL phis(ip1jmp1)                    
47        REAL q(ip1jmp1,llm,nqmx)      ! Initialisations
48        integer time  
49        ok_sync =.TRUE.
50        itau_w = itau_dyn + time
51  ! This routine needs IOIPSL to work      ! Passage aux composantes naturelles du vent
52  C   Variables locales      call covnat(llm, ucov, vcov, unat, vnat)
53  C  
54        integer iq, ii, ll      ! Appels a histwrite pour l'ecriture des variables a sauvegarder
55        integer ndexu(ip1jmp1*llm),ndexv(ip1jm*llm),ndex2d(ip1jmp1)  
56        logical ok_sync      ! Vents U
57        integer itau_w  
58        REAL vnat(ip1jm,llm),unat(ip1jmp1,llm)      call histwrite(histuid, 'u', itau_w, unat)
59    
60  C      ! Vents V
61  C  Initialisations  
62  C      call histwrite(histvid, 'v', itau_w, vnat)
63        ndexu = 0  
64        ndexv = 0      ! Temperature potentielle
65        ndex2d = 0  
66        ok_sync =.TRUE.      call histwrite(histid, 'teta', itau_w, teta)
67        itau_w = itau_dyn + time  
68  !  Passage aux composantes naturelles du vent      ! Geopotentiel
69        call covnat(llm, ucov, vcov, unat, vnat)  
70  C      call histwrite(histid, 'phi', itau_w, phi)
71  C  Appels a histwrite pour l'ecriture des variables a sauvegarder  
72  C      ! Masse
73  C  Vents U  
74  C      call histwrite(histid, 'masse', itau_w, masse)
75        call histwrite(histuid, 'u', itau_w, unat)  
76  C      ! Pression au sol
77  C  Vents V      call histwrite(histid, 'ps', itau_w, ps)
78  C  
79        call histwrite(histvid, 'v', itau_w, vnat)      if (ok_sync) then
80           call histsync(histid)
81  C         call histsync(histvid)
82  C  Temperature potentielle         call histsync(histuid)
83  C      endif
84        call histwrite(histid, 'teta', itau_w, teta)  
85  C    end subroutine writehist
86  C  Geopotentiel  
87  C  end module writehist_m
       call histwrite(histid, 'phi', itau_w, phi)  
 C  
 C  Traceurs  
 C  
 !        DO iq=1,nqmx  
 !          call histwrite(histid, ttext(iq), itau_w, q(:,:,iq),  
 !     .                   iip1*jjp1*llm, ndexu)  
 !        enddo  
 !C  
 C  Masse  
 C  
       call histwrite(histid,'masse',itau_w, masse)  
 C  
 C  Pression au sol  
 C  
       call histwrite(histid, 'ps', itau_w, ps)  
 C  
 C  Geopotentiel au sol  
 C  
 !      call histwrite(histid, 'phis', itau_w, phis, iip1*jjp1, ndex2d)  
 C  
 C  Fin  
 C  
       if (ok_sync) then  
         call histsync(histid)  
         call histsync(histvid)  
         call histsync(histuid)  
       endif  
       return  
       end  

Legend:
Removed from v.56  
changed lines
  Added in v.178

  ViewVC Help
Powered by ViewVC 1.1.21