Index: codes/icosagcm/devel/rebuild_full
===================================================================
--- codes/icosagcm/devel/rebuild_full	(revision 830)
+++ codes/icosagcm/devel/rebuild_full	(revision 830)
@@ -0,0 +1,4 @@
+#!/bin/bash
+CMD=$(cat rebuild)
+$CMD -full
+$CMD
Index: codes/icosagcm/devel/src/base/grid_param.f90
===================================================================
--- codes/icosagcm/devel/src/base/grid_param.f90	(revision 829)
+++ codes/icosagcm/devel/src/base/grid_param.f90	(revision 830)
@@ -1,3 +1,5 @@
 MODULE grid_param
+  IMPLICIT NONE
+  SAVE
   INTEGER  :: iim_glo=40
   INTEGER  :: jjm_glo
@@ -8,24 +10,3 @@
   INTEGER  :: nqtot ! number of tracers handled by advection scheme
   INTEGER, BIND(C) :: nqdyn ! number of dynamical tracers : 1 if dry, more if moist
-
-CONTAINS
-
-  SUBROUTINE init_grid_param(is_mpi_root)
-    USE ioipsl
-    IMPLICIT NONE
-    LOGICAL :: is_mpi_root
-    CALL getin('nbp',iim_glo)
-    jjm_glo=iim_glo
-    CALL getin('llm',llm)
-    nqtot=1
-    CALL getin('nqtot',nqtot)
-    IF(is_mpi_root) THEN
-       PRINT *, 'GETIN nbp = ',iim_glo
-       PRINT *, 'GETIN llm = ',llm
-       PRINT *, 'GETIN nqtot = ',nqtot
-    END IF
-    
-  END SUBROUTINE  init_grid_param
-
 END MODULE grid_param
-    
Index: codes/icosagcm/devel/src/base/init_grid_param.f90
===================================================================
--- codes/icosagcm/devel/src/base/init_grid_param.f90	(revision 830)
+++ codes/icosagcm/devel/src/base/init_grid_param.f90	(revision 830)
@@ -0,0 +1,45 @@
+MODULE init_grid_param_mod
+  IMPLICIT NONE
+
+CONTAINS
+
+  SUBROUTINE init_grid_param(is_mpi_root)
+    USE grid_param
+    USE ioipsl, ONLY : getin
+    USE init_unstructured_mod, ONLY : read_dump_partition
+    LOGICAL :: is_mpi_root
+    CHARACTER(len=255) :: grid_type_var
+    
+    grid_type_var='icosahedral'
+    CALL getin("grid_type",grid_type_var)
+    SELECT CASE(grid_type_var)
+    CASE('icosahedral')
+       grid_type = grid_ico
+       IF (is_mpi_root) PRINT *,'DYNAMICO mesh is icosahedral.'
+       CALL getin('nbp',iim_glo)
+       jjm_glo=iim_glo
+       IF(is_mpi_root) PRINT *, 'GETIN nbp = ',iim_glo
+    CASE('unstructured')
+       grid_type = grid_unst
+       !       is_omp_level_master=.TRUE.
+       !       omp_level_size=1
+       CALL read_dump_partition
+       IF (is_mpi_root) PRINT *,'DYNAMICO mesh is unstructured/LAM.'
+    CASE DEFAULT
+       PRINT *, 'Invalid value of grid_type :',TRIM(grid_type_var)
+       PRINT *, 'Valid values are : <icosahedral> <unstructured>'
+       STOP
+    END SELECT
+    
+    nqtot=1
+    CALL getin('nqtot',nqtot)
+    CALL getin('llm',llm)
+    IF(is_mpi_root) THEN
+       PRINT *, 'GETIN llm = ',llm
+       PRINT *, 'GETIN nqtot = ',nqtot
+    END IF
+    
+  END SUBROUTINE  init_grid_param
+  
+END MODULE init_grid_param_mod
+    
Index: codes/icosagcm/devel/src/icosa_init.f90
===================================================================
--- codes/icosagcm/devel/src/icosa_init.f90	(revision 829)
+++ codes/icosagcm/devel/src/icosa_init.f90	(revision 830)
@@ -22,10 +22,9 @@
   USE diagflux_mod
   USE profiling_mod
-  USE init_unstructured_mod, ONLY: init_grid_type
+  USE init_grid_param_mod
   IMPLICIT NONE
   
     CALL init_profiling
     CALL init_mpipara
-    CALL init_grid_type
     CALL trace_off
     CALL xios_init
Index: codes/icosagcm/devel/src/unstructured/init_unstructured.f90
===================================================================
--- codes/icosagcm/devel/src/unstructured/init_unstructured.f90	(revision 829)
+++ codes/icosagcm/devel/src/unstructured/init_unstructured.f90	(revision 830)
@@ -1,5 +1,4 @@
 MODULE init_unstructured_mod
   USE mpipara, ONLY : is_mpi_master
-  USE grid_param, ONLY : llm, nqdyn
   USE data_unstructured_mod
   IMPLICIT NONE
@@ -11,5 +10,5 @@
   INTEGER, ALLOCATABLE :: Idata_read1(:),Idata_read2(:,:),Idata_read3(:,:,:)
 
-  PUBLIC :: init_grid_type
+  PUBLIC :: read_dump_partition
 
 CONTAINS
