Index: codes/icosagcm/devel/src/base/init_grid_param.f90
===================================================================
--- codes/icosagcm/devel/src/base/init_grid_param.f90	(revision 957)
+++ codes/icosagcm/devel/src/base/init_grid_param.f90	(revision 958)
@@ -5,4 +5,5 @@
   USE compute_pression_mod
   USE compute_temperature_mod
+  USE vertical_interp_mod
 
   USE compute_caldyn_mod
@@ -71,4 +72,5 @@
     compute_temperature  => compute_temperature_hex
     compute_hydrostatic_pressure => compute_hydrostatic_pressure_hex
+    compute_vertical_interp => compute_vertical_interp_hex
     ! dynamics
     compute_pvort_only        => compute_pvort_only_hex
@@ -87,4 +89,5 @@
     compute_temperature  => compute_temperature_unst
     compute_hydrostatic_pressure => compute_hydrostatic_pressure_unst
+    compute_vertical_interp => compute_vertical_interp_unst
     ! dynamics
     compute_pvort_only         => compute_pvort_only_unst
Index: codes/icosagcm/devel/src/diagnostics/compute_diagnostics.f90
===================================================================
--- codes/icosagcm/devel/src/diagnostics/compute_diagnostics.f90	(revision 957)
+++ codes/icosagcm/devel/src/diagnostics/compute_diagnostics.f90	(revision 958)
@@ -39,4 +39,12 @@
     END SUBROUTINE comp_hydro_press
 
+    SUBROUTINE comp_vert_interp(pmid,in,out,pval)
+      IMPORT
+      REAL(rstd),INTENT(IN) :: pmid(iim_jjm_i, llm_)
+      REAL(rstd),INTENT(IN) :: in(iim_jjm_i, llm_)
+      REAL(rstd),INTENT(OUT):: out(iim_jjm_i)
+      REAL(rstd),INTENT(IN) :: pval
+    END SUBROUTINE comp_vert_interp
+
   END INTERFACE
 
@@ -45,6 +53,8 @@
   PROCEDURE(comp_temperature), POINTER :: compute_temperature => NULL()
   PROCEDURE(comp_hydro_press), POINTER :: compute_hydrostatic_pressure => NULL()
+  PROCEDURE(comp_vert_interp), POINTER :: compute_vertical_interp => NULL()
 
-  PUBLIC :: compute_rhodz, compute_pression, compute_pression_mid, compute_temperature, compute_hydrostatic_pressure
+  PUBLIC :: compute_rhodz, compute_pression, compute_pression_mid, compute_temperature, compute_hydrostatic_pressure, &
+       compute_vertical_interp
 
 END MODULE compute_diagnostics_mod
Index: codes/icosagcm/devel/src/vertical/vertical_interp.f90
===================================================================
--- codes/icosagcm/devel/src/vertical/vertical_interp.f90	(revision 957)
+++ codes/icosagcm/devel/src/vertical/vertical_interp.f90	(revision 958)
@@ -9,5 +9,6 @@
   
 
-  PUBLIC init_vertical_interp, vertical_interp, compute_vertical_interp
+  PUBLIC init_vertical_interp, vertical_interp, &
+       compute_vertical_interp_hex, compute_vertical_interp_unst
 
 CONTAINS
@@ -41,10 +42,10 @@
   END SUBROUTINE  vertical_interp
 
-  SUBROUTINE compute_vertical_interp(pmid,in,out,pval)
+  SUBROUTINE compute_vertical_interp_hex(pmid,in,out,pval)
     REAL(rstd),INTENT(IN) :: pmid(iim*jjm,llm)
     REAL(rstd),INTENT(IN) :: in(iim*jjm,llm)
-    REAL(rstd),INTENT(OUT) :: out(iim*jjm)
-    REAL(rstd) :: pval, coeff
-    INTEGER :: i,j,ij,l
+    REAL(rstd),INTENT(OUT):: out(iim*jjm)
+    REAL(rstd),INTENT(IN) :: pval
+    INTEGER :: i,j,ij
         
 !$OMP BARRIER    
@@ -54,10 +55,5 @@
         DO i=ii_begin-1,ii_end+1
           ij=(j-1)*iim+i
-          l=llm-1
-          DO WHILE(pmid(ij,l)<pval .AND. l>1)
-            l=l-1
-          ENDDO
-          coeff=(pval-pmid(ij,l))/(pmid(ij,l)-pmid(ij,l+1))
-          out(ij)=in(ij,l)+coeff*(in(ij,l)-in(ij,l+1))
+          CALL interp_1d(pmid(ij,:), in(ij,:), out(ij), pval)
         ENDDO
       ENDDO   
@@ -65,5 +61,35 @@
 !$OMP BARRIER
 
-  END SUBROUTINE compute_vertical_interp
+  END SUBROUTINE compute_vertical_interp_hex
+
+  SUBROUTINE compute_vertical_interp_unst(pmid,in,out,pval)
+    REAL(rstd),INTENT(IN) :: pmid(llm, primal_num)
+    REAL(rstd),INTENT(IN) :: in(llm, primal_num)
+    REAL(rstd),INTENT(OUT) :: out(primal_num)
+    REAL(rstd) :: pval
+    INTEGER :: ij        
+!$OMP BARRIER
+!$OMP MASTER
+    DO ij=1, primal_num
+       CALL interp_1d(pmid(:,ij), in(:,ij), out(ij), pval)
+    END DO
+!$OMP END MASTER
+!$OMP BARRIER
+  END SUBROUTINE compute_vertical_interp_unst
+
+  PURE SUBROUTINE interp_1d(pmid,in,out,pval)
+    REAL(rstd),INTENT(IN)  :: pmid(:)
+    REAL(rstd),INTENT(IN)  :: in(:)
+    REAL(rstd),INTENT(OUT) :: out
+    REAL(rstd),INTENT(IN)  :: pval
+    REAL(rstd) :: coeff
+    INTEGER :: l
+    l=llm-1
+    DO WHILE(pmid(l)<pval .AND. l>1)
+       l=l-1
+    END DO
+    coeff=(pval-pmid(l))/(pmid(l)-pmid(l+1))
+    out=in(l)+coeff*(in(l)-in(l+1))
+  END SUBROUTINE interp_1d
 
 END MODULE vertical_interp_mod
