Index: codes/icosagcm/devel/src/dynamics/compute_caldyn.f90
===================================================================
--- codes/icosagcm/devel/src/dynamics/compute_caldyn.f90	(revision 938)
+++ codes/icosagcm/devel/src/dynamics/compute_caldyn.f90	(revision 1027)
@@ -11,60 +11,60 @@
     SUBROUTINE comp_pvort_only(u,rhodz,qu,qv, hv)
       IMPORT
-      REAL(rstd),INTENT(IN)  :: u(iim_jjm_i, llm_)
-      REAL(rstd),INTENT(INOUT) :: rhodz(iim_jjm_i, llm_)
-      REAL(rstd),INTENT(OUT) :: qu(iim_jjm_u, llm_)
-      REAL(rstd),INTENT(OUT) :: qv(iim_jjm_v, llm_)
-      REAL(rstd),INTENT(OUT) :: hv(iim_jjm_v, llm_)
+      REAL(rstd), INTENT(IN)    :: u(:,:)
+      REAL(rstd), INTENT(INOUT) :: rhodz(:,:)
+      REAL(rstd), INTENT(OUT)   :: qu(:,:)
+      REAL(rstd), INTENT(OUT)   :: qv(:,:)
+      REAL(rstd), INTENT(OUT)   :: hv(:,:)
     END SUBROUTINE comp_pvort_only
 
     SUBROUTINE comp_theta(mass_col,theta_rhodz, rhodz,theta)
       IMPORT
-      REAL(rstd),INTENT(IN)    :: mass_col(iim_jjm_i)
-      REAL(rstd),INTENT(IN)    :: theta_rhodz(iim_jjm_i, llm_, nqdyn_)
-      REAL(rstd),INTENT(INOUT) :: rhodz(iim_jjm_i, llm_)
-      REAL(rstd),INTENT(OUT)   :: theta(iim_jjm_i, llm_, nqdyn_)
+      REAL(rstd), INTENT(IN)    :: mass_col(:)
+      REAL(rstd), INTENT(IN)    :: theta_rhodz(:,:,:)
+      REAL(rstd), INTENT(INOUT) :: rhodz(:,:)
+      REAL(rstd), INTENT(OUT)   :: theta(:,:,:)
     END SUBROUTINE comp_theta
 
     SUBROUTINE comp_geopot(rhodz,theta, ps,pk,geopot) 
       IMPORT
-      REAL(rstd),INTENT(IN)    :: rhodz(iim_jjm_i, llm_)         ! rho*dz = mass per unit surface in each full model level
-      REAL(rstd),INTENT(IN)    :: theta(iim_jjm_i, llm_, nqdyn_) ! active scalars : theta/entropy, moisture, ...
-      REAL(rstd),INTENT(INOUT) :: ps(iim_jjm_i)                  ! surface pressure
-      REAL(rstd),INTENT(OUT)   :: pk(iim_jjm_i, llm_)            ! Exner function (compressible) /Lagrange multiplier (Boussinesq)
-      REAL(rstd),INTENT(INOUT) :: geopot(iim_jjm_i, llm1)        ! geopotential
+      REAL(rstd), INTENT(IN)    :: rhodz(:,:)    ! rho*dz = mass per unit surface in each full model level
+      REAL(rstd), INTENT(IN)    :: theta(:,:,:)  ! active scalars : theta/entropy, moisture, ...
+      REAL(rstd), INTENT(INOUT) :: ps(:)         ! surface pressure
+      REAL(rstd), INTENT(OUT)   :: pk(:,:)       ! Exner function (compressible) /Lagrange multiplier (Boussinesq)
+      REAL(rstd), INTENT(INOUT) :: geopot(:,:)   ! geopotential
     END SUBROUTINE comp_geopot
 
     SUBROUTINE comp_caldyn_fast(tau,theta,geopot, pk,berni,du,u)
       IMPORT
