Index: /codes/icosagcm/trunk/src/caldyn_kernels.f90
===================================================================
--- /codes/icosagcm/trunk/src/caldyn_kernels.f90	(revision 520)
+++ /codes/icosagcm/trunk/src/caldyn_kernels.f90	(revision 521)
@@ -60,9 +60,5 @@
           !DIR$ SIMD
           DO ij=ij_begin_ext,ij_end_ext
-             IF(DEC) THEN  ! ps is actually Ms
-                m = mass_dak(l)+(ps(ij)*g+ptop)*mass_dbk(l)
-             ELSE
-                m = mass_dak(l)+ps(ij)*mass_dbk(l)
-             END IF
+             m = mass_dak(l)+(ps(ij)*g+ptop)*mass_dbk(l) ! ps is actually Ms
              rhodz(ij,l) = m/g
              theta(ij,l) = theta_rhodz(ij,l)/rhodz(ij,l)
@@ -85,39 +81,19 @@
        !DIR$ SIMD
        DO ij=ij_begin_ext,ij_end_ext
-          IF(DEC) THEN
-             etav= 1./Av(ij+z_up)*(  ne_rup  * u(ij+u_rup,l)         &
-                                   + ne_left * u(ij+t_rup+u_left,l)  &
-                                   - ne_lup  * u(ij+u_lup,l) )                               
-
-             hv =   Riv2(ij,vup)          * rhodz(ij,l)           &
-                  + Riv2(ij+t_rup,vldown) * rhodz(ij+t_rup,l)     &
-                  + Riv2(ij+t_lup,vrdown) * rhodz(ij+t_lup,l)
-             qv(ij+z_up,l) = ( etav+fv(ij+z_up) )/hv
-
-             etav = 1./Av(ij+z_down)*(  ne_ldown * u(ij+u_ldown,l)          &
-                                      + ne_right * u(ij+t_ldown+u_right,l)  &
-                                      - ne_rdown * u(ij+u_rdown,l) )
-             hv =   Riv2(ij,vdown)        * rhodz(ij,l)          &
-                  + Riv2(ij+t_ldown,vrup) * rhodz(ij+t_ldown,l)  &
-                  + Riv2(ij+t_rdown,vlup) * rhodz(ij+t_rdown,l)
-             qv(ij+z_down,l) =( etav+fv(ij+z_down) )/hv
-          ELSE
-             etav= 1./Av(ij+z_up)*(  ne_rup  * u(ij+u_rup,l)        * de(ij+u_rup)         &
-                                   + ne_left * u(ij+t_rup+u_left,l) * de(ij+t_rup+u_left)  &
-                                   - ne_lup  * u(ij+u_lup,l)        * de(ij+u_lup) )                               
-
-             hv =   Riv2(ij,vup)          * rhodz(ij,l)           &
-                  + Riv2(ij+t_rup,vldown) * rhodz(ij+t_rup,l)     &
-                  + Riv2(ij+t_lup,vrdown) * rhodz(ij+t_lup,l)
-             qv(ij+z_up,l) = ( etav+fv(ij+z_up) )/hv
-
-             etav = 1./Av(ij+z_down)*(  ne_ldown * u(ij+u_ldown,l)          * de(ij+u_ldown)          &
-                                      + ne_right * u(ij+t_ldown+u_right,l)  * de(ij+t_ldown+u_right)  &
-                                      - ne_rdown * u(ij+u_rdown,l)          * de(ij+u_rdown) )
-             hv =   Riv2(ij,vdown)        * rhodz(ij,l)          &
-                  + Riv2(ij+t_ldown,vrup) * rhodz(ij+t_ldown,l)  &
-                  + Riv2(ij+t_rdown,vlup) * rhodz(ij+t_rdown,l)
-             qv(ij+z_down,l) =( etav+fv(ij+z_down) )/hv
-          END IF
+          etav= 1./Av(ij+z_up)*(  ne_rup  * u(ij+u_rup,l)    &
+               + ne_left * u(ij+t_rup+u_left,l)              &
+               - ne_lup  * u(ij+u_lup,l) )                               
+          hv =   Riv2(ij,vup)          * rhodz(ij,l)         &
+               + Riv2(ij+t_rup,vldown) * rhodz(ij+t_rup,l)   &
+               + Riv2(ij+t_lup,vrdown) * rhodz(ij+t_lup,l)
+          qv(ij+z_up,l) = ( etav+fv(ij+z_up) )/hv
+          
+          etav = 1./Av(ij+z_down)*(  ne_ldown * u(ij+u_ldown,l)  &
+               + ne_right * u(ij+t_ldown+u_right,l)              &
+               - ne_rdown * u(ij+u_rdown,l) )
+          hv =   Riv2(ij,vdown)        * rhodz(ij,l)          &
+               + Riv2(ij+t_ldown,vrup) * rhodz(ij+t_ldown,l)  &
+               + Riv2(ij+t_rdown,vlup) * rhodz(ij+t_rdown,l)
+          qv(ij+z_down,l) =( etav+fv(ij+z_down) )/hv
        ENDDO
 
