Index: trunk/LMDZ.TITAN/libf/phytitan/aaam_bud.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/aaam_bud.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/aaam_bud.F	(revision 1530)
@@ -7,4 +7,5 @@
 c
       use dimphy
+      use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, klon_glo
       implicit none
 c======================================================================
@@ -52,8 +53,8 @@
 c ===================
 c
-c iim--common-I: Number of longitude intervals
-c jjm--common-I: Number of latitude intervals
+c nbp_lon--common-I: Number of longitude intervals
+c nbp_lat-1--common-I: Number of latitude intervals
 c klon-common-I: Number of points seen by the physics
-c                iim*(jjm-1)+2 for instance
+c                nbp_lon*(nbp_lat-1-1)+2 for instance
 c klev-common-I: Number of vertical layers
 c======================================================================
@@ -78,5 +79,4 @@
 c======================================================================
 
-#include "dimensions.h"
 c
 c ARGUMENTS
@@ -106,5 +106,5 @@
 C  PUT AAM QUANTITIES AT ZERO:
 C
-      if(iim+1.gt.801.or.jjm+1.gt.401)then
+      if(nbp_lon+1.gt.801.or.nbp_lat.gt.401)then
       print *,' Pb de dimension dans aaam_bud'
       stop
@@ -114,6 +114,10 @@
       hadley=1.e18
       hadday=1.e18*1.e7
-      dlat=xpi/float(jjm)
-      dlon=2.*xpi/float(iim) 
+      IF (klon_glo.EQ.1) THEN
+        dlat=xpi
+      ELSE
+        dlat=xpi/float(nbp_lat-1)
+      ENDIF
+      dlon=2.*xpi/float(nbp_lon) 
       
       do iax=1,3
@@ -140,5 +144,5 @@
           zlat(1)=plat(l)*xpi/180.
 
-        do i=1,iim+1
+        do i=1,nbp_lon+1
 
           zs(i,1)=phis(l)/rg
@@ -154,26 +158,28 @@
 
 
-      do j = 2,jjm
+      do j = 2,nbp_lat-1
 
 C Values at Greenwich (Periodicity)
 
-      zs(iim+1,j)=phis(l+1)/rg
-      ps(iim+1,j)=p(l+1,1)
-          ssou(iim+1,j)=dragu(l+1)+liftu(l+1)
-          ssov(iim+1,j)=dragv(l+1)+liftv(l+1)
-          blsu(iim+1,j)=clu(l+1)
-          blsv(iim+1,j)=clv(l+1)
-      zlon(iim+1)=-plon(l+1)*xpi/180.
+      zs(nbp_lon+1,j)=phis(l+1)/rg
+      ps(nbp_lon+1,j)=p(l+1,1)
+          ssou(nbp_lon+1,j)=dragu(l+1)+liftu(l+1)
+          ssov(nbp_lon+1,j)=dragv(l+1)+liftv(l+1)
+          blsu(nbp_lon+1,j)=clu(l+1)
+          blsv(nbp_lon+1,j)=clv(l+1)
+      zlon(nbp_lon+1)=-plon(l+1)*xpi/180.
       zlat(j)=plat(l+1)*xpi/180.
 
-      ub(iim+1,j)=0.
-      vb(iim+1,j)=0.
+      ub(nbp_lon+1,j)=0.
+      vb(nbp_lon+1,j)=0.
          do k=1,nlev
-         ub(iim+1,j)=ub(iim+1,j)+u(l+1,k)*(p(l+1,k)-p(l+1,k+1))/rg
-         vb(iim+1,j)=vb(iim+1,j)+v(l+1,k)*(p(l+1,k)-p(l+1,k+1))/rg
+         ub(nbp_lon+1,j)=ub(nbp_lon+1,j)+u(l+1,k)*
+     &                                   (p(l+1,k)-p(l+1,k+1))/rg
+         vb(nbp_lon+1,j)=vb(nbp_lon+1,j)+v(l+1,k)*
+     &                                   (p(l+1,k)-p(l+1,k+1))/rg
          enddo
       
 
-      do i=1,iim
+      do i=1,nbp_lon
 
       l=l+1
@@ -201,21 +207,21 @@
 
       l=l+1
-      ub(1,jjm+1)=0.
-      vb(1,jjm+1)=0.
+      ub(1,nbp_lat)=0.
+      vb(1,nbp_lat)=0.
       do k=1,nlev
-         ub(1,jjm+1)=ub(1,jjm+1)+u(l,k)*(p(l,k)-p(l,k+1))/rg
-         vb(1,jjm+1)=vb(1,jjm+1)+v(l,k)*(p(l,k)-p(l,k+1))/rg
-      enddo
-      zlat(jjm+1)=plat(l)*xpi/180.
-
-      do i=1,iim+1
-      zs(i,jjm+1)=phis(l)/rg
-      ps(i,jjm+1)=p(l,1)
-          ssou(i,jjm+1)=dragu(l)+liftu(l)
-          ssov(i,jjm+1)=dragv(l)+liftv(l)
-          blsu(i,jjm+1)=clu(l)
-          blsv(i,jjm+1)=clv(l)
-      ub(i,jjm+1)=ub(1,jjm+1)                               
-      vb(i,jjm+1)=vb(1,jjm+1)                                
+         ub(1,nbp_lat)=ub(1,nbp_lat)+u(l,k)*(p(l,k)-p(l,k+1))/rg
+         vb(1,nbp_lat)=vb(1,nbp_lat)+v(l,k)*(p(l,k)-p(l,k+1))/rg
+      enddo
+      zlat(nbp_lat)=plat(l)*xpi/180.
+
+      do i=1,nbp_lon+1
+      zs(i,nbp_lat)=phis(l)/rg
+      ps(i,nbp_lat)=p(l,1)
+          ssou(i,nbp_lat)=dragu(l)+liftu(l)
+          ssov(i,nbp_lat)=dragv(l)+liftv(l)
+          blsu(i,nbp_lat)=clu(l)
+          blsv(i,nbp_lat)=clv(l)
+      ub(i,nbp_lat)=ub(1,nbp_lat)                               
+      vb(i,nbp_lat)=vb(1,nbp_lat)                                
       enddo
 
@@ -223,6 +229,6 @@
 C  MOMENT ANGULAIRE 
 C
-        DO j=1,jjm    
-        DO i=1,iim
+        DO j=1,nbp_lat-1    
+        DO i=1,nbp_lon
 
            raam(1)=raam(1)-rea**3*dlon*dlat*0.5*
@@ -261,6 +267,6 @@
 C
 
-        DO j=1,jjm
-        DO i=1,iim
+        DO j=1,nbp_lat-1
+        DO i=1,nbp_lon
            tmou(1)=tmou(1)-rea**2*dlon*0.5*sin(zlon(i))
      c  *(zs(i,j)-zs(i,j+1))
@@ -272,6 +278,6 @@
         ENDDO
            
-        DO j=2,jjm 
-        DO i=1,iim
+        DO j=2,nbp_lat-1 
+        DO i=1,nbp_lon
            tmou(1)=tmou(1)+rea**2*dlat*0.5*sin(zlat(j))
      c  *(zs(i+1,j)-zs(i,j))
@@ -288,6 +294,6 @@
 C
         l=1
-        DO j=2,jjm
-        DO i=1,iim
+        DO j=2,nbp_lat-1
+        DO i=1,nbp_lon
         l=l+1
            tsso(1)=tsso(1)-rea**3*cos(zlat(j))*dlon*dlat*
@@ -335,12 +341,12 @@
 c00   format(F12.5,5(1x,F12.5))
 
-      write(iam+1,*)((zs(i,j),i=1,iim),j=1,jjm+1)
-      write(iam+1,*)((ps(i,j),i=1,iim),j=1,jjm+1)
-      write(iam+1,*)((ub(i,j),i=1,iim),j=1,jjm+1)
-      write(iam+1,*)((vb(i,j),i=1,iim),j=1,jjm+1)
-      write(iam+1,*)((ssou(i,j),i=1,iim),j=1,jjm+1)
-      write(iam+1,*)((ssov(i,j),i=1,iim),j=1,jjm+1)
-      write(iam+1,*)((blsu(i,j),i=1,iim),j=1,jjm+1)
-      write(iam+1,*)((blsv(i,j),i=1,iim),j=1,jjm+1)
+      write(iam+1,*)((zs(i,j),i=1,nbp_lon),j=1,nbp_lat)
+      write(iam+1,*)((ps(i,j),i=1,nbp_lon),j=1,nbp_lat)
+      write(iam+1,*)((ub(i,j),i=1,nbp_lon),j=1,nbp_lat)
+      write(iam+1,*)((vb(i,j),i=1,nbp_lon),j=1,nbp_lat)
+      write(iam+1,*)((ssou(i,j),i=1,nbp_lon),j=1,nbp_lat)
+      write(iam+1,*)((ssov(i,j),i=1,nbp_lon),j=1,nbp_lat)
+      write(iam+1,*)((blsu(i,j),i=1,nbp_lon),j=1,nbp_lat)
+      write(iam+1,*)((blsv(i,j),i=1,nbp_lon),j=1,nbp_lat)
 
       RETURN
Index: trunk/LMDZ.TITAN/libf/phytitan/ajsec.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/ajsec.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/ajsec.F	(revision 1530)
@@ -7,4 +7,5 @@
 
       use dimphy
+      use mod_grid_phy_lmdz, only: nbp_lev
       use cpdet_mod, only: t2tpot, tpot2t
       IMPLICIT none
@@ -27,5 +28,4 @@
 c d_qfi-----output-R-Incrementation des traceurs
 c======================================================================
-#include "dimensions.h"
 #include "YOMCST.h"
       REAL paprs(klon,klev+1), pplay(klon,klev)
@@ -66,5 +66,5 @@
 c------------------------------------- passage en temperature potentielle
 ! ADAPTATION GCM POUR CP(T)
-      call t2tpot(klon*llm,tfi,zh,ppk)
+      call t2tpot(klon*nbp_lev,tfi,zh,ppk)
 c
       DO k = limbas, limhau
@@ -168,5 +168,5 @@
 c------------------------------------- et calcul du d_t 
 ! ADAPTATION GCM POUR CP(T)
-      call tpot2t(klon*llm,zh,zt,ppk)
+      call tpot2t(klon*nbp_lev,zh,zt,ppk)
 
       DO k = limbas, limhau
Index: trunk/LMDZ.TITAN/libf/phytitan/ballon.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/ballon.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/ballon.F	(revision 1530)
@@ -3,4 +3,5 @@
 
       use dimphy
+      use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat
       implicit none
 
@@ -94,5 +95,4 @@
 c======================================================================
 
-#include "dimensions.h"
 #include "YOMCST.h"
 c
@@ -110,6 +110,5 @@
       INTEGER jj,ii,ll
 
-      REAL zlon(iim+1),zlat(jjm+1)
-      save zlon,zlat
+      REAL,SAVE,ALLOCATABLE :: zlon(:),zlat(:)
 
       REAL time
@@ -141,18 +140,21 @@
       print*,"BALLOONS ACTIVATED"
 
+      allocate(zlon(nbp_lon+1))
+      allocate(zlat(nbp_lat))
+
 C Latitudes:
       zlat(1)=plat(1)*RPI/180.
-      do j = 2,jjm
-         k=(j-2)*iim+2
+      do j = 2,nbp_lat-1
+         k=(j-2)*nbp_lon+2
          zlat(j)=plat(k)*RPI/180.
       enddo
-      zlat(jjm+1)=plat(klon)*RPI/180.
+      zlat(nbp_lat)=plat(klon)*RPI/180.
 
 C Longitudes:
-      do i = 1,iim
+      do i = 1,nbp_lon
          k=i+1
          zlon(i)=plon(k)*RPI/180.
       enddo
-      zlon(iim+1)=zlon(1)+2.*RPI
+      zlon(nbp_lon+1)=zlon(1)+2.*RPI
 
 c verif init     lat de 90 à -90, lon de -180 à 180
@@ -256,4 +258,5 @@
 
       use dimphy
+      use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat
       implicit none
 
@@ -283,5 +286,4 @@
 c======================================================================
 
-#include "dimensions.h"
 #include "YOMCST.h"
 c
@@ -289,5 +291,5 @@
 c
       real map_u(klon),map_v(klon),map_a(klon)
-      real latit(jjm+1),longit(iim)
+      real latit(nbp_lat),longit(nbp_lon)
       real phi,lam,ubal,vbal,abal
 c
@@ -296,5 +298,5 @@
       INTEGER i,j,k
       INTEGER jj,ii
-      REAL    ujj(iim+1),vjj(iim+1),ajj(iim+1)
+      REAL    ujj(nbp_lon+1),vjj(nbp_lon+1),ajj(nbp_lon+1)
       REAL    factlat,factlon
 
@@ -302,5 +304,5 @@
 c-------------------------------------------------
         jj=1  ! POLE NORD 
-        do j=2,jjm
+        do j=2,nbp_lat-1
           if (phi.lt.latit(j)) jj=j
         enddo
@@ -309,5 +311,5 @@
 c pole nord
         if (jj.eq.1) then
-         do i=1,iim
+         do i=1,nbp_lon
           ujj(i) = map_u(i+1)*factlat + map_u(1)*(1-factlat)
           vjj(i) = map_v(i+1)*factlat + map_v(1)*(1-factlat)
@@ -315,7 +317,7 @@
          enddo
 c pole sud
