/[lmdze]/trunk/bibio/initfluxsto.f
ViewVC logotype

Annotation of /trunk/bibio/initfluxsto.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 27 - (hide annotations)
Thu Mar 25 14:29:07 2010 UTC (14 years, 2 months ago) by guez
Original Path: trunk/libf/bibio/initfluxsto.f
File size: 6008 byte(s)
"dyn3d" and "filtrez" do not contain any included file so make rules
have been updated.

"comdissip.f90" was useless, removed it.

"dynredem0" wrote undefined value in "controle(31)", that was
overwritten by "dynredem1". Now "dynredem0" just writes 0 to
"controle(31)".

Removed arguments of "inidissip". "inidissip" now accesses the
variables by use association.

In program "etat0_lim", "itaufin" is not defined so "dynredem1" wrote
undefined value to "controle(31)". Added argument "itau" of
"dynredem1" to correct that.

"itaufin" does not need to be a module variable (of "temps"), made it
a local variable of "leapfrog".

Removed calls to "diagedyn" from "leapfrog".

1 guez 3 !
2     ! $Header: /home/cvsroot/LMDZ4/libf/bibio/initfluxsto.F,v 1.1.1.1 2004/05/19 12:53:05 lmdzadmin Exp $
3     !
4     subroutine initfluxsto
5 guez 27 . (tstep,t_ops,t_wrt,nq,
6 guez 3 . fileid,filevid,filedid)
7    
8     USE IOIPSL
9    
10     C
11     C Routine d'initialisation des ecritures des fichiers histoires LMDZ
12     C au format IOIPSL
13     C
14     C Appels succesifs des routines: histbeg
15     C histhori
16     C histver
17     C histdef
18     C histend
19     C
20     C Entree:
21     C
22     C day0,anne0: date de reference
23     C tstep: duree du pas de temps en seconde
24     C t_ops: frequence de l'operation pour IOIPSL
25     C t_wrt: frequence d'ecriture sur le fichier
26     C nq: nombre de traceurs
27     C
28     C Sortie:
29     C fileid: ID du fichier netcdf cree
30     C filevid:ID du fichier netcdf pour la grille v
31     C
32     C L. Fairhead, LMD, 03/99
33     C
34     C =====================================================================
35     C
36     C Declarations
37     use dimens_m
38     use paramet_m
39     use comconst
40     use comvert
41     use logic
42     use comgeom
43     use serre
44     use temps, only: annee_ref, day_ref, itau_dyn
45     use ener
46     implicit none
47    
48     C Arguments
49     C
50     integer*4 itau
51     real tstep, t_ops, t_wrt
52     integer fileid, filevid,filedid
53     integer nq,ndex(1)
54     real nivd(1)
55    
56     C Variables locales
57     real zjulian
58     character*3 str
59     character*10 ctrac
60     integer iq
61 guez 15 real rlong(iip1,jjp1), rlat(iip1,jjp1)
62 guez 3 integer uhoriid, vhoriid, thoriid, zvertiid,dhoriid,dvertiid
63     integer ii,jj
64     integer zan, idayref
65     logical ok_sync
66     C
67     C Initialisations
68     C
69     pi = 4. * atan (1.)
70     str='q '
71     ctrac = 'traceur '
72     ok_sync = .true.
73     C
74     C Appel a histbeg: creation du fichier netcdf et initialisations diverses
75     C
76    
77     zan = annee_ref
78     idayref = day_ref
79     CALL ymds2ju(zan, 1, idayref, 0.0, zjulian)
80    
81     do jj = 1, jjp1
82     do ii = 1, iip1
83     rlong(ii,jj) = rlonu(ii) * 180. / pi
84     rlat(ii,jj) = rlatu(jj) * 180. / pi
85     enddo
86     enddo
87    
88 guez 27 call histbeg_totreg('fluxstoke', rlong(:,1), rlat(1,:),
89 guez 3 . 1, iip1, 1, jjp1,
90 guez 27 . itau_dyn, zjulian, tstep, uhoriid, fileid)
91 guez 3 C
92     C Creation du fichier histoire pour la grille en V (oblige pour l'instant,
93     C IOIPSL ne permet pas de grilles avec des nombres de point differents dans
94     C un meme fichier)
95    
96    
97     do jj = 1, jjm
98     do ii = 1, iip1
99     rlong(ii,jj) = rlonv(ii) * 180. / pi
100     rlat(ii,jj) = rlatv(jj) * 180. / pi
101     enddo
102     enddo
103    
104 guez 15 call histbeg_totreg('fluxstokev.nc', rlong(:,1),
105     . rlat(1,:jjm),1, iip1, 1, jjm,
106 guez 27 . itau_dyn, zjulian, tstep, vhoriid, filevid)
107 guez 3
108 guez 15 call histbeg_totreg('defstoke.nc', (/1./), (/1./),
109 guez 3 . 1, 1, 1, 1,
110 guez 27 . itau_dyn, zjulian, tstep, dhoriid, filedid)
111 guez 3
112     C
113     C Appel a histhori pour rajouter les autres grilles horizontales
114     C
115     do jj = 1, jjp1
116     do ii = 1, iip1
117     rlong(ii,jj) = rlonv(ii) * 180. / pi
118     rlat(ii,jj) = rlatu(jj) * 180. / pi
119     enddo
120     enddo
121    
122 guez 15 call histhori_regular(fileid, iip1, rlong, jjp1, rlat, 'scalar',
123 guez 3 . 'Grille points scalaires', thoriid)
124    
125     C
126     C Appel a histvert pour la grille verticale
127     C
128     call histvert(fileid, 'sig_s', 'Niveaux sigma',
129     . 'sigma_level',
130     . llm, nivsigs, zvertiid)
131     C Pour le fichier V
132     call histvert(filevid, 'sig_s', 'Niveaux sigma',
133     . 'sigma_level',
134     . llm, nivsigs, zvertiid)
135     c pour le fichier def
136     nivd(1) = 1
137     call histvert(filedid, 'sig_s', 'Niveaux sigma',
138     . 'sigma_level',
139     . 1, nivd, dvertiid)
140    
141     C
142     C Appels a histdef pour la definition des variables a sauvegarder
143    
144     CALL histdef(fileid, "phis", "Surface geop. height", "-",
145 guez 15 . iip1,jjp1,thoriid, 1,1,1, -99,
146 guez 3 . "once", t_ops, t_wrt)
147    
148     CALL histdef(fileid, "aire", "Grid area", "-",
149 guez 15 . iip1,jjp1,thoriid, 1,1,1, -99,
150 guez 3 . "once", t_ops, t_wrt)
151    
152     CALL histdef(filedid, "dtvr", "tps dyn", "s",
153 guez 15 . 1,1,dhoriid, 1,1,1, -99,
154 guez 3 . "once", t_ops, t_wrt)
155    
156     CALL histdef(filedid, "istdyn", "tps stock", "s",
157 guez 15 . 1,1,dhoriid, 1,1,1, -99,
158 guez 3 . "once", t_ops, t_wrt)
159    
160     CALL histdef(filedid, "istphy", "tps stock phy", "s",
161 guez 15 . 1,1,dhoriid, 1,1,1, -99,
162 guez 3 . "once", t_ops, t_wrt)
163    
164    
165     C
166     C Masse
167     C
168     call histdef(fileid, 'masse', 'Masse', 'kg',
169     . iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
170 guez 15 . 'inst(X)', t_ops, t_wrt)
171 guez 3 C
172     C Pbaru
173     C
174     call histdef(fileid, 'pbaru', 'flx de masse zonal', 'kg m/s',
175     . iip1, jjp1, uhoriid, llm, 1, llm, zvertiid,
176 guez 15 . 'inst(X)', t_ops, t_wrt)
177 guez 3
178     C
179     C Pbarv
180     C
181     call histdef(filevid, 'pbarv', 'flx de masse mer', 'kg m/s',
182     . iip1, jjm, vhoriid, llm, 1, llm, zvertiid,
183 guez 15 . 'inst(X)', t_ops, t_wrt)
184 guez 3 C
185     C w
186     C
187     call histdef(fileid, 'w', 'flx de masse vert', 'kg m/s',
188     . iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
189 guez 15 . 'inst(X)', t_ops, t_wrt)
190 guez 3
191     C
192     C Temperature potentielle
193     C
194     call histdef(fileid, 'teta', 'temperature potentielle', '-',
195     . iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
196 guez 15 . 'inst(X)', t_ops, t_wrt)
197 guez 3 C
198    
199     C
200     C Geopotentiel
201     C
202     call histdef(fileid, 'phi', 'geopotentiel instantane', '-',
203     . iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
204 guez 15 . 'inst(X)', t_ops, t_wrt)
205 guez 3 C
206     C Fin
207     C
208     call histend(fileid)
209     call histend(filevid)
210     call histend(filedid)
211     if (ok_sync) then
212     call histsync(fileid)
213     call histsync(filevid)
214     call histsync(filedid)
215     endif
216    
217     return
218     end

  ViewVC Help
Powered by ViewVC 1.1.21