Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icblbc.F90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icblbc.F90	(revision 14650)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icblbc.F90	(revision 14651)
@@ -43,6 +43,6 @@
 
    TYPE, PUBLIC :: buffer
-      INTEGER :: size = 0
-      REAL(wp), DIMENSION(:,:), POINTER ::   data
+      INTEGER :: buff_size = 0
+      REAL(wp), DIMENSION(:,:), POINTER ::   buff_data
    END TYPE buffer
 
@@ -285,13 +285,13 @@
       ENDIF
       
-      IF( ibergs_to_send_w > 0 ) CALL mppsend( 13, obuffer_w%data, ibergs_to_send_w*jp_buffer_width, ipe_W, iml_req2 )
-      IF( ibergs_to_send_e > 0 ) CALL mppsend( 14, obuffer_e%data, ibergs_to_send_e*jp_buffer_width, ipe_E, iml_req3 )
+      IF( ibergs_to_send_w > 0 ) CALL mppsend( 13, obuffer_w%buff_data, ibergs_to_send_w*jp_buffer_width, ipe_W, iml_req2 )
+      IF( ibergs_to_send_e > 0 ) CALL mppsend( 14, obuffer_e%buff_data, ibergs_to_send_e*jp_buffer_width, ipe_E, iml_req3 )
       IF( ibergs_rcvd_from_e > 0 ) THEN
          CALL icb_increase_ibuffer(ibuffer_e, ibergs_rcvd_from_e)
-         CALL mpprecv( 13, ibuffer_e%data, ibergs_rcvd_from_e*jp_buffer_width )
+         CALL mpprecv( 13, ibuffer_e%buff_data, ibergs_rcvd_from_e*jp_buffer_width )
       ENDIF
       IF( ibergs_rcvd_from_w > 0 ) THEN
          CALL icb_increase_ibuffer(ibuffer_w, ibergs_rcvd_from_w)
-         CALL mpprecv( 14, ibuffer_w%data, ibergs_rcvd_from_w*jp_buffer_width )
+         CALL mpprecv( 14, ibuffer_w%buff_data, ibergs_rcvd_from_w*jp_buffer_width )
       ENDIF
       IF( ibergs_to_send_w > 0 ) CALL mpi_wait( iml_req2, iml_stat, iml_err )
@@ -299,5 +299,5 @@
       DO i = 1, ibergs_rcvd_from_e
          IF( nn_verbose_level >= 4 ) THEN
-            WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_e%data(16,i)),' from east'
+            WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_e%buff_data(16,i)),' from east'
             CALL FLUSH( numicb )
          ENDIF
@@ -306,5 +306,5 @@
       DO i = 1, ibergs_rcvd_from_w
          IF( nn_verbose_level >= 4 ) THEN
-            WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_w%data(16,i)),' from west'
+            WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_w%buff_data(16,i)),' from west'
             CALL FLUSH( numicb )
          ENDIF
@@ -370,13 +370,13 @@
       ENDIF
 
-      IF( ibergs_to_send_s > 0 ) CALL mppsend( 17, obuffer_s%data, ibergs_to_send_s*jp_buffer_width, ipe_S, iml_req2 )
-      IF( ibergs_to_send_n > 0 ) CALL mppsend( 18, obuffer_n%data, ibergs_to_send_n*jp_buffer_width, ipe_N, iml_req3 )
+      IF( ibergs_to_send_s > 0 ) CALL mppsend( 17, obuffer_s%buff_data, ibergs_to_send_s*jp_buffer_width, ipe_S, iml_req2 )
+      IF( ibergs_to_send_n > 0 ) CALL mppsend( 18, obuffer_n%buff_data, ibergs_to_send_n*jp_buffer_width, ipe_N, iml_req3 )
       IF( ibergs_rcvd_from_n > 0 ) THEN
          CALL icb_increase_ibuffer(ibuffer_n, ibergs_rcvd_from_n)
-         CALL mpprecv( 17, ibuffer_n%data, ibergs_rcvd_from_n*jp_buffer_width )
+         CALL mpprecv( 17, ibuffer_n%buff_data, ibergs_rcvd_from_n*jp_buffer_width )
       ENDIF
       IF( ibergs_rcvd_from_s > 0 ) THEN
          CALL icb_increase_ibuffer(ibuffer_s, ibergs_rcvd_from_s)
-         CALL mpprecv( 18, ibuffer_s%data, ibergs_rcvd_from_s*jp_buffer_width )
+         CALL mpprecv( 18, ibuffer_s%buff_data, ibergs_rcvd_from_s*jp_buffer_width )
       ENDIF
       IF( ibergs_to_send_s > 0 ) CALL mpi_wait( iml_req2, iml_stat, iml_err )
