Index: /NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/diaobs.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/diaobs.F90	(revision 15496)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/diaobs.F90	(revision 15497)
@@ -170,11 +170,8 @@
       jenabled = 0
       DO jgroup = 1, nn_obsgroups
-         CALL obs_group_read ( sobsgroups(jgroup) )
+         CALL obs_group_read_namelist( sobsgroups(jgroup) )
          CALL obs_group_check( sobsgroups(jgroup), jgroup )
          IF (sobsgroups(jgroup)%lenabled) THEN
             jenabled = jenabled + 1
-            IF( sobsgroups(jgroup)%lvel  .AND.  .NOT.ln_grid_global ) THEN
-               CALL ctl_stop( 'Velocity data only works with ln_grid_global=.true.' )
-            ENDIF
          ENDIF
       END DO
@@ -187,5 +184,4 @@
       ENDIF
 
-
       !-----------------------------------------------------------------------
       ! Obs operator parameter checking and initialisations
@@ -202,6 +198,6 @@
       !
       DO jgroup = 1, nn_obsgroups
-         IF (sobsgroups(jgroup)%lenabled) THEN
-            IF (sobsgroups(jgroup)%lprof) THEN
+         IF ( sobsgroups(jgroup)%lenabled ) THEN
+            IF ( sobsgroups(jgroup)%lprof ) THEN
                !
                ! Read in profile or profile obs types
@@ -328,7 +324,4 @@
                      &              sobsgroups(jgroup)%rmdtcutoff )
                   IF( sobsgroups(jgroup)%laltbias ) THEN
-                     !CALL obs_rea_altbias( sobsgroups(jgroup)%ssurfdataqc, &
-                     !   &                  sobsgroups(jgroup)%n2dint,      &
-                     !   &                  sobsgroups(jgroup)%caltbiasfile )
                      CALL obs_app_bias( sobsgroups(jgroup)%ssurfdataqc,   &
                         &               sobsgroups(jgroup)%next_mdt,      & 
@@ -439,7 +432,7 @@
 
       DO jgroup = 1, nn_obsgroups
-         IF (sobsgroups(jgroup)%lenabled) THEN
-
-            IF (sobsgroups(jgroup)%lprof) THEN
+         IF ( sobsgroups(jgroup)%lenabled ) THEN
+
+            IF ( sobsgroups(jgroup)%lprof ) THEN
 
                zprofclim(:,:,:) = fbrmdi
Index: /NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_group_def.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_group_def.F90	(revision 15496)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_group_def.F90	(revision 15497)
@@ -2,11 +2,12 @@
    !!=====================================================================
    !!                       ***  MODULE obs_group_def  ***
-   !! Observation diagnostics: Routines specific to model variables
+   !! Observation diagnostics: Routines specific to observation groups
    !!=====================================================================
    !! History : 4.0  !  2021-06  (D Ford)  Original code
    !!----------------------------------------------------------------------
-   !!   obs_group_alloc   : allocate observation group types
-   !!   obs_group_dealloc : deallocate observation group types
-   !!   obs_group_check   : check observation group options
+   !!   obs_group_alloc         : allocate observation group types
+   !!   obs_group_dealloc       : deallocate observation group types
+   !!   obs_group_read_namelist : read observation group namelists
+   !!   obs_group_check         : check observation group options
    !!----------------------------------------------------------------------
 
@@ -19,4 +20,6 @@
    USE tradmp, ONLY : &   ! Damping to climatology
       & ln_tradmp
+   USE obs_grid, ONLY : & ! Use global distribution of observations
+      & ln_grid_global
 
    IMPLICIT NONE
@@ -26,8 +29,8 @@
 
    PUBLIC &
-      & obs_group,         &
-      & obs_group_alloc,   &
-      & obs_group_dealloc, &
-      & obs_group_read,    &
+      & obs_group,               &
+      & obs_group_alloc,         &
+      & obs_group_dealloc,       &
+      & obs_group_read_namelist, &
       & obs_group_check
 
@@ -165,7 +168,7 @@
 
 
-   SUBROUTINE obs_group_read( sdobsgroup )
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE obs_group_read  ***
+   SUBROUTINE obs_group_read_namelist( sdobsgroup )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE obs_group_read_namelist  ***
       !!
       !! ** Purpose : - Read namelist for observation group types
@@ -388,5 +391,5 @@
       ENDIF
 
-   END SUBROUTINE obs_group_read
+   END SUBROUTINE obs_group_read_namelist
 
 
@@ -504,5 +507,9 @@
                   CALL ctl_stop( ' No altimeter bias file specified' )
                ENDIF
-            ENDIF   
+            ENDIF
+
+            IF( sdobsgroup%lvel .AND. (.NOT. ln_grid_global) ) THEN
+               CALL ctl_stop( ' Velocity data only works with ln_grid_global=.true.' )
+            ENDIF
 
          ENDIF
