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