Index: branches/2013/dev_r3891_METO1_MERCATOR6_OBC_BDY_merge/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- branches/2013/dev_r3891_METO1_MERCATOR6_OBC_BDY_merge/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 3898)
+++ branches/2013/dev_r3891_METO1_MERCATOR6_OBC_BDY_merge/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 3900)
@@ -108,5 +108,5 @@
             nblenrim => idx_bdy(ib_bdy)%nblenrim
 
-            IF( nn_dyn2d(ib_bdy) .gt. 0 .and. nn_dyn2d_dta(ib_bdy) .eq. 0 ) THEN 
+            IF( cn_dyn2d(ib_bdy) /= 'none' .and. nn_dyn2d_dta(ib_bdy) .eq. 0 ) THEN 
                ilen1(:) = nblen(:)
                igrd = 1
@@ -130,5 +130,5 @@
             ENDIF
 
-            IF( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 0 ) THEN 
+            IF( cn_dyn3d(ib_bdy) /= 'none' .and. nn_dyn3d_dta(ib_bdy) .eq. 0 ) THEN 
                ilen1(:) = nblen(:)
                igrd = 2 
@@ -150,5 +150,5 @@
             ENDIF
 
-            IF( nn_tra(ib_bdy) .gt. 0 .and. nn_tra_dta(ib_bdy) .eq. 0 ) THEN 
+            IF( cn_tra(ib_bdy) /= 'none' .and. nn_tra_dta(ib_bdy) .eq. 0 ) THEN 
                ilen1(:) = nblen(:)
                igrd = 1                       ! Everything is at T-points here
@@ -193,5 +193,5 @@
                ! Update barotropic boundary conditions only
                ! jit is optional argument for fld_read and bdytide_update
-               IF( nn_dyn2d(ib_bdy) .gt. 0 ) THEN
+               IF( cn_dyn2d(ib_bdy) /= 'none' ) THEN
                   IF( nn_dyn2d_dta(ib_bdy) .eq. 2 ) THEN ! tidal harmonic forcing ONLY: initialise arrays
                      dta_bdy(ib_bdy)%ssh(:) = 0.0
@@ -199,5 +199,5 @@
                      dta_bdy(ib_bdy)%v2d(:) = 0.0
                   ENDIF
-                  IF (nn_tra(ib_bdy).ne.4) THEN
+                  IF (cn_tra(ib_bdy) /= 'runoff') THEN
                      IF( nn_dyn2d_dta(ib_bdy) .EQ. 1 .OR. nn_dyn2d_dta(ib_bdy) .EQ. 3 .OR.  &
                        & (ln_full_vel_array(ib_bdy) .AND. nn_dyn3d_dta(ib_bdy).eq.1) )THEN
@@ -205,8 +205,8 @@
                         ! For the runoff case, no need to update the forcing (already done in the baroclinic part)
                         jend = nb_bdy_fld(ib_bdy)
-                        IF ( nn_tra(ib_bdy) .GT. 0 .AND. nn_tra_dta(ib_bdy) .GE. 1 ) jend = jend - 2
+                        IF ( cn_tra(ib_bdy) /= 'none' .AND. nn_tra_dta(ib_bdy) .GE. 1 ) jend = jend - 2
                         CALL fld_read( kt=kt, kn_fsbc=1, sd=bf(jstart:jend), map=nbmap_ptr(jstart:jend),  &
-                                     & kit=jit, kt_offset=time_offset )
-                        IF ( nn_tra(ib_bdy) .GT. 0 .AND. nn_tra_dta(ib_bdy) .GE. 1 ) jend = jend + 2
+                                     & jit=jit, time_offset=time_offset )
+                        IF ( cn_tra(ib_bdy) /= 'none' .AND. nn_tra_dta(ib_bdy) .GE. 1 ) jend = jend + 2
 
                         ! If full velocities in boundary data then split into barotropic and baroclinic data
