Index: codes/icosagcm/trunk/src/etat0_dcmip3.f90
===================================================================
--- codes/icosagcm/trunk/src/etat0_dcmip3.f90	(revision 355)
+++ codes/icosagcm/trunk/src/etat0_dcmip3.f90	(revision 356)
@@ -35,6 +35,7 @@
                ulon(ij,l),ulat(ij,l),dummy,Temp(ij,l),dummy,dummy,dummy,dummy)
        END DO
+       q(:,l,:)=0.
     END DO
-    q(:,:,:)=0.
+    
   END SUBROUTINE compute_etat0
 
Index: codes/icosagcm/trunk/src/geometry.f90
===================================================================
--- codes/icosagcm/trunk/src/geometry.f90	(revision 355)
+++ codes/icosagcm/trunk/src/geometry.f90	(revision 356)
@@ -1,5 +1,6 @@
 MODULE geometry
   USE field_mod
-  
+  IMPLICIT NONE
+
   TYPE t_geometry
     TYPE(t_field),POINTER :: centroid(:)
@@ -205,4 +206,40 @@
   END SUBROUTINE update_circumcenters
 
+  SUBROUTINE remap_schmidt_loc
+    USE spherical_geom_mod
+    USE getin_mod
+    USE omp_para
+    USE domain_mod
+    USE dimensions
+    IMPLICIT NONE
+    INTEGER :: ind,i,j,n
+    REAL(rstd) :: schmidt_factor, schmidt_lon, schmidt_lat
+
+    ! Schmidt transform parameters
+    schmidt_factor = 1.
+    CALL getin('schmidt_factor', schmidt_factor)
+    schmidt_factor =  schmidt_factor**2.
+    
+    schmidt_lon = 0.
+    CALL getin('schmidt_lon', schmidt_lon)
+    schmidt_lon = schmidt_lon * pi/180.
+
+    schmidt_lat = 45.
+    CALL getin('schmidt_lat', schmidt_lat)
+    schmidt_lat = schmidt_lat * pi/180.
+
+    DO ind=1,ndomain
+      IF (.NOT. assigned_domain(ind) .OR. .NOT. is_omp_level_master) CYCLE
+      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
+          CALL schmidt_transform(xyz_i(n,:), schmidt_factor, schmidt_lon, schmidt_lat)
+        ENDDO
+      ENDDO
+    ENDDO
+  END SUBROUTINE remap_schmidt_loc
+
   SUBROUTINE optimize_geometry
   USE metric
@@ -303,4 +340,29 @@
   END SUBROUTINE optimize_geometry
 
+  SUBROUTINE update_domain 
+    ! copy position of generators and vertices back into domain(:)%xyz/vertex
+    ! so that XIOS gets the right values
+    USE omp_para
+    USE dimensions
+    USE domain_mod
+    INTEGER :: ind,i,j,k,n
+    TYPE(t_domain),POINTER :: d
+    DO ind=1,ndomain
+       IF (.NOT. assigned_domain(ind)  .OR. .NOT. is_omp_level_master ) CYCLE
+       d=>domain(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
+             d%xyz(:,i,j)=xyz_i(n,:)
+             DO k=0,5
+                d%vertex(:,k,i,j) = xyz_v(n+z_pos(k+1),:)
+             END DO
+          END DO
+       END DO
+    END DO
+  END SUBROUTINE update_domain
+  
   SUBROUTINE set_geometry
   USE metric
@@ -329,5 +391,10 @@
       
     CALL optimize_geometry
- 
+    CALL remap_schmidt_loc
+    CALL update_circumcenters
+    ! copy position of generators and vertices back into domain(:)%xyz/vertex
+    ! so that XIOS gets the right values
+    CALL update_domain
+
     DO ind=1,ndomain
       IF (.NOT. assigned_domain(ind)  .OR. .NOT. is_omp_level_master ) CYCLE
Index: codes/icosagcm/trunk/src/metric.f90
===================================================================
--- codes/icosagcm/trunk/src/metric.f90	(revision 355)
+++ codes/icosagcm/trunk/src/metric.f90	(revision 356)
@@ -55,5 +55,5 @@
 CONTAINS
 
-  SUBROUTINE remap_schmidt
+  SUBROUTINE remap_schmidt_glo ! FIXME : not called any more
     USE spherical_geom_mod
     USE getin_mod
@@ -82,5 +82,5 @@
        END DO
     END DO
-  END SUBROUTINE remap_schmidt
+  END SUBROUTINE remap_schmidt_glo
 
   SUBROUTINE allocate_metric
@@ -858,5 +858,5 @@
 !    CALL compute_face
     CALL compute_face_projection
-    CALL remap_schmidt
+!    CALL remap_schmidt_glo ! replaced by call to remap_schmidt_loc in set_geometry
 
     CALL set_index
Index: codes/icosagcm/trunk/src/observable.f90
===================================================================
--- codes/icosagcm/trunk/src/observable.f90	(revision 355)
+++ codes/icosagcm/trunk/src/observable.f90	(revision 356)
@@ -37,4 +37,5 @@
     CALL output_field("ulat",f_buf_ulat)
     CALL output_field("ps",f_ps)
+    CALL output_field("Ai",geom%Ai)
     !       CALL output_field("dps",f_dps)
     !CALL output_field("mass",f_mass)
