/[lmdze]/trunk/Sources/phylmd/initphysto.f
ViewVC logotype

Annotation of /trunk/Sources/phylmd/initphysto.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 189 - (hide annotations)
Tue Mar 29 15:20:23 2016 UTC (8 years, 2 months ago) by guez
File size: 5956 byte(s)
There was a function gr_phy_write_3d in dyn3d and a function
gr_phy_write_2d in module grid_change. Moved them into a new module
gr_phy_write_m under a generic interface gr_phy_write. Replaced calls
to gr_fi_ecrit by calls to gr_phy_write.

Removed arguments len, nloc and nd of cv30_compress.

Removed arguments wd and wd1 of cv30_uncompress, wd of cv30_yield, wd
of concvl, wd1 of cv_driver. Was just filled with 0. Removed option
ok_gust in physiq, never used.

In cv30_unsat, cv30_yield and cv_driver, we only need to define b to
level nl - 1.

1 guez 155 module initphysto_m
2 guez 3
3 guez 155 IMPLICIT NONE
4 guez 3
5 guez 155 contains
6 guez 3
7 guez 155 SUBROUTINE initphysto(infile,rlon,rlat,tstep,t_ops,t_wrt,fileid)
8 guez 3
9 guez 155 ! From phylmd/initphysto.F,v 1.2 2004/06/22 11:45:32
10     ! Routine d'initialisation des ecritures des fichiers histoires LMDZ
11     ! au format IOIPSL
12 guez 3
13 guez 155 ! Appels succesifs des routines: histbeg
14     ! histhori
15     ! histver
16     ! histdef
17     ! histend
18 guez 3
19 guez 155 ! Entree:
20 guez 3
21 guez 155 ! infile: nom du fichier histoire a creer
22     ! day0,anne0: date de reference
23     ! tstep: duree du pas de temps en seconde
24     ! t_ops: frequence de l'operation pour IOIPSL
25     ! t_wrt: frequence d'ecriture sur le fichier
26 guez 3
27 guez 155 ! Sortie:
28     ! fileid: ID du fichier netcdf cree
29     ! filevid:ID du fichier netcdf pour la grille v
30 guez 3
31 guez 155 ! L. Fairhead, 03/99
32 guez 3
33 guez 155 use dynetat0_m, only: day_ref, annee_ref
34 guez 189 use gr_phy_write_m, only: gr_phy_write
35 guez 155 USE histbeg_totreg_m, ONLY : histbeg_totreg
36     USE histdef_m, ONLY : histdef
37     USE histend_m, ONLY : histend
38     use histsync_m, only: histsync
39     USE histvert_m, ONLY : histvert
40     USE dimens_m
41     USE paramet_m
42     USE comconst
43     USE indicesol
44     USE dimphy
45     use conf_gcm_m
46     USE comgeom
47     USE ymds2ju_m
48 guez 3
49 guez 155 ! Arguments
50     CHARACTER(len=*) infile
51     INTEGER nhoriid, i
52     REAL, INTENT (IN) :: tstep
53     REAL t_ops, t_wrt
54     INTEGER fileid
55     INTEGER l
56     REAL nivsigs(llm)
57 guez 3
58 guez 155 ! Variables locales
59 guez 3
60 guez 155 INTEGER tau0
61     REAL zjulian
62     INTEGER zvertiid
63     LOGICAL ok_sync
64     REAL zx_lon(iim,jjm+1), zx_lat(iim,jjm+1)
65 guez 3
66 guez 155 REAL, INTENT (IN) :: rlon(klon), rlat(klon)
67 guez 3
68 guez 155 !-----------------------------------------------------
69 guez 3
70 guez 155 ! Initialisations
71     ok_sync = .TRUE.
72 guez 3
73 guez 155 ! Appel a histbeg: creation du fichier netcdf et initialisations
74     ! diverses
75 guez 3
76 guez 155 CALL ymds2ju(annee_ref,1,day_ref,0.0,zjulian)
77     tau0 = 0
78 guez 3
79 guez 189 zx_lon = gr_phy_write(rlon)
80 guez 155 DO i = 1, iim
81     zx_lon(i,1) = rlon(i+1)
82     zx_lon(i,jjm+1) = rlon(i+1)
83     END DO
84 guez 189 zx_lat = gr_phy_write(rlat)
85 guez 3
86    
87 guez 155 CALL histbeg_totreg(infile,zx_lon(:,1),zx_lat(1,:),1,iim,1,jjm+1,tau0, &
88     zjulian,tstep,nhoriid,fileid)
89 guez 3
90 guez 155 ! Appel a histvert pour la grille verticale
91 guez 3
92 guez 155 DO l = 1, llm
93     nivsigs(l) = float(l)
94     END DO
95 guez 3
96 guez 155 CALL histvert(fileid,'sig_s','Niveaux sigma','sigma_level',nivsigs, &
97     zvertiid)
98 guez 3
99 guez 155 ! Appels a histdef pour la definition des variables a sauvegarder
100 guez 3
101 guez 155 CALL histdef(fileid,'phis','Surface geop. height','-',iim,jjm+1,nhoriid, &
102     1,1,1,-99,'once',t_ops,t_wrt)
103 guez 3
104 guez 155 CALL histdef(fileid,'aire','Grid area','-',iim,jjm+1,nhoriid,1,1,1,-99, &
105     'once',t_ops,t_wrt)
106 guez 3
107 guez 155 CALL histdef(fileid,'dtime','tps phys ','s',1,1,nhoriid,1,1,1,-99, &
108     'once',t_ops,t_wrt)
109 guez 3
110 guez 155 CALL histdef(fileid,'istphy','tps stock','s',1,1,nhoriid,1,1,1,-99, &
111     'once',t_ops,t_wrt)
112 guez 3
113 guez 155 ! T
114 guez 3
115 guez 155 CALL histdef(fileid,'t','Temperature','K',iim,jjm+1,nhoriid,llm,1,llm, &
116     zvertiid,'inst(X)',t_ops,t_wrt)
117 guez 31
118 guez 155 CALL histdef(fileid,'mfu','flx m. pan. mt','kg m/s',iim,jjm+1,nhoriid, &
119     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
120 guez 31
121 guez 155 CALL histdef(fileid,'mfd','flx m. pan. des','kg m/s',iim,jjm+1,nhoriid, &
122     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
123 guez 31
124    
125 guez 155 ! en_u
126 guez 31
127 guez 155 CALL histdef(fileid,'en_u','flx ent pan mt','kg m/s',iim,jjm+1,nhoriid, &
128     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
129 guez 31
130 guez 155 CALL histdef(fileid,'de_u','flx det pan mt','kg m/s',iim,jjm+1,nhoriid, &
131     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
132 guez 31
133    
134 guez 155 ! en_d
135 guez 31
136 guez 155 CALL histdef(fileid,'en_d','flx ent pan dt','kg m/s',iim,jjm+1,nhoriid, &
137     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
138 guez 31
139    
140    
141 guez 155 ! de_d
142 guez 31
143 guez 155 CALL histdef(fileid,'de_d','flx det pan dt','kg m/s',iim,jjm+1,nhoriid, &
144     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
145 guez 31
146 guez 155 ! coefh frac_impa,frac_nucl
147 guez 31
148 guez 155 CALL histdef(fileid,'coefh',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
149     zvertiid,'inst(X)',t_ops,t_wrt)
150 guez 31
151 guez 155 ! abderrahmane le 16 09 02
152     CALL histdef(fileid,'fm_th',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
153     zvertiid,'inst(X)',t_ops,t_wrt)
154 guez 31
155 guez 155 CALL histdef(fileid,'en_th',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
156     zvertiid,'inst(X)',t_ops,t_wrt)
157     ! fin aj
158 guez 31
159 guez 155 CALL histdef(fileid,'frac_impa',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
160     zvertiid,'inst(X)',t_ops,t_wrt)
161 guez 31
162 guez 155 CALL histdef(fileid,'frac_nucl',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
163     zvertiid,'inst(X)',t_ops,t_wrt)
164 guez 31
165    
166 guez 155 ! pyu1
167 guez 31
168 guez 155 CALL histdef(fileid,'pyu1',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
169     'inst(X)',t_ops,t_wrt)
170 guez 31
171    
172 guez 155 ! pyv1
173 guez 31
174 guez 155 CALL histdef(fileid,'pyv1',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
175     'inst(X)',t_ops,t_wrt)
176 guez 31
177 guez 155 CALL histdef(fileid,'ftsol1',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
178     'inst(X)',t_ops,t_wrt)
179 guez 31
180    
181 guez 155 ! ftsol2
182 guez 31
183 guez 155 CALL histdef(fileid,'ftsol2',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
184     'inst(X)',t_ops,t_wrt)
185 guez 31
186    
187 guez 155 ! ftsol3
188 guez 31
189 guez 155 CALL histdef(fileid,'ftsol3',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
190     'inst(X)',t_ops,t_wrt)
191 guez 31
192    
193 guez 155 ! ftsol4
194 guez 31
195 guez 155 CALL histdef(fileid,'ftsol4',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
196     'inst(X)',t_ops,t_wrt)
197 guez 31
198    
199 guez 155 ! rain
200 guez 31
201 guez 155 CALL histdef(fileid,'rain',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
202     'inst(X)',t_ops,t_wrt)
203 guez 31
204    
205 guez 155 ! psrf1
206 guez 31
207 guez 155 CALL histdef(fileid,'psrf1',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
208     'inst(X)',t_ops,t_wrt)
209 guez 31
210    
211 guez 155 ! psrf2
212 guez 31
213 guez 155 CALL histdef(fileid,'psrf2',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
214     'inst(X)',t_ops,t_wrt)
215 guez 31
216    
217 guez 155 ! psrf3
218 guez 31
219 guez 155 CALL histdef(fileid,'psrf3',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
220     'inst(X)',t_ops,t_wrt)
221 guez 31
222    
223 guez 155 ! psrf4
224 guez 31
225 guez 155 CALL histdef(fileid,'psrf4',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
226     'inst(X)',t_ops,t_wrt)
227    
228     CALL histend(fileid)
229     IF (ok_sync) CALL histsync
230    
231     END SUBROUTINE initphysto
232    
233     end module initphysto_m

  ViewVC Help
Powered by ViewVC 1.1.21