/[lmdze]/trunk/bibio/initdynav.f
ViewVC logotype

Diff of /trunk/bibio/initdynav.f

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

trunk/libf/bibio/initdynav.f90 revision 40 by guez, Tue Feb 22 13:49:36 2011 UTC trunk/bibio/initdynav.f revision 82 by guez, Wed Mar 5 14:57:53 2014 UTC
# Line 1  Line 1 
1  module initdynav_m  module initdynav_m
2    
   ! This module is clean: no C preprocessor directive, no include line  
   
3    implicit none    implicit none
4    
5      integer histaveid
6    
7  contains  contains
8    
9    subroutine initdynav(day0, anne0, tstep, nq, fileid, t_ops, t_wrt)    subroutine initdynav(day0, anne0, tstep, nq, t_ops, t_wrt)
10    
11      ! From initdynav.F, version 1.1.1.1, 2004/05/19 12:53:05      ! From initdynav.F, version 1.1.1.1, 2004/05/19 12:53:05
12      ! L. Fairhead, LMD      ! L. Fairhead, LMD
13      ! Routine d'initialisation des écritures des fichiers histoires LMDZ  
14      ! au format IOIPSL. Initialisation du fichier histoire moyenne.      ! Routine d'initialisation des écritures des fichiers histoires au
15        ! format IOIPSL. Initialisation du fichier histoire moyenne.
16    
17      use calendar, ONLY: ymds2ju      use calendar, ONLY: ymds2ju
18      USE comvert, ONLY : nivsigs      USE comgeom, ONLY: rlatu, rlonv
19      USE comgeom, ONLY : rlatu, rlonv      USE dimens_m, ONLY: llm
20      USE dimens_m, ONLY : llm      USE disvert_m, ONLY: nivsigs
21      USE histcom, ONLY: histbeg_totreg, histdef, histend, histvert      USE histbeg_totreg_m, ONLY: histbeg_totreg
22      USE iniadvtrac_m, ONLY : ttext      USE histdef_m, ONLY: histdef
23      USE nr_util, ONLY : pi      USE histend_m, ONLY: histend
24      USE paramet_m, ONLY : iip1, jjp1      USE histvert_m, ONLY: histvert
25      USE temps, ONLY : itau_dyn      USE iniadvtrac_m, ONLY: ttext
26        USE nr_util, ONLY: pi
27      integer, intent(in):: day0, anne0 ! date de reference      USE paramet_m, ONLY: iip1, jjp1
28      real, intent(in):: tstep ! frequence d'ecriture      USE temps, ONLY: itau_dyn
29      real, intent(in):: t_ops ! frequence de l'operation pour IOIPSL  
30      real, intent(in):: t_wrt ! frequence d'ecriture sur le fichier      integer, intent(in):: day0, anne0 ! date de référence
31      integer, intent(out):: fileid ! ID du fichier netcdf cree      real, intent(in):: tstep ! fréquence d'écriture
32      integer, intent(in):: nq ! nombre de traceurs      integer, intent(in):: nq ! nombre de traceurs
33        real, intent(in):: t_ops ! fréquence de l'opération pour IOIPSL
34        real, intent(in):: t_wrt ! fréquence d'écriture sur le fichier
35    
36      ! Variables locales      ! Variables locales
37      integer thoriid, zvertiid      integer horiid, zvertiid
38      real zjulian      real julian
39      integer iq      integer iq, ii, jj
     real rlong(iip1, jjp1), rlat(iip1, jjp1)  
     integer ii, jj  
     integer zan, dayref  
40    
41      !----------------------------------------------------      !----------------------------------------------------
42    
43      print *, "Call sequence information: initdynav"      print *, "Call sequence information: initdynav"
44    
45      zan = anne0      CALL ymds2ju(anne0, 1, day0, 0., julian)
46      dayref = day0      call histbeg_totreg('dyn_hist_ave.nc', rlonv * 180. / pi, &
47      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)           rlatu * 180. / pi, 1, iip1, 1, jjp1, itau_dyn, julian, tstep, &
48             horiid, histaveid)
49      do jj = 1, jjp1      call histvert(histaveid, 'sigss', 'Niveaux sigma', 'Pa', nivsigs, zvertiid)
50         do ii = 1, iip1  
51            rlong(ii, jj) = rlonv(ii) * 180. / pi      call histdef(histaveid, 'u', 'vents u scalaires moyennes', 'm/s', iip1, &
52            rlat(ii, jj) = rlatu(jj) * 180. / pi           jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
53         enddo      call histdef(histaveid, 'v', 'vents v scalaires moyennes', 'm/s', iip1, &
54      enddo           jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
55        call histdef(histaveid, 'temp', 'temperature moyennee', 'K', iip1, jjp1, &
56      call histbeg_totreg('dyn_hist_ave.nc', rlong(:, 1), rlat(1, :), 1, iip1, &           horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
57           1, jjp1, itau_dyn, zjulian, tstep, thoriid, fileid)      call histdef(histaveid, 'theta', 'temperature potentielle', 'K', iip1, &
58      call histvert(fileid, 'sigss', 'Niveaux sigma', 'Pa', llm, nivsigs, &           jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
59           zvertiid)      call histdef(histaveid, 'phi', 'geopotentiel moyenne', '-', iip1, jjp1, &
60             horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
     call histdef(fileid, 'u', 'vents u scalaires moyennes', &  
          'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
     call histdef(fileid, 'v', 'vents v scalaires moyennes', &  
          'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
     call histdef(fileid, 'temp', 'temperature moyennee', 'K', &  
          iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
     call histdef(fileid, 'theta', 'temperature potentielle', 'K', &  
          iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
     call histdef(fileid, 'phi', 'geopotentiel moyenne', '-', &  
          iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
61    
62      ! Traceurs      ! Traceurs
63      DO iq = 1, nq      DO iq = 1, nq
64         call histdef(fileid, ttext(iq), ttext(iq), '-', &         call histdef(histaveid, ttext(iq), ttext(iq), '-', iip1, jjp1, &
65              iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &              horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
             'ave(X)', t_ops, t_wrt)  
66      enddo      enddo
67    
68      call histdef(fileid, 'masse', 'masse', 'kg', &      call histdef(histaveid, 'masse', 'masse', 'kg', iip1, jjp1, horiid, 1, &
69           iip1, jjp1, thoriid, 1, 1, 1, -99, &           1, 1, -99, 'ave(X)', t_ops, t_wrt)
70           'ave(X)', t_ops, t_wrt)      call histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa', iip1, &
71      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa', &           jjp1, horiid, 1, 1, 1, -99, 'ave(X)', t_ops, t_wrt)
72           iip1, jjp1, thoriid, 1, 1, 1, -99, &      call histdef(histaveid, 'phis', 'geopotentiel au sol', '-', iip1, jjp1, &
73           'ave(X)', t_ops, t_wrt)           horiid, 1, 1, 1, -99, 'ave(X)', t_ops, t_wrt)
     call histdef(fileid, 'phis', 'geopotentiel au sol', '-', &  
          iip1, jjp1, thoriid, 1, 1, 1, -99, &  
          'ave(X)', t_ops, t_wrt)  
74    
75      call histend(fileid)      call histend(histaveid)
76    
77    end subroutine initdynav    end subroutine initdynav
78    

Legend:
Removed from v.40  
changed lines
  Added in v.82

  ViewVC Help
Powered by ViewVC 1.1.21