Index: codes/icosagcm/devel/make_python
===================================================================
--- codes/icosagcm/devel/make_python	(revision 845)
+++ codes/icosagcm/devel/make_python	(revision 846)
@@ -14,5 +14,5 @@
 function cmd_clean() # cleanup, invoked by : './make_python clean'
 {
-    rm -f lib/*.so lib/dynamico
+    rm -rf lib/*.so lib/dynamico
     cd $KERNELS/src
     rm -rf *.o *.so build/
Index: codes/icosagcm/devel/src/dynamics/caldyn_gcm.F90
===================================================================
--- codes/icosagcm/devel/src/dynamics/caldyn_gcm.F90	(revision 845)
+++ codes/icosagcm/devel/src/dynamics/caldyn_gcm.F90	(revision 846)
@@ -150,11 +150,14 @@
     CALL allocate_caldyn
 
-    DO ind=1,ndomain
-       IF (.NOT. assigned_domain(ind)) CYCLE
-       CALL swap_dimensions(ind)
-       CALL swap_geometry(ind)
-       planetvel=f_planetvel(ind)
-       CALL compute_planetvel(planetvel)
-    END DO
+    IF(grid_type==grid_ico) THEN
+       ! NB : unused now, would be useful for non-traditional / deep-atmosphere
+       DO ind=1,ndomain
+          IF (.NOT. assigned_domain(ind)) CYCLE
+          CALL swap_dimensions(ind)
+          CALL swap_geometry(ind)
+          planetvel=f_planetvel(ind)
+          CALL compute_planetvel(planetvel)
+       END DO
+    END IF
 
     compute_pvort_only => compute_pvort_only_hex
Index: codes/icosagcm/devel/src/icosa_init.f90
===================================================================
--- codes/icosagcm/devel/src/icosa_init.f90	(revision 845)
+++ codes/icosagcm/devel/src/icosa_init.f90	(revision 846)
@@ -34,5 +34,5 @@
     CALL init_grid_param(is_mpi_master)
     CALL init_omp_para(is_mpi_master)
-    CALL compute_metric
+    IF(grid_type == grid_ico) CALL compute_metric
     CALL compute_domain
     CALL init_transfert
@@ -42,5 +42,5 @@
   !$OMP PARALLEL  
     CALL switch_omp_no_distrib_level
-    CALL compute_geometry
+    IF(grid_type == grid_ico) CALL compute_geometry
     CALL check_total_area
   
@@ -80,36 +80,24 @@
     SUBROUTINE check_total_area
     IMPLICIT NONE
-    TYPE(t_field),POINTER,SAVE :: sum_ne(:)
-    TYPE(t_field),POINTER,SAVE :: sum_ne_glo(:)
-    REAL(rstd),POINTER :: pt_sum_ne(:)
-    INTEGER :: ind,i,j,k,n
+    INTEGER :: ind,i,j,ij
     REAL(rstd) :: vect(3,6)
     REAL(rstd) :: centr(3),dist    
     REAL(rstd) :: tot_sum=0
 
-      CALL allocate_field(sum_ne,field_T,type_real)
-    
     !$OMP BARRIER
     !$OMP MASTER
-      DO ind=1,ndomain
-       
-        pt_sum_ne=sum_ne(ind)
-        
-        CALL swap_dimensions(ind)
-        CALL swap_geometry(ind)
-       
-        DO j=jj_begin,jj_end
-          DO i=ii_begin,ii_end
-            n=(j-1)*iim+i
-            pt_sum_ne(n)=0
-            DO k=1,6
-              pt_sum_ne(n)=pt_sum_ne(n)+ne(n,k)
-            ENDDO
-            IF (domain(ind)%own(i,j)) tot_sum=tot_sum+Ai(n)
+    IF(grid_type == grid_ico) THEN
+       DO ind=1,ndomain
+          CALL swap_dimensions(ind)
+          CALL swap_geometry(ind)
+          DO j=jj_begin,jj_end
+             DO i=ii_begin,ii_end
+                ij=(j-1)*iim+i
+                IF (domain(ind)%own(i,j)) tot_sum=tot_sum+Ai(ij)
+             ENDDO
           ENDDO
-        ENDDO
-      ENDDO
-    
-      IF (is_mpi_root) PRINT *," Diff surf",1-tot_sum/(4*Pi*radius*radius)
+       ENDDO
+    END IF
+    IF (is_mpi_root) PRINT *," Diff surf",1-tot_sum/(4*Pi*radius*radius)
     !$OMP END MASTER
     
Index: codes/icosagcm/devel/src/output/write_field.f90
===================================================================
--- codes/icosagcm/devel/src/output/write_field.f90	(revision 845)
+++ codes/icosagcm/devel/src/output/write_field.f90	(revision 846)
@@ -70,4 +70,5 @@
     USE mpipara
     USE netcdf_mod
+    USE grid_param
     IMPLICIT NONE  
      CHARACTER(LEN=*),INTENT(IN) :: name_in
@@ -80,5 +81,6 @@
       
       IF (no_io) RETURN
-      
+      IF (grid_type==grid_unst) RETURN
+
 !$OMP BARRIER
 !$OMP MASTER      
Index: codes/icosagcm/devel/src/parallel/transfert_mpi.f90
===================================================================
--- codes/icosagcm/devel/src/parallel/transfert_mpi.f90	(revision 845)
+++ codes/icosagcm/devel/src/parallel/transfert_mpi.f90	(revision 846)
@@ -91,5 +91,12 @@
       
   SUBROUTINE init_transfert
-  USE profiling_mod
+    USE grid_param
+    USE profiling_mod, ONLY : register_id
+    USE mpipara, ONLY : id_mpi
+    CALL register_id('MPI', id_mpi)
+    IF(grid_type == grid_ico) CALL init_transfer_hex
+  END SUBROUTINE init_transfert
+
+  SUBROUTINE init_transfer_hex
   USE domain_mod
   USE dimensions
@@ -101,6 +108,4 @@
   INTEGER :: ind,i,j
   LOGICAL ::ok
-
-    CALL register_id('MPI', id_mpi)
 
     CALL create_request(field_t,req_i1)
@@ -299,5 +304,5 @@
     CALL finalize_request(req_z1_scal)
 
-  END SUBROUTINE init_transfert
+  END SUBROUTINE init_transfer_hex
   
   SUBROUTINE create_request(type_field,request,vector)
@@ -925,4 +930,5 @@
   USE mpipara
   USE mpi_mod
+  USE grid_param
   IMPLICIT NONE
   
@@ -942,4 +948,6 @@
 !    TYPE(t_reorder),POINTER :: reorder(:)
 !    TYPE(t_reorder) :: reorder_swap
+
+    IF(grid_type==grid_unst) RETURN
 
 !$OMP BARRIER
