/[lmdze]/trunk/Sources/dyn3d/initdynav.f
ViewVC logotype

Diff of /trunk/Sources/dyn3d/initdynav.f

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

trunk/libf/bibio/initdynav.f90 revision 56 by guez, Tue Jan 10 19:02:02 2012 UTC trunk/Sources/dyn3d/initdynav.f revision 253 by guez, Tue Jan 23 15:49:10 2018 UTC
# Line 6  module initdynav_m Line 6  module initdynav_m
6    
7  contains  contains
8    
9    subroutine initdynav(day0, anne0, tstep, nq, t_ops, t_wrt)    subroutine initdynav(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
     ! Routine d'initialisation des écritures des fichiers histoires LMDZ  
     ! au format IOIPSL. Initialisation du fichier histoire moyenne.  
13    
14      use calendar, ONLY: ymds2ju      ! Routine d'initialisation des écritures du fichier histoire
15      USE comvert, ONLY : nivsigs      ! moyenne au format IOIPSL.
     USE comgeom, ONLY : rlatu, rlonv  
     USE dimens_m, ONLY : llm  
     USE histcom, ONLY: histbeg_totreg, histdef, histend, histvert  
     USE iniadvtrac_m, ONLY : ttext  
     USE nr_util, ONLY : pi  
     USE paramet_m, ONLY : iip1, jjp1  
     USE temps, ONLY : itau_dyn  
16    
17      integer, intent(in):: day0, anne0 ! date de reference      USE dimens_m, ONLY: llm
18      real, intent(in):: tstep ! frequence d'ecriture      use dynetat0_m, only: day_ref, annee_ref, rlatu, rlonv
19        use histbeg_totreg_m, only: histbeg_totreg
20        USE histdef_m, ONLY: histdef
21        USE histend_m, ONLY: histend
22        USE histvert_m, ONLY: histvert
23        USE iniadvtrac_m, ONLY: ttext
24        USE nr_util, ONLY: pi
25        USE paramet_m, ONLY: iip1, jjp1
26        USE temps, ONLY: itau_dyn
27        use ymds2ju_m, ONLY: ymds2ju
28    
29        real, intent(in):: tstep ! fréquence d'écriture
30      integer, intent(in):: nq ! nombre de traceurs      integer, intent(in):: nq ! nombre de traceurs
31      real, intent(in):: t_ops ! frequence de l'operation pour IOIPSL      real, intent(in):: t_ops ! fréquence de l'opération pour IOIPSL
32      real, intent(in):: t_wrt ! frequence d'ecriture sur le fichier      real, intent(in):: t_wrt ! fréquence d'écriture sur le fichier
33    
34      ! Variables locales      ! Local:
35      integer thoriid, zvertiid      real julian
36      real zjulian      integer iq, l
37      integer iq      integer horiid, zvertiid
     real rlong(iip1, jjp1), rlat(iip1, jjp1)  
     integer ii, jj  
     integer zan, dayref  
38    
39      !----------------------------------------------------      !-----------------------------------------------------------------------
40    
41      print *, "Call sequence information: initdynav"      print *, "Call sequence information: initdynav"
42        CALL ymds2ju(annee_ref, 1, day_ref, 0., julian)
43      zan = anne0      call histbeg_totreg('dyn_hist_ave.nc', rlonv * 180. / pi, &
44      dayref = day0           rlatu * 180. / pi, 1, iip1, 1, jjp1, itau_dyn, julian, tstep, &
45      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)           horiid, histaveid)
46        call histvert(histaveid, 'sigss', 'Niveaux sigma', '', &
47      do jj = 1, jjp1           (/(real(l), l = 1, llm)/), zvertiid)
48         do ii = 1, iip1  
49            rlong(ii, jj) = rlonv(ii) * 180. / pi      call histdef(histaveid, 'u', 'vents u scalaires moyennes', 'm/s', iip1, &
50            rlat(ii, jj) = rlatu(jj) * 180. / pi           jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
51         enddo      call histdef(histaveid, 'v', 'vents v scalaires moyennes', 'm/s', iip1, &
52      enddo           jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
53        call histdef(histaveid, 'temp', 'temperature moyennee', 'K', iip1, jjp1, &
54      call histbeg_totreg('dyn_hist_ave.nc', rlong(:, 1), rlat(1, :), 1, iip1, &           horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
55           1, jjp1, itau_dyn, zjulian, tstep, thoriid, histaveid)      call histdef(histaveid, 'theta', 'temperature potentielle', 'K', iip1, &
56      call histvert(histaveid, 'sigss', 'Niveaux sigma', 'Pa', llm, nivsigs, &           jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
57           zvertiid)      call histdef(histaveid, 'phi', 'geopotentiel moyenne', '-', iip1, jjp1, &
58             horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
     call histdef(histaveid, 'u', 'vents u scalaires moyennes', &  
          'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
     call histdef(histaveid, 'v', 'vents v scalaires moyennes', &  
          'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
     call histdef(histaveid, 'temp', 'temperature moyennee', 'K', &  
          iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
     call histdef(histaveid, 'theta', 'temperature potentielle', 'K', &  
          iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
     call histdef(histaveid, 'phi', 'geopotentiel moyenne', '-', &  
          iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &  
          'ave(X)', t_ops, t_wrt)  
59    
60      ! Traceurs      ! Traceurs
61      DO iq = 1, nq      DO iq = 1, nq
62         call histdef(histaveid, ttext(iq), ttext(iq), '-', &         call histdef(histaveid, ttext(iq), ttext(iq), '-', iip1, jjp1, &
63              iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &              horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
             'ave(X)', t_ops, t_wrt)  
64      enddo      enddo
65    
66      call histdef(histaveid, 'masse', 'masse', 'kg', &      call histdef(histaveid, 'masse', 'masse', 'kg', iip1, jjp1, horiid, 1, &
67           iip1, jjp1, thoriid, 1, 1, 1, -99, &           1, 1, -99, 'ave(X)', t_ops, t_wrt)
68           'ave(X)', t_ops, t_wrt)      call histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa', iip1, &
69      call histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa', &           jjp1, horiid, 1, 1, 1, -99, 'ave(X)', t_ops, t_wrt)
70           iip1, jjp1, thoriid, 1, 1, 1, -99, &      call histdef(histaveid, 'phis', 'geopotentiel au sol', '-', iip1, jjp1, &
71           'ave(X)', t_ops, t_wrt)           horiid, 1, 1, 1, -99, 'ave(X)', t_ops, t_wrt)
     call histdef(histaveid, 'phis', 'geopotentiel au sol', '-', &  
          iip1, jjp1, thoriid, 1, 1, 1, -99, &  
          'ave(X)', t_ops, t_wrt)  
72    
73      call histend(histaveid)      call histend(histaveid)
74    

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

  ViewVC Help
Powered by ViewVC 1.1.21