source: codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/config/ppsrc/bibio/inithist.f @ 224

Last change on this file since 224 was 224, checked in by ymipsl, 10 years ago
File size: 12.2 KB
Line 
1!
2! $Id: inithist.F 1403 2010-07-01 09:02:53Z fairhead $
3!
4      subroutine inithist(day0,anne0,tstep,t_ops,t_wrt)
5
6
7
8
9       USE infotrac, ONLY : nqtot, ttext
10       use com_io_dyn_mod, only : histid,histvid,histuid,               &
11     &                        dynhist_file,dynhistv_file,dynhistu_file
12
13      implicit none
14
15C
16C   Routine d'initialisation des ecritures des fichiers histoires LMDZ
17C   au format IOIPSL
18C
19C   Appels succesifs des routines: histbeg
20C                                  histhori
21C                                  histver
22C                                  histdef
23C                                  histend
24C
25C   Entree:
26C
27C      infile: nom du fichier histoire a creer
28C      day0,anne0: date de reference
29C      tstep: duree du pas de temps en seconde
30C      t_ops: frequence de l'operation pour IOIPSL
31C      t_wrt: frequence d'ecriture sur le fichier
32C      nq: nombre de traceurs
33C
34C
35C   L. Fairhead, LMD, 03/99
36C
37C =====================================================================
38C
39C   Declarations
40!-----------------------------------------------------------------------
41!   INCLUDE 'dimensions.h'
42!
43!   dimensions.h contient les dimensions du modele
44!   ndm est tel que iim=2**ndm
45!-----------------------------------------------------------------------
46
47      INTEGER iim,jjm,llm,ndm
48
49      PARAMETER (iim= 128,jjm=96,llm=64,ndm=1)
50
51!-----------------------------------------------------------------------
52!
53! $Header$
54!
55!
56!  ATTENTION!!!!: ce fichier include est compatible format fixe/format libre
57!                 veillez  n'utiliser que des ! pour les commentaires
58!                 et  bien positionner les & des lignes de continuation
59!                 (les placer en colonne 6 et en colonne 73)
60!
61!
62!-----------------------------------------------------------------------
63!   INCLUDE 'paramet.h'
64
65      INTEGER  iip1,iip2,iip3,jjp1,llmp1,llmp2,llmm1
66      INTEGER  kftd,ip1jm,ip1jmp1,ip1jmi1,ijp1llm
67      INTEGER  ijmllm,mvar
68      INTEGER jcfil,jcfllm
69
70      PARAMETER( iip1= iim+1,iip2=iim+2,iip3=iim+3                       &
71     &    ,jjp1=jjm+1-1/jjm)
72      PARAMETER( llmp1 = llm+1,  llmp2 = llm+2, llmm1 = llm-1 )
73      PARAMETER( kftd  = iim/2 -ndm )
74      PARAMETER( ip1jm  = iip1*jjm,  ip1jmp1= iip1*jjp1 )
75      PARAMETER( ip1jmi1= ip1jm - iip1 )
76      PARAMETER( ijp1llm= ip1jmp1 * llm, ijmllm= ip1jm * llm )
77      PARAMETER( mvar= ip1jmp1*( 2*llm+1) + ijmllm )
78      PARAMETER( jcfil=jjm/2+5, jcfllm=jcfil*llm )
79
80!-----------------------------------------------------------------------
81!
82! $Id: comconst.h 1437 2010-09-30 08:29:10Z emillour $
83!
84!-----------------------------------------------------------------------
85! INCLUDE comconst.h
86
87      COMMON/comconsti/im,jm,lllm,imp1,jmp1,lllmm1,lllmp1,lcl,          &
88     &                 iflag_top_bound,mode_top_bound
89      COMMON/comconstr/dtvr,daysec,                                     &
90     & pi,dtphys,dtdiss,rad,r,kappa,cotot,unsim,g,omeg                  &
91     & ,dissip_fac_mid,dissip_fac_up,dissip_deltaz,dissip_hdelta        &
92     & ,dissip_pupstart  ,tau_top_bound,                                &
93     & daylen,molmass, ihf
94      COMMON/cpdetvenus/cpp,nu_venus,t0_venus
95
96      INTEGER im,jm,lllm,imp1,jmp1,lllmm1,lllmp1,lcl
97      REAL dtvr ! dynamical time step (in s)
98      REAL daysec !length (in s) of a standard day
99      REAL pi    ! something like 3.14159....
100      REAL dtphys ! (s) time step for the physics
101      REAL dtdiss ! (s) time step for the dissipation
102      REAL rad ! (m) radius of the planet
103      REAL r ! Reduced Gas constant r=R/mu
104             ! with R=8.31.. J.K-1.mol-1, mu: mol mass of atmosphere (kg/mol)
105      REAL cpp   ! Cp
106      REAL kappa ! kappa=R/Cp
107      REAL cotot
108      REAL unsim ! = 1./iim
109      REAL g ! (m/s2) gravity
110      REAL omeg ! (rad/s) rotation rate of the planet
111! Dissipation factors, for Earth model:
112      REAL dissip_factz,dissip_zref !dissip_deltaz
113! Dissipation factors, for other planets:
114      REAL dissip_fac_mid,dissip_fac_up,dissip_deltaz,dissip_hdelta
115      REAL dissip_pupstart
116      INTEGER iflag_top_bound,mode_top_bound
117      REAL tau_top_bound
118      REAL daylen ! length of solar day, in 'standard' day length
119      REAL molmass ! (g/mol) molar mass of the atmosphere
120
121      REAL nu_venus,t0_venus ! coeffs needed for Cp(T), Venus atmosphere
122      REAL ihf  ! (W/m2) intrinsic heat flux for giant planets
123
124
125!-----------------------------------------------------------------------
126!
127! $Id: comvert.h 1654 2012-09-24 15:07:18Z aslmd $
128!
129!-----------------------------------------------------------------------
130!   INCLUDE 'comvert.h'
131
132      COMMON/comvertr/ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm),     &
133     &               pa,preff,nivsigs(llm),nivsig(llm+1),               &
134     &               aps(llm),bps(llm),scaleheight,pseudoalt(llm)
135
136      common/comverti/disvert_type, pressure_exner
137
138      real ap     ! hybrid pressure contribution at interlayers
139      real bp     ! hybrid sigma contribution at interlayer
140      real presnivs ! (reference) pressure at mid-layers
141      real dpres
142      real pa     ! reference pressure (Pa) at which hybrid coordinates
143                  ! become purely pressure
144      real preff  ! reference surface pressure (Pa)
145      real nivsigs
146      real nivsig
147      real aps    ! hybrid pressure contribution at mid-layers
148      real bps    ! hybrid sigma contribution at mid-layers
149      real scaleheight ! atmospheric (reference) scale height (km)
150      real pseudoalt ! pseudo-altitude of model levels (km), based on presnivs(),
151                     ! preff and scaleheight
152
153      integer disvert_type ! type of vertical discretization:
154                           ! 1: Earth (default for planet_type==earth),
155                           !     automatic generation
156                           ! 2: Planets (default for planet_type!=earth),
157                           !     using 'z2sig.def' (or 'esasig.def) file
158
159      logical pressure_exner
160!     compute pressure inside layers using Exner function, else use mean
161!     of pressure values at interfaces
162
163 !-----------------------------------------------------------------------
164!
165! $Header$
166!
167!CDK comgeom
168      COMMON/comgeom/                                                   &
169     & cu(ip1jmp1),cv(ip1jm),unscu2(ip1jmp1),unscv2(ip1jm),             &
170     & aire(ip1jmp1),airesurg(ip1jmp1),aireu(ip1jmp1),                  &
171     & airev(ip1jm),unsaire(ip1jmp1),apoln,apols,                       &
172     & unsairez(ip1jm),airuscv2(ip1jm),airvscu2(ip1jm),                 &
173     & aireij1(ip1jmp1),aireij2(ip1jmp1),aireij3(ip1jmp1),              &
174     & aireij4(ip1jmp1),alpha1(ip1jmp1),alpha2(ip1jmp1),                &
175     & alpha3(ip1jmp1),alpha4(ip1jmp1),alpha1p2(ip1jmp1),               &
176     & alpha1p4(ip1jmp1),alpha2p3(ip1jmp1),alpha3p4(ip1jmp1),           &
177     & fext(ip1jm),constang(ip1jmp1),rlatu(jjp1),rlatv(jjm),            &
178     & rlonu(iip1),rlonv(iip1),cuvsurcv(ip1jm),cvsurcuv(ip1jm),         &
179     & cvusurcu(ip1jmp1),cusurcvu(ip1jmp1),cuvscvgam1(ip1jm),           &
180     & cuvscvgam2(ip1jm),cvuscugam1(ip1jmp1),                           &
181     & cvuscugam2(ip1jmp1),cvscuvgam(ip1jm),cuscvugam(ip1jmp1),         &
182     & unsapolnga1,unsapolnga2,unsapolsga1,unsapolsga2,                 &
183     & unsair_gam1(ip1jmp1),unsair_gam2(ip1jmp1),unsairz_gam(ip1jm),    &
184     & aivscu2gam(ip1jm),aiuscv2gam(ip1jm),xprimu(iip1),xprimv(iip1)
185
186!
187        REAL                                                            &
188     & cu,cv,unscu2,unscv2,aire,airesurg,aireu,airev,unsaire,apoln     ,&
189     & apols,unsairez,airuscv2,airvscu2,aireij1,aireij2,aireij3,aireij4,&
190     & alpha1,alpha2,alpha3,alpha4,alpha1p2,alpha1p4,alpha2p3,alpha3p4 ,&
191     & fext,constang,rlatu,rlatv,rlonu,rlonv,cuvscvgam1,cuvscvgam2     ,&
192     & cvuscugam1,cvuscugam2,cvscuvgam,cuscvugam,unsapolnga1,unsapolnga2&
193     & ,unsapolsga1,unsapolsga2,unsair_gam1,unsair_gam2,unsairz_gam    ,&
194     & aivscu2gam ,aiuscv2gam,cuvsurcv,cvsurcuv,cvusurcu,cusurcvu,xprimu&
195     & , xprimv
196!
197!
198! $Id: temps.h 1577 2011-10-20 15:06:47Z fairhead $
199!
200!  ATTENTION!!!!: ce fichier include est compatible format fixe/format libre
201!                 veillez  n'utiliser que des ! pour les commentaires
202!                 et  bien positionner les & des lignes de continuation
203!                 (les placer en colonne 6 et en colonne 73)
204!
205!
206! jD_ref = jour julien de la date de reference (lancement de l'experience)
207! hD_ref = "heure" julienne de la date de reference
208!-----------------------------------------------------------------------
209! INCLUDE 'temps.h'
210
211      COMMON/temps_r/dt,jD_ref,jH_ref,start_time,hour_ini
212      COMMON/temps_i/day_ini,day_end,annee_ref,day_ref,                 &
213     &             itau_dyn,itau_phy,itaufin
214      COMMON/temps_c/calend
215
216
217      INTEGER   itaufin ! total number of dynamical steps for the run
218      INTEGER   itau_dyn, itau_phy
219      INTEGER   day_ini ! initial day # of simulation sequence
220      INTEGER   day_end ! final day # ; i.e. day # when this simulation ends
221      INTEGER   annee_ref
222      INTEGER   day_ref
223      REAL      dt ! (dynamics) time step (changes if doing Matsuno or LF step)
224      REAL      jD_ref, jH_ref, start_time
225      CHARACTER (len=10) :: calend
226
227      ! Additionnal Mars stuff:
228      real hour_ini ! initial fraction of day of simulation sequence (0=<hour_ini<1)
229
230!-----------------------------------------------------------------------
231!
232! $Id: ener.h 1447 2010-10-22 16:18:27Z jghattas $
233!
234!  ATTENTION!!!!: ce fichier include est compatible format fixe/format libre
235!                 veillez à n'utiliser que des ! pour les commentaires
236!                 et à bien positionner les & des lignes de continuation
237!                 (les placer en colonne 6 et en colonne 73)
238!
239! INCLUDE 'ener.h'
240
241      COMMON/ener/ang0,etot0,ptot0,ztot0,stot0,                         &
242     &            ang,etot,ptot,ztot,stot,rmsdpdt ,                     &
243     &            rmsv,gtot(llmm1)
244
245      REAL ang0,etot0,ptot0,ztot0,stot0,                                &
246     &     ang,etot,ptot,ztot,stot,rmsdpdt,rmsv,gtot
247
248!-----------------------------------------------------------------------
249!
250! $Id: logic.h 1520 2011-05-23 11:37:09Z emillour $
251!
252!
253! NB: keep items of different kinds in seperate common blocs to avoid
254!     "misaligned commons" issues
255!-----------------------------------------------------------------------
256! INCLUDE 'logic.h'
257
258      COMMON/logicl/ purmats,forward,leapf,apphys,                      &
259     &  statcl,conser,apdiss,apdelq,saison,ecripar,fxyhypb,ysinus       &
260     &  ,read_start,ok_guide,ok_strato,tidal,ok_gradsfile               &
261     &  ,ok_limit,ok_etat0,hybrid                                       &
262     &  ,moyzon_mu,moyzon_ch
263
264      COMMON/logici/ iflag_phys,iflag_trac
265     
266      LOGICAL purmats,forward,leapf,apphys,statcl,conser,               &
267     & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus                      &
268     &  ,read_start,ok_guide,ok_strato,tidal,ok_gradsfile               &
269     &  ,ok_limit,ok_etat0
270      logical hybrid ! vertical coordinate is hybrid if true (sigma otherwise)
271                     ! (only used if disvert_type==2)
272      logical moyzon_mu,moyzon_ch ! used for zonal averages in Titan
273
274      integer iflag_phys,iflag_trac
275!$OMP THREADPRIVATE(/logicl/)
276!$OMP THREADPRIVATE(/logici/)
277!-----------------------------------------------------------------------
278!
279! $Header$
280!
281      character *120 descript
282      common /titre/descript
283!
284! $Header$
285!
286!c
287!c
288!c..include serre.h
289!c
290       REAL clon,clat,transx,transy,alphax,alphay,pxo,pyo,              &
291     &  grossismx, grossismy, dzoomx, dzoomy,taux,tauy
292       COMMON/serre/clon,clat,transx,transy,alphax,alphay,pxo,pyo ,     &
293     &  grossismx, grossismy, dzoomx, dzoomy,taux,tauy
294!
295! $Header$
296!
297!
298! gestion des impressions de sorties et de débogage
299! lunout:    unité du fichier dans lequel se font les sorties
300!                           (par defaut 6, la sortie standard)
301! prt_level: niveau d'impression souhaité (0 = minimum)
302!
303      INTEGER lunout, prt_level
304      COMMON /comprint/ lunout, prt_level
305
306C   Arguments
307C
308      integer day0, anne0
309      real tstep, t_ops, t_wrt
310
311! tell the user this routine should be run with ioipsl
312      write(lunout,*)"inithist: Warning this routine should not be",
313     &               " used without ioipsl"
314! of #ifdef CPP_IOIPSL
315      return
316      end
Note: See TracBrowser for help on using the repository browser.