Index: branches/2012/dev_r3452_UKMO2_DIADCT/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
===================================================================
--- branches/2012/dev_r3452_UKMO2_DIADCT/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 3518)
+++ branches/2012/dev_r3452_UKMO2_DIADCT/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 3522)
@@ -73,6 +73,6 @@
   INTEGER, PARAMETER :: nb_sec_max    = 150
   INTEGER, PARAMETER :: nb_point_max  = 2000
-  INTEGER, PARAMETER :: nb_type_class = 14
-  INTEGER, PARAMETER :: nb_3d_vars    = 5 
+  INTEGER, PARAMETER :: nb_type_class = 10
+  INTEGER, PARAMETER :: nb_3d_vars    = 3 
   INTEGER, PARAMETER :: nb_2d_vars    = 2 
   INTEGER            :: nb_sec 
@@ -740,8 +740,6 @@
   
               IF ( sec%llstrpond ) THEN 
-                 transports_3d(2,jsec,jseg,jk) = transports_3d(2,jsec,jseg,jk)  + zTnorm * zrhoi 
-                 transports_3d(3,jsec,jseg,jk) = transports_3d(3,jsec,jseg,jk)  + zTnorm * zrhop 
-                 transports_3d(4,jsec,jseg,jk) = transports_3d(4,jsec,jseg,jk)  + zTnorm * (ztn + 273.15) * zrhop * rcp
-                 transports_3d(5,jsec,jseg,jk) = transports_3d(5,jsec,jseg,jk)  + zTnorm * zsn * zrhop * 0.001
+                 transports_3d(2,jsec,jseg,jk) = transports_3d(2,jsec,jseg,jk)  + zTnorm * (ztn + 273.15) * zrhop * rcp
+                 transports_3d(3,jsec,jseg,jk) = transports_3d(3,jsec,jseg,jk)  + zTnorm * zsn * zrhop * 0.001
               ENDIF
    
@@ -773,9 +771,7 @@
                                    (1.0 - frld(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J))  & 
                                   *(hsnif(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J) +  & 
-                                    hicif(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J)) & 
-                                   +zice_vol_pos 
+                                    hicif(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J))
               transports_2d(2,jsec,jseg) = transports_2d(2,jsec,jseg) + (zTnorm)*   & 
-                                    (1.0 -  frld(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J))  & 
-                                   +zice_surf_pos 
+                                    (1.0 -  frld(sec%listPoint(jseg)%I,sec%listPoint(jseg)%J))
    
            ENDIF !end of ice case
@@ -925,30 +921,14 @@
                     IF( sec%llstrpond )THEN 
  
-                       IF( transports_3d(1,jsec,jseg,jk) .NE. 0._wp ) THEN 
- 
-                          IF (transports_3d(2,jsec,jseg,jk)/transports_3d(1,jsec,jseg,jk) .GE. 0.0 ) THEN 
-                             sec%transport(3,jclass) = sec%transport(3,jclass)+transports_3d(2,jsec,jseg,jk)/transports_3d(1,jsec,jseg,jk) 
-                          ELSE 
-                             sec%transport(4,jclass) = sec%transport(4,jclass)+transports_3d(2,jsec,jseg,jk)/transports_3d(1,jsec,jseg,jk) 
-                          ENDIF 
- 
-                          IF ( transports_3d(3,jsec,jseg,jk)/transports_3d(1,jsec,jseg,jk) .GE. 0.0 ) THEN 
-                             sec%transport(5,jclass) = sec%transport(5,jclass)+transports_3d(3,jsec,jseg,jk)/transports_3d(1,jsec,jseg,jk) 
-                          ELSE 
-                             sec%transport(6,jclass) = sec%transport(6,jclass)+transports_3d(3,jsec,jseg,jk)/transports_3d(1,jsec,jseg,jk) 
-                          ENDIF 
-  
+                       IF ( transports_3d(2,jsec,jseg,jk) .GE. 0.0 ) THEN 
+                          sec%transport(3,jclass) = sec%transport(3,jclass)+transports_3d(2,jsec,jseg,jk) 
+                       ELSE 
+                          sec%transport(4,jclass) = sec%transport(4,jclass)+transports_3d(2,jsec,jseg,jk) 
                        ENDIF 
  
-                       IF ( transports_3d(4,jsec,jseg,jk) .GE. 0.0 ) THEN 
-                          sec%transport(7,jclass) = sec%transport(7,jclass)+transports_3d(4,jsec,jseg,jk) 
+                       IF ( transports_3d(3,jsec,jseg,jk) .GE. 0.0 ) THEN 
+                          sec%transport(5,jclass) = sec%transport(5,jclass)+transports_3d(3,jsec,jseg,jk) 
                        ELSE 
-                          sec%transport(8,jclass) = sec%transport(8,jclass)+transports_3d(4,jsec,jseg,jk) 
-                       ENDIF 
- 
-                       IF ( transports_3d(5,jsec,jseg,jk) .GE. 0.0 ) THEN 
-                          sec%transport( 9,jclass) = sec%transport( 9,jclass)+transports_3d(5,jsec,jseg,jk) 
-                       ELSE 
-                          sec%transport(10,jclass) = sec%transport(10,jclass)+transports_3d(5,jsec,jseg,jk) 
+                          sec%transport(6,jclass) = sec%transport(6,jclass)+transports_3d(3,jsec,jseg,jk) 
                        ENDIF 
  
@@ -958,8 +938,4 @@
                        sec%transport( 5,jclass) = 0._wp 
                        sec%transport( 6,jclass) = 0._wp 
