Index: codes/icosagcm/devel/src/parallel/domain.f90
===================================================================
--- codes/icosagcm/devel/src/parallel/domain.f90	(revision 864)
+++ codes/icosagcm/devel/src/parallel/domain.f90	(revision 867)
@@ -614,5 +614,17 @@
   END SUBROUTINE assign_domain_omp
     
-          
+  SUBROUTINE init_domain_unst(dom)
+    USE grid_param, ONLY : primal_num
+    TYPE(t_domain) :: dom
+    dom%ii_begin=1
+    dom%ii_end=primal_num
+    dom%iim=primal_num
+    dom%jj_begin=1
+    dom%jj_end=1
+    dom%jjm=1
+    ALLOCATE(dom%assign_domain(primal_num,1))
+    dom%assign_domain(:,:)=1  ! all cells are assigned to MPI rank 0
+  END SUBROUTINE init_domain_unst
+
   SUBROUTINE compute_domain
     USE grid_param, ONLY : grid_type, grid_unst, grid_ico
@@ -620,7 +632,22 @@
     SELECT CASE(grid_type)
     CASE(grid_unst)
+       ! FIXME temporary, sequential hack
+       ndomain_glo=1
+       ALLOCATE(domain_glo(ndomain_glo))
+       ALLOCATE(domglo_rank(ndomain_glo))
+       ALLOCATE(domglo_loc_ind(ndomain_glo))
+       domglo_rank(:)=0
+       domglo_loc_ind(:)=1
+
        ndomain=1
-       ALLOCATE(assigned_domain(1))
-       assigned_domain=.TRUE.
+       ALLOCATE(domain(ndomain))
+       ALLOCATE(domloc_glo_ind(ndomain))
+       ALLOCATE(assigned_domain(ndomain))
+       domloc_glo_ind(:)=1
+       assigned_domain(:)=.TRUE.
+
+       CALL init_domain_unst(domain(1))
+       CALL init_domain_unst(domain_glo(1))
+
     CASE DEFAULT
        CALL init_domain_param
Index: codes/icosagcm/devel/src/time/euler_scheme.f90
===================================================================
--- codes/icosagcm/devel/src/time/euler_scheme.f90	(revision 864)
+++ codes/icosagcm/devel/src/time/euler_scheme.f90	(revision 867)
@@ -167,12 +167,24 @@
 
        u=f_u(ind)
-       DO l=ll_begin,ll_end
-          !DIR$ SIMD
-          DO ij=ij_begin,ij_end
-             u(ij+u_right,l)=u(ij+u_right,l)*de(ij+u_right)
-             u(ij+u_lup,l)=u(ij+u_lup,l)*de(ij+u_lup)
-             u(ij+u_ldown,l)=u(ij+u_ldown,l)*de(ij+u_ldown)
-          ENDDO
-       ENDDO
+       SELECT CASE(grid_type)
+       CASE(grid_ico)
+          DO l=ll_begin,ll_end
+             !DIR$ SIMD
+             DO ij=ij_begin,ij_end
+                u(ij+u_right,l)=u(ij+u_right,l)*de(ij+u_right)
+                u(ij+u_lup,l)=u(ij+u_lup,l)*de(ij+u_lup)
+                u(ij+u_ldown,l)=u(ij+u_ldown,l)*de(ij+u_ldown)
+             ENDDO
+          ENDDO
+       CASE(grid_unst)
+          PRINT *, 'legacy_to_DEC', llm, edge_num, SHAPE(u), SHAPE(de) ! FIXME
+          DO ij=1, edge_num
+             DO l=1,llm
+                u(l,ij) = u(l,ij)*de(ij)
+             END DO
+          END DO
+       CASE DEFAULT
+          STOP 'Unsupported grid_type encountered in legacy_to_DEC'
+       END SELECT
     ENDDO
 
Index: codes/icosagcm/devel/src/unstructured/data_unstructured.F90
===================================================================
--- codes/icosagcm/devel/src/unstructured/data_unstructured.F90	(revision 864)
+++ codes/icosagcm/devel/src/unstructured/data_unstructured.F90	(revision 867)
@@ -4,4 +4,5 @@
   USE mpipara, ONLY : is_mpi_master
   USE grid_param, ONLY : llm, nqdyn
+  USE geometry, ONLY : le, le_de, fv, Av, Ai
 #ifdef CPP_USING_OMP
   USE OMP_LIB
@@ -28,5 +29,5 @@
   INDEX, BIND(C) :: edge_num, primal_num, dual_num, &
        max_primal_deg, max_dual_deg, max_trisk_deg
-  INDEX, ALLOCATABLE :: & ! deg(ij) = nb of vertices = nb of edges of primal/dual cell ij
+  INDEX, POINTER :: & ! deg(ij) = nb of vertices = nb of edges of primal/dual cell ij
        primal_deg(:), primal_edge(:,:), primal_vertex(:,:), primal_ne(:,:), & 
        dual_deg(:), dual_edge(:,:), dual_vertex(:,:), dual_ne(:,:), &
@@ -43,6 +44,5 @@
   NUM1(max_nb_stage), BIND(C)              :: tauj       ! diagonal of fast Butcher tableau
   NUM2(max_nb_stage,max_nb_stage), BIND(C) :: cslj, cflj ! slow and fast modified Butcher tableaus
-  NUM1(:), ALLOCATABLE            :: le, le_de, fv, Av, Ai
-  NUM2(:,:), ALLOCATABLE          :: centroid, xyz_v, Riv2, wee, ap,bp, mass_bl, mass_dak, mass_dbk
+  NUM2(:,:), POINTER          :: centroid, xyz_v, Riv2, wee, ap,bp, mass_bl, mass_dak, mass_dbk
 
   INTEGER(C_INT), BIND(C) :: comm_icosa
@@ -144,6 +144,8 @@
   !---------------------------- CONTEXT INITIALIZATION --------------------------
 
-#define ALLOC1(v,n1) IF(ALLOCATED(v)) DEALLOCATE(v) ; ALLOCATE(v(n1))
-#define ALLOC2(v,n1,n2) IF(ALLOCATED(v)) DEALLOCATE(v) ; ALLOCATE(v(n1,n2))
+!#define ALLOC1(v,n1) IF(ALLOCATED(v)) DEALLOCATE(v) ; ALLOCATE(v(n1))
+!#define ALLOC2(v,n1,n2) IF(ALLOCATED(v)) DEALLOCATE(v) ; ALLOCATE(v(n1,n2))
+#define ALLOC1(v,n1) IF(ASSOCIATED(v)) DEALLOCATE(v) ; ALLOCATE(v(n1))
+#define ALLOC2(v,n1,n2) IF(ASSOCIATED(v)) DEALLOCATE(v) ; ALLOCATE(v(n1,n2))
 
   SUBROUTINE init_mesh( & 
