Index: codes/icosagcm/devel/src/diagnostics/diagflux.f90
===================================================================
--- codes/icosagcm/devel/src/diagnostics/diagflux.f90	(revision 586)
+++ codes/icosagcm/devel/src/diagnostics/diagflux.f90	(revision 587)
@@ -4,6 +4,5 @@
   SAVE
   
-  TYPE(t_field),POINTER :: f_qfluxt(:), f_qfluxt_i(:) ! time-integrated flux of scalars and its reconstruction at cell centers
-  
+  TYPE(t_field),POINTER :: f_qfluxt(:), f_qfluxt_lon(:), f_qfluxt_lat(:) ! time-integrated flux of scalars and its reconstruction at cell centers
   LOGICAL :: diagflux_on
   !$OMP THREADPRIVATE(diagflux_on)
@@ -17,9 +16,12 @@
     IF(diagflux_on) THEN
        CALL allocate_field(f_qfluxt,  field_u,type_real,llm,nqtot, name="qfluxt")
-       CALL allocate_field(f_qfluxt_i,  field_t,type_real,llm,nqtot, name="qfluxt_i")
+       CALL allocate_field(f_qfluxt_lon,  field_t,type_real,llm,nqtot, name="qfluxt_lon")
+       CALL allocate_field(f_qfluxt_lat,  field_t,type_real,llm,nqtot, name="qfluxt_lat")
        CALL zero_qfluxt
     ELSE
+       STOP ! FIXME
        CALL allocate_field(f_qfluxt,  field_u,type_real,llm,0, name="qfluxt")
-       CALL allocate_field(f_qfluxt_i,  field_t,type_real,llm,0, name="qfluxt_i")
+       CALL allocate_field(f_qfluxt_lon,  field_t,type_real,llm,0, name="qfluxt_lon")
+       CALL allocate_field(f_qfluxt_lat,  field_t,type_real,llm,0, name="qfluxt_lat")
     END IF
   END SUBROUTINE init_diagflux
@@ -38,5 +40,6 @@
   END SUBROUTINE zero_qfluxt
 
-  SUBROUTINE flux_centered_lonlat(f_flux, f_flux_lon, f_flux_lat)
+  SUBROUTINE flux_centered_lonlat(scale, f_flux, f_flux_lon, f_flux_lat)
+    REAL(rstd), INTENT(IN) :: scale
     TYPE(t_field),POINTER :: f_flux(:), f_flux_lon(:), f_flux_lat(:)
     REAL(rstd), POINTER :: flux(:,:,:), flux_lon(:,:,:), flux_lat(:,:,:)
@@ -47,15 +50,19 @@
        CALL swap_geometry(ind)
        flux=f_flux(ind)
+       flux_lon=f_flux_lon(ind)
+       flux_lat=f_flux_lat(ind)
        DO itrac=1,nqtot
-          CALL compute_flux_centered_lonlat(flux(:,:,itrac), flux_lon(:,:,itrac), flux_lat(:,:,itrac))
+          CALL compute_flux_centered_lonlat(scale, flux(:,:,itrac), flux_lon(:,:,itrac), flux_lat(:,:,itrac))
        END DO
     END DO
   END SUBROUTINE flux_centered_lonlat
   
-  SUBROUTINE compute_flux_centered_lonlat(flux, flux_lon, flux_lat)
+  SUBROUTINE compute_flux_centered_lonlat(scale, flux, flux_lon, flux_lat)
+    USE wind_mod
+    REAL(rstd), INTENT(IN) :: scale
     REAL(rstd), INTENT(IN) :: flux(3*iim*jjm,llm)
     REAL(rstd), INTENT(OUT) :: flux_lon(iim*jjm,llm), flux_lat(iim*jjm,llm)
     REAL(rstd) :: flux_3d(iim*jjm,llm,3)
