/[lmdze]/trunk/libf/bibio/inithist.f90
ViewVC logotype

Diff of /trunk/libf/bibio/inithist.f90

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

revision 3 by guez, Wed Feb 27 13:16:39 2008 UTC revision 30 by guez, Thu Apr 1 09:07:28 2010 UTC
# Line 6  module inithist_m Line 6  module inithist_m
6    
7  contains  contains
8    
9    subroutine inithist(day0, anne0, tstep, nq, fileid, filevid, infile, t_ops, &    subroutine inithist(day0, anne0, tstep, nq, fileid, filevid, t_ops, &
10         t_wrt)         t_wrt)
11    
12      ! From inithist.F,v 1.1.1.1 2004/05/19 12:53:05      ! From inithist.F,v 1.1.1.1 2004/05/19 12:53:05
# Line 21  contains Line 21  contains
21      !                                  histend      !                                  histend
22    
23      !   Entree:      !   Entree:
     !      infile: nom du fichier histoire a creer  
24      !      day0,anne0: date de reference      !      day0,anne0: date de reference
25      !      tstep: duree du pas de temps en seconde      !      tstep: duree du pas de temps en seconde
26      !      t_ops: frequence de l'operation pour IOIPSL      !      t_ops: frequence de l'operation pour IOIPSL
# Line 34  contains Line 33  contains
33    
34      !   L. Fairhead, LMD, 03/99      !   L. Fairhead, LMD, 03/99
35    
36      USE IOIPSL      USE calendar
37        use histcom
38      use dimens_m      use dimens_m
39      use paramet_m      use paramet_m
40      use comconst      use comconst
# Line 44  contains Line 44  contains
44      use serre      use serre
45      use temps      use temps
46      use ener      use ener
47      use advtrac_m      use iniadvtrac_m
48    
49      !   Arguments      !   Arguments
     character(len=*) infile  
50      integer day0, anne0      integer day0, anne0
51      real, intent(in):: tstep, t_ops, t_wrt      real, intent(in):: tstep, t_ops, t_wrt
52      integer fileid, filevid      integer fileid, filevid
53      integer nq      integer nq
54    
55      !   Variables locales      !   Variables locales
   
     integer tau0  
56      real zjulian      real zjulian
57      integer iq      integer iq
58      real rlong(iip1,jjp1), rlat(iip1,jjp1)      real rlong(iip1,jjp1), rlat(iip1,jjp1)
# Line 74  contains Line 71  contains
71      zan = anne0      zan = anne0
72      dayref = day0      dayref = day0
73      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
     tau0 = itau_dyn  
