   !!======================================================================

  SUBROUTINE obc2d_rank

   !&E---------------------------------------------------------------------
   !&E                 ***  ROUTINE obc2d_rank  ***
   !&E
   !&E ** Purpose : Choice of kind of grid (rotated or not)
   !&E
   !&E ** Description : CPP key key_grid_rotated for use of rotated grid
   !&E
   !&E ** Called by :
   !&E
   !&E ** External calls :
   !&E
   !&E ** Used ij-arrays :
   !&E
   !&E ** Modified variables :
   !&E
   !&E ** Reference :
   !&E
   !&E ** History :
   !&E       !  1987-02  (J.-C. Salomon, P. Lazure)  Original code
   !&E       !  1990-10  (F. Dumas ) new formulation
   !&E
   !&E---------------------------------------------------------------------
   !! * Modules used
   USE comvars2d, ONLY : l_tide_surge
#ifdef key_grid_rotated
   CALL obc2d_rank_rotated
#else
   IF (l_tide_surge) THEN
     CALL obc2d_rank_default
     CALL obc2d_rank_default_surge
   ELSE
#ifdef key_lagoon
     CALL obc2d_rank_lagoon
#else
     CALL obc2d_rank_default
#endif
   END IF
#endif

  END SUBROUTINE obc2d_rank