@@ -252,8 +252,8 @@
                ENDIF
             ELSE
-               IF (nn_tra(ib_bdy).eq.4) then      ! runoff condition
+               IF (cn_tra(ib_bdy) == 'runoff') then      ! runoff condition
                   jend = nb_bdy_fld(ib_bdy)
                   CALL fld_read( kt=kt, kn_fsbc=1, sd=bf(jstart:jend),  &
-                               & map=nbmap_ptr(jstart:jend), kt_offset=time_offset )
+                               & map=nbmap_ptr(jstart:jend), time_offset=time_offset )
                   !
                   igrd = 2                      ! zonal velocity
@@ -271,5 +271,5 @@
                   END DO
                ELSE
-                  IF( nn_dyn2d(ib_bdy) .gt. 0 .and. nn_dyn2d_dta(ib_bdy) .eq. 2 ) THEN ! tidal harmonic forcing ONLY: initialise arrays
+                  IF( cn_dyn2d(ib_bdy) /= 'none' .and. nn_dyn2d_dta(ib_bdy) .eq. 2 ) THEN ! tidal harmonic forcing ONLY: initialise arrays
                      dta_bdy(ib_bdy)%ssh(:) = 0.0
                      dta_bdy(ib_bdy)%u2d(:) = 0.0
@@ -279,5 +279,5 @@
                      jend = nb_bdy_fld(ib_bdy)
                      CALL fld_read( kt=kt, kn_fsbc=1, sd=bf(jstart:jend), &
-                                  & map=nbmap_ptr(jstart:jend), kt_offset=time_offset )
+                                  & map=nbmap_ptr(jstart:jend), time_offset=time_offset )
                   ENDIF
                   ! If full velocities in boundary data then split into barotropic and baroclinic data
@@ -314,5 +314,5 @@
                      END DO
                   ENDIF
-                  IF( nn_dyn2d(ib_bdy) .gt. 0 .and. nn_dyn2d_dta(ib_bdy) .ge. 2 ) THEN ! update tidal harmonic forcing
+                  IF( cn_dyn2d(ib_bdy) /= 'none' .and. nn_dyn2d_dta(ib_bdy) .ge. 2 ) THEN ! update tidal harmonic forcing
                      CALL bdytide_update( kt=kt, idx=idx_bdy(ib_bdy), dta=dta_bdy(ib_bdy),  &
                                         & td=tides(ib_bdy), time_offset=time_offset )
@@ -326,5 +326,5 @@
       IF ( ln_apr_obc ) THEN
          DO ib_bdy = 1, nb_bdy
-            IF (nn_tra(ib_bdy).NE.4)THEN
+            IF (cn_tra(ib_bdy) /= 'runoff')THEN
                igrd = 1                      ! meridional velocity
                DO ib = 1, idx_bdy(ib_bdy)%nblenrim(igrd)
@@ -403,11 +403,11 @@
       nb_bdy_fld(:) = 0
       DO ib_bdy = 1, nb_bdy         
-         IF( nn_dyn2d(ib_bdy) .gt. 0 .and. ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) THEN
+         IF( cn_dyn2d(ib_bdy) /= 'none' .and. ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) THEN
             nb_bdy_fld(ib_bdy) = nb_bdy_fld(ib_bdy) + 3
          ENDIF
-         IF( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ) THEN
+         IF( cn_dyn3d(ib_bdy) /= 'none' .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ) THEN
             nb_bdy_fld(ib_bdy) = nb_bdy_fld(ib_bdy) + 2
          ENDIF
-         IF( nn_tra(ib_bdy) .gt. 0 .and. nn_tra_dta(ib_bdy) .eq. 1  ) THEN
+         IF( cn_tra(ib_bdy) /= 'none' .and. nn_tra_dta(ib_bdy) .eq. 1  ) THEN
             nb_bdy_fld(ib_bdy) = nb_bdy_fld(ib_bdy) + 2
          ENDIF