-        elseif (jj.eq.jjm) then
-         do i=1,iim
-          k = (jj-2)*iim+1+i
+        elseif (jj.eq.nbp_lat-1) then
+         do i=1,nbp_lon
+          k = (jj-2)*nbp_lon+1+i
           ujj(i) = map_u(klon)*factlat + map_u(k)*(1-factlat)
           vjj(i) = map_v(klon)*factlat + map_v(k)*(1-factlat)
@@ -324,19 +326,19 @@
 c autres latitudes
         else
-         do i=1,iim
-          k = (jj-2)*iim+1+i
-          ujj(i) = map_u(k+iim)*factlat + map_u(k)*(1-factlat)
-          vjj(i) = map_v(k+iim)*factlat + map_v(k)*(1-factlat)
-          ajj(i) = map_a(k+iim)*factlat + map_a(k)*(1-factlat)
+         do i=1,nbp_lon
+          k = (jj-2)*nbp_lon+1+i
+          ujj(i) = map_u(k+nbp_lon)*factlat + map_u(k)*(1-factlat)
+          vjj(i) = map_v(k+nbp_lon)*factlat + map_v(k)*(1-factlat)
+          ajj(i) = map_a(k+nbp_lon)*factlat + map_a(k)*(1-factlat)
          enddo
         endif
-        ujj(iim+1)=ujj(1)
-        vjj(iim+1)=vjj(1)
-        ajj(iim+1)=ajj(1)
+        ujj(nbp_lon+1)=ujj(1)
+        vjj(nbp_lon+1)=vjj(1)
+        ajj(nbp_lon+1)=ajj(1)
 
 c Interpolation in longitudes
 c-------------------------------------------------
         ii=1  ! lon=-180
-        do i=2,iim
+        do i=2,nbp_lon
           if (lam.gt.longit(i)) ii=i
         enddo
@@ -370,5 +372,4 @@
 c======================================================================
 
-#include "dimensions.h"
 #include "YOMCST.h"
 c
Index: trunk/LMDZ.TITAN/libf/phytitan/calchim.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/calchim.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/calchim.F	(revision 1530)
@@ -19,8 +19,7 @@
       USE comgeomphy,  only: rlatd
       USE moyzon_mod, only: tmoy,playmoy,zlaymoy,zlevmoy,klat
+      use mod_grid_phy_lmdz, only: nbp_lat
       implicit none
-#include "dimensions.h"
 #include "clesphys.h"
-#include "paramet.h"
 #include "YOMCST.h"
 
@@ -105,5 +104,5 @@
 c ************************************
 
-        allocate(krpd(15,ND+1,NLRT,jjp1),krate(NLEV,NR),md(NLEV,NC))
+        allocate(krpd(15,ND+1,NLRT,nbp_lat),krate(NLEV,NR),md(NLEV,NC))
 
 c Verification du nombre de composes: coherence common_mod et nqmax-nmicro
@@ -265,5 +264,5 @@
 c taux de photodissociations:
 c --------------------------
-        call disso(krpd,jjp1) 
+        call disso(krpd,nbp_lat) 
 
 c reactions chimiques:
Index: trunk/LMDZ.TITAN/libf/phytitan/clmain.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/clmain.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/clmain.F	(revision 1530)
@@ -35,4 +35,5 @@
       USE interface_surf
       use dimphy
+      use mod_grid_phy_lmdz, only: nbp_lev
       use cpdet_mod, only: t2tpot
       IMPLICIT none
@@ -66,5 +67,4 @@
 cAA la premiere couche
 c======================================================================
-#include "dimensions.h"
 c$$$ PB ajout pour soil
 #include "dimsoil.h"
@@ -324,5 +324,5 @@
 
 ! ADAPTATION GCM POUR CP(T)
-         call t2tpot(knon*llm,yt,yteta,ppk)
+         call t2tpot(knon*nbp_lev,yt,yteta,ppk)
 
          yzlev(1:knon,1)=0.
@@ -479,4 +479,5 @@
       USE interface_surf
       use dimphy
+      use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, nbp_lev
       use cpdet_mod, only: t2tpot,tpot2t,cpdet
 
@@ -486,5 +487,4 @@
 c Objet: diffusion verticale de "h"
 c======================================================================
-#include "dimensions.h"
 #include "YOMCST.h"
 #include "dimsoil.h"
@@ -594,5 +594,5 @@
 
 c passage en enthalpie potentielle
-      call t2tpot(knon*llm,t,local_h,ppk)
+      call t2tpot(knon*nbp_lev,t,local_h,ppk)
 c     print*,"tpot en entree de clqh=",local_h(klon/2,:)
 