74    
75      do jj = 1, jjp1      do jj = 1, jjp1
76         do ii = 1, iip1         do ii = 1, iip1
# Line 83  contains Line 79  contains
79         enddo         enddo
80      enddo      enddo
81    
82      call histbeg_totreg(infile, iip1, rlong(:,1), jjp1, rlat(1,:), &      call histbeg_totreg("dyn_hist.nc", rlong(:,1), rlat(1,:), &
83           1, iip1, 1, jjp1, &           1, iip1, 1, jjp1, &
84           tau0, zjulian, tstep, uhoriid, fileid)           itau_dyn, zjulian, tstep, uhoriid, fileid)
85      !      !
86      !  Creation du fichier histoire pour la grille en V (oblige pour l'instant,      !  Creation du fichier histoire pour la grille en V (oblige pour l'instant,
87      !  IOIPSL ne permet pas de grilles avec des nombres de point differents dans      !  IOIPSL ne permet pas de grilles avec des nombres de point differents dans
88      !  un meme fichier)      !  un meme fichier)
89    
90      do jj = 1, jjm      do jj = 1, jjm
# Line 98  contains Line 94  contains
94         enddo         enddo
95      enddo      enddo
96    
97      call histbeg_totreg('dyn_histv.nc', iip1, rlong(:,1), jjm, rlat(1,:jjm), &      call histbeg_totreg('dyn_histv.nc', rlong(:,1), rlat(1,:jjm), &
98           1, iip1, 1, jjm, &           1, iip1, 1, jjm, &
99           tau0, zjulian, tstep, vhoriid, filevid)           itau_dyn, zjulian, tstep, vhoriid, filevid)
100      !      !
101      !  Appel a histhori pour rajouter les autres grilles horizontales      !  Appel a histhori pour rajouter les autres grilles horizontales
102      !      !
# Line 111  contains Line 107  contains
107         enddo         enddo
108      enddo      enddo
109    
110      call histhori(fileid, iip1, rlong, jjp1, rlat, 'scalar', &      call histhori_regular(fileid, iip1, rlong, jjp1, rlat, 'scalar', &
111           'Grille points scalaires', thoriid)           'Grille points scalaires', thoriid)
112      !      !
113      !  Appel a histvert pour la grille verticale      !  Appel a histvert pour la grille verticale
# Line 128  contains Line 124  contains
124      !      !
125      call histdef(fileid, 'ucov', 'vents u covariants', 'm/s', &      call histdef(fileid, 'ucov', 'vents u covariants', 'm/s', &
126           iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, &           iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, &
127           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
128      !      !
129      !  Vents V      !  Vents V
130      !      !
131      call histdef(filevid, 'vcov', 'vents v covariants', 'm/s', &      call histdef(filevid, 'vcov', 'vents v covariants', 'm/s', &
132           iip1, jjm, vhoriid, llm, 1, llm, zvertiid, &           iip1, jjm, vhoriid, llm, 1, llm, zvertiid, &
133           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
134    
135      !      !
136      !  Temperature potentielle      !  Temperature potentielle
137      !      !
138      call histdef(fileid, 'teta', 'temperature potentielle', '-', &      call histdef(fileid, 'teta', 'temperature potentielle', '-', &
139           iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &           iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
140           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
141      !      !
142      !  Geopotentiel      !  Geopotentiel
143      !      !
144      call histdef(fileid, 'phi', 'geopotentiel instantane', '-', &      call histdef(fileid, 'phi', 'geopotentiel instantane', '-', &
145           iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &           iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
146           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
147      !      !
148      !  Traceurs      !  Traceurs
149      !      !
150      DO iq=1,nq      DO iq=1,nq
151         call histdef(fileid, ttext(iq),  ttext(iq), '-', &         call histdef(fileid, ttext(iq),  ttext(iq), '-', &
152              iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &              iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
153              32, 'inst(X)', t_ops, t_wrt)              'inst(X)', t_ops, t_wrt)
154      enddo      enddo
155      !      !
156      !  Masse      !  Masse
157      !      !
158      call histdef(fileid, 'masse', 'masse', 'kg', &      call histdef(fileid, 'masse', 'masse', 'kg', &
159           iip1, jjp1, thoriid, 1, 1, 1, -99, &           iip1, jjp1, thoriid, 1, 1, 1, -99, &
160           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
161      !      !
162      !  Pression au sol      !  Pression au sol
163      !      !
164      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa', &      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa', &
165           iip1, jjp1, thoriid, 1, 1, 1, -99, &           iip1, jjp1, thoriid, 1, 1, 1, -99, &
166           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
167      !      !
168      !  Pression au sol      !  Pression au sol
169      !      !
170      call histdef(fileid, 'phis', 'geopotentiel au sol', '-', &      call histdef(fileid, 'phis', 'geopotentiel au sol', '-', &
171           iip1, jjp1, thoriid, 1, 1, 1, -99, &           iip1, jjp1, thoriid, 1, 1, 1, -99, &
172           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
173      !      !
174      !  Fin      !  Fin
175      !      !

Legend:
Removed from v.3  
changed lines
  Added in v.30

  ViewVC Help
Powered by ViewVC 1.1.21