-    CALL compute_flux_centered(flux, flux_3d)
+    CALL compute_flux_centered(scale, flux, flux_3d)
     CALL compute_wind_centered_lonlat_compound(flux_3d, flux_lon, flux_lat)
   END SUBROUTINE compute_flux_centered_lonlat
Index: codes/icosagcm/devel/src/diagnostics/wind.F90
===================================================================
--- codes/icosagcm/devel/src/diagnostics/wind.F90	(revision 586)
+++ codes/icosagcm/devel/src/diagnostics/wind.F90	(revision 587)
@@ -53,13 +53,15 @@
   REAL(rstd) :: ucenter(iim*jjm,llm,3)
   INTEGER :: ij,l
-  REAL(rstd) :: ue_le, cx,cy,cz, ux,uy,uz
+  REAL(rstd), PARAMETER :: scale=1.
+  REAL(rstd) :: fac, ue_le, cx,cy,cz, ux,uy,uz
 #include "../kernels/wind_centered.k90"
  END SUBROUTINE compute_wind_centered
  
-  SUBROUTINE compute_flux_centered(ue,ucenter)
+  SUBROUTINE compute_flux_centered(scale,ue,ucenter)
+  REAL(rstd), INTENT(IN) :: scale
   REAL(rstd) :: ue(3*iim*jjm,llm)
   REAL(rstd) :: ucenter(iim*jjm,llm,3)
   INTEGER :: ij,l
-  REAL(rstd) :: ue_le, cx,cy,cz, ux,uy,uz
+  REAL(rstd) :: fac, ue_le, cx,cy,cz, ux,uy,uz
 #include "../kernels/flux_centered.k90"
   END SUBROUTINE compute_flux_centered
Index: codes/icosagcm/devel/src/kernels/flux_centered.k90
===================================================================
--- codes/icosagcm/devel/src/kernels/flux_centered.k90	(revision 586)
+++ codes/icosagcm/devel/src/kernels/flux_centered.k90	(revision 587)
@@ -2,4 +2,5 @@
    !---------------------------- flux_centered ----------------------------------
    ! NB : here the input data is a flux and has already the factor l_e in it
+   ! Input data is rescaled by factor scale
    ! Perot reconstruction based on Gauss theorem
    ! u = sum( u.edge_normal * edge_length * (edge_midpoint-cell_centroid) ) /cell_area
@@ -35,7 +36,8 @@
          uy = uy + ue_le*(.5*(xyz_v(ij+z_rup,2)+xyz_v(ij+z_rdown,2))-cy)
          uz = uz + ue_le*(.5*(xyz_v(ij+z_rup,3)+xyz_v(ij+z_rdown,3))-cz)
-         ucenter(ij,l,1)=ux
-         ucenter(ij,l,2)=uy
-         ucenter(ij,l,3)=uz
+         fac = scale*(1./Ai(ij))
+         ucenter(ij,l,1)=ux*fac
+         ucenter(ij,l,2)=uy*fac
+         ucenter(ij,l,3)=uz*fac
       END DO
    END DO
Index: codes/icosagcm/devel/src/kernels/wind_centered.k90
===================================================================
--- codes/icosagcm/devel/src/kernels/wind_centered.k90	(revision 586)
+++ codes/icosagcm/devel/src/kernels/wind_centered.k90	(revision 587)
@@ -34,7 +34,8 @@
          uy = uy + ue_le*(.5*(xyz_v(ij+z_rup,2)+xyz_v(ij+z_rdown,2))-cy)
          uz = uz + ue_le*(.5*(xyz_v(ij+z_rup,3)+xyz_v(ij+z_rdown,3))-cz)
-         ucenter(ij,l,1)=ux
-         ucenter(ij,l,2)=uy
-         ucenter(ij,l,3)=uz
+         fac = scale*(1./Ai(ij))
+         ucenter(ij,l,1)=ux*fac
+         ucenter(ij,l,2)=uy*fac
+         ucenter(ij,l,3)=uz*fac
       END DO
    END DO