@@ -685,5 +685,5 @@
 ! ADAPTATION GCM POUR CP(T)
       CALL interfsurf_hq(itime, dtime, rmu0,
-     e klon, iim, jjm, knon, 
+     e klon, nbp_lon, nbp_lat-1, knon, 
      e rlon, rlat, cufi, cvfi, 
      e debut, lafin, soil_model, nsoilmx,tsoil, 
@@ -733,5 +733,5 @@
       ENDDO
       ENDDO
-      call tpot2t(knon*llm,local_h,d_t,ppk)
+      call tpot2t(knon*nbp_lev,local_h,d_t,ppk)
 
 c     print*,"tpot en sortie de clqh=",local_h(klon/2,:)
@@ -781,5 +781,4 @@
 c flux_v---output-R- (diagnostic) flux du vent: (kg m/s)/(m**2 s)
 c======================================================================
-#include "dimensions.h"
 #include "iniprint.h"
       INTEGER knon
@@ -908,5 +907,4 @@
 c pcfh-----output-R- coefficients a calculer (chaleur et humidite)
 c======================================================================
-#include "dimensions.h"
 #include "YOMCST.h"
 #include "iniprint.h"
@@ -1172,4 +1170,5 @@
 
       use dimphy
+      use mod_grid_phy_lmdz, only: nbp_lev
       use cpdet_mod, only: cpdet
       IMPLICIT none
@@ -1188,5 +1187,4 @@
 c pcfh-----output-R- coefficients a calculer (chaleur et humidite)
 c======================================================================
-#include "dimensions.h"
 #include "YOMCST.h"
 #include "iniprint.h"
Index: trunk/LMDZ.TITAN/libf/phytitan/cltrac.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/cltrac.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/cltrac.F	(revision 1530)
@@ -27,5 +27,4 @@
 c flux_tr--output-R- flux de tr
 c======================================================================
-#include "dimensions.h"
       REAL dtime
       REAL coef(klon,klev)
Index: trunk/LMDZ.TITAN/libf/phytitan/coefkzmin.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/coefkzmin.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/coefkzmin.F	(revision 1530)
@@ -9,5 +9,4 @@
       IMPLICIT NONE
 
-#include "dimensions.h"
 #include "YOMCST.h"
 
Index: trunk/LMDZ.TITAN/libf/phytitan/common_mod.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/common_mod.F90	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/common_mod.F90	(revision 1530)
@@ -90,5 +90,4 @@
 use dimphy
 IMPLICIT NONE
-#include "dimensions.h"
 #include "microtab.h"
 
Index: trunk/LMDZ.TITAN/libf/phytitan/conf_dat3d.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/conf_dat3d.F	(revision 1525)
+++ 	(revision )
@@ -1,296 +1,0 @@
-!
-! $Header$
-!
-C
-C
-      SUBROUTINE conf_dat3d( title, lons,lats,levs,xd,yd,zd,xf,yf,zf,
-     ,                                 champd , interbar             )
-c
-c     Auteur : P. Le Van
-c
-c    Ce s-pr. configure le champ de donnees 3D 'champd' de telle facon 
-c       qu'on ait     - pi    a    pi    en longitude
-c       qu'on ait      pi/2.  a - pi/2.  en latitude
-c      et qu'on ait les niveaux verticaux variant du sol vers le ht de l'atmos.
-c           (     en Pascals   ) .
-c
-c      xd et yd  sont les longitudes et latitudes initiales
-c      zd  les pressions initiales
-c
-c      xf et yf  sont les longitudes et latitudes en sortie , eventuellement
-c       modifiees pour etre configurees comme ci-dessus .
-c      zf  les pressions en sortie
-c
-c      champd   en meme temps le champ initial et  final
-c
-c      interbar = .TRUE.  si on appelle l'interpo. barycentrique inter_barxy
-c          sinon , l'interpolation   grille_m  ( grid_atob ) .
-c
-
-      IMPLICIT NONE
- 
-c    ***       Arguments en  entree      ***
-      CHARACTER*(*) :: title
-      INTEGER lons, lats, levs
-      REAL xd(lons), yd(lats), zd(levs)
-      LOGICAL interbar
-c
-c    ***       Arguments en  sortie      ***
-      REAL xf(lons), yf(lats), zf(levs)
-
-c    ***  Arguments en entree et  sortie ***
-      REAL  champd(lons,lats,levs)
-
-c    ***  Variables locales  ***
-c
-      REAL pi,pis2,depi,presmax
-      LOGICAL radianlon, invlon ,radianlat, invlat, invlev, alloc
-      REAL rlatmin,rlatmax,oldxd1
-      INTEGER i,j,ip180,ind,l
-
-      REAL, ALLOCATABLE :: xtemp(:)
-      REAL, ALLOCATABLE :: ytemp(:)
-      REAL, ALLOCATABLE :: ztemp(:)
-      REAL, ALLOCATABLE :: champf(:,:,:)
-     
-
-c      WRITE(6,*) '  Conf_dat3d  pour  ',title
-
-      ALLOCATE(xtemp(lons))
-      ALLOCATE(ytemp(lats))
-      ALLOCATE(ztemp(levs))
-
-      DO i = 1, lons
-       xtemp(i) = xd(i)
-      ENDDO
-      DO j = 1, lats
-       ytemp(j) = yd(j)
-      ENDDO
-      DO l = 1, levs
-       ztemp(l) = zd(l)
-      ENDDO
-
-      pi   = 2. * ASIN(1.) 
-      pis2 = pi/2.
-      depi = 2. * pi
-
-      IF( xtemp(1).GE.-pi-0.5.AND. xtemp(lons).LE.pi+0.5 )  THEN
-            radianlon = .TRUE.
-            invlon    = .FALSE.
-      ELSE IF (xtemp(1).GE.-0.5.AND.xtemp(lons).LE.depi+0.5 ) THEN
-            radianlon = .TRUE.
-            invlon    = .TRUE.
-      ELSE IF ( xtemp(1).GE.-180.5.AND. xtemp(lons).LE.180.5 )   THEN
-            radianlon = .FALSE.
-            invlon    = .FALSE.
-      ELSE IF ( xtemp(1).GE.-0.5.AND.xtemp(lons).LE.360.5 )   THEN
-            radianlon = .FALSE.
-            invlon    = .TRUE.
-      ELSE
-        WRITE(6,*) 'Pbs. sur les longitudes des donnees pour le fichier'
-     ,  , title
-      ENDIF
-
-      invlat = .FALSE.
-      
-      IF( ytemp(1).LT.ytemp(lats) ) THEN
-        invlat = .TRUE.
-      ENDIF
-
-      rlatmin = MIN( ytemp(1), ytemp(lats) )
-      rlatmax = MAX( ytemp(1), ytemp(lats) )
-      
-      IF( rlatmin.GE.-pis2-0.5.AND.rlatmax.LE.pis2+0.5)THEN
-             radianlat = .TRUE.
-      ELSE IF ( rlatmin.GE.-90.-0.5.AND.rlatmax.LE.90.+0.5 ) THEN
-             radianlat = .FALSE.
-      ELSE
-        WRITE(6,*) ' Pbs. sur les latitudes des donnees pour le fichier'
-     ,  , title
-      ENDIF
-
-       IF( .NOT. radianlon )  THEN
-         DO i = 1, lons
-          xtemp(i) = xtemp(i) * pi/180.
-         ENDDO
-       ENDIF
-
-       IF( .NOT. radianlat )  THEN
-         DO j = 1, lats
-          ytemp(j) = ytemp(j) * pi/180.
-         ENDDO   
-       ENDIF
-
-
-        alloc =.FALSE.
-
-        IF ( invlon )   THEN
-
-            ALLOCATE(champf(lons,lats,levs))
-            alloc = .TRUE.
-
-            DO i = 1 ,lons
-             xf(i) = xtemp(i)
-            ENDDO
-
-            DO l = 1, levs
-             DO j = 1, lats
-              DO i= 1, lons
-               champf (i,j,l)  = champd (i,j,l)
-              ENDDO
-             ENDDO
-            ENDDO
-c
-c    ***  On tourne les longit.  pour avoir  - pi  a  +  pi  ****
-c
-            DO i=1,lons
-             IF( xf(i).GT. pi )  THEN
-              GO TO 88
-             ENDIF
-            ENDDO
-
-88          CONTINUE
-c
-            ip180 = i
-
-            DO i = 1,lons
-             IF (xf(i).GT. pi)  THEN
-              xf(i) = xf(i) - depi
-             ENDIF
-            ENDDO
-
-            DO i= ip180,lons
-             ind = i-ip180 +1
-             xtemp(ind) = xf(i)
-            ENDDO
-
-            DO i= ind +1,lons
-             xtemp(i) = xf(i-ind)
-            ENDDO
-
-c   .....    on tourne les longitudes  pour champf  ....
-c
-            DO l = 1,levs
-              DO j = 1,lats
-               DO i = ip180,lons
-                ind  = i-ip180 +1
-                champd (ind,j,l) = champf (i,j,l)
-               ENDDO
-   
-               DO i= ind +1,lons
-                champd (i,j,l)  = champf (i-ind,j,l)
-               ENDDO
-              ENDDO
-            ENDDO
-
-        ENDIF
-c
-c    *****   fin  de   IF(invlon)   ****
-         
-         IF ( invlat )    THEN
-
-           IF(.NOT.alloc)  THEN 
-            ALLOCATE(champf(lons,lats,levs))
-            alloc = .TRUE.
-           ENDIF
-
-           DO j = 1, lats
-            yf(j) = ytemp(j)
-           ENDDO
-         
-           DO l = 1,levs
-            DO j = 1, lats
-             DO i = 1,lons
-              champf(i,j,l) = champd(i,j,l)
-             ENDDO
-            ENDDO
-
-            DO j = 1, lats
-              ytemp( lats-j+1 ) = yf(j)
-              DO i = 1, lons
-               champd (i,lats-j+1,l) = champf (i,j,l)
-              ENDDO
-            ENDDO
-          ENDDO
-
-
-         ENDIF
-
-c    *****  fin  de  IF(invlat)   ****
-c
-c
-      IF( interbar )  THEN
-        oldxd1 = xtemp(1)
-        DO i = 1, lons -1
-          xtemp(i) = 0.5 * ( xtemp(i) + xtemp(i+1) )
-        ENDDO
-          xtemp(lons) = 0.5 * ( xtemp(lons) + oldxd1 + depi )
-
-        DO j = 1, lats -1
-          ytemp(j) = 0.5 * ( ytemp(j) + ytemp(j+1) )
-        ENDDO
-      ENDIF
-c
-
-      invlev = .FALSE.
-      IF( ztemp(1).LT.ztemp(levs) )  invlev = .TRUE.
-
-      presmax = MAX( ztemp(1), ztemp(levs) )
-      IF( presmax.LT.1200. ) THEN
-         DO l = 1,levs
-           ztemp(l) = ztemp(l) * 100.
-         ENDDO
-      ENDIF
-
-      IF( invlev )  THEN
-
-          IF(.NOT.alloc)  THEN
-            ALLOCATE(champf(lons,lats,levs))
-            alloc = .TRUE.
-          ENDIF
-
-          DO l = 1,levs
-            zf(l) = ztemp(l)
-          ENDDO
-
-          DO l = 1,levs
-            DO j = 1, lats
-             DO i = 1,lons
-              champf(i,j,l) = champd(i,j,l)
-             ENDDO
-            ENDDO
-          ENDDO
-
-          DO l = 1,levs
-            ztemp(levs+1-l) = zf(l)
-          ENDDO
-
-          DO l = 1,levs
-            DO j = 1, lats
-             DO i = 1,lons
-              champd(i,j,levs+1-l) = champf(i,j,l)
-             ENDDO
-            ENDDO
-          ENDDO
-
-
-      ENDIF
-
-         IF(alloc)  DEALLOCATE(champf)
-
-         DO i = 1, lons
-           xf(i) = xtemp(i)
-         ENDDO
-         DO j = 1, lats
-           yf(j) = ytemp(j)
-         ENDDO
-         DO l = 1, levs
-           zf(l) = ztemp(l)
-         ENDDO
-
-      DEALLOCATE(xtemp)
-      DEALLOCATE(ytemp)
-      DEALLOCATE(ztemp)
-
-      RETURN
-      END
Index: trunk/LMDZ.TITAN/libf/phytitan/diagphy.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/diagphy.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/diagphy.F	(revision 1530)
@@ -51,5 +51,4 @@
       implicit none
 
-#include "dimensions.h"
 #include "YOMCST.h"
 C
@@ -212,5 +211,4 @@
       IMPLICIT NONE
 C
-#include "dimensions.h"
 #include "YOMCST.h"
 C
Index: trunk/LMDZ.TITAN/libf/phytitan/drag_noro.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/drag_noro.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/drag_noro.F	(revision 1530)
@@ -11,7 +11,4 @@
       use dimphy
       IMPLICIT none
-
-#include "dimensions.h"
-#include "paramet.h"
 
 c======================================================================
@@ -30,5 +27,5 @@
 c paprs---input-R-Pressure in semi layers    (Pa)
 c pplay---input-R-Pressure model-layers      (Pa)
-c pgeop---input-R-Geopotential model layers (reference ground)
+c pgeop---input-R-Geopotential model layers (reference to ground)
 c pn2-----input-R-Brunt-Vaisala freq.^2 at 1/2 layers
 c t-------input-R-temperature (K)
Index: trunk/LMDZ.TITAN/libf/phytitan/grid_noro.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/grid_noro.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/grid_noro.F	(revision 1530)
@@ -52,7 +52,7 @@
 C=======================================================================
 
+      use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat
       IMPLICIT none 
       
-#include "dimensions.h"
 #include "YOMCST.h"
 
@@ -79,7 +79,7 @@
 C INTERMEDIATE FIELDS  (CORRELATIONS OF OROGRAPHY GRADIENT)
 
-      REAL ztz(iim+1,jjm+1),zxtzx(iim+1,jjm+1)
-      REAL zytzy(iim+1,jjm+1),zxtzy(iim+1,jjm+1)
-      REAL weight(iim+1,jjm+1)
+      REAL ztz(nbp_lon+1,nbp_lat),zxtzx(nbp_lon+1,nbp_lat)
+      REAL zytzy(nbp_lon+1,nbp_lat),zxtzy(nbp_lon+1,nbp_lat)
+      REAL weight(nbp_lon+1,nbp_lat)
 
 C CORRELATIONS OF USN OROGRAPHY GRADIENTS
@@ -107,6 +107,6 @@
 c    
 c
-      if(iim.ne.imar) STOP 'Problem dim. x'
-      if(jjm.ne.jmar-1) STOP 'Problem dim. y'
+      if(nbp_lon.ne.imar) STOP 'Problem dim. x'
+      if(nbp_lat-1.ne.jmar-1) STOP 'Problem dim. y'
       IF (imar.GT.2200 .OR. jmar.GT.1100) THEN
          PRINT*, 'imar or jmar too big', imar, jmar
@@ -114,5 +114,5 @@
       ENDIF
 
-      IF(imar+1.ne.iim+1.or.jmar.ne.jjm+1)THEN
+      IF(imar+1.ne.nbp_lon+1.or.jmar.ne.nbp_lat)THEN
         print *,' imar or jmar bad dimensions:',imar,jmar
         call abort
@@ -297,11 +297,11 @@
 C  FIRST FILTER, MOVING AVERAGE OVER 9 POINTS.
 
-       CALL MVA9(zmea,iim+1,jjm+1)
-       CALL MVA9(zstd,iim+1,jjm+1)
-       CALL MVA9(zpic,iim+1,jjm+1)
-       CALL MVA9(zval,iim+1,jjm+1)
-       CALL MVA9(zxtzx,iim+1,jjm+1)
-       CALL MVA9(zxtzy,iim+1,jjm+1) 
-       CALL MVA9(zytzy,iim+1,jjm+1)
+       CALL MVA9(zmea,nbp_lon+1,nbp_lat)
+       CALL MVA9(zstd,nbp_lon+1,nbp_lat)
+       CALL MVA9(zpic,nbp_lon+1,nbp_lat)
+       CALL MVA9(zval,nbp_lon+1,nbp_lat)
+       CALL MVA9(zxtzx,nbp_lon+1,nbp_lat)
+       CALL MVA9(zxtzy,nbp_lon+1,nbp_lat) 
+       CALL MVA9(zytzy,nbp_lon+1,nbp_lat)
 
        DO ii = 1, imar
Index: trunk/LMDZ.TITAN/libf/phytitan/gwprofil.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/gwprofil.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/gwprofil.F	(revision 1530)
@@ -38,7 +38,4 @@
       use dimphy
       IMPLICIT NONE
-
-#include "dimensions.h"
-#include "paramet.h"
 
 #include "YOMCST.h"
Index: trunk/LMDZ.TITAN/libf/phytitan/gwstress.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/gwstress.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/gwstress.F	(revision 1530)
@@ -54,7 +54,4 @@
       use dimphy
       implicit none
-
-#include "dimensions.h"
-#include "paramet.h"
 
 #include "YOMCST.h"
Index: trunk/LMDZ.TITAN/libf/phytitan/hgardfou.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/hgardfou.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/hgardfou.F	(revision 1530)
@@ -3,10 +3,10 @@
 !
       SUBROUTINE hgardfou (t,tsol,text)
+
+      use dimphy
+      IMPLICIT none
 c======================================================================
 c Verifier la temperature
 c======================================================================
-      use dimphy
-      IMPLICIT none
-#include "dimensions.h"
 #include "YOMCST.h"
       REAL t(klon,klev), tsol(klon)
@@ -84,5 +84,5 @@
            ok = .FALSE.
            DO i = 1, jbad
-             PRINT *,'i,temperature sol =',jadrs(i),zt(jadrs(i))
+             PRINT *,'i,temperature =',jadrs(i),zt(jadrs(i))
            ENDDO
          ENDIF
@@ -101,5 +101,5 @@
            ok = .FALSE.
            DO i = 1, jbad
-             PRINT *,'i,temperature sol =',jadrs(i),zt(jadrs(i))
+             PRINT *,'i,temperature =',jadrs(i),zt(jadrs(i))
            ENDDO
          ENDIF
Index: trunk/LMDZ.TITAN/libf/phytitan/ini_histday.h
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/ini_histday.h	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/ini_histday.h	(revision 1530)
@@ -22,14 +22,14 @@
 
          CALL histdef(nid_day, "phis", "Surface geop. height", "-",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "once",  zsto,zout)
 
          CALL histdef(nid_day, "aire", "Grid area", "-",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "once",  zsto,zout)
 
 ccccccc axe Ls
          CALL histdef(nid_day, "ls", "Solar longitude", "degrees",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto,zout)
 
@@ -37,17 +37,17 @@
 
          CALL histdef(nid_day, "tsol", "Surface Temperature", "K",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "psol", "Surface Pressure", "Pa",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_day, "ue", "Zonal energy transport", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_day, "ve", "Merid energy transport", "-",
-c     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c     .                "ave(X)", zsto,zout)
 
@@ -60,37 +60,37 @@
 
          CALL histdef(nid_day, "temp", "Air temperature", "K",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "pres", "Air pressure", "Pa",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "geop", "Geopotential height", "m",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "vitu", "Zonal wind", "m/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "vitv", "Meridional wind", "m/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "vitw", "Vertical wind", "Pa/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "tops", "Solar rad. at TOA", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto1,zout)
 
          CALL histdef(nid_day, "duvdf", "Boundary-layer dU", "m/s2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "dudyn", "Dynamics dU", "m/s2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
@@ -101,77 +101,77 @@
 c           DO iq=1,nmicro
 c             CALL histdef(nid_day, tname(iq), ttext(iq), "n/m2",
-c     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c     .                "ave(X)", zsto,zout)
 c           ENDDO
              CALL histdef(nid_day, "qaer","nb tot aer" , "n/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
 
             if (clouds.eq.1) then
              CALL histdef(nid_day, "qnoy","nb tot noy" , "n/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
              CALL histdef(nid_day, "qgl1","V tot gl1" , "m3/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
              CALL histdef(nid_day, "qgl2","V tot gl2" , "m3/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
              CALL histdef(nid_day, "qgl3","V tot gl3" , "m3/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
 c--------------
 c ----- SATURATION ESP NUAGES
                CALL histdef(nid_day,"ch4sat", "saturation CH4", "--",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_day,"c2h6sat", "saturation C2H6", "--",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_day,"c2h2sat", "saturation C2H2", "--",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 c --------------
 c ----- RESERVOIR DE SURFACE
                CALL histdef(nid_day, "reserv", "Reservoir surface","m",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
 c --------------
 c ----- ECHANGE GAZ SURF/ATM (evaporation)
                CALL histdef(nid_day, "evapch4", "Evaporation CH4","m",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
 c --------------
 c ----- PRECIPITATIONS (precipitations cumulatives)
                CALL histdef(nid_day,"prech4","Precip CH4","m",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_day,"prec2h6","Precip C2H6",
-     .                "m",iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                "m",nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_day,"prec2h2","Precip C2H2",
-     .                "m",iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                "m",nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_day,"prenoy","Precip NOY",
-     .                "um/s",iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                "um/s",nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_day,"preaer","Precip AER",
-     .                "um/s",iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                "um/s",nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
 c --------------
 c ----- FLUX GLACE
                CALL histdef(nid_day,"flxgl1", "flux gl CH4",
-     .              "kg/m2/s",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "kg/m2/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .              "ave(X)", zsto,zout)
                CALL histdef(nid_day,"flxgl2", "flux gl C2H6",
-     .              "kg/m2/s",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "kg/m2/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .              "ave(X)", zsto,zout)
                CALL histdef(nid_day,"flxgl3", "flux gl C2H2",
-     .              "kg/m2/s",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "kg/m2/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .              "ave(X)", zsto,zout)
 c --------------
 c ----- RAYON DES GOUTTES
                CALL histdef(nid_day,"rcldbar", "rayon moyen goutte",
-     .                "m",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                "m",nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
             endif
@@ -182,5 +182,5 @@
            DO iq=nmicro+1,nqmax
          CALL histdef(nid_day, tname(iq), ttext(iq), "ppm",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
            ENDDO
@@ -198,13 +198,13 @@
 
          CALL histdef(nid_day, "topl", "IR rad. at TOA", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto1,zout)
 
          CALL histdef(nid_day, "sols", "Solar rad. at surf.", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto1,zout)
 
          CALL histdef(nid_day, "soll", "IR rad. at surface", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto1,zout)
 
@@ -212,9 +212,9 @@
 
          CALL histdef(nid_day, "SWnet", "Net SW flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "ave(X)", zsto1,zout)
 
          CALL histdef(nid_day, "LWnet", "Net LW flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "ave(X)", zsto1,zout)
 
@@ -224,5 +224,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_day,"thv"//str2,"Haze Opa Vis",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -231,5 +231,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_day,"thi"//str2,"Haze Opa IR",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -240,5 +240,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_day,"khv"//str2,"Haze ext Vis ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -247,5 +247,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_day,"khi"//str2,"Haze ext IR ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -256,5 +256,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_day,"tgv"//str2,"Gas Opa Vis",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -263,5 +263,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_day,"tgi"//str2,"Gas Opa IR",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -272,5 +272,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_day,"kgv"//str2,"Gas ext Vis ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -279,5 +279,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_day,"kgi"//str2,"Gas ext IR ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -287,5 +287,5 @@
          if (clouds.eq.1) then
            CALL histdef(nid_day,"tcld","Cld Opa proxy",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto,zout)
 
@@ -293,5 +293,5 @@
 c ----- EXTINCTION NUAGES
            CALL histdef(nid_day,"kcld","Cld Ext proxy",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto,zout)
          endif
@@ -303,29 +303,29 @@
 
          CALL histdef(nid_day, "dtdyn", "Dynamics dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "dtphy", "Physics dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "dtvdf", "Boundary-layer dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "dtajs", "Dry adjust. dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "dtswr", "SW radiation dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_day, "dtlwr", "LW radiation dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_day, "dtec", "Cinetic dissip dT", "K/s",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "ave(X)", zsto,zout)
 
@@ -338,18 +338,18 @@
 c        call histdef(nid_day, "taux", 
 c    $         "Zonal wind stress", "Pa",  
-c    $         iim,jj_nb,nhori, 1,1,1, nvert, 32,
+c    $         nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
 c    $         "ave(X)", zsto,zout)
 
 c        call histdef(nid_day, "tauy", 
 c    $         "Meridional xind stress", "Pa",  
-c    $         iim,jj_nb,nhori, 1,1,1, nvert, 32,
+c    $         nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
 c    $         "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_day, "cdrm", "Momentum drag coef.", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_day, "cdrh", "Heat drag coef.", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "ave(X)", zsto,zout)
 
Index: trunk/LMDZ.TITAN/libf/phytitan/ini_histins.h
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/ini_histins.h	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/ini_histins.h	(revision 1530)
@@ -21,14 +21,14 @@
 
          CALL histdef(nid_ins, "phis", "Surface geop. height", "-",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "once",  zsto,zout)
 
          CALL histdef(nid_ins, "aire", "Grid area", "-",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "once",  zsto,zout)
 
 ccccccc axe Ls
          CALL histdef(nid_ins, "ls", "Solar longitude", "degrees",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "inst(X)", zsto,zout)
 
@@ -36,17 +36,17 @@
 
          CALL histdef(nid_ins, "tsol", "Surface Temperature", "K",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "psol", "Surface Pressure", "Pa",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "inst(X)", zsto,zout)
 
 c        CALL histdef(nid_ins, "ue", "Zonal energy transport", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "inst(X)", zsto,zout)
 
 c        CALL histdef(nid_ins, "ve", "Merid energy transport", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "inst(X)", zsto,zout)
 
@@ -59,37 +59,37 @@
 
          CALL histdef(nid_ins, "temp", "Air temperature", "K",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "pres", "Air pressure", "Pa",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "geop", "Geopotential height", "m",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "vitu", "Zonal wind", "m/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "vitv", "Meridional wind", "m/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "vitw", "Vertical wind", "Pa/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "tops", "Solar rad. at TOA", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "inst(X)", zsto,zout)
 
 c        CALL histdef(nid_ins, "duvdf", "Boundary-layer dU", "m/s2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "inst(X)", zsto,zout)
 
 c        CALL histdef(nid_ins, "dudyn", "Dynamics dU", "m/s2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "inst(X)", zsto,zout)
 
@@ -105,5 +105,5 @@
            DO iq=1,nmicro
          CALL histdef(nid_ins, tname(iq), ttext(iq), "n/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
            ENDDO
@@ -112,5 +112,5 @@
            DO iq=nmicro+1,nqmax
          CALL histdef(nid_ins, tname(iq), ttext(iq), "ppm",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
            ENDDO
@@ -123,13 +123,13 @@
 
          CALL histdef(nid_ins, "topl", "IR rad. at TOA", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "sols", "Solar rad. at surf.", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "soll", "IR rad. at surface", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "inst(X)", zsto,zout)
 
@@ -137,9 +137,9 @@
 
          CALL histdef(nid_ins, "SWnet", "Net SW flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "LWnet", "Net LW flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "inst(X)", zsto,zout)
 
@@ -149,5 +149,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_ins,"thv"//str2,"Haze Opa Vis",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ins(X)",zsto,zout)
          ENDDO
@@ -156,5 +156,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_ins,"thi"//str2,"Haze Opa IR",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ins(X)",zsto,zout)
          ENDDO
@@ -165,5 +165,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_ins,"khv"//str2,"Haze ext Vis ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ins(X)",zsto,zout)
          ENDDO
@@ -172,5 +172,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_ins,"khi"//str2,"Haze ext IR ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ins(X)",zsto,zout)
          ENDDO
@@ -181,5 +181,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_ins,"tgv"//str2,"Haze Opa Vis",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ins(X)",zsto,zout)
          ENDDO
@@ -188,5 +188,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_ins,"tgi"//str2,"Haze Opa IR",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ins(X)",zsto,zout)
          ENDDO
@@ -197,5 +197,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_ins,"kgv"//str2,"Haze ext Vis ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ins(X)",zsto,zout)
          ENDDO
@@ -204,5 +204,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_ins,"kgi"//str2,"Haze ext IR ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ins(X)",zsto,zout)
          ENDDO
@@ -214,33 +214,33 @@
 
          CALL histdef(nid_ins, "dtdyn", "Dynamics dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "dtphy", "Physics dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "dtvdf", "Boundary-layer dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "dtajs", "Dry adjust. dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "dtswr", "SW radiation dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
          CALL histdef(nid_ins, "dtlwr", "LW radiation dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "inst(X)", zsto,zout)
 
 c        CALL histdef(nid_ins, "dtec", "Cinetic dissip dT", "K/s",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "inst(X)", zsto,zout)
 
 c        CALL histdef(nid_ins, "dvvdf", "Boundary-layer dV", "m/s2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "inst(X)", zsto,zout)
 
@@ -253,18 +253,18 @@
 c        call histdef(nid_ins, "taux", 
 c    $         "Zonal wind stress", "Pa",  
-c    $         iim,jj_nb,nhori, 1,1,1, nvert, 32,
+c    $         nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
 c    $         "inst(X)", zsto,zout)
 
 c        call histdef(nid_ins, "tauy", 
 c    $         "Meridional xind stress", "Pa",  
-c    $         iim,jj_nb,nhori, 1,1,1, nvert, 32,
+c    $         nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
 c    $         "inst(X)", zsto,zout)
 
 c        CALL histdef(nid_ins, "cdrm", "Momentum drag coef.", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "inst(X)", zsto,zout)
 
 c        CALL histdef(nid_ins, "cdrh", "Heat drag coef.", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "inst(X)", zsto,zout)
 
Index: trunk/LMDZ.TITAN/libf/phytitan/ini_histmth.h
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/ini_histmth.h	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/ini_histmth.h	(revision 1530)
@@ -22,14 +22,14 @@
 
          CALL histdef(nid_mth, "phis", "Surface geop. height", "-",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "once",  zsto,zout)
 
          CALL histdef(nid_mth, "aire", "Grid area", "-",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "once",  zsto,zout)
 
 ccccccc axe Ls
          CALL histdef(nid_mth, "ls", "Solar longitude", "degrees",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto,zout)
 
@@ -37,17 +37,17 @@
 
          CALL histdef(nid_mth, "tsol", "Surface Temperature", "K",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "psol", "Surface Pressure", "Pa",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_mth, "ue", "Zonal energy transport", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_mth, "ve", "Merid energy transport", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "ave(X)", zsto,zout)
 
@@ -60,41 +60,41 @@
 
          CALL histdef(nid_mth, "temp", "Air temperature", "K",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "pres", "Air pressure", "Pa",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "geop", "Geopotential height", "m",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "vitu", "Zonal wind", "m/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "vitv", "Meridional wind", "m/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "vitw", "Vertical wind", "Pa/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_mth, "Kz", "vertical diffusion coef", "m2/s",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "tops", "Solar rad. at TOA", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto1,zout)
 
          CALL histdef(nid_mth, "duvdf", "Boundary-layer dU", "m/s2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "dudyn", "Dynamics dU", "m/s2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
@@ -105,88 +105,88 @@
 c           DO iq=1,nmicro
 c             CALL histdef(nid_mth, tname(iq), ttext(iq), "n/m2",
-c     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c     .                "ave(X)", zsto,zout)
 c           ENDDO
              CALL histdef(nid_mth, "qaer","nb tot aer" , "n/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
 
             if (clouds.eq.1) then
              CALL histdef(nid_mth, "qnoy","nb tot noy" , "n/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
              CALL histdef(nid_mth, "qgl1","V tot gl1" , "m3/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
              CALL histdef(nid_mth, "qgl2","V tot gl2" , "m3/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
              CALL histdef(nid_mth, "qgl3","V tot gl3" , "m3/m2",
-     .                    iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                    nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                    "ave(X)", zsto,zout)
 c--------------
 c ----- SATURATION ESP NUAGES
                CALL histdef(nid_mth,"ch4sat", "saturation CH4", "--",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"c2h6sat", "saturation C2H6", "--",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"c2h2sat", "saturation C2H2", "--",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 c --------------
 c ----- RESERVOIR DE SURFACE
                CALL histdef(nid_mth, "reserv", "Reservoir surface","m",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
 c --------------
 c ----- ECHANGE GAZ SURF/ATM (evaporation)
                CALL histdef(nid_mth, "evapch4", "Evaporation CH4","m",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
 c --------------
 c ----- PRECIPITATIONS (precipitations moyennes)
                CALL histdef(nid_mth,"prech4","Precip CH4","um/s",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"prec2h6","Precip C2H6",
-     .                "um/s",iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                "um/s",nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"prec2h2","Precip C2H2",
-     .                "um/s",iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                "um/s",nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"prenoy","Precip NOY",
-     .                "um/s",iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                "um/s",nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"preaer","Precip AER",
-     .                "um/s",iim,jj_nb,nhori, 1,1,1, nvert, 32,
+     .                "um/s",nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
      .                "ave(X)", zsto,zout)
 c --------------
 c ----- FLUX GLACE
                CALL histdef(nid_mth,"flxgl1", "flux gl CH4",
-     .              "kg/m2/s",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "kg/m2/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .              "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"flxgl2", "flux gl C2H6",
-     .              "kg/m2/s",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "kg/m2/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .              "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"flxgl3", "flux gl C2H2",
-     .              "kg/m2/s",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "kg/m2/s",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .              "ave(X)", zsto,zout)
 c --------------
 c ----- Source/puits GLACE
                CALL histdef(nid_mth,"solch4", "dQ gl CH4",
-     .              "m3/m3",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "m3/m3",nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .              "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"solc2h6", "dQ gl C2H6",
-     .              "m3/m3",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "m3/m3",nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .              "ave(X)", zsto,zout)
                CALL histdef(nid_mth,"solc2h2", "dQ gl C2H2",
-     .              "m3/m3",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .              "m3/m3",nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .              "ave(X)", zsto,zout)
 c --------------
 c ----- RAYON DES GOUTTES
                CALL histdef(nid_mth,"rcldbar", "rayon moyen goutte",
-     .                "m",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                "m",nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
             endif
@@ -197,5 +197,5 @@
            DO iq=nmicro+1,nqmax
          CALL histdef(nid_mth, tname(iq), ttext(iq), "ppm",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
            ENDDO
@@ -203,5 +203,5 @@
 c          DO iq=nmicro+1,nqmax
 c        CALL histdef(nid_mth, "c_"//tname(iq), "c_"//ttext(iq),
-c    .        "ppm/s",iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .        "ppm/s",nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "ave(X)", zsto,zout)
 c          ENDDO
@@ -219,13 +219,13 @@
 
          CALL histdef(nid_mth, "topl", "IR rad. at TOA", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto1,zout)
 
          CALL histdef(nid_mth, "sols", "Solar rad. at surf.", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto1,zout)
 
          CALL histdef(nid_mth, "soll", "IR rad. at surface", "W/m2",
-     .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+     .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
      .                "ave(X)", zsto1,zout)
 
@@ -233,41 +233,41 @@
 
          CALL histdef(nid_mth, "SWnet", "Net SW flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "ave(X)", zsto1,zout)
 
 c        CALL histdef(nid_mth, "SWup", "upward SW flux","W/m2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
 c    .                32, "ave(X)", zsto1,zout)
 
 c        CALL histdef(nid_mth, "SWdn", "downward SW flux","W/m2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
 c    .                32, "ave(X)", zsto1,zout)
 
          CALL histdef(nid_mth, "LWnet", "Net LW flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "ave(X)", zsto1,zout)
 
 c        CALL histdef(nid_mth, "LWup", "upward LW flux","W/m2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
 c    .                32, "ave(X)", zsto1,zout)
 
 c        CALL histdef(nid_mth, "LWdn", "downward LW flux","W/m2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
 c    .                32, "ave(X)", zsto1,zout)
 
          CALL histdef(nid_mth, "fluxvdf", "PBL net flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "fluxdyn", "Dyn. net flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "fluxajs", "Dry adj. net flux","W/m2",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
      .                32, "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_mth, "fluxec", "Cin. net flux","W/m2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert,
 c    .                32, "ave(X)", zsto,zout)
 
@@ -277,5 +277,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_mth,"thv"//str2,"Haze Opa Vis",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -284,5 +284,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_mth,"thi"//str2,"Haze Opa IR",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -293,5 +293,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_mth,"khv"//str2,"Haze ext Vis ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -300,5 +300,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_mth,"khi"//str2,"Haze ext IR ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -309,5 +309,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_mth,"tgv"//str2,"Gas Opa Vis",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -316,5 +316,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_mth,"tgi"//str2,"Haze Opa IR",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -325,5 +325,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_mth,"kgv"//str2,"Gas ext Vis ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -332,5 +332,5 @@
            write(str2,'(i2.2)') k
          CALL histdef(nid_mth,"kgi"//str2,"Gas ext IR ",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto1,zout)
          ENDDO
@@ -340,5 +340,5 @@
          if (clouds.eq.1) then
            CALL histdef(nid_mth,"tcld","Cld Opa proxy",
-     .                "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto,zout)
 
@@ -346,5 +346,5 @@
 c ----- EXTINCTION NUAGES
            CALL histdef(nid_mth,"kcld","Cld Ext proxy",
-     .                "m-1",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .                "m-1",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .                "ave(X)",zsto,zout)
          endif
@@ -355,5 +355,5 @@
              write(str2,'(i2.2)') k
              CALL histdef(nid_mth,"occcld"//str2,"occ cld",
-     .       "--",iim,jj_nb,nhori,klev,1,klev,nvert,32,
+     .       "--",nbp_lon,jj_nb,nhori,klev,1,klev,nvert,32,
      .       "ave(X)",zsto,zout)
            enddo
@@ -365,33 +365,33 @@
 
          CALL histdef(nid_mth, "dtdyn", "Dynamics dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "dtphy", "Physics dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "dtvdf", "Boundary-layer dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "dtajs", "Dry adjust. dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "dtswr", "SW radiation dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "dtlwr", "LW radiation dT", "K/s",
-     .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_mth, "dtec", "Cinetic dissip dT", "K/s",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_mth, "dvvdf", "Boundary-layer dV", "m/s2",
-c    .                iim,jj_nb,nhori, klev,1,klev,nvert, 32,
+c    .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
 c    .                "ave(X)", zsto,zout)
 
@@ -404,18 +404,18 @@
 c        call histdef(nid_mth, "taux", 
 c    $         "Zonal wind stress", "Pa",  
-c    $         iim,jj_nb,nhori, 1,1,1, nvert, 32,
+c    $         nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
 c    $         "ave(X)", zsto,zout)
 
 c        call histdef(nid_mth, "tauy", 
 c    $         "Meridional xind stress", "Pa",  
-c    $         iim,jj_nb,nhori, 1,1,1, nvert, 32,
+c    $         nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32,
 c    $         "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_mth, "cdrm", "Momentum drag coef.", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "ave(X)", zsto,zout)
 
 c        CALL histdef(nid_mth, "cdrh", "Heat drag coef.", "-",
-c    .                iim,jj_nb,nhori, 1,1,1, nvert, 32, 
+c    .                nbp_lon,jj_nb,nhori, 1,1,1, nvert, 32, 
 c    .                "ave(X)", zsto,zout)
 
Index: trunk/LMDZ.TITAN/libf/phytitan/inicondens.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/inicondens.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/inicondens.F	(revision 1530)
@@ -10,6 +10,6 @@
 
       use dimphy
+      use mod_grid_phy_lmdz, only: nbp_lev
       IMPLICIT NONE
-#include "dimensions.h"
 #include "YOMCST.h"
 
@@ -17,6 +17,6 @@
 c    -----------
       INTEGER ny
-      real press(llm),temp(llm)  ! pressure in mbar !
-      REAL yc(llm,ny)
+      real press(nbp_lev),temp(nbp_lev)  ! pressure in mbar !
+      REAL yc(nbp_lev,ny)
       character*10 nomy(ny+1)
       
@@ -28,5 +28,5 @@
       do ic=1,ny
        print*, 'traceur CH(', ic, ')=', nomy(ic),'------------'
-           do l=1,llm
+           do l=1,nbp_lev
 
 c  Par defaut, yc est a 1 c'est a dire qu'on ne condense pas
Index: trunk/LMDZ.TITAN/libf/phytitan/iniinterp_horiz.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/iniinterp_horiz.F	(revision 1525)
+++ 	(revision )
@@ -1,179 +1,0 @@
-C 
-C $Header$
-C
-      subroutine iniinterp_horiz (imo,jmo,imn,jmn ,kllm,
-     &       rlonuo,rlatvo,rlonun,rlatvn,
-     &       ktotal,iik,jjk,jk,ik,intersec,airen)
-   
-      implicit none
-
-
-
-c ---------------------------------------------------------
-c Prepare l' interpolation des variables d'une grille LMDZ
-c  dans une autre grille LMDZ en conservant la quantite
-c  totale pour les variables intensives (/m2) : ex : Pression au sol
-c
-c   (Pour chaque case autour d'un point scalaire de la nouvelle
-c    grille, on calcule la surface (en m2)en intersection avec chaque
-c    case de l'ancienne grille , pour la future interpolation)
-c
-c on calcule aussi l' aire dans la nouvelle grille 
-c
-c
-c   Auteur:  F.Forget 01/1995
-c   -------
-c
-c ---------------------------------------------------------
-c   Declarations:
-c ==============
-c
-c  ARGUMENTS
-c  """""""""
-c INPUT
-       integer imo, jmo ! dimensions ancienne grille
-       integer imn,jmn  ! dimensions nouvelle grille
-       integer kllm ! taille du tableau des intersections
-       real rlonuo(imo+1)     !  Latitude et
-       real rlatvo(jmo)       !  longitude des
-       real rlonun(imn+1)     !  bord des
-       real rlatvn(jmn)     !  cases "scalaires" (input)
-
-c OUTPUT
-       integer ktotal ! nombre totale d'intersections reperees
-       integer iik(kllm), jjk(kllm),jk(kllm),ik(kllm)
-       real intersec(kllm)  ! surface des intersections (m2)
-       real airen (imn+1,jmn+1) ! aire dans la nouvelle grille
-
-
-       
- 
-c Autres variables
-c """"""""""""""""
-       integer i,j,ii,jj,k
-       real a(imo+1),b(imo+1),c(jmo+1),d(jmo+1)
-       real an(imn+1),bn(imn+1),cn(jmn+1),dn(jmn+1)
-       real aa, bb,cc,dd
-       real pi
-
-       pi      = 2.*ASIN( 1. )
-
-
-
-c On repere les frontieres des cases :
-c =================================== 
-c
-c Attention, on ruse avec des latitudes = 90 deg au pole.
-
-
-c  ANcienne grile
-c  """"""""""""""
-      a(1) =   - rlonuo(imo+1)
-      b(1) = rlonuo(1)
-      do i=2,imo+1
-         a(i) = rlonuo(i-1)
-         b(i) =  rlonuo(i)
-      end do
-
-      d(1) = pi/2 
-      do j=1,jmo
-         c(j) = rlatvo(j) 
-         d(j+1) = rlatvo(j)
-      end do
-      c(jmo+1) = -pi/2 
-      
-
-c  Nouvelle grille
-c  """""""""""""""
-      an(1) =  - rlonun(imn+1)
-      bn(1) = rlonun(1)
-      do i=2,imn+1
-         an(i) = rlonun(i-1)
-         bn(i) =  rlonun(i)
-      end do
-
-      dn(1) = pi/2 
-      do j=1,jmn
-         cn(j) = rlatvn(j)
-         dn(j+1) = rlatvn(j)
-      end do
-      cn(jmn+1) = -pi/2 
-
-c Calcul de la surface des cases scalaires de la nouvelle grille
-c ==============================================================
-      do ii=1,imn + 1
-        do jj = 1,jmn+1
-               airen(ii,jj) = (bn(ii)-an(ii))*(sin(dn(jj))-sin(cn(jj)))
-        end do
-      end do
-
-c Calcul de la surface des intersections
-c ======================================
-
-c     boucle sur la nouvelle grille
-c     """"""""""""""""""""""""""""
-      ktotal = 0
-      do jj = 1,jmn+1
-       do j=1, jmo+1
-          if((cn(jj).lt.d(j)).and.(dn(jj).gt.c(j)))then
-              do ii=1,imn + 1
-                do i=1, imo +1
-                    if (  ((an(ii).lt.b(i)).and.(bn(ii).gt.a(i)))
-     &        .or. ((an(ii).lt.b(i)-2*pi).and.(bn(ii).gt.a(i)-2*pi)
-     &             .and.(b(i)-2*pi.lt.-pi) )
-     &        .or. ((an(ii).lt.b(i)+2*pi).and.(bn(ii).gt.a(i)+2*pi)
-     &             .and.(a(i)+2*pi.gt.pi) )
-     &                     )then
-                      ktotal = ktotal +1
-                      iik(ktotal) =ii
-                      jjk(ktotal) =jj
-                      ik(ktotal) =i
-                      jk(ktotal) =j
-
-                      dd = min(d(j), dn(jj))
-                      cc = cn(jj)
-                      if (cc.lt. c(j))cc=c(j)
-                      if((an(ii).lt.b(i)-2*pi).and.
-     &                  (bn(ii).gt.a(i)-2*pi)) then 
-                          bb = min(b(i)-2*pi,bn(ii))
-                          aa = an(ii)
-                          if (aa.lt.a(i)-2*pi) aa=a(i)-2*pi
-                      else if((an(ii).lt.b(i)+2*pi).and.
-     &                       (bn(ii).gt.a(i)+2*pi)) then
-                          bb = min(b(i)+2*pi,bn(ii))
-                          aa = an(ii)
-                          if (aa.lt.a(i)+2*pi) aa=a(i)+2*pi
-                      else 
-                          bb = min(b(i),bn(ii))
-                          aa = an(ii)
-                          if (aa.lt.a(i)) aa=a(i)
-                      end if
-                      intersec(ktotal)=(bb-aa)*(sin(dd)-sin(cc))
-                     end if
-                end do
-               end do
-             end if
-         end do
-       end do       
-
-
-
-c     TEST  INFO
-c     DO k=1,ktotal 
-c      ii = iik(k) 
-c      jj = jjk(k)
-c      i = ik(k)
-c      j = jk(k)
-c      if ((ii.eq.10).and.(jj.eq.10).and.(i.eq.10).and.(j.eq.10))then
-c      if (jj.eq.2.and.(ii.eq.1))then
-c          write(*,*) '**************** jj=',jj,'ii=',ii
-c          write(*,*) 'i,j =',i,j
-c          write(*,*) 'an,bn,cn,dn', an(ii), bn(ii), cn(jj),dn(jj)
-c          write(*,*) 'a,b,c,d', a(i), b(i), c(j),d(j)
-c          write(*,*) 'intersec(k)',intersec(k)
-c          write(*,*) 'airen(ii,jj)=',airen(ii,jj)
-c      end if
-c     END DO 
-
-      return
-      end
Index: trunk/LMDZ.TITAN/libf/phytitan/interp_horiz.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/interp_horiz.F	(revision 1525)
+++ 	(revision )
@@ -1,154 +1,0 @@
-c
-c $Id: interp_horiz.F 1403 2010-07-01 09:02:53Z fairhead $
-c
-      subroutine interp_horiz (varo,varn,imo,jmo,imn,jmn,lm,
-     &  rlonuo,rlatvo,rlonun,rlatvn)  
-
-c===========================================================
-c  Interpolation Horizontales des variables d'une grille LMDZ
-c (des points SCALAIRES au point SCALAIRES)
-c  dans une autre grille LMDZ en conservant la quantite
-c  totale pour les variables intensives (/m2) : ex : Pression au sol
-c
-c Francois Forget (01/1995)
-c===========================================================
-
-      IMPLICIT NONE 
-
-c   Declarations:
-c ==============
-c
-c  ARGUMENTS
-c  """""""""
-        
-       integer imo, jmo ! dimensions ancienne grille (input)
-       integer imn,jmn  ! dimensions nouvelle grille (input)
-
-       real rlonuo(imo+1)     !  Latitude et
-       real rlatvo(jmo)       !  longitude des
-       real rlonun(imn+1)     !  bord des 
-       real rlatvn(jmn)     !  cases "scalaires" (input)
-
-       integer lm ! dimension verticale (input)
-       real varo (imo+1, jmo+1,lm) ! var dans l'ancienne grille (input)
-       real varn (imn+1,jmn+1,lm) ! var dans la nouvelle grille (output)
-
-c Autres variables
-c """"""""""""""""
-       real airetest(imn+1,jmn+1)
-       integer ii,jj,l
-
-       real airen (imn+1,jmn+1) ! aire dans la nouvelle grille
-c    Info sur les ktotal intersection entre les cases new/old grille
-       integer kllm, k, ktotal
-       parameter (kllm = 400*200*10)
-       integer iik(kllm), jjk(kllm),jk(kllm),ik(kllm)
-       real intersec(kllm)
-       real R
-       real totn, tots
-
-       logical firstcall, firsttest, aire_ok
-       save firsttest
-       data firsttest /.true./
-       data aire_ok /.true./
-
-       
-
-
-
-c initialisation
-c --------------
-c Si c'est le premier appel, on prepare l'interpolation
-c en calculant pour chaque case autour d'un point scalaire de la
-c nouvelle grille, la surface  de intersection avec chaque
-c    case de l'ancienne grille.
-
-
-        call iniinterp_horiz (imo,jmo,imn,jmn ,kllm,
-     &       rlonuo,rlatvo,rlonun,rlatvn,
-     &          ktotal,iik,jjk,jk,ik,intersec,airen)
-
-      do l=1,lm
-       do jj =1 , jmn+1
-        do ii=1, imn+1
-          varn(ii,jj,l) =0.
-        end do
-       end do
-      end do 
-       
-c Interpolation horizontale
-c -------------------------
-c boucle sur toute les ktotal intersections entre les cases
-c de l'ancienne et la  nouvelle grille
-c
-      PRINT *, 'ktotal 1 = ', ktotal
-     
-      do k=1,ktotal
-        do l=1,lm
-         varn(iik(k),jjk(k),l) = varn(iik(k),jjk(k),l) 
-     &        + varo(ik(k), jk(k),l)*intersec(k)/airen(iik(k),jjk(k))
-        end do
-      end do
-
-c Une seule valeur au pole pour les variables ! :
-c -----------------------------------------------
-       do l=1, lm
-         totn =0.
-         tots =0.
-           do ii =1, imn+1
-             totn = totn + varn(ii,1,l)
-             tots = tots + varn (ii,jmn+1,l)
-           end do 
-           do ii =1, imn+1
-             varn(ii,1,l) = totn/REAL(imn+1)
-             varn(ii,jmn+1,l) = tots/REAL(imn+1)
-           end do 
-       end do
-           
-
-c---------------------------------------------------------------
-c  TEST  TEST  TEST  TEST  TEST  TEST  TEST  TEST  TEST  TEST 
-!!       if (.not.(firsttest)) goto 99
-!!       firsttest = .false.
-!! !     write (*,*) 'INTERP. HORIZ. : TEST SUR LES AIRES:'
-!!       do jj =1 , jmn+1
-!!         do ii=1, imn+1
-!!           airetest(ii,jj) =0.
-!!         end do
-!!       end do 
-!!       PRINT *, 'ktotal = ', ktotal
-!!       PRINT *, 'jmn+1 =', jmn+1, 'imn+1', imn+1
-!! 
-!!       do k=1,ktotal
-!!          airetest(iik(k),jjk(k))= airetest(iik(k),jjk(k)) +intersec(k) 
-!!       end DO
-!! 
-!! 
-!!       PRINT *, 'fin boucle'
-!!       do jj =1 , jmn+1
-!!        do ii=1, imn+1
-!!          r = airen(ii,jj)/airetest(ii,jj)
-!!          if ((r.gt.1.001).or.(r.lt.0.999)) then
-!! !             write (*,*) '********** PROBLEME D'' AIRES !!!',
-!! !     &                   ' DANS L''INTERPOLATION HORIZONTALE'
-!! !             write(*,*)'ii,jj,airen,airetest',
-!! !     &          ii,jj,airen(ii,jj),airetest(ii,jj)
-!!              aire_ok = .false.
-!!          end if
-!!        end do
-!!       end do
-!! !      if (aire_ok) write(*,*) 'INTERP. HORIZ. : AIRES OK'
-!!  99   continue
-
-c FIN TEST  FIN TEST  FIN TEST  FIN TEST  FIN TEST  FIN TEST  FIN TEST
-c---------------------------------------------------------------
-
-
-
-
-
-
-
-
-        return
-        end
Index: trunk/LMDZ.TITAN/libf/phytitan/iophy.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/iophy.F90	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/iophy.F90	(revision 1530)
@@ -24,10 +24,9 @@
 
   subroutine init_iophy_new(rlat,rlon)
-  USE dimphy
+  USE dimphy, only: klon
   USE mod_phys_lmdz_para
-  USE mod_grid_phy_lmdz
+  USE mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, klon_glo
   USE ioipsl
   implicit none
-  include 'dimensions.h'   
     real,dimension(klon),intent(in) :: rlon
     real,dimension(klon),intent(in) :: rlat
@@ -51,27 +50,33 @@
     
 !$OMP MASTER  
-    ALLOCATE(io_lat(jjm+1-1/(iim*jjm)))
-    io_lat(1)=rlat_glo(1)
-    io_lat(jjm+1-1/(iim*jjm))=rlat_glo(klon_glo)
-    IF ((iim*jjm) > 1) then
-      DO i=2,jjm
-        io_lat(i)=rlat_glo(2+(i-2)*iim)
+    ALLOCATE(io_lat(nbp_lat))
+    IF (klon_glo == 1) THEN
+      io_lat(1)=rlat_glo(1)
+    ELSE
+      io_lat(1)=rlat_glo(1)
+      io_lat(nbp_lat)=rlat_glo(klon_glo)
+      DO i=2,nbp_lat-1
+        io_lat(i)=rlat_glo(2+(i-2)*nbp_lon)
       ENDDO
     ENDIF
 
-    ALLOCATE(io_lon(iim))
-    io_lon(:)=rlon_glo(2-1/(iim*jjm):iim+1-1/(iim*jjm))
+    ALLOCATE(io_lon(nbp_lon))
+    IF (klon_glo == 1) THEN
+      io_lon(1)=rlon_glo(1)
+    ELSE 
+      io_lon(1:nbp_lon)=rlon_glo(2:nbp_lon+1)
+    ENDIF
 
     ddid=(/ 1,2 /)
-    dsg=(/ iim, jjm+1-1/(iim*jjm) /)
-    dsl=(/ iim, jj_nb /)
+    dsg=(/ nbp_lon, nbp_lat /)
+    dsl=(/ nbp_lon, jj_nb /)
     dpf=(/ 1,jj_begin /)
-    dpl=(/ iim, jj_end /)
+    dpl=(/ nbp_lon, jj_end /)
     dhs=(/ ii_begin-1,0 /)
-    if (mpi_rank==mpi_size-1) then
+    IF (mpi_rank==mpi_size-1) THEN
       dhe=(/0,0/)
-    else
-      dhe=(/ iim-ii_end,0 /)  
-    endif
+    ELSE
+      dhe=(/ nbp_lon-ii_end,0 /)  
+    ENDIF
     
     call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, &
@@ -85,9 +90,9 @@
   USE dimphy
   USE mod_phys_lmdz_para
-  use ioipsl
-  implicit none
-  include 'dimensions.h'   
-    real,dimension(iim),intent(in) :: lon
-    real,dimension(jjm+1-1/(iim*jjm)),intent(in) :: lat
+  use ioipsl, only: flio_dom_set
+  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+  implicit none
+    real,dimension(nbp_lon),intent(in) :: lon
+    real,dimension(nbp_lat),intent(in) :: lat
 
     INTEGER,DIMENSION(2) :: ddid
@@ -100,19 +105,19 @@
 
 !$OMP MASTER  
-    allocate(io_lat(jjm+1-1/(iim*jjm)))
+    allocate(io_lat(nbp_lat))
     io_lat(:)=lat(:)
-    allocate(io_lon(iim))
+    allocate(io_lon(nbp_lon))
     io_lon(:)=lon(:)
    
     ddid=(/ 1,2 /)
-    dsg=(/ iim, jjm+1-1/(iim*jjm) /)
-    dsl=(/ iim, jj_nb /)
+    dsg=(/ nbp_lon, nbp_lat /)
+    dsl=(/ nbp_lon, jj_nb /)
     dpf=(/ 1,jj_begin /)
-    dpl=(/ iim, jj_end /)
+    dpl=(/ nbp_lon, jj_end /)
     dhs=(/ ii_begin-1,0 /)
     if (mpi_rank==mpi_size-1) then
       dhe=(/0,0/)
     else
-      dhe=(/ iim-ii_end,0 /)  
+      dhe=(/ nbp_lon-ii_end,0 /)  
     endif
     
@@ -125,10 +130,9 @@
   
   subroutine histbeg_phy(name,itau0,zjulian,dtime,nhori,nid_day)
-  USE dimphy
-  USE mod_phys_lmdz_para
-  use ioipsl
+  USE mod_phys_lmdz_para, only: jj_begin, jj_end, jj_nb, is_sequential
+  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+  use ioipsl, only: histbeg
   use write_field
   implicit none
-  include 'dimensions.h'
     
     character*(*), intent(IN) :: name
@@ -141,9 +145,9 @@
 !$OMP MASTER    
     if (is_sequential) then
-      call histbeg(name,iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
-                   1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
+      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
+                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
     else
-      call histbeg(name,iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
-                   1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
+      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
+                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
     endif
 !$OMP END MASTER
@@ -154,11 +158,10 @@
              plon,plat,plon_bounds,plat_bounds, &
              nname,itau0,zjulian,dtime,nnhori,nnid_day)
-  USE dimphy
+  USE dimphy, only: klon
   USE mod_phys_lmdz_para
-  USE mod_grid_phy_lmdz
-  use ioipsl
-  use write_field
-  implicit none
-  include 'dimensions.h' 
+  USE mod_grid_phy_lmdz, only: klon_glo, nbp_lon, nbp_lat
+  use ioipsl, only: histbeg
+
+  implicit none
 
     real,dimension(klon),intent(in) :: rlon
@@ -186,6 +189,5 @@
     REAL, allocatable, dimension(:) :: npplat, npplon
     REAL, allocatable, dimension(:,:) :: npplat_bounds, npplon_bounds
-    INTEGER, PARAMETER :: jjmp1=jjm+1-1/jjm
-    REAL, dimension(iim,jjmp1) :: zx_lon, zx_lat
+    REAL, dimension(nbp_lon,nbp_lat) :: zx_lon, zx_lat
 
     CALL gather(rlat,rlat_glo)
@@ -212,10 +214,10 @@
      endif
 !
-     IF ( tabij(i).LE.iim) THEN
+     IF ( tabij(i).LE.nbp_lon) THEN
       plat_bounds(i,1)=rlat_glo(tabij(i))
      ELSE
-      plat_bounds(i,1)=rlat_glo(tabij(i)-iim)
+      plat_bounds(i,1)=rlat_glo(tabij(i)-nbp_lon)
      ENDIF
-     plat_bounds(i,2)=rlat_glo(tabij(i)+iim)
+     plat_bounds(i,2)=rlat_glo(tabij(i)+nbp_lon)
 !
 !    print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon_glo(tabij(i)),plon_bounds(i,2) 
@@ -233,12 +235,12 @@
      ENDDO
 
-       CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon_glo,zx_lon)
-       if ((iim*jjm).gt.1) then
-       DO i = 1, iim
+       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon)
+       if ((nbp_lon*nbp_lat).gt.1) then
+       DO i = 1, nbp_lon
          zx_lon(i,1) = rlon_glo(i+1)
-         zx_lon(i,jjmp1) = rlon_glo(i+1)
+         zx_lon(i,nbp_lat) = rlon_glo(i+1)
        ENDDO
        endif
-       CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat_glo,zx_lat)
+       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat)
 
     DO i=1,pim
@@ -249,9 +251,9 @@
 
      if (ipt(i).EQ.1) then
-      plon_bounds(i,1)=zx_lon(iim,jpt(i))
+      plon_bounds(i,1)=zx_lon(nbp_lon,jpt(i))
       plon_bounds(i,2)=360.+zx_lon(ipt(i)+1,jpt(i))
      endif
  
-     if (ipt(i).EQ.iim) then
+     if (ipt(i).EQ.nbp_lon) then
       plon_bounds(i,2)=360.+zx_lon(1,jpt(i))
      endif
@@ -265,7 +267,7 @@
      endif
  
-     if (jpt(i).EQ.jjmp1) then
-      plat_bounds(i,1)=zx_lat(ipt(i),jjmp1)+0.001
-      plat_bounds(i,2)=zx_lat(ipt(i),jjmp1)-0.001
+     if (jpt(i).EQ.nbp_lat) then
+      plat_bounds(i,1)=zx_lat(ipt(i),nbp_lat)+0.001
+      plat_bounds(i,2)=zx_lat(ipt(i),nbp_lat)-0.001
      endif
 !
@@ -323,9 +325,9 @@
  
   subroutine histwrite2d_phy(nid,lpoint,name,itau,field)
-  USE dimphy
+  USE dimphy, only: klon
   USE mod_phys_lmdz_para
-  USE ioipsl
-  implicit none
-  include 'dimensions.h'
+  USE ioipsl, only: histwrite
+  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+  implicit none
     
     integer,intent(in) :: nid
@@ -336,5 +338,5 @@
     REAL,dimension(klon_mpi) :: buffer_omp
     INTEGER, allocatable, dimension(:) :: index2d
-    REAL :: Field2d(iim,jj_nb)
+    REAL :: Field2d(nbp_lon,jj_nb)
 
     integer :: ip
@@ -347,7 +349,7 @@
     CALL grid1Dto2D_mpi(buffer_omp,Field2d)
     if(.NOT.lpoint) THEN
-     ALLOCATE(index2d(iim*jj_nb))
-     ALLOCATE(fieldok(iim*jj_nb))
-     CALL histwrite(nid,name,itau,Field2d,iim*jj_nb,index2d)
+     ALLOCATE(index2d(nbp_lon*jj_nb))
+     ALLOCATE(fieldok(nbp_lon*jj_nb))
+     CALL histwrite(nid,name,itau,Field2d,nbp_lon*jj_nb,index2d)
     else
      ALLOCATE(fieldok(npstn))
@@ -378,10 +380,9 @@
 
   subroutine histwrite3d_phy(nid,lpoint,name,itau,field)
-  USE dimphy
+  USE dimphy, only: klon
   USE mod_phys_lmdz_para
-
-  use ioipsl
-  implicit none
-  include 'dimensions.h'
+  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+  use ioipsl, only: histwrite
+  implicit none
     
     integer,intent(in) :: nid
@@ -391,5 +392,5 @@
     real,dimension(:,:),intent(in) :: field  ! --> field(klon,:)
     REAL,dimension(klon_mpi,size(field,2)) :: buffer_omp
-    REAL :: Field3d(iim,jj_nb,size(field,2))
+    REAL :: Field3d(nbp_lon,jj_nb,size(field,2))
     INTEGER :: ip, n, nlev
     INTEGER, ALLOCATABLE, dimension(:) :: index3d
@@ -409,7 +410,7 @@
     CALL grid1Dto2D_mpi(buffer_omp,field3d)
     if(.NOT.lpoint) THEN
-     ALLOCATE(index3d(iim*jj_nb*nlev))
-     ALLOCATE(fieldok(iim*jj_nb,nlev))
-     CALL histwrite(nid,name,itau,Field3d,iim*jj_nb*nlev,index3d)
+     ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
+     ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
+     CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d)
     else
       nlev=size(field,2)
Index: trunk/LMDZ.TITAN/libf/phytitan/orodrag.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/orodrag.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/orodrag.F	(revision 1530)
@@ -10,7 +10,4 @@
       use dimphy
       IMPLICIT NONE
-
-#include "dimensions.h"
-#include "paramet.h"
 
 c
Index: trunk/LMDZ.TITAN/libf/phytitan/orosetup.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/orosetup.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/orosetup.F	(revision 1530)
@@ -97,7 +97,4 @@
       use dimphy
       implicit none
-
-#include "dimensions.h"
-#include "paramet.h"
 
 #include "YOMCST.h"
Index: trunk/LMDZ.TITAN/libf/phytitan/phyetat0.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/phyetat0.F90	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/phyetat0.F90	(revision 1530)
@@ -21,5 +21,4 @@
 ! Objet: Lecture de l'etat initial pour la physique
 !======================================================================
-#include "dimensions.h"
 #include "netcdf.inc"
 #include "dimsoil.h"
Index: trunk/LMDZ.TITAN/libf/phytitan/phyredem.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/phyredem.F90	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/phyredem.F90	(revision 1530)
@@ -20,5 +20,4 @@
 ! Objet: Lecture de l'etat initial pour la physique
 !======================================================================
-#include "dimensions.h"
 #include "netcdf.inc"
 #include "dimsoil.h"
Index: trunk/LMDZ.TITAN/libf/phytitan/physiq.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/physiq.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/physiq.F	(revision 1530)
@@ -73,4 +73,5 @@
       USE time_phylmdz_mod, only: itau_phy,day_ref,annee_ref,nday
       USE logic_mod, only: iflag_trac,moyzon_ch,moyzon_mu
+      USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev
       IMPLICIT none
 c======================================================================
Index: trunk/LMDZ.TITAN/libf/phytitan/radlwsw.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/radlwsw.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/radlwsw.F	(revision 1530)
@@ -41,5 +41,4 @@
       USE write_field_phy
        IMPLICIT none
-#include "dimensions.h"
 #include "YOMCST.h"
 #include "clesphys.h" 
Index: trunk/LMDZ.TITAN/libf/phytitan/readstartphy.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/readstartphy.F	(revision 1525)
+++ 	(revision )
@@ -1,477 +1,0 @@
-!
-! $Header: /home/cvsroot/LMDZ4/libf/phylmd/phyetat0.F,v 1.2 2004/06/22 11:45:33 lmdzadmin Exp $
-!
-c
-c
-      SUBROUTINE readstartphy(fichnom,
-     .            rlat,rlon, tsol,tsoil,
-     .           albe, solsw, sollw,
-     .           fder,radsol,
-     .    zmea, zstd, zsig, zgam, zthe, zpic, zval,
-     .           tabcntr0)
-c======================================================================
-c Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818
-c Objet: Lecture de l'etat initial pour la physique
-c======================================================================
-      use dimphy
-      IMPLICIT none
-#include "dimensions.h"
-#include "netcdf.inc"
-#include "dimsoil.h"
-c======================================================================
-      integer ngridmx
-      parameter (ngridmx=(2+(jjm-1)*iim - 1/jjm))
-
-      CHARACTER*(*) fichnom
-      REAL rlat(ngridmx), rlon(ngridmx)
-      REAL tsol(ngridmx)
-      REAL tsoil(ngridmx,nsoilmx)
-      REAL albe(ngridmx)
-cIM BEG alblw
-      REAL alblw(ngridmx)
-cIM END alblw
-      REAL radsol(ngridmx)
-      REAL sollw(ngridmx)
-      real solsw(ngridmx)
-      real fder(ngridmx)
-      REAL zmea(ngridmx), zstd(ngridmx)
-      REAL zsig(ngridmx), zgam(ngridmx), zthe(ngridmx)
-      REAL zpic(ngridmx), zval(ngridmx)
-      INTEGER length
-      PARAMETER (length=100)
-      REAL tabcntr0(length)
-
-      REAL xmin, xmax
-c
-      INTEGER nid, nvarid
-      INTEGER ierr, i, nsrf, isoil 
-      CHARACTER*2 str2
-c
-c Ouvrir le fichier contenant l'etat initial:
-c
-      print*,'fichnom',fichnom
-      ierr = NF_OPEN (fichnom, NF_NOWRITE,nid)
-      IF (ierr.NE.NF_NOERR) THEN
-        write(6,*)' Pb d''ouverture du fichier '//fichnom
-        write(6,*)' ierr = ', ierr
-        CALL ABORT
-      ENDIF
-c
-c Lecture des parametres de controle:
-c
-      ierr = NF_INQ_VARID (nid, "controle", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <controle> est absent'
-         CALL abort
-      ENDIF
-#ifdef NC_DOUBLE
-      ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tabcntr0)
-#else
-      ierr = NF_GET_VAR_REAL(nid, nvarid, tabcntr0)
-#endif
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <controle>'
-         CALL abort
-      ENDIF
-c
-c
-c Lecture des latitudes (coordonnees):
-c
-      ierr = NF_INQ_VARID (nid, "latitude", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <latitude> est absent'
-         CALL abort
-      ENDIF
-#ifdef NC_DOUBLE
-      ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rlat)
-#else
-      ierr = NF_GET_VAR_REAL(nid, nvarid, rlat)
-#endif
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <latitude>'
-         CALL abort
-      ENDIF
-c
-c Lecture des longitudes (coordonnees):
-c
-      ierr = NF_INQ_VARID (nid, "longitude", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <longitude> est absent'
-         CALL abort
-      ENDIF
-#ifdef NC_DOUBLE
-      ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rlon)
-#else
-      ierr = NF_GET_VAR_REAL(nid, nvarid, rlon)
-#endif
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <latitude>'
-         CALL abort
-      ENDIF
-C
-c Lecture des temperatures du sol:
-c
-      ierr = NF_INQ_VARID (nid, "TS", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <TS> est absent'
-         PRINT*, "phyetat0: Lecture echouee pour <TS>"
-         CALL abort
-      ELSE
-         PRINT*, 'phyetat0: Le champ <TS> est present'
-#ifdef NC_DOUBLE
-         ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsol)
-#else
-         ierr = NF_GET_VAR_REAL(nid, nvarid, tsol)
-#endif
-         IF (ierr.NE.NF_NOERR) THEN
-            PRINT*, "phyetat0: Lecture echouee pour <TS>"
-            CALL abort
-         ENDIF
-         xmin = 1.0E+20
-         xmax = -1.0E+20
-         DO i = 1, ngridmx
-            xmin = MIN(tsol(i),xmin)
-            xmax = MAX(tsol(i),xmax)
-         ENDDO
-         PRINT*,'Temperature du sol <TS>', xmin, xmax
-      ENDIF
-c
-c Lecture des temperatures du sol profond:
-c
-      DO isoil=1, nsoilmx
-      IF (isoil.GT.99) THEN
-         PRINT*, "Trop de couches"
-         CALL abort
-      ENDIF
-      WRITE(str2,'(i2.2)') isoil
-      ierr = NF_INQ_VARID (nid, 'Tsoil'//str2, nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, "phyetat0: Le champ <Tsoil"//str2//"> est absent"
-         PRINT*, "          Il prend donc la valeur de surface"
-         DO i=1, ngridmx
-             tsoil(i,isoil)=tsol(i)
-         ENDDO
-      ELSE
-#ifdef NC_DOUBLE
-         ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsoil(1,isoil))
-#else
-         ierr = NF_GET_VAR_REAL(nid, nvarid, tsoil(1,isoil))
-#endif
-         IF (ierr.NE.NF_NOERR) THEN
-            PRINT*, "Lecture echouee pour <Tsoil"//str2//">"
-            CALL abort
-         ENDIF
-      ENDIF
-      ENDDO
-
-c
-c Lecture de albedo au sol:
-c
-      ierr = NF_INQ_VARID (nid, "ALBE", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <ALBE> est absent'
-         PRINT*, "phyetat0: Lecture echouee pour <ALBE>"
-         CALL abort
-      ELSE
-         PRINT*, 'phyetat0: Le champ <ALBE> est present'
-#ifdef NC_DOUBLE
-         ierr = NF_GET_VAR_DOUBLE(nid, nvarid, albe(1))
-#else
-         ierr = NF_GET_VAR_REAL(nid, nvarid, albe(1))
-#endif
-         IF (ierr.NE.NF_NOERR) THEN
-            PRINT*, "phyetat0: Lecture echouee pour <ALBE>"
-            CALL abort
-         ENDIF
-         xmin = 1.0E+20
-         xmax = -1.0E+20
-         DO i = 1, ngridmx
-            xmin = MIN(albe(i),xmin)
-            xmax = MAX(albe(i),xmax)
-         ENDDO
-         PRINT*,'Albedo du sol <ALBE>', xmin, xmax
-      ENDIF
-
-c
-c Lecture rayonnement solaire au sol:
-c
-      ierr = NF_INQ_VARID (nid, "solsw", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <solsw> est absent'
-         PRINT*, 'mis a zero'
-         solsw = 0.
-      ELSE
-#ifdef NC_DOUBLE
-        ierr = NF_GET_VAR_DOUBLE(nid, nvarid, solsw)
-#else
-        ierr = NF_GET_VAR_REAL(nid, nvarid, solsw)
-#endif
-        IF (ierr.NE.NF_NOERR) THEN
-          PRINT*, 'phyetat0: Lecture echouee pour <solsw>'
-          CALL abort
-        ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(solsw(i),xmin)
-         xmax = MAX(solsw(i),xmax)
-      ENDDO
-      PRINT*,'Rayonnement solaire au sol solsw:', xmin, xmax
-c
-c Lecture rayonnement IF au sol:
-c
-      ierr = NF_INQ_VARID (nid, "sollw", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <sollw> est absent'
-         PRINT*, 'mis a zero'
-         sollw = 0.
-      ELSE
-#ifdef NC_DOUBLE
-        ierr = NF_GET_VAR_DOUBLE(nid, nvarid, sollw)
-#else
-        ierr = NF_GET_VAR_REAL(nid, nvarid, sollw)
-#endif
-        IF (ierr.NE.NF_NOERR) THEN
-          PRINT*, 'phyetat0: Lecture echouee pour <sollw>'
-          CALL abort
-        ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(sollw(i),xmin)
-         xmax = MAX(sollw(i),xmax)
-      ENDDO
-      PRINT*,'Rayonnement IF au sol sollw:', xmin, xmax
-
-c
-c Lecture derive des flux:
-c
-      ierr = NF_INQ_VARID (nid, "fder", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <fder> est absent'
-         PRINT*, 'mis a zero'
-         fder = 0.
-      ELSE
-#ifdef NC_DOUBLE
-        ierr = NF_GET_VAR_DOUBLE(nid, nvarid, fder)
-#else
-        ierr = NF_GET_VAR_REAL(nid, nvarid, fder)
-#endif
-        IF (ierr.NE.NF_NOERR) THEN
-          PRINT*, 'phyetat0: Lecture echouee pour <fder>'
-          CALL abort
-        ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(fder(i),xmin)
-         xmax = MAX(fder(i),xmax)
-      ENDDO
-      PRINT*,'Derive des flux fder:', xmin, xmax
-
-c
-c Lecture du rayonnement net au sol:
-c
-      ierr = NF_INQ_VARID (nid, "RADS", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <RADS> est absent'
-         CALL abort
-      ENDIF
-#ifdef NC_DOUBLE
-      ierr = NF_GET_VAR_DOUBLE(nid, nvarid, radsol)
-#else
-      ierr = NF_GET_VAR_REAL(nid, nvarid, radsol)
-#endif
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <RADS>'
-         CALL abort
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(radsol(i),xmin)
-         xmax = MAX(radsol(i),xmax)
-      ENDDO
-      PRINT*,'Rayonnement net au sol radsol:', xmin, xmax
-
-c
-c Lecture des parametres orographie sous-maille:
-c
-      ierr = NF_INQ_VARID (nid, "ZMEA", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <ZMEA> est absent'
-         PRINT*, 'mis a zero'
-         zmea = 0.
-      ELSE
-#ifdef NC_DOUBLE
-       ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmea)
-#else
-       ierr = NF_GET_VAR_REAL(nid, nvarid, zmea)
-#endif
-       IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <ZMEA>'
-         CALL abort
-       ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(zmea(i),xmin)
-         xmax = MAX(zmea(i),xmax)
-      ENDDO
-      PRINT*,'zmea:', xmin, xmax
-c
-      ierr = NF_INQ_VARID (nid, "ZSTD", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <ZSTD> est absent'
-         PRINT*, 'mis a zero'
-         zstd = 0.
-      ELSE
-#ifdef NC_DOUBLE
-       ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zstd)
-#else
-       ierr = NF_GET_VAR_REAL(nid, nvarid, zstd)
-#endif
-       IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <ZSTD>'
-         CALL abort
-       ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(zstd(i),xmin)
-         xmax = MAX(zstd(i),xmax)
-      ENDDO
-      PRINT*,'zstd:', xmin, xmax
-c
-      ierr = NF_INQ_VARID (nid, "ZSIG", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <ZSIG> est absent'
-         PRINT*, 'mis a zero'
-         zsig = 0.
-      ELSE
-#ifdef NC_DOUBLE
-       ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zsig)
-#else
-       ierr = NF_GET_VAR_REAL(nid, nvarid, zsig)
-#endif
-       IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <ZSIG>'
-         CALL abort
-       ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(zsig(i),xmin)
-         xmax = MAX(zsig(i),xmax)
-      ENDDO
-      PRINT*,'zsig:', xmin, xmax
-c
-      ierr = NF_INQ_VARID (nid, "ZGAM", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <ZGAM> est absent'
-         PRINT*, 'mis a zero'
-         zgam = 0.
-      ELSE
-#ifdef NC_DOUBLE
-       ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zgam)
-#else
-       ierr = NF_GET_VAR_REAL(nid, nvarid, zgam)
-#endif
-       IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <ZGAM>'
-         CALL abort
-       ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(zgam(i),xmin)
-         xmax = MAX(zgam(i),xmax)
-      ENDDO
-      PRINT*,'zgam:', xmin, xmax
-c
-      ierr = NF_INQ_VARID (nid, "ZTHE", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <ZTHE> est absent'
-         PRINT*, 'mis a zero'
-         zthe = 0.
-      ELSE
-#ifdef NC_DOUBLE
-       ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zthe)
-#else
-       ierr = NF_GET_VAR_REAL(nid, nvarid, zthe)
-#endif
-       IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <ZTHE>'
-         CALL abort
-       ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(zthe(i),xmin)
-         xmax = MAX(zthe(i),xmax)
-      ENDDO
-      PRINT*,'zthe:', xmin, xmax
-c
-      ierr = NF_INQ_VARID (nid, "ZPIC", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <ZPIC> est absent'
-         PRINT*, 'mis a zero'
-         zpic = 0.
-      ELSE
-#ifdef NC_DOUBLE
-       ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zpic)
-#else
-       ierr = NF_GET_VAR_REAL(nid, nvarid, zpic)
-#endif
-       IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <ZPIC>'
-         CALL abort
-       ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(zpic(i),xmin)
-         xmax = MAX(zpic(i),xmax)
-      ENDDO
-      PRINT*,'zpic:', xmin, xmax
-c
-      ierr = NF_INQ_VARID (nid, "ZVAL", nvarid)
-      IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Le champ <ZVAL> est absent'
-         PRINT*, 'mis a zero'
-         zval = 0.
-      ELSE
-#ifdef NC_DOUBLE
-       ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zval)
-#else
-       ierr = NF_GET_VAR_REAL(nid, nvarid, zval)
-#endif
-       IF (ierr.NE.NF_NOERR) THEN
-         PRINT*, 'phyetat0: Lecture echouee pour <ZVAL>'
-         CALL abort
-       ENDIF
-      ENDIF
-      xmin = 1.0E+20
-      xmax = -1.0E+20
-      DO i = 1, ngridmx
-         xmin = MIN(zval(i),xmin)
-         xmax = MAX(zval(i),xmax)
-      ENDDO
-      PRINT*,'zval:', xmin, xmax
-c
-c Fermer le fichier:
-c
-      ierr = NF_CLOSE(nid)
-c
-      RETURN
-      END
-
Index: trunk/LMDZ.TITAN/libf/phytitan/soil.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/soil.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/soil.F	(revision 1530)
@@ -48,5 +48,4 @@
       use dimphy
       IMPLICIT NONE
-#include "dimensions.h"
 #include "YOMCST.h"
 #include "dimsoil.h"
Index: trunk/LMDZ.TITAN/libf/phytitan/sources.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/sources.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/sources.F	(revision 1530)
@@ -23,6 +23,4 @@
          use dimphy
          IMPLICIT NONE
-#include "dimensions.h"
-#include "microtab.h"
 #include "YOMCST.h"
 c
Index: trunk/LMDZ.TITAN/libf/phytitan/sugwd.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/sugwd.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/sugwd.F	(revision 1530)
@@ -76,7 +76,4 @@
       use dimphy
       IMPLICIT NONE
-
-#include "dimensions.h"
-#include "paramet.h"
 
 #include "YOEGWD.h"
Index: trunk/LMDZ.TITAN/libf/phytitan/tgmdat_mod.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/tgmdat_mod.F90	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/tgmdat_mod.F90	(revision 1530)
@@ -1,7 +1,5 @@
 MODULE  TGMDAT_MOD
       IMPLICIT NONE
-      include "dimensions.h"
 
-      INTEGER,PARAMETER :: NLAYER=llm,NLEVEL=NLAYER+1
       REAL,SAVE :: PI=3.14159265358979323846
 ! RGAS IS THE UNIVERSAL GAS CONSTANT IN UNITS OF: M SEC-2 AMU K-1 KM
Index: trunk/LMDZ.TITAN/libf/phytitan/ustarhb.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/ustarhb.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/ustarhb.F	(revision 1530)
@@ -18,5 +18,4 @@
       use dimphy
       IMPLICIT none
-#include "dimensions.h"
 #include "YOMCST.h"
 c
Index: trunk/LMDZ.TITAN/libf/phytitan/vdif_kcay.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/vdif_kcay.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/vdif_kcay.F	(revision 1530)
@@ -8,5 +8,4 @@
       use dimphy
       IMPLICIT NONE
-#include "dimensions.h"
 c.......................................................................
 c
Index: trunk/LMDZ.TITAN/libf/phytitan/writerestartphy.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/writerestartphy.F	(revision 1525)
+++ 	(revision )
@@ -1,343 +1,0 @@
-      SUBROUTINE writerestartphy(fichnom,tab_cntrl,klon,klev,
-     .           rlat,rlon, tsol,tsoil,
-     .           albedo, 
-     .           solsw, sollw,fder,
-     .           radsol,
-     .    zmea, zstd, zsig, zgam, zthe, zpic, zval,
-     .           t_ancien)
-
-
-c======================================================================
-c Ecriture de l'etat de redemarrage pour la physique (pour newstart)
-c======================================================================
-      IMPLICIT none
-#include "dimensions.h"
-#include "netcdf.inc"
-#include "dimsoil.h"
-c======================================================================
-      CHARACTER*13 fichnom
-      INTEGER length,klon,klev
-      PARAMETER (length=100)
-      REAL tab_cntrl(length)
-      REAL rlat(klon), rlon(klon)
-      REAL tsol(klon)
-      REAL tsoil(klon,nsoilmx)
-      REAL albedo(klon)
-      real solsw(klon)
-      real sollw(klon)
-      real fder(klon)
-      REAL radsol(klon)
-      REAL zmea(klon), zstd(klon)
-      REAL zsig(klon), zgam(klon), zthe(klon)
-      REAL zpic(klon), zval(klon)
-      REAL t_ancien(klon,klev)
-c
-      INTEGER nid, nvarid, idim1, idim2, idim3
-      INTEGER ierr
-c
-      INTEGER isoil
-      CHARACTER*2 str2
-c
-c-----------------------------------------------------------------------
-c Creation du fichier:
-c-----------------------------------------------------------------------
-c
-c     print*,'fichnom',fichnom
-      ierr = NF_CREATE(fichnom, NF_CLOBBER, nid)
-      IF (ierr.NE.NF_NOERR) THEN
-        write(6,*)' Pb d''ouverture du fichier '//fichnom
-        write(6,*)' ierr = ', ierr
-        CALL ABORT
-      ENDIF
-c
-      ierr = NF_PUT_ATT_TEXT (nid, NF_GLOBAL, "title", 28,
-     .                       "Fichier redemarrage physique")
-c
-      ierr = NF_DEF_DIM (nid, "index", length, idim1)
-      ierr = NF_DEF_DIM (nid, "points_physiques", klon, idim2)
-      ierr = NF_DEF_DIM (nid, "horizon_vertical", klon*klev, idim3)
-c
-
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "controle", NF_DOUBLE, 1, idim1,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "controle", NF_FLOAT, 1, idim1,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22,
-     .                        "Parametres de controle")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tab_cntrl)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,tab_cntrl)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "longitude", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "longitude", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32,
-     .                        "Longitudes de la grille physique")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlon)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,rlon)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "latitude", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "latitude", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 31,
-     .                        "Latitudes de la grille physique")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlat)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,rlat)
-#endif
-c
-c-----------------------------------------------------------------------
-c Ecriture des variables:
-c-----------------------------------------------------------------------
-c
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid, "TS", NF_DOUBLE, 1, idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid, "TS", NF_FLOAT, 1, idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22,
-     .                        "Temperature de surface")
-        ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-        ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsol)
-#else
-        ierr = NF_PUT_VAR_REAL (nid,nvarid,tsol)
-#endif
-c
-      DO isoil=1, nsoilmx
-        IF (isoil.LE.99) THEN
-        WRITE(str2,'(i2.2)') isoil
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid, "Tsoil"//str2,NF_DOUBLE,1,idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid, "Tsoil"//str2,NF_FLOAT,1,idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 24,
-     .                        "Temperature du sol No."//str2)
-        ierr = NF_ENDDEF(nid)
-        ELSE
-        PRINT*, "Trop de couches"
-        CALL abort
-        ENDIF
-#ifdef NC_DOUBLE
-        ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsoil(1,isoil))
-#else
-        ierr = NF_PUT_VAR_REAL (nid,nvarid,tsoil(1,isoil))
-#endif
-      ENDDO
-c
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid,"ALBE",NF_DOUBLE,1,idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid,"ALBE",NF_FLOAT,1,idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 18,
-     .                        "albedo de surface")
-        ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,albedo)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,albedo)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "solsw", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "solsw", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32,
-     .                        "Rayonnement solaire a la surface")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,solsw)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,solsw)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "sollw", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "sollw", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 27,
-     .                        "Rayonnement IF a la surface")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,sollw)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,sollw)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "fder", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "fder", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 14,
-     .                        "Derive de flux")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,fder)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,fder)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "RADS", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "RADS", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "Rayonnement net a la surface")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,radsol)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,radsol)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZMEA", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZMEA", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "zmea Orographie sous-maille")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmea)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zmea)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZSTD", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZSTD", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "zstd Orographie sous-maille")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zstd)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zstd)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZSIG", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZSIG", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "zsig Orographie sous-maille")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zsig)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zsig)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZGAM", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZGAM", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "zgam Orographie sous-maille")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zgam)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zgam)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZTHE", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZTHE", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "zthe Orographie sous-maille")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zthe)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zthe)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZPIC", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZPIC", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "zpic Orographie sous-maille")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zpic)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zpic)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZVAL", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZVAL", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "zval Orographie sous-maille")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zval)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zval)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "TANCIEN", NF_DOUBLE, 1, idim3,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "TANCIEN", NF_FLOAT, 1, idim3,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,t_ancien)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,t_ancien)
-#endif
-c
-      ierr = NF_CLOSE(nid)
-c
-      RETURN
-      END
Index: trunk/LMDZ.TITAN/libf/phytitan/yamada.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/yamada.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/yamada.F	(revision 1530)
@@ -8,5 +8,4 @@
       use dimphy
       IMPLICIT NONE
-#include "dimensions.h"
 c.......................................................................
 c
Index: trunk/LMDZ.TITAN/libf/phytitan/yamada4.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/yamada4.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/yamada4.F	(revision 1530)
@@ -9,5 +9,4 @@
       use dimphy
       IMPLICIT NONE
-#include "dimensions.h"
 #include "YOMCST.h"
 c.......................................................................
Index: trunk/LMDZ.TITAN/libf/phytitan/zenang.F
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/zenang.F	(revision 1525)
+++ trunk/LMDZ.TITAN/libf/phytitan/zenang.F	(revision 1530)
@@ -26,5 +26,4 @@
       use dimphy
       IMPLICIT none
-#include "dimensions.h"
 #include "YOMCST.h"
 #include "comorbit.h"
