/[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 27 by guez, Thu Mar 25 14:29:07 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 44  contains Line 43  contains
43      use serre      use serre
44      use temps      use temps
45      use ener      use ener
46      use advtrac_m      use iniadvtrac_m
47    
48      !   Arguments      !   Arguments
     character(len=*) infile  
49      integer day0, anne0      integer day0, anne0
50      real, intent(in):: tstep, t_ops, t_wrt      real, intent(in):: tstep, t_ops, t_wrt
51      integer fileid, filevid      integer fileid, filevid
52      integer nq      integer nq
53    
54      !   Variables locales      !   Variables locales
   
     integer tau0  
55      real zjulian      real zjulian
56      integer iq      integer iq
57      real rlong(iip1,jjp1), rlat(iip1,jjp1)      real rlong(iip1,jjp1), rlat(iip1,jjp1)
# Line 74  contains Line 70  contains
70      zan = anne0      zan = anne0
71      dayref = day0      dayref = day0
72      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
     tau0 = itau_dyn  
73    
74      do jj = 1, jjp1      do jj = 1, jjp1
75         do ii = 1, iip1         do ii = 1, iip1
# Line 83  contains Line 78  contains
78         enddo         enddo
79      enddo      enddo
80    
81      call histbeg_totreg(infile, iip1, rlong(:,1), jjp1, rlat(1,:), &      call histbeg_totreg("dyn_hist.nc", rlong(:,1), rlat(1,:), &
82           1, iip1, 1, jjp1, &           1, iip1, 1, jjp1, &
83           tau0, zjulian, tstep, uhoriid, fileid)           itau_dyn, zjulian, tstep, uhoriid, fileid)
84      !      !
85      !  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,
86      !  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
87      !  un meme fichier)      !  un meme fichier)
88    
89      do jj = 1, jjm      do jj = 1, jjm
# Line 98  contains Line 93  contains
93         enddo         enddo
94      enddo      enddo
95    
96      call histbeg_totreg('dyn_histv.nc', iip1, rlong(:,1), jjm, rlat(1,:jjm), &      call histbeg_totreg('dyn_histv.nc', rlong(:,1), rlat(1,:jjm), &
97           1, iip1, 1, jjm, &           1, iip1, 1, jjm, &
98           tau0, zjulian, tstep, vhoriid, filevid)           itau_dyn, zjulian, tstep, vhoriid, filevid)
99      !      !
100      !  Appel a histhori pour rajouter les autres grilles horizontales      !  Appel a histhori pour rajouter les autres grilles horizontales
101      !      !
# Line 111  contains Line 106  contains
106         enddo         enddo
107      enddo      enddo
108    
109      call histhori(fileid, iip1, rlong, jjp1, rlat, 'scalar', &      call histhori_regular(fileid, iip1, rlong, jjp1, rlat, 'scalar', &
110           'Grille points scalaires', thoriid)           'Grille points scalaires', thoriid)
111      !      !
112      !  Appel a histvert pour la grille verticale      !  Appel a histvert pour la grille verticale
# Line 128  contains Line 123  contains
123      !      !
124      call histdef(fileid, 'ucov', 'vents u covariants', 'm/s', &      call histdef(fileid, 'ucov', 'vents u covariants', 'm/s', &
125           iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, &           iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, &
126           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
127      !      !
128      !  Vents V      !  Vents V
129      !      !
130      call histdef(filevid, 'vcov', 'vents v covariants', 'm/s', &      call histdef(filevid, 'vcov', 'vents v covariants', 'm/s', &
131           iip1, jjm, vhoriid, llm, 1, llm, zvertiid, &           iip1, jjm, vhoriid, llm, 1, llm, zvertiid, &
132           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
133    
134      !      !
135      !  Temperature potentielle      !  Temperature potentielle
136      !      !
137      call histdef(fileid, 'teta', 'temperature potentielle', '-', &      call histdef(fileid, 'teta', 'temperature potentielle', '-', &
138           iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &           iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
139           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
140      !      !
141      !  Geopotentiel      !  Geopotentiel
142      !      !
143      call histdef(fileid, 'phi', 'geopotentiel instantane', '-', &      call histdef(fileid, 'phi', 'geopotentiel instantane', '-', &
144           iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &           iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
145           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
146      !      !
147      !  Traceurs      !  Traceurs
148      !      !
149      DO iq=1,nq      DO iq=1,nq
150         call histdef(fileid, ttext(iq),  ttext(iq), '-', &         call histdef(fileid, ttext(iq),  ttext(iq), '-', &
151              iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &              iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
152              32, 'inst(X)', t_ops, t_wrt)              'inst(X)', t_ops, t_wrt)
153      enddo      enddo
154      !      !
155      !  Masse      !  Masse
156      !      !
157      call histdef(fileid, 'masse', 'masse', 'kg', &      call histdef(fileid, 'masse', 'masse', 'kg', &
158           iip1, jjp1, thoriid, 1, 1, 1, -99, &           iip1, jjp1, thoriid, 1, 1, 1, -99, &
159           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
160      !      !
161      !  Pression au sol      !  Pression au sol
162      !      !
163      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa', &      call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa', &
164           iip1, jjp1, thoriid, 1, 1, 1, -99, &           iip1, jjp1, thoriid, 1, 1, 1, -99, &
165           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
166      !      !
167      !  Pression au sol      !  Pression au sol
168      !      !
169      call histdef(fileid, 'phis', 'geopotentiel au sol', '-', &      call histdef(fileid, 'phis', 'geopotentiel au sol', '-', &
170           iip1, jjp1, thoriid, 1, 1, 1, -99, &           iip1, jjp1, thoriid, 1, 1, 1, -99, &
171           32, 'inst(X)', t_ops, t_wrt)           'inst(X)', t_ops, t_wrt)
172      !      !
173      !  Fin      !  Fin
174      !      !

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

  ViewVC Help
Powered by ViewVC 1.1.21