--- trunk/libf/phylmd/phystokenc.f 2008/03/31 12:24:17 7 +++ trunk/libf/phylmd/phystokenc.f 2010/04/01 14:59:19 31 @@ -10,9 +10,8 @@ I pcoefh,yu1,yv1,ftsol,pctsrf, I frac_impa,frac_nucl, I pphis,paire,dtime,itap) - USE ioipsl - USE histcom - + USE histwrite_m + use histcom use dimens_m use indicesol use dimphy @@ -36,7 +35,7 @@ c divers: c ------- c - real pdtphys ! pas d'integration pour la physique (seconde) + real, intent(in):: pdtphys ! pas d'integration pour la physique (seconde) c integer physid integer, intent(in):: itap @@ -55,7 +54,7 @@ real pt(klon,klev),t(klon,klev) c REAL, intent(in):: rlon(klon), rlat(klon) - real dtime + real, intent(in):: dtime REAL zx_tmp_3d(iim,jjm+1,klev),zx_tmp_2d(iim,jjm+1) c Couche limite: @@ -117,30 +116,21 @@ c====================================================================== ok_sync = .true. - print*,'Dans phystokenc.F' - print*,'iadvtr= ',iadvtr - print*,'istphy= ',istphy - print*,'istdyn= ',istdyn IF (iadvtr.eq.0) THEN - CALL initphysto('phystoke', . rlon,rlat,dtime, dtime*istphy,dtime*istphy,nqmx,physid) - - write(*,*) 'apres initphysto ds phystokenc' - - ENDIF c ndex2d = 0 ndex3d = 0 i=itap CALL gr_fi_ecrit(1,klon,iim,jjm+1,pphis,zx_tmp_2d) - CALL histwrite(physid,"phis",i,zx_tmp_2d,iim*(jjm+1),ndex2d) + CALL histwrite(physid,"phis",i,zx_tmp_2d) c i=itap CALL gr_fi_ecrit(1,klon,iim,jjm+1,paire,zx_tmp_2d) - CALL histwrite(physid,"aire",i,zx_tmp_2d,iim*(jjm+1),ndex2d) + CALL histwrite(physid,"aire",i,zx_tmp_2d) iadvtr=iadvtr+1 c @@ -247,30 +237,22 @@ ccccc CALL gr_fi_ecrit(klev,klon,iim,jjm+1, t, zx_tmp_3d) - CALL histwrite(physid,"t",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"t",itap,zx_tmp_3d) CALL gr_fi_ecrit(klev,klon,iim,jjm+1, mfu, zx_tmp_3d) - CALL histwrite(physid,"mfu",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"mfu",itap,zx_tmp_3d) CALL gr_fi_ecrit(klev,klon,iim,jjm+1, mfd, zx_tmp_3d) - CALL histwrite(physid,"mfd",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"mfd",itap,zx_tmp_3d) CALL gr_fi_ecrit(klev,klon,iim,jjm+1, en_u, zx_tmp_3d) - CALL histwrite(physid,"en_u",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"en_u",itap,zx_tmp_3d) CALL gr_fi_ecrit(klev,klon,iim,jjm+1, de_u, zx_tmp_3d) - CALL histwrite(physid,"de_u",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"de_u",itap,zx_tmp_3d) CALL gr_fi_ecrit(klev,klon,iim,jjm+1, en_d, zx_tmp_3d) - CALL histwrite(physid,"en_d",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"en_d",itap,zx_tmp_3d) CALL gr_fi_ecrit(klev,klon,iim,jjm+1, de_d, zx_tmp_3d) - CALL histwrite(physid,"de_d",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"de_d",itap,zx_tmp_3d) CALL gr_fi_ecrit(klev,klon,iim,jjm+1, coefh, zx_tmp_3d) - CALL histwrite(physid,"coefh",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"coefh",itap,zx_tmp_3d) c ajou... do k=1,klev @@ -280,54 +262,40 @@ enddo CALL gr_fi_ecrit(klev,klon,iim,jjm+1, fm_therm1, zx_tmp_3d) - CALL histwrite(physid,"fm_th",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"fm_th",itap,zx_tmp_3d) c CALL gr_fi_ecrit(klev,klon,iim,jjm+1, entr_therm, zx_tmp_3d) - CALL histwrite(physid,"en_th",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"en_th",itap,zx_tmp_3d) cccc CALL gr_fi_ecrit(klev,klon,iim,jjm+1,frac_impa,zx_tmp_3d) - CALL histwrite(physid,"frac_impa",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"frac_impa",itap,zx_tmp_3d) CALL gr_fi_ecrit(klev,klon,iim,jjm+1,frac_nucl,zx_tmp_3d) - CALL histwrite(physid,"frac_nucl",itap,zx_tmp_3d, - . iim*(jjm+1)*klev,ndex3d) + CALL histwrite(physid,"frac_nucl",itap,zx_tmp_3d) CALL gr_fi_ecrit(1, klon,iim,jjm+1, pyu1,zx_tmp_2d) - CALL histwrite(physid,"pyu1",itap,zx_tmp_2d,iim*(jjm+1), - . ndex2d) + CALL histwrite(physid,"pyu1",itap,zx_tmp_2d) CALL gr_fi_ecrit(1, klon,iim,jjm+1, pyv1,zx_tmp_2d) - CALL histwrite(physid,"pyv1",itap,zx_tmp_2d,iim*(jjm+1) - . ,ndex2d) + CALL histwrite(physid,"pyv1",itap,zx_tmp_2d) CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol1, zx_tmp_2d) - CALL histwrite(physid,"ftsol1",itap,zx_tmp_2d, - . iim*(jjm+1),ndex2d) + CALL histwrite(physid,"ftsol1",itap,zx_tmp_2d) CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol2, zx_tmp_2d) - CALL histwrite(physid,"ftsol2",itap,zx_tmp_2d, - . iim*(jjm+1),ndex2d) + CALL histwrite(physid,"ftsol2",itap,zx_tmp_2d) CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol3, zx_tmp_2d) - CALL histwrite(physid,"ftsol3",itap,zx_tmp_2d, - . iim*(jjm+1),ndex2d) + CALL histwrite(physid,"ftsol3",itap,zx_tmp_2d) CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol4, zx_tmp_2d) - CALL histwrite(physid,"ftsol4",itap,zx_tmp_2d, - . iim*(jjm+1),ndex2d) + CALL histwrite(physid,"ftsol4",itap,zx_tmp_2d) CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf1, zx_tmp_2d) - CALL histwrite(physid,"psrf1",itap,zx_tmp_2d, - . iim*(jjm+1),ndex2d) + CALL histwrite(physid,"psrf1",itap,zx_tmp_2d) CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf2, zx_tmp_2d) - CALL histwrite(physid,"psrf2",itap,zx_tmp_2d, - . iim*(jjm+1),ndex2d) + CALL histwrite(physid,"psrf2",itap,zx_tmp_2d) CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf3, zx_tmp_2d) - CALL histwrite(physid,"psrf3",itap,zx_tmp_2d, - . iim*(jjm+1),ndex2d) + CALL histwrite(physid,"psrf3",itap,zx_tmp_2d) CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf4, zx_tmp_2d) - CALL histwrite(physid,"psrf4",itap,zx_tmp_2d, - . iim*(jjm+1),ndex2d) + CALL histwrite(physid,"psrf4",itap,zx_tmp_2d) if (ok_sync) call histsync(physid) c if (ok_sync) call histsync