-      REAL(rstd),INTENT(IN)    :: tau                ! "solve" u-tau*du/dt = rhs
-      REAL(rstd),INTENT(IN)    :: theta(iim_jjm_i, llm_, nqdyn_)
-      REAL(rstd),INTENT(IN)    :: geopot(iim_jjm_i, llm1)
-      REAL(rstd),INTENT(INOUT) :: pk(iim_jjm_i, llm_)
-      REAL(rstd),INTENT(INOUT) :: berni(iim_jjm_i, llm_)  ! partial Bernoulli function
-      REAL(rstd),INTENT(INOUT) :: du(iim_jjm_u, llm_)
-      REAL(rstd),INTENT(INOUT) :: u(iim_jjm_u, llm_)   ! INOUT if tau>0
+      REAL(rstd), INTENT(IN)    :: tau           ! "solve" u-tau*du/dt = rhs
+      REAL(rstd), INTENT(IN)    :: theta(:,:,:)
+      REAL(rstd), INTENT(IN)    :: geopot(:,:)
+      REAL(rstd), INTENT(INOUT) :: pk(:,:)
+      REAL(rstd), INTENT(INOUT) :: berni(:,:)    ! partial Bernoulli function
+      REAL(rstd), INTENT(INOUT) :: du(:,:)
+      REAL(rstd), INTENT(INOUT) :: u(:,:)        ! INOUT if tau>0
     END SUBROUTINE comp_caldyn_fast
 
     SUBROUTINE comp_caldyn_slow_hydro(zero, u,rhodz,hv,Kv, berni, hflux,du)
       IMPORT
-      LOGICAL, INTENT(IN) :: zero
-      REAL(rstd),INTENT(IN)  :: u(iim_jjm_u, llm_)    ! prognostic "velocity"
-      REAL(rstd),INTENT(IN)  :: rhodz(iim_jjm_i, llm_)
-      REAL(rstd),INTENT(IN)  :: hv(iim_jjm_v, llm_)   ! height/mass averaged to vertices
-      REAL(rstd),INTENT(IN)  :: Kv(iim_jjm_v, llm_)   ! kinetic energy at vertices
-      REAL(rstd), INTENT(OUT) :: berni(iim_jjm_i, llm_)  ! Bernoulli function
-      REAL(rstd),INTENT(OUT) :: hflux(iim_jjm_u, llm_) ! hflux in kg/s 
-      REAL(rstd),INTENT(INOUT) :: du(iim_jjm_u, llm_)
+      LOGICAL,    INTENT(IN)    :: zero
+      REAL(rstd), INTENT(IN)    :: u(:,:)      ! prognostic "velocity"
+      REAL(rstd), INTENT(IN)    :: rhodz(:,:)
+      REAL(rstd), INTENT(IN)    :: hv(:,:)     ! height/mass averaged to vertices
+      REAL(rstd), INTENT(IN)    :: Kv(:,:)     ! kinetic energy at vertices
+      REAL(rstd), INTENT(OUT)   :: berni(:,:)  ! Bernoulli function
+      REAL(rstd), INTENT(OUT)   :: hflux(:,:)  ! hflux in kg/s 
+      REAL(rstd), INTENT(INOUT) :: du(:,:)
     END SUBROUTINE comp_caldyn_slow_hydro
     
     SUBROUTINE comp_caldyn_coriolis(hflux,theta,qu, Ftheta, convm,dtheta_rhodz,du)
       IMPORT
-      REAL(rstd),INTENT(IN)    :: hflux(iim_jjm_u, llm_)  ! hflux in kg/s
-      REAL(rstd),INTENT(IN)    :: theta(iim_jjm_i, llm_, nqdyn_) ! active scalars
-      REAL(rstd),INTENT(IN)    :: qu(iim_jjm_u, llm_)
-      REAL(rstd), INTENT(OUT)  :: Ftheta(iim_jjm_u, llm_)  ! potential temperature flux
-      REAL(rstd),INTENT(OUT)   :: convm(iim_jjm_i, llm_)  ! mass flux convergence
-      REAL(rstd),INTENT(OUT)   :: dtheta_rhodz(iim_jjm_i, llm_, nqdyn_)
-      REAL(rstd),INTENT(INOUT) :: du(iim_jjm_u, llm_)
+      REAL(rstd), INTENT(IN)    :: hflux(:,:)   ! hflux in kg/s
+      REAL(rstd), INTENT(IN)    :: theta(:,:,:) ! active scalars
+      REAL(rstd), INTENT(IN)    :: qu(:,:)
+      REAL(rstd), INTENT(OUT)   :: Ftheta(:,:)  ! potential temperature flux
+      REAL(rstd), INTENT(OUT)   :: convm(:,:)   ! mass flux convergence
+      REAL(rstd), INTENT(OUT)   :: dtheta_rhodz(:,:,:)
+      REAL(rstd), INTENT(INOUT) :: du(:,:)
     END SUBROUTINE comp_caldyn_coriolis
 