-                       sec%transport( 7,jclass) = 0._wp 
-                       sec%transport( 8,jclass) = 0._wp 
-                       sec%transport( 9,jclass) = 0._wp 
-                       sec%transport(10,jclass) = 0._wp 
                     ENDIF 
  
@@ -976,13 +952,13 @@
  
               IF ( transports_2d(1,jsec,jseg) .GE. 0.0 ) THEN 
-                 sec%transport(11,1) = sec%transport(11,1)+transports_2d(1,jsec,jseg)*1.E-6 
+                 sec%transport( 7,1) = sec%transport( 7,1)+transports_2d(1,jsec,jseg)*1.E-6 
               ELSE 
-                 sec%transport(12,1) = sec%transport(12,1)+transports_2d(1,jsec,jseg)*1.E-6 
+                 sec%transport( 8,1) = sec%transport( 8,1)+transports_2d(1,jsec,jseg)*1.E-6 
               ENDIF 
  
               IF ( transports_2d(3,jsec,jseg) .GE. 0.0 ) THEN 
-                 sec%transport(13,1) = sec%transport(13,1)+transports_2d(2,jsec,jseg)*1.E-6 
+                 sec%transport( 9,1) = sec%transport( 9,1)+transports_2d(2,jsec,jseg)*1.E-6 
               ELSE 
-                 sec%transport(14,1) = sec%transport(14,1)+transports_2d(2,jsec,jseg)*1.E-6 
+                 sec%transport(10,1) = sec%transport(10,1)+transports_2d(2,jsec,jseg)*1.E-6 
               ENDIF 
  
@@ -994,6 +970,6 @@
      ELSE  !if sec%nb_point =0 
         sec%transport(1:2,:)=0. 
-        IF (sec%llstrpond) sec%transport(3:10,:)=0. 
-        IF (sec%ll_ice_section) sec%transport( 11:14,:)=0. 
+        IF (sec%llstrpond) sec%transport(3:6,:)=0. 
+        IF (sec%ll_ice_section) sec%transport(7:10,:)=0. 
      ENDIF !end of sec%nb_point =0 case 
  
@@ -1091,11 +1067,11 @@
            WRITE(numdct_heat,119) ndastp,kt,ksec,sec%name,zslope,  &
                               jclass,classe,zbnd1,zbnd2,&
-                              sec%transport(7,jclass)*1000._wp*rcp/1.e15,sec%transport(8,jclass)*1000._wp*rcp/1.e15, &
-                              ( sec%transport(7,jclass)+sec%transport(8,jclass) )*1000._wp*rcp/1.e15
+                              sec%transport(3,jclass)*1000._wp*rcp/1.e15,sec%transport(4,jclass)*1000._wp*rcp/1.e15, &
+                              ( sec%transport(3,jclass)+sec%transport(4,jclass) )*1000._wp*rcp/1.e15
            !write salt transport per class
            WRITE(numdct_salt,119) ndastp,kt,ksec,sec%name,zslope,  &
                               jclass,classe,zbnd1,zbnd2,&
-                              sec%transport(9,jclass)*1000._wp/1.e9,sec%transport(10,jclass)*1000._wp/1.e9,&
-                              (sec%transport(9,jclass)+sec%transport(10,jclass))*1000._wp/1.e9
+                              sec%transport(5,jclass)*1000._wp/1.e9,sec%transport(6,jclass)*1000._wp/1.e9,&
+                              (sec%transport(5,jclass)+sec%transport(6,jclass))*1000._wp/1.e9
         ENDIF
 
@@ -1116,11 +1092,11 @@
         WRITE(numdct_heat,119) ndastp,kt,ksec,sec%name,zslope, &
                            jclass,"total",zbnd1,zbnd2,&
-                           zsumclasses(7)* 1000._wp*rcp/1.e15,zsumclasses(8)* 1000._wp*rcp/1.e15,&
-                           (zsumclasses(7)+zsumclasses(8) )* 1000._wp*rcp/1.e15
+                           zsumclasses(3)* 1000._wp*rcp/1.e15,zsumclasses(4)* 1000._wp*rcp/1.e15,&
+                           (zsumclasses(3)+zsumclasses(4) )* 1000._wp*rcp/1.e15
         !write total salt transport
         WRITE(numdct_salt,119) ndastp,kt,ksec,sec%name,zslope, &
                            jclass,"total",zbnd1,zbnd2,&
-                           zsumclasses(9)*1000._wp/1.e9,zsumclasses(10)*1000._wp/1.e9,&
-                           (zsumclasses(9)+zsumclasses(10))*1000._wp/1.e9
+                           zsumclasses(5)*1000._wp/1.e9,zsumclasses(6)*1000._wp/1.e9,&
+                           (zsumclasses(5)+zsumclasses(6))*1000._wp/1.e9
      ENDIF
 
@@ -1130,11 +1106,11 @@
         WRITE(numdct_vol,118) ndastp,kt,ksec,sec%name,zslope,&
                               jclass,"ice_vol",zbnd1,zbnd2,&
-                              sec%transport(9,1),sec%transport(10,1),&
-                              sec%transport(9,1)+sec%transport(10,1)
+                              sec%transport(7,1),sec%transport(8,1),&
+                              sec%transport(7,1)+sec%transport(8,1)
         !write total ice surface transport
         WRITE(numdct_vol,118) ndastp,kt,ksec,sec%name,zslope,&
                               jclass,"ice_surf",zbnd1,zbnd2,&
-                              sec%transport(11,1),sec%transport(12,1), &
-                              sec%transport(11,1)+sec%transport(12,1) 
+                              sec%transport(9,1),sec%transport(10,1), &
+                              sec%transport(9,1)+sec%transport(10,1) 
      ENDIF
                                               
