/[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 212 by guez, Thu Jan 12 12:31:31 2017 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 , revision 1403, 2010-07-01 09:02:53Z
10        use temps, only: itau_dyn      ! Écriture du fichier histoire
11        use histwrite_m, only: histwrite      ! L. Fairhead, LMD, 03/99
12        use histcom, only: histsync  
13        use covnat_m, only: covnat
14        implicit none      use dimens_m, only: llm
15        use histsync_m, only: histsync
16  C      use histwrite_m, only: histwrite
17  C   Ecriture du fichier histoire au format IOIPSL      use inithist_m, only: histid, histvid, histuid
18  C      use paramet_m, only: ip1jm, ip1jmp1
19  C   Appels succesifs des routines: histwrite      use temps, only: itau_dyn
20  C  
21  C   Entree:      integer, intent(in):: time ! temps de l'ecriture
22  C      time: temps de l'ecriture      REAL, intent(in):: vcov(ip1jm, llm), ucov(ip1jmp1, llm) ! vent covariant
23  C      vcov: vents v covariants      REAL, intent(in):: teta(ip1jmp1, llm) ! temperature potentielle
24  C      ucov: vents u covariants      REAL, intent(in):: phi(ip1jmp1, llm) ! geopotentiel instantane
25  C      teta: temperature potentielle      REAL, intent(in):: masse(ip1jmp1, llm)
26  C      phi : geopotentiel instantane      REAL, intent(in):: ps(ip1jmp1) ! pression au sol
27  C      q   : traceurs  
28  C      masse: masse      ! Local:
29  C      ps   :pression au sol      logical ok_sync
30  C      phis : geopotentiel au sol      integer itau_w
31  C            REAL vnat(ip1jm, llm), unat(ip1jmp1, llm)
32  C  
33  C   L. Fairhead, LMD, 03/99      !---------------------------------------------------------------------
34  C  
35  C =====================================================================      ! Initialisations
36  C  
37  C   Declarations      ok_sync =.TRUE.
38        itau_w = itau_dyn + time
39  C      ! Passage aux composantes naturelles du vent
40  C   Arguments      call covnat(llm, ucov, vcov, unat, vnat)
41  C  
42        ! Appels a histwrite pour l'ecriture des variables a sauvegarder
43        REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm)  
44        REAL teta(ip1jmp1,llm),phi(ip1jmp1,llm)                        ! Vents U
45        REAL ps(ip1jmp1),masse(ip1jmp1,llm)                    
46        REAL phis(ip1jmp1)                        call histwrite(histuid, 'u', itau_w, unat)
47        REAL q(ip1jmp1,llm,nqmx)  
48        integer time      ! Vents V
49    
50        call histwrite(histvid, 'v', itau_w, vnat)
51  ! This routine needs IOIPSL to work  
52  C   Variables locales      ! Temperature potentielle
53  C  
54        integer iq, ii, ll      call histwrite(histid, 'teta', itau_w, teta)
55        integer ndexu(ip1jmp1*llm),ndexv(ip1jm*llm),ndex2d(ip1jmp1)  
56        logical ok_sync      ! Geopotentiel
57        integer itau_w  
58        REAL vnat(ip1jm,llm),unat(ip1jmp1,llm)      call histwrite(histid, 'phi', itau_w, phi)
59    
60  C      ! Masse
61  C  Initialisations  
62  C      call histwrite(histid, 'masse', itau_w, masse)
63        ndexu = 0  
64        ndexv = 0      ! Pression au sol
65        ndex2d = 0      call histwrite(histid, 'ps', itau_w, ps)
66        ok_sync =.TRUE.  
67        itau_w = itau_dyn + time      if (ok_sync) then
68  !  Passage aux composantes naturelles du vent         call histsync(histid)
69        call covnat(llm, ucov, vcov, unat, vnat)         call histsync(histvid)
70  C         call histsync(histuid)
71  C  Appels a histwrite pour l'ecriture des variables a sauvegarder      endif
72  C  
73  C  Vents U    end subroutine writehist
74  C  
75        call histwrite(histuid, 'u', itau_w, unat)  end module writehist_m
 C  
 C  Vents V  
 C  
       call histwrite(histvid, 'v', itau_w, vnat)  
   
 C  
 C  Temperature potentielle  
 C  
       call histwrite(histid, 'teta', itau_w, teta)  
 C  
 C  Geopotentiel  
 C  
       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.212

  ViewVC Help
Powered by ViewVC 1.1.21