@@ -384,5 +384,5 @@
       DO i = 1, ibergs_rcvd_from_n
          IF( nn_verbose_level >= 4 ) THEN
-            WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_n%data(16,i)),' from north'
+            WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_n%buff_data(16,i)),' from north'
             CALL FLUSH( numicb )
          ENDIF
@@ -391,5 +391,5 @@
       DO i = 1, ibergs_rcvd_from_s
          IF( nn_verbose_level >= 4 ) THEN
-            WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_s%data(16,i)),' from south'
+            WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_s%buff_data(16,i)),' from south'
             CALL FLUSH( numicb )
          ENDIF
@@ -637,5 +637,5 @@
    
             IF( ibergs_to_send > 0 )  &
-                CALL mppsend( 12, obuffer_f%data, ibergs_to_send*jp_buffer_width, ifldproc-1, nicbfldreq(jn) )
+                CALL mppsend( 12, obuffer_f%buff_data, ibergs_to_send*jp_buffer_width, ifldproc-1, nicbfldreq(jn) )
             !
          ENDIF
@@ -652,10 +652,10 @@
             IF( ibergs_to_rcv  > 0 ) THEN
                CALL icb_increase_ibuffer(ibuffer_f, ibergs_to_rcv)
-               CALL mpprecv( 12, ibuffer_f%data, ibergs_to_rcv*jp_buffer_width, ifldproc-1 )
+               CALL mpprecv( 12, ibuffer_f%buff_data, ibergs_to_rcv*jp_buffer_width, ifldproc-1 )
             ENDIF
             !
             DO jk = 1, ibergs_to_rcv
                IF( nn_verbose_level >= 4 ) THEN
-                  WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_f%data(16,jk)),' from north fold'
+                  WRITE(numicb,*) 'bergstep ',nktberg,' unpacking berg ',INT(ibuffer_f%buff_data(16,jk)),' from north fold'
                   CALL flush( numicb )
                ENDIF
@@ -690,26 +690,26 @@
       !
       IF( .NOT. ASSOCIATED(pbuff) ) CALL icb_increase_buffer( pbuff, jp_delta_buf )
-      IF( kb .GT. pbuff%size ) CALL icb_increase_buffer( pbuff, jp_delta_buf )
+      IF( kb .GT. pbuff%buff_size ) CALL icb_increase_buffer( pbuff, jp_delta_buf )
 
       !! pack points into buffer
 
-      pbuff%data( 1,kb) = berg%current_point%lon
-      pbuff%data( 2,kb) = berg%current_point%lat
-      pbuff%data( 3,kb) = berg%current_point%uvel
-      pbuff%data( 4,kb) = berg%current_point%vvel
-      pbuff%data( 5,kb) = berg%current_point%xi
-      pbuff%data( 6,kb) = berg%current_point%yj
-      pbuff%data( 7,kb) = float(berg%current_point%year)
-      pbuff%data( 8,kb) = berg%current_point%day
-      pbuff%data( 9,kb) = berg%current_point%mass
-      pbuff%data(10,kb) = berg%current_point%thickness
-      pbuff%data(11,kb) = berg%current_point%width
-      pbuff%data(12,kb) = berg%current_point%length
-      pbuff%data(13,kb) = berg%current_point%mass_of_bits
-      pbuff%data(14,kb) = berg%current_point%heat_density
-
-      pbuff%data(15,kb) = berg%mass_scaling
+      pbuff%buff_data( 1,kb) = berg%current_point%lon
+      pbuff%buff_data( 2,kb) = berg%current_point%lat
+      pbuff%buff_data( 3,kb) = berg%current_point%uvel
+      pbuff%buff_data( 4,kb) = berg%current_point%vvel
+      pbuff%buff_data( 5,kb) = berg%current_point%xi
+      pbuff%buff_data( 6,kb) = berg%current_point%yj
+      pbuff%buff_data( 7,kb) = float(berg%current_point%year)
+      pbuff%buff_data( 8,kb) = berg%current_point%day
+      pbuff%buff_data( 9,kb) = berg%current_point%mass
+      pbuff%buff_data(10,kb) = berg%current_point%thickness
+      pbuff%buff_data(11,kb) = berg%current_point%width
+      pbuff%buff_data(12,kb) = berg%current_point%length
+      pbuff%buff_data(13,kb) = berg%current_point%mass_of_bits
+      pbuff%buff_data(14,kb) = berg%current_point%heat_density
+
+      pbuff%buff_data(15,kb) = berg%mass_scaling
       DO k=1,nkounts
