1 | ! |
---|
2 | ! $Header$ |
---|
3 | ! |
---|
4 | IF (ok_isccp) THEN |
---|
5 | c |
---|
6 | ndex2d = 0 |
---|
7 | ndex3d = 0 |
---|
8 | c |
---|
9 | c pour les champs instantannes, il faut mettre la meme valeur pour |
---|
10 | c zout et zsto. |
---|
11 | c dtime est passe par ailleurs a histbeg |
---|
12 | c zstophy = frequence de stockage des champs tous les pdt physiques |
---|
13 | c zout = frequence d'ecriture des champs |
---|
14 | cIM 300505 zstophy = dtime |
---|
15 | c appel du simulateur toutes les 3heures |
---|
16 | zcals(1) = dtime *6. !toutes les 3h (en s) |
---|
17 | DO n=1, napisccp |
---|
18 | zcalh(n) = zcals(n)/3600. !stoutes les Xh (en heures) |
---|
19 | ENDDO !n |
---|
20 | c |
---|
21 | c ecriture 8 fois par jour |
---|
22 | c zout = dtime * REAL(NINT(86400./dtime*ecrit_isccp)) |
---|
23 | c ecriture toutes les 2h (12 fois par jour) |
---|
24 | c zout = dtime * 4. |
---|
25 | c ecriture toutes les 1/2 h (48 fois par jour) |
---|
26 | c zout = dtime |
---|
27 | c |
---|
28 | c IF(freqout_isccp.EQ.1.) THEN |
---|
29 | c ecriture jounaliere |
---|
30 | zout_isccp(1) = ecrit_day !(en s) |
---|
31 | c ecriture mensuelle |
---|
32 | c zout = dtime * ecrit_mth !(en s) |
---|
33 | DO n=1, napisccp |
---|
34 | zoutj(n)=zout_isccp(n)/86400. !(en jours) |
---|
35 | c |
---|
36 | c le nombre de sous-colonnes ncol : ncol=(100.*zcalh)/zoutd |
---|
37 | ncol(n)=NINT((100.*zcalh(n))/zoutj(n)) |
---|
38 | PRINT*,'n ncol',n,ncol(n) |
---|
39 | c |
---|
40 | DO l=1, ncol(n) |
---|
41 | vertlev(l,n)=float(l) |
---|
42 | ENDDO !ncol |
---|
43 | c |
---|
44 | ENDDO !n |
---|
45 | |
---|
46 | c PRINT*, 'La frequence de sortie ISCCP est de ', ecrit_isccp |
---|
47 | c |
---|
48 | idayref = day_ref |
---|
49 | CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) |
---|
50 | c write(*,*)'ISCCP ', itau_phy, zjulian |
---|
51 | c |
---|
52 | c |
---|
53 | c definition coordonnees lon,lat en globale |
---|
54 | c |
---|
55 | cym CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon,zx_lon) |
---|
56 | cym DO i = 1, iim |
---|
57 | cym zx_lon(i,1) = rlon(i+1) |
---|
58 | cym zx_lon(i,jjmp1) = rlon(i+1) |
---|
59 | cym ENDDO |
---|
60 | |
---|
61 | cym CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat) |
---|
62 | c |
---|
63 | cIM BEG region |
---|
64 | cym Desole dans un premier temps le mode région ne marchera pas |
---|
65 | cym Il faudra voir dans un second temps pour l'implementer |
---|
66 | cym Mais cela posera des problèmes au niveau de la reconstruction |
---|
67 | |
---|
68 | imin_ins=1 |
---|
69 | imax_ins=iim |
---|
70 | jmin_ins=1 |
---|
71 | jmax_ins=jjmp1 |
---|
72 | cym do i=1,iim-1 |
---|
73 | cym if(zx_lon(i,1).lt.lonmin_ins) imin_ins=i |
---|
74 | cym if(zx_lon(i,1).le.lonmax_ins) imax_ins=i+1 |
---|
75 | cym enddo |
---|
76 | cym do j=1,jjmp1 |
---|
77 | cym if(zx_lat(1,j).ge.latmin_ins) jmax_ins=j |
---|
78 | cym if(zx_lat(1,j).gt.latmax_ins) jmin_ins=j |
---|
79 | cym enddo |
---|
80 | c |
---|
81 | print*,'On stoke le fichier histISCCP instantanne sur ', |
---|
82 | s imin_ins,imax_ins,jmin_ins,jmax_ins |
---|
83 | print*,'On stoke le fichier histISCCP instantanne sur ', |
---|
84 | s zx_lon(imin_ins,1),zx_lon(imax_ins,1), |
---|
85 | s zx_lat(1,jmin_ins),zx_lat(1,jmax_ins) |
---|
86 | cIM END region |
---|
87 | c |
---|
88 | IF(1.EQ.0) THEN |
---|
89 | cym CALL histbeg("histISCCP.nc", iim,zx_lon(:,1),jjmp1,zx_lat(1,:), |
---|
90 | cym . 1, iim, 1, jjmp1, |
---|
91 | cym . itau_phy, zjulian, dtime, |
---|
92 | cym . nhori, nid_isccp) |
---|
93 | CALL histbeg_phy("histISCCP.nc", itau_phy, zjulian, dtime, |
---|
94 | . nhori, nid_isccp) |
---|
95 | |
---|
96 | ENDIF !(1.EQ.0) THEN |
---|
97 | c |
---|
98 | cym CALL histbeg("histISCCP.nc", iim,zx_lon(:,1), |
---|
99 | cym . jjmp1,zx_lat(1,:), |
---|
100 | cym . imin_ins,imax_ins-imin_ins+1, |
---|
101 | cym . jmin_ins,jmax_ins-jmin_ins+1, |
---|
102 | cym . itau_phy, zjulian, dtime, |
---|
103 | cym . nhori, nid_isccp) |
---|
104 | |
---|
105 | CALL histbeg_phy("histISCCP.nc", itau_phy, zjulian, dtime, |
---|
106 | . nhori, nid_isccp) |
---|
107 | |
---|
108 | c |
---|
109 | IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN |
---|
110 | CALL histvert(nid_isccp, "cldtopres","Cloud Top Pressure","mb", |
---|
111 | . lmaxm1, cldtopres, nvert,'down') |
---|
112 | ELSE IF(type_run.EQ."AMIP".OR.type_run.EQ."CFMI") THEN |
---|
113 | CALL histvert(nid_isccp,"cldtopres3","Cloud Top Pressure","mb", |
---|
114 | . lmax3, cldtopres3, nvert3,'down') |
---|
115 | ENDIF |
---|
116 | DO n=1, napisccp |
---|
117 | CALL histvert(nid_isccp, "Nbcol"//verticaxe(n), |
---|
118 | . "Nb of Column"//verticaxe(n),"1", |
---|
119 | . ncol(n), vertlev(:,n), nvlev(n),'up') |
---|
120 | ENDDO |
---|
121 | c |
---|
122 | IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN |
---|
123 | c |
---|
124 | c variables a ecrire |
---|
125 | c |
---|
126 | DO n=1, napisccp |
---|
127 | c |
---|
128 | DO k=1, kmaxm1 |
---|
129 | CALL histdef(nid_isccp, "cldISCCP_"//taulev(k)//typinout(n), |
---|
130 | . "LMDZ ISCCP cld", "%", |
---|
131 | . iim, jjphy_nb,nhori,lmaxm1,1,lmaxm1,nvert,32, |
---|
132 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
133 | ENDDO |
---|
134 | c |
---|
135 | CALL histdef(nid_isccp, "nsunlit"//typinout(n), |
---|
136 | . "Nb of calls with sunlit ", "%", |
---|
137 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
138 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
139 | c |
---|
140 | ENDDO |
---|
141 | c |
---|
142 | ELSE IF(type_run.EQ."AMIP".OR.type_run.EQ."CFMI") THEN |
---|
143 | c |
---|
144 | DO n=1, napisccp |
---|
145 | c |
---|
146 | c print*,'n=',n,' avant histdef(..LMDZ ISCCP cld' |
---|
147 | c |
---|
148 | DO k=1, kmaxm1 |
---|
149 | DO l=1, lmaxm1 |
---|
150 | c |
---|
151 | CALL histdef(nid_isccp, pclev(l)//taulev(k)//typinout(n), |
---|
152 | . "LMDZ ISCCP cld "//cnameisccp(l,k), "%", |
---|
153 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
154 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
155 | c |
---|
156 | ENDDO |
---|
157 | ENDDO |
---|
158 | c |
---|
159 | c print*,'n=',n,' avant histdef(..Nb of calls sunlit' |
---|
160 | CALL histdef(nid_isccp, "nsunlit"//typinout(n), |
---|
161 | . "Nb of calls with sunlit ", "%", |
---|
162 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
163 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
164 | c |
---|
165 | c 9types de nuages ISCCP-D2 |
---|
166 | CALL histdef(nid_isccp, "cirr", |
---|
167 | . "Cirrus lk ISCCP-D2", "%", |
---|
168 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
169 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
170 | c |
---|
171 | CALL histdef(nid_isccp, "cist", |
---|
172 | . "CiSt lk ISCCP-D2", "%", |
---|
173 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
174 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
175 | c |
---|
176 | CALL histdef(nid_isccp, "deep", |
---|
177 | . "Deep lk ISCCP-D2", "%", |
---|
178 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
179 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
180 | c |
---|
181 | CALL histdef(nid_isccp, "alcu", |
---|
182 | . "AlCu lk ISCCP-D2", "%", |
---|
183 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
184 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
185 | c |
---|
186 | CALL histdef(nid_isccp, "alst", |
---|
187 | . "AlSt lk ISCCP-D2", "%", |
---|
188 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
189 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
190 | c |
---|
191 | CALL histdef(nid_isccp, "nist", |
---|
192 | . "NiSt lk ISCCP-D2", "%", |
---|
193 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
194 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
195 | c |
---|
196 | CALL histdef(nid_isccp, "cumu", |
---|
197 | . "Cumu lk ISCCP-D2", "%", |
---|
198 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
199 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
200 | c |
---|
201 | CALL histdef(nid_isccp, "stcu", |
---|
202 | . "StCu lk ISCCP-D2", "%", |
---|
203 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
204 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
205 | c |
---|
206 | CALL histdef(nid_isccp, "stra", |
---|
207 | . "Stra lk ISCCP-D2", "%", |
---|
208 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
209 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
210 | c |
---|
211 | c 3_epaisseurs_optiques x3_pressions_au_sommet_des_nuages types de nuages |
---|
212 | CALL histdef(nid_isccp, "thin", |
---|
213 | . "Opt. thin ISCCP-D2 like clouds", "%", |
---|
214 | . iim, jjphy_nb,nhori,lmax3,1,lmax3,nvert3,32, |
---|
215 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
216 | c |
---|
217 | CALL histdef(nid_isccp, "mid", |
---|
218 | . "Opt. intermediate ISCCP-D2 like clouds", "%", |
---|
219 | . iim, jjphy_nb,nhori,lmax3,1,lmax3,nvert3,32, |
---|
220 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
221 | c |
---|
222 | CALL histdef(nid_isccp, "thick", |
---|
223 | . "Opt. thick ISCCP-D2 like clouds", "%", |
---|
224 | . iim, jjphy_nb,nhori,lmax3,1,lmax3,nvert3,32, |
---|
225 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
226 | c |
---|
227 | c IF(1.EQ.0) THEN |
---|
228 | c IF(n.EQ.3) THEN |
---|
229 | c IF(n.EQ.1) THEN |
---|
230 | c |
---|
231 | cIM 070905 BEG |
---|
232 | IF(1.EQ.0) THEN |
---|
233 | print*,'n=',n,' avant histdef(..boxptop axe' |
---|
234 | cIM verif boxptop |
---|
235 | CALL histdef(nid_isccp,"boxptop"//verticaxe(n), |
---|
236 | . "Boxptop axe"//verticaxe(n), "mb", |
---|
237 | . iim, jjphy_nb,nhori, |
---|
238 | . ncol(n),1,ncol(n),nvlev(n),32, |
---|
239 | cIM . ncolmx,1,ncolmx,nvlev,32, |
---|
240 | cIM . "inst(X)",dtime,dtime) |
---|
241 | . "ave(X)",zcals(n),zout_isccp(n)) |
---|
242 | ENDIF !(1.EQ.0) THEN |
---|
243 | cIM 070905 END |
---|
244 | c ENDIF !(n.EQ.3) THEN |
---|
245 | c ENDIF !(1.EQ.0) THEN |
---|
246 | c |
---|
247 | c print*,'n=',n,' avant histdef(..seed axe' |
---|
248 | CALL histdef(nid_isccp, "seed"//verticaxe(n), |
---|
249 | . "seed axe"//verticaxe(n), "-", |
---|
250 | . iim, jjphy_nb,nhori,1,1,1,-99,32, |
---|
251 | cIM . "inst(X)", dtime,dtime) |
---|
252 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
253 | c |
---|
254 | ENDDO !n |
---|
255 | ENDIF |
---|
256 | CALL histend(nid_isccp) |
---|
257 | c |
---|
258 | ENDIF ! ok_isccp |
---|