Index: /codes/icosagcm/trunk/src/caldyn_kernels_base.f90
===================================================================
--- /codes/icosagcm/trunk/src/caldyn_kernels_base.f90	(revision 520)
+++ /codes/icosagcm/trunk/src/caldyn_kernels_base.f90	(revision 521)
@@ -7,6 +7,4 @@
   IMPLICIT NONE
   PRIVATE
-
-  LOGICAL, PARAMETER, PUBLIC :: DEC = .TRUE.
 
   INTEGER, PARAMETER,PUBLIC :: energy=1, enstrophy=2
@@ -219,9 +217,5 @@
        DO ij=ij_begin,ij_end         
           ! dps/dt = -int(div flux)dz
-          IF(DEC) THEN
-             dps(ij) = convm(ij,1)
-          ELSE
-             dps(ij) = convm(ij,1) * g 
-          END IF
+          dps(ij) = convm(ij,1)
        ENDDO
     ENDIF
Index: /codes/icosagcm/trunk/src/caldyn_kernels_hevi.f90
===================================================================
--- /codes/icosagcm/trunk/src/caldyn_kernels_hevi.f90	(revision 520)
+++ /codes/icosagcm/trunk/src/caldyn_kernels_hevi.f90	(revision 521)
@@ -32,9 +32,5 @@
           !DIR$ SIMD
           DO ij=ij_begin_ext,ij_end_ext
-             IF(DEC) THEN  ! ps is actually Ms
-                m = mass_dak(l)+(ps(ij)*g+ptop)*mass_dbk(l)
-             ELSE
-                m = mass_dak(l)+ps(ij)*mass_dbk(l)
-             END IF
+             m = mass_dak(l)+(ps(ij)*g+ptop)*mass_dbk(l) ! ps is actually Ms
              rhodz(ij,l) = m/g
           END DO
@@ -69,39 +65,19 @@
        !DIR$ SIMD
        DO ij=ij_begin_ext,ij_end_ext