-         pbuff%data(15+k,kb) = REAL( berg%number(k), wp )
+         pbuff%buff_data(15+k,kb) = REAL( berg%number(k), wp )
       END DO
       !
@@ -729,22 +729,22 @@
       !!----------------------------------------------------------------------
       !
-      pt%lon            =      pbuff%data( 1,kb)
-      pt%lat            =      pbuff%data( 2,kb)
-      pt%uvel           =      pbuff%data( 3,kb)
-      pt%vvel           =      pbuff%data( 4,kb)
-      pt%xi             =      pbuff%data( 5,kb)
-      pt%yj             =      pbuff%data( 6,kb)
-      pt%year           = INT( pbuff%data( 7,kb) )
-      pt%day            =      pbuff%data( 8,kb)
-      pt%mass           =      pbuff%data( 9,kb)
-      pt%thickness      =      pbuff%data(10,kb)
-      pt%width          =      pbuff%data(11,kb)
-      pt%length         =      pbuff%data(12,kb)
-      pt%mass_of_bits   =      pbuff%data(13,kb)
-      pt%heat_density   =      pbuff%data(14,kb)
-
-      currentberg%mass_scaling =      pbuff%data(15,kb)
+      pt%lon            =      pbuff%buff_data( 1,kb)
+      pt%lat            =      pbuff%buff_data( 2,kb)
+      pt%uvel           =      pbuff%buff_data( 3,kb)
+      pt%vvel           =      pbuff%buff_data( 4,kb)
+      pt%xi             =      pbuff%buff_data( 5,kb)
+      pt%yj             =      pbuff%buff_data( 6,kb)
+      pt%year           = INT( pbuff%buff_data( 7,kb) )
+      pt%day            =      pbuff%buff_data( 8,kb)
+      pt%mass           =      pbuff%buff_data( 9,kb)
+      pt%thickness      =      pbuff%buff_data(10,kb)
+      pt%width          =      pbuff%buff_data(11,kb)
+      pt%length         =      pbuff%buff_data(12,kb)
+      pt%mass_of_bits   =      pbuff%buff_data(13,kb)
+      pt%heat_density   =      pbuff%buff_data(14,kb)
+
+      currentberg%mass_scaling =      pbuff%buff_data(15,kb)
       DO ik = 1, nkounts
-         currentberg%number(ik) = INT( pbuff%data(15+ik,kb) )
+         currentberg%number(ik) = INT( pbuff%buff_data(15+ik,kb) )
       END DO
       !
@@ -764,12 +764,12 @@
       !
       IF( .NOT. ASSOCIATED(old) ) THEN   ;   inew_size = kdelta
-      ELSE                               ;   inew_size = old%size + kdelta
+      ELSE                               ;   inew_size = old%buff_size + kdelta
       ENDIF
       ALLOCATE( new )
-      ALLOCATE( new%data( jp_buffer_width, inew_size) )
-      new%size = inew_size
+      ALLOCATE( new%buff_data( jp_buffer_width, inew_size) )
+      new%buff_size = inew_size
       IF( ASSOCIATED(old) ) THEN
-         new%data(:,1:old%size) = old%data(:,1:old%size)
-         DEALLOCATE(old%data)
+         new%buff_data(:,1:old%buff_size) = old%buff_data(:,1:old%buff_size)
+         DEALLOCATE(old%buff_data)
          DEALLOCATE(old)
       ENDIF
@@ -793,7 +793,7 @@
          iold_size = 0
       ELSE
-         iold_size = old%size
-         IF( kdelta .LT. old%size ) THEN
-            inew_size = old%size + kdelta
+         iold_size = old%buff_size
+         IF( kdelta .LT. old%buff_size ) THEN
+            inew_size = old%buff_size + kdelta
          ELSE
             inew_size = kdelta + jp_delta_buf
@@ -803,9 +803,9 @@
       IF( iold_size .NE. inew_size ) THEN
          ALLOCATE( new )
-         ALLOCATE( new%data( jp_buffer_width, inew_size) )
-         new%size = inew_size
+         ALLOCATE( new%buff_data( jp_buffer_width, inew_size) )
+         new%buff_size = inew_size
          IF( ASSOCIATED(old) ) THEN
-            new%data(:,1:old%size) = old%data(:,1:old%size)
-            DEALLOCATE(old%data)
+            new%buff_data(:,1:old%buff_size) = old%buff_data(:,1:old%buff_size)
+            DEALLOCATE(old%buff_data)
             DEALLOCATE(old)
          ENDIF
