/[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 144 by guez, Wed Jun 10 16:46:46 2015 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 des fichiers histoires au
15      USE comvert, ONLY : nivsigs      ! format IOIPSL. Initialisation du fichier histoire moyenne.
     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      ! Variables locales
35      integer thoriid, zvertiid      integer horiid, zvertiid
36      real zjulian      real julian
37      integer iq      integer iq, l
     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    
43      zan = anne0      CALL ymds2ju(annee_ref, 1, day_ref, 0., julian)
44      dayref = day0      call histbeg_totreg('dyn_hist_ave.nc', rlonv * 180. / pi, &
45      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)           rlatu * 180. / pi, 1, iip1, 1, jjp1, itau_dyn, julian, tstep, &
46             horiid, histaveid)
47      do jj = 1, jjp1      call histvert(histaveid, 'sigss', 'Niveaux sigma', '', &
48         do ii = 1, iip1           (/(real(l), l = 1, llm)/), zvertiid)
49            rlong(ii, jj) = rlonv(ii) * 180. / pi  
50            rlat(ii, jj) = rlatu(jj) * 180. / pi      call histdef(histaveid, 'u', 'vents u scalaires moyennes', 'm/s', iip1, &
51         enddo           jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
52      enddo      call histdef(histaveid, 'v', 'vents v scalaires moyennes', 'm/s', iip1, &
53             jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
54      call histbeg_totreg('dyn_hist_ave.nc', rlong(:, 1), rlat(1, :), 1, iip1, &      call histdef(histaveid, 'temp', 'temperature moyennee', 'K', iip1, jjp1, &
55           1, jjp1, itau_dyn, zjulian, tstep, thoriid, histaveid)           horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
56      call histvert(histaveid, 'sigss', 'Niveaux sigma', 'Pa', llm, nivsigs, &      call histdef(histaveid, 'theta', 'temperature potentielle', 'K', iip1, &
57           zvertiid)           jjp1, horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
58        call histdef(histaveid, 'phi', 'geopotentiel moyenne', '-', iip1, jjp1, &
59      call histdef(histaveid, 'u', 'vents u scalaires moyennes', &           horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
          '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)  
60    
61      ! Traceurs      ! Traceurs
62      DO iq = 1, nq      DO iq = 1, nq
63         call histdef(histaveid, ttext(iq), ttext(iq), '-', &         call histdef(histaveid, ttext(iq), ttext(iq), '-', iip1, jjp1, &
64              iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &              horiid, llm, 1, llm, zvertiid, 'ave(X)', t_ops, t_wrt)
             'ave(X)', t_ops, t_wrt)  
65      enddo      enddo
66    
67      call histdef(histaveid, 'masse', 'masse', 'kg', &      call histdef(histaveid, 'masse', 'masse', 'kg', iip1, jjp1, horiid, 1, &
68           iip1, jjp1, thoriid, 1, 1, 1, -99, &           1, 1, -99, 'ave(X)', t_ops, t_wrt)
69           'ave(X)', t_ops, t_wrt)      call histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa', iip1, &
70      call histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa', &           jjp1, horiid, 1, 1, 1, -99, 'ave(X)', t_ops, t_wrt)
71           iip1, jjp1, thoriid, 1, 1, 1, -99, &      call histdef(histaveid, 'phis', 'geopotentiel au sol', '-', iip1, jjp1, &
72           '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)  
73    
74      call histend(histaveid)      call histend(histaveid)
75    

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

  ViewVC Help
Powered by ViewVC 1.1.21