@@ -474,7 +474,7 @@
             ! Only read in necessary fields for this set.
             ! Important that barotropic variables come first.
-            IF( nn_dyn2d(ib_bdy) .gt. 0 .and. ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) THEN 
-
-               IF( nn_tra(ib_bdy) .ne. 4 ) THEN ! runoff condition : no ssh reading
+            IF( cn_dyn2d(ib_bdy) /= 'none' .and. ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) THEN 
+
+               IF( cn_tra(ib_bdy) /= 'runoff' ) THEN ! runoff condition : no ssh reading
                   jfld = jfld + 1
                   blf_i(jfld) = bn_ssh
@@ -504,6 +504,6 @@
 
             ! baroclinic velocities
-            IF( ( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ) .or. &
-           &      ( ln_full_vel_array(ib_bdy) .and. nn_dyn2d(ib_bdy) .gt. 0 .and.  &
+            IF( ( cn_dyn3d(ib_bdy) /= 'none' .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ) .or. &
+           &      ( ln_full_vel_array(ib_bdy) .and. cn_dyn2d(ib_bdy) /= 'none' .and.  &
            &        ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) ) THEN
 
@@ -525,5 +525,5 @@
 
             ! temperature and salinity
-            IF( nn_tra(ib_bdy) .gt. 0 .and. nn_tra_dta(ib_bdy) .eq. 1 ) THEN
+            IF( cn_tra(ib_bdy) /= 'none' .and. nn_tra_dta(ib_bdy) .eq. 1 ) THEN
 
                jfld = jfld + 1
@@ -611,5 +611,5 @@
          nblenrim => idx_bdy(ib_bdy)%nblenrim
 
-         IF (nn_dyn2d(ib_bdy) .gt. 0) THEN
+         IF (cn_dyn2d(ib_bdy) /= 'none') THEN
             IF( nn_dyn2d_dta(ib_bdy) .eq. 0 .or. nn_dyn2d_dta(ib_bdy) .eq. 2 .or. ln_full_vel_array(ib_bdy) ) THEN
                ilen0(1:3) = nblen(1:3)
@@ -623,5 +623,5 @@
                ENDIF
             ELSE
-               IF( nn_dyn2d(ib_bdy) .ne. jp_frs ) THEN
+               IF( cn_dyn2d(ib_bdy) /= 'frs' ) THEN
                   jfld = jfld + 1
                   dta_bdy(ib_bdy)%ssh => bf(jfld)%fnow(:,1,1)
@@ -634,11 +634,11 @@
          ENDIF
 
-         IF ( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 0 ) THEN
+         IF ( cn_dyn3d(ib_bdy) /= 'none' .and. nn_dyn3d_dta(ib_bdy) .eq. 0 ) THEN
             ilen0(1:3) = nblen(1:3)
             ALLOCATE( dta_bdy(ib_bdy)%u3d(ilen0(2),jpk) )
             ALLOCATE( dta_bdy(ib_bdy)%v3d(ilen0(3),jpk) )
          ENDIF
-         IF ( ( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ).or. &
-           &  ( ln_full_vel_array(ib_bdy) .and. nn_dyn2d(ib_bdy) .gt. 0 .and.   &
+         IF ( ( cn_dyn3d(ib_bdy) /= 'none' .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ).or. &
+           &  ( ln_full_vel_array(ib_bdy) .and. cn_dyn2d(ib_bdy) /= 'none' .and.   &
            &    ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) ) THEN
             jfld = jfld + 1
@@ -648,5 +648,5 @@
          ENDIF
 
-         IF (nn_tra(ib_bdy) .gt. 0) THEN
+         IF (cn_tra(ib_bdy) /= 'none') THEN
             IF( nn_tra_dta(ib_bdy) .eq. 0 ) THEN
                ilen0(1:3) = nblen(1:3)
