Changeset 610
- Timestamp:
- Mar 24, 2005, 4:45:53 PM (20 years ago)
- Location:
- LMDZ4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/IPSL-CM4_IPCC_patches/libf/phylmd/write_histhf.h
r599 r610 171 171 172 172 endif 173 if (ok_hf) then174 175 c Comprendre comment marche el i=nint(zout/zsto)176 c177 c print*,'ACRITURE HF !!! ACRITURE HF !!! ACRITURE HF !!! '178 ndex2d = 0179 ndex3d = 0180 c181 zsto = dtime182 zout = dtime * ecrit_hf183 itau_w = itau_phy + itap184 c185 IF(lev_histhf.GE.1) THEN186 c187 c i = NINT(zout/zsto)188 c CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d)189 c CALL histwrite(nid_hf,"phis",i,zx_tmp_2d,iim*jjmp1,ndex2d)190 c191 c i = NINT(zout/zsto)192 c CALL gr_fi_ecrit(1,klon,iim,jjmp1,paire,zx_tmp_2d)193 c CALL histwrite(nid_hf,"aire",i,zx_tmp_2d,iim*jjmp1,ndex2d)194 C195 CALL gr_fi_ecrit(1, klon,iim,jjmp1, paire_ter, zx_tmp_2d)196 CALL histwrite(nid_hf,"aireTER",itau_w,197 $ zx_tmp_2d,iim*jjmp1,ndex2d)198 c199 DO i=1, klon200 zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic)201 ENDDO202 c203 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)204 CALL histwrite(nid_hf,"contfracATM",itau_w,205 $ zx_tmp_2d,iim*jjmp1,ndex2d)206 c207 CALL gr_fi_ecrit(1,klon,iim,jjmp1,pctsrf_new(:,is_ter),zx_tmp_2d)208 CALL histwrite(nid_hf,"contfracOR",itau_w,209 $ zx_tmp_2d,iim*jjmp1,ndex2d)210 c211 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zt2m,zx_tmp_2d)212 CALL histwrite(nid_hf,"t2m",itau_w,zx_tmp_2d,iim*jjmp1,213 . ndex2d)214 c215 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zq2m,zx_tmp_2d)216 CALL histwrite(nid_hf,"q2m",itau_w,zx_tmp_2d,iim*jjmp1,217 . ndex2d)218 c219 DO i = 1, klon220 zx_tmp_fi2d(i) = paprs(i,1)221 ENDDO222 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)223 CALL histwrite(nid_hf,"psol",itau_w,zx_tmp_2d,iim*jjmp1,224 . ndex2d)225 c226 DO i = 1, klon227 zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i)228 ENDDO229 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)230 CALL histwrite(nid_hf,"rain",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)231 c232 c ENSEMBLES BEG233 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d)234 CALL histwrite(nid_hf,"tsol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)235 c236 CALL gr_fi_ecrit(1, klon,iim,jjmp1, slp,zx_tmp_2d)237 CALL histwrite(nid_hf,"slp",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)238 c239 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zu10m,zx_tmp_2d)240 CALL histwrite(nid_hf,"u10m",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)241 c242 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zv10m,zx_tmp_2d)243 CALL histwrite(nid_hf,"v10m",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)244 c245 DO i=1, klon246 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i))247 ENDDO248 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)249 CALL histwrite(nid_hf,"wind10m",itau_w,zx_tmp_2d,250 $ iim*jjmp1,ndex2d)251 c252 DO k=1, nlevENS253 IF(clev(k).EQ."500") THEN254 CALL gr_fi_ecrit(1, klon,iim,jjmp1, philev(:,k),zx_tmp_2d)255 CALL histwrite(nid_hf,"phi"//clev(k),itau_w,zx_tmp_2d,256 $ iim*jjmp1,ndex2d)257 ENDIF !clev(k).EQ."500"258 ENDDO259 c260 ENDIF !lev_histhf.GE.1261 c262 IF(lev_histhf.GE.2) THEN263 c264 CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d)265 CALL histwrite(nid_hf,"cldt",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)266 c267 c -- LOOP268 zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter)269 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)270 CALL histwrite(nid_hf,"SWnetOR",itau_w,271 $ zx_tmp_2d,iim*jjmp1,ndex2d)272 c273 zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol(1:klon))274 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)275 CALL histwrite(nid_hf,"SWdownOR",itau_w,276 $ zx_tmp_2d,iim*jjmp1,ndex2d)277 c -- LOOP278 c279 CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d)280 CALL histwrite(nid_hf,"LWdownOR",itau_w,zx_tmp_2d,iim*jjmp1,281 $ ndex2d)282 c283 c284 ENDIF !lev_histhf.GE.2285 c286 IF(lev_histhf.GE.3) THEN287 c288 DO k=1, nlevENS289 c290 CALL gr_fi_ecrit(1, klon,iim,jjmp1, tlev(:,k),zx_tmp_2d)291 CALL histwrite(nid_hf,"t"//clev(k),itau_w,zx_tmp_2d,292 $ iim*jjmp1,ndex2d)293 c294 IF(clev(k).NE."500") THEN !clev(k).NE."500"295 CALL gr_fi_ecrit(1, klon,iim,jjmp1, philev(:,k),zx_tmp_2d)296 CALL histwrite(nid_hf,"phi"//clev(k),itau_w,zx_tmp_2d,297 $ iim*jjmp1,ndex2d)298 ENDIF !clev(k).NE."500"299 c300 CALL gr_fi_ecrit(1, klon,iim,jjmp1, qlev(:,k),zx_tmp_2d)301 CALL histwrite(nid_hf,"q"//clev(k),itau_w,zx_tmp_2d,302 $ iim*jjmp1,ndex2d)303 c304 IF(1.EQ.0) THEN305 CALL gr_fi_ecrit(1, klon,iim,jjmp1, rhlev(:,k),zx_tmp_2d)306 CALL histwrite(nid_hf,"rh"//clev(k),itau_w,zx_tmp_2d,307 $ iim*jjmp1,ndex2d)308 ENDIF !1.EQ.0309 c310 CALL gr_fi_ecrit(1, klon,iim,jjmp1, ulev(:,k),zx_tmp_2d)311 CALL histwrite(nid_hf,"u"//clev(k),itau_w,zx_tmp_2d,312 $ iim*jjmp1,ndex2d)313 c314 CALL gr_fi_ecrit(1, klon,iim,jjmp1, vlev(:,k),zx_tmp_2d)315 CALL histwrite(nid_hf,"v"//clev(k),itau_w,zx_tmp_2d,316 $ iim*jjmp1,ndex2d)317 c318 ENDDO !nlevENS319 c320 IF(1.EQ.0) THEN321 CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d)322 CALL histwrite(nid_hf,"cdrm",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)323 c324 CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragh,zx_tmp_2d)325 CALL histwrite(nid_hf,"cdrh",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)326 ENDIF !(1.EQ.0) THEN327 c328 ENDIF !lev_histhf.GE.3329 c330 IF(lev_histhf.GE.4) THEN331 c332 #define histhf3d333 #ifdef histhf3d334 #include "write_histhf3d.h"335 #endif336 c337 ENDIF !lev_histhf.GE.4338 c339 if (ok_sync) then340 call histsync(nid_hf)341 endif342 343 endif -
LMDZ4/trunk/libf/phylmd/write_histhf.h
r594 r610 171 171 172 172 endif 173 !174 ! $Header$175 !176 if (ok_hf) then177 178 c Comprendre comment marche el i=nint(zout/zsto)179 c180 c print*,'ACRITURE HF !!! ACRITURE HF !!! ACRITURE HF !!! '181 ndex2d = 0182 ndex3d = 0183 c184 zsto = dtime185 zout = dtime * ecrit_hf186 itau_w = itau_phy + itap187 c188 IF(lev_histhf.GE.1) THEN189 c190 c i = NINT(zout/zsto)191 c CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d)192 c CALL histwrite(nid_hf,"phis",i,zx_tmp_2d,iim*jjmp1,ndex2d)193 c194 c i = NINT(zout/zsto)195 c CALL gr_fi_ecrit(1,klon,iim,jjmp1,paire,zx_tmp_2d)196 c CALL histwrite(nid_hf,"aire",i,zx_tmp_2d,iim*jjmp1,ndex2d)197 C198 CALL gr_fi_ecrit(1, klon,iim,jjmp1, paire_ter, zx_tmp_2d)199 CALL histwrite(nid_hf,"aireTER",itau_w,200 $ zx_tmp_2d,iim*jjmp1,ndex2d)201 c202 DO i=1, klon203 zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic)204 ENDDO205 c206 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)207 CALL histwrite(nid_hf,"contfracATM",itau_w,208 $ zx_tmp_2d,iim*jjmp1,ndex2d)209 c210 CALL gr_fi_ecrit(1,klon,iim,jjmp1,pctsrf_new(:,is_ter),zx_tmp_2d)211 CALL histwrite(nid_hf,"contfracOR",itau_w,212 $ zx_tmp_2d,iim*jjmp1,ndex2d)213 c214 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zt2m,zx_tmp_2d)215 CALL histwrite(nid_hf,"t2m",itau_w,zx_tmp_2d,iim*jjmp1,216 . ndex2d)217 c218 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zq2m,zx_tmp_2d)219 CALL histwrite(nid_hf,"q2m",itau_w,zx_tmp_2d,iim*jjmp1,220 . ndex2d)221 c222 DO i = 1, klon223 zx_tmp_fi2d(i) = paprs(i,1)224 ENDDO225 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)226 CALL histwrite(nid_hf,"psol",itau_w,zx_tmp_2d,iim*jjmp1,227 . ndex2d)228 c229 DO i = 1, klon230 zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i)231 ENDDO232 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)233 CALL histwrite(nid_hf,"rain",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)234 c235 c ENSEMBLES BEG236 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d)237 CALL histwrite(nid_hf,"tsol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)238 c239 CALL gr_fi_ecrit(1, klon,iim,jjmp1, slp,zx_tmp_2d)240 CALL histwrite(nid_hf,"slp",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)241 c242 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zu10m,zx_tmp_2d)243 CALL histwrite(nid_hf,"u10m",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)244 c245 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zv10m,zx_tmp_2d)246 CALL histwrite(nid_hf,"v10m",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)247 c248 DO i=1, klon249 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i))250 ENDDO251 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)252 CALL histwrite(nid_hf,"wind10m",itau_w,zx_tmp_2d,253 $ iim*jjmp1,ndex2d)254 c255 DO k=1, nlevENS256 IF(clev(k).EQ."500") THEN257 CALL gr_fi_ecrit(1, klon,iim,jjmp1, philev(:,k),zx_tmp_2d)258 CALL histwrite(nid_hf,"phi"//clev(k),itau_w,zx_tmp_2d,259 $ iim*jjmp1,ndex2d)260 ENDIF !clev(k).EQ."500"261 ENDDO262 c263 ENDIF !lev_histhf.GE.1264 c265 IF(lev_histhf.GE.2) THEN266 c267 CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d)268 CALL histwrite(nid_hf,"cldt",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)269 c270 c -- LOOP271 zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter)272 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)273 CALL histwrite(nid_hf,"SWnetOR",itau_w,274 $ zx_tmp_2d,iim*jjmp1,ndex2d)275 c276 zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol(1:klon))277 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)278 CALL histwrite(nid_hf,"SWdownOR",itau_w,279 $ zx_tmp_2d,iim*jjmp1,ndex2d)280 c -- LOOP281 c282 CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d)283 CALL histwrite(nid_hf,"LWdownOR",itau_w,zx_tmp_2d,iim*jjmp1,284 $ ndex2d)285 c286 c287 ENDIF !lev_histhf.GE.2288 c289 IF(lev_histhf.GE.3) THEN290 c291 DO k=1, nlevENS292 c293 CALL gr_fi_ecrit(1, klon,iim,jjmp1, tlev(:,k),zx_tmp_2d)294 CALL histwrite(nid_hf,"t"//clev(k),itau_w,zx_tmp_2d,295 $ iim*jjmp1,ndex2d)296 c297 IF(clev(k).NE."500") THEN !clev(k).NE."500"298 CALL gr_fi_ecrit(1, klon,iim,jjmp1, philev(:,k),zx_tmp_2d)299 CALL histwrite(nid_hf,"phi"//clev(k),itau_w,zx_tmp_2d,300 $ iim*jjmp1,ndex2d)301 ENDIF !clev(k).NE."500"302 c303 CALL gr_fi_ecrit(1, klon,iim,jjmp1, qlev(:,k),zx_tmp_2d)304 CALL histwrite(nid_hf,"q"//clev(k),itau_w,zx_tmp_2d,305 $ iim*jjmp1,ndex2d)306 c307 IF(1.EQ.0) THEN308 CALL gr_fi_ecrit(1, klon,iim,jjmp1, rhlev(:,k),zx_tmp_2d)309 CALL histwrite(nid_hf,"rh"//clev(k),itau_w,zx_tmp_2d,310 $ iim*jjmp1,ndex2d)311 ENDIF !1.EQ.0312 c313 CALL gr_fi_ecrit(1, klon,iim,jjmp1, ulev(:,k),zx_tmp_2d)314 CALL histwrite(nid_hf,"u"//clev(k),itau_w,zx_tmp_2d,315 $ iim*jjmp1,ndex2d)316 c317 CALL gr_fi_ecrit(1, klon,iim,jjmp1, vlev(:,k),zx_tmp_2d)318 CALL histwrite(nid_hf,"v"//clev(k),itau_w,zx_tmp_2d,319 $ iim*jjmp1,ndex2d)320 c321 ENDDO !nlevENS322 c323 IF(1.EQ.0) THEN324 CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d)325 CALL histwrite(nid_hf,"cdrm",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)326 c327 CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragh,zx_tmp_2d)328 CALL histwrite(nid_hf,"cdrh",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)329 ENDIF !(1.EQ.0) THEN330 c331 ENDIF !lev_histhf.GE.3332 c333 IF(lev_histhf.GE.4) THEN334 c335 #define histhf3d336 #ifdef histhf3d337 #include "write_histhf3d.h"338 #endif339 c340 ENDIF !lev_histhf.GE.4341 c342 if (ok_sync) then343 call histsync(nid_hf)344 endif345 346 endif
Note: See TracChangeset
for help on using the changeset viewer.