-          IF(DEC) THEN
-             etav= 1./Av(ij+z_up)*(  ne_rup  * u(ij+u_rup,l)         &
-                                   + ne_left * u(ij+t_rup+u_left,l)  &
-                                   - ne_lup  * u(ij+u_lup,l) )                               
-
-             hv =   Riv2(ij,vup)          * rhodz(ij,l)           &
-                  + Riv2(ij+t_rup,vldown) * rhodz(ij+t_rup,l)     &
-                  + Riv2(ij+t_lup,vrdown) * rhodz(ij+t_lup,l)
-             qv(ij+z_up,l) = ( etav+fv(ij+z_up) )/hv
-
-             etav = 1./Av(ij+z_down)*(  ne_ldown * u(ij+u_ldown,l)          &
-                                      + ne_right * u(ij+t_ldown+u_right,l)  &
-                                      - ne_rdown * u(ij+u_rdown,l) )
-             hv =   Riv2(ij,vdown)        * rhodz(ij,l)          &
-                  + Riv2(ij+t_ldown,vrup) * rhodz(ij+t_ldown,l)  &
-                  + Riv2(ij+t_rdown,vlup) * rhodz(ij+t_rdown,l)
-             qv(ij+z_down,l) =( etav+fv(ij+z_down) )/hv
-          ELSE
-             etav= 1./Av(ij+z_up)*(  ne_rup  * u(ij+u_rup,l)        * de(ij+u_rup)         &
-                                   + ne_left * u(ij+t_rup+u_left,l) * de(ij+t_rup+u_left)  &
-                                   - ne_lup  * u(ij+u_lup,l)        * de(ij+u_lup) )                               
-
-             hv =   Riv2(ij,vup)          * rhodz(ij,l)           &
-                  + Riv2(ij+t_rup,vldown) * rhodz(ij+t_rup,l)     &
-                  + Riv2(ij+t_lup,vrdown) * rhodz(ij+t_lup,l)
-             qv(ij+z_up,l) = ( etav+fv(ij+z_up) )/hv
-
-             etav = 1./Av(ij+z_down)*(  ne_ldown * u(ij+u_ldown,l)          * de(ij+u_ldown)          &
-                                      + ne_right * u(ij+t_ldown+u_right,l)  * de(ij+t_ldown+u_right)  &
-                                      - ne_rdown * u(ij+u_rdown,l)          * de(ij+u_rdown) )
-             hv =   Riv2(ij,vdown)        * rhodz(ij,l)          &
-                  + Riv2(ij+t_ldown,vrup) * rhodz(ij+t_ldown,l)  &
-                  + Riv2(ij+t_rdown,vlup) * rhodz(ij+t_rdown,l)
-             qv(ij+z_down,l) =( etav+fv(ij+z_down) )/hv
-          END IF
+          etav= 1./Av(ij+z_up)*(  ne_rup  * u(ij+u_rup,l)   &
+                  + ne_left * u(ij+t_rup+u_left,l)          &
+                  - ne_lup  * u(ij+u_lup,l) )                               
+          hv =   Riv2(ij,vup)          * rhodz(ij,l)        &
+               + Riv2(ij+t_rup,vldown) * rhodz(ij+t_rup,l)  &
+               + Riv2(ij+t_lup,vrdown) * rhodz(ij+t_lup,l)
+          qv(ij+z_up,l) = ( etav+fv(ij+z_up) )/hv
+          
+          etav = 1./Av(ij+z_down)*(  ne_ldown * u(ij+u_ldown,l)   &
+               + ne_right * u(ij+t_ldown+u_right,l)               &
+               - ne_rdown * u(ij+u_rdown,l) )
+          hv =   Riv2(ij,vdown)        * rhodz(ij,l)              &
+               + Riv2(ij+t_ldown,vrup) * rhodz(ij+t_ldown,l)      &
+               + Riv2(ij+t_rdown,vlup) * rhodz(ij+t_rdown,l)
+          qv(ij+z_down,l) =( etav+fv(ij+z_down) )/hv
        ENDDO
 
Index: /codes/icosagcm/trunk/src/hevi_scheme.f90
===================================================================
--- /codes/icosagcm/trunk/src/hevi_scheme.f90	(revision 520)
+++ /codes/icosagcm/trunk/src/hevi_scheme.f90	(revision 521)
@@ -4,5 +4,4 @@
   USE field_mod
   USE euler_scheme_mod
-  USE caldyn_kernels_base_mod, ONLY : DEC
   IMPLICIT NONE
   PRIVATE
@@ -60,5 +59,5 @@
     REAL(rstd),POINTER :: hflux(:,:),wflux(:,:),hfluxt(:,:),wfluxt(:,:)
 
-    IF(DEC) CALL legacy_to_DEC(f_ps, f_u)
+    CALL legacy_to_DEC(f_ps, f_u)
     DO j=1,nb_stage
        CALL caldyn_hevi((j==1) .AND. (MOD(it,itau_out)==0), taujj(j), &
@@ -97,5 +96,5 @@
        END DO
     END DO
-    IF(DEC) CALL DEC_to_legacy(f_ps, f_u)
+    CALL DEC_to_legacy(f_ps, f_u)
   END SUBROUTINE HEVI_scheme
   
