Index: branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/domain_def.xml
===================================================================
--- branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/domain_def.xml	(revision 5406)
+++ branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/domain_def.xml	(revision 5409)
@@ -5,5 +5,4 @@
 	 <!--   My zoom: example of hand defined zoom   -->
          <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" />
-         <domain id="1point" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="1" zoom_nj="1" />
          <domain id="ptr" zoom_ibegin="0000"  zoom_jbegin="1" zoom_ni="1" zoom_nj="0000" />
          <!--   Eq section   -->
@@ -170,9 +169,7 @@
       </domain_group>
 
-      <domain_group id="scalarpoint">
-         <domain id="scalarpoint" long_name="scalar"/>
-         <!--
-         <domain id="1point" zoom_ibegin="1" zoom_jbegin="1" zoom_ni="1" zoom_nj="1" />
-         -->
+      <domain_group id="scalarpoint" long_name="scalar" zoom_ibegin="1" zoom_jbegin="1" zoom_ni="1" zoom_nj="1">
+         <domain id="1point"/>
+         <domain id="globalscalar" />
       </domain_group>
 
Index: branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 5406)
+++ branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 5409)
@@ -451,5 +451,5 @@
       <!-- scalar variables available with key_diaar5 -->
 
-      <field_group id="scalar"  domain_ref="1point" >
+      <field_group id="scalar"  domain_ref="globalscalar" >
          <field id="voltot"     long_name="global total volume"                          standard_name="sea_water_volume"                               unit="m3"   />
          <field id="sshtot"     long_name="global mean ssh"                              standard_name="global_average_sea_level_change"                unit="m"    />
@@ -459,5 +459,5 @@
          <field id="temptot"    long_name="global mean temperature"                      standard_name="sea_water_potential_temperature"                unit="degC" />
          <field id="saltot"     long_name="global mean salinity"                         standard_name="sea_water_salinity"                             unit="1e-3" />
-         <field id="fram_trans" long_name="Sea Ice Mass Transport Through Fram Strait"   standard_name="sea_ice_transport_across_line"                  unit="kg/s" />
+         <field id="fram_trans" long_name="Sea Ice Mass Transport Through Fram Strait"   standard_name="sea_ice_transport_across_line"                  unit="kg/s"   domain_ref="1point" />
 
       	 <!-- available with ln_diahsb -->
@@ -480,5 +480,5 @@
       <!-- LIM3 scalar variables -->
 
-      <field_group id="SBC_scalar"  domain_ref="1point" >
+      <field_group id="SBC_scalar"  domain_ref="globalscalar" >
          <!-- available with ln_limdiaout -->
          <field id="ibgvoltot"    long_name="global mean ice volume"                                 unit="km3"        />
@@ -881,5 +881,5 @@
      </field_group>
 
-     <field_group id="PISCES_scalar"  domain_ref="1point" >
+     <field_group id="PISCES_scalar"  domain_ref="globalscalar" >
        <field id="pno3tot"         long_name="global mean nitrate concentration"                  unit="mol/m3"   />
        <field id="psiltot"         long_name="global mean silicate concentration"                 unit="mol/m3"   />
Index: branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 5406)
+++ branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 5409)
@@ -127,9 +127,13 @@
          CALL set_grid( "W", glamt, gphit )
          !
-         IF( ln_cfmeta ) THEN   ! Add cell areas
+         IF( ln_cfmeta ) THEN   ! Add additional grid metadata
             CALL iom_set_domain_attr("grid_T", area = e12t(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_U", area = e12u(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_V", area = e12v(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_W", area = e12t(nldi:nlei, nldj:nlej))
+            CALL set_grid_bounds( "T", glamf, gphif, glamt, gphit ) 
+            CALL set_grid_bounds( "U", glamv, gphiv, glamu, gphiu )
+            CALL set_grid_bounds( "V", glamu, gphiu, glamv, gphiv )
+            CALL set_grid_bounds( "W", glamf, gphif, glamt, gphit )
          ENDIF
       ENDIF
@@ -145,17 +149,14 @@
          CALL dom_grid_glo   ! Return to parent grid domain
          !
-         IF( ln_cfmeta ) THEN   ! Add cell areas
+         IF( ln_cfmeta ) THEN   ! Add additional grid metadata
             CALL iom_set_domain_attr("grid_T", area = e1e2t_crs(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_V", area = e1v_crs(nldi:nlei, nldj:nlej) * e2v_crs(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_W", area = e1e2t_crs(nldi:nlei, nldj:nlej))
-         ENDIF
-      ENDIF
-
-      IF ( ln_cfmeta ) THEN   ! Add horizontal grid bounds
-         CALL set_grid_bounds( "T", cdname ) 
-         CALL set_grid_bounds( "U", cdname )
-         CALL set_grid_bounds( "V", cdname )
-         CALL set_grid_bounds( "W", cdname )
+            CALL set_grid_bounds( "T", glamf_crs, gphif_crs, glamt_crs, gphit_crs ) 
+            CALL set_grid_bounds( "U", glamv_crs, gphiv_crs, glamu_crs, gphiu_crs )
+            CALL set_grid_bounds( "V", glamu_crs, gphiu_crs, glamv_crs, gphiv_crs )
+            CALL set_grid_bounds( "W", glamf_crs, gphif_crs, glamt_crs, gphit_crs )
+         ENDIF
       ENDIF
 
@@ -1101,9 +1102,6 @@
       CHARACTER(LEN=*), INTENT(in) ::   cdname
       REAL(wp)        , INTENT(in) ::   pfield0d
-      REAL(wp)        , DIMENSION(jpi,jpj) ::   zz     ! masson
 #if defined key_iomput
-      zz(:,:)=pfield0d
-      CALL xios_send_field(cdname, zz)
-      !CALL xios_send_field(cdname, (/pfield0d/)) 
+      CALL xios_send_field(cdname, (/pfield0d/)) 
 #else
       IF( .FALSE. )   WRITE(numout,*) cdname, pfield0d   ! useless test to avoid compilation warnings
@@ -1300,5 +1298,5 @@
 
 
-   SUBROUTINE set_grid_bounds( cdgrd, cdname )
+   SUBROUTINE set_grid_bounds( cdgrd, plon_cnr, plat_cnr, plon_pnt, plat_pnt )
       !!----------------------------------------------------------------------
       !!                   ***  ROUTINE set_grid_bounds  ***
@@ -1308,9 +1306,9 @@
       !!----------------------------------------------------------------------
       CHARACTER(LEN=1) , INTENT(in) :: cdgrd
-      CHARACTER(LEN=*) , INTENT(in) :: cdname
+      !
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in)           :: plon_cnr, plat_cnr  ! Lat/lon coordinates of a contiguous vertex of cell (i,j)
+      REAL(wp), DIMENSION(jpi,jpj), OPTIONAL, INTENT(in) :: plon_pnt, plat_pnt  ! Lat/lon coordinates of the point of cell (i,j)
       !
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:)   :: z_bnds      ! Lat/lon coordinates of the vertices of cell (i,j)
-      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)     :: z_cnr       ! Lat/lon coordinates of a contiguous vertex of cell (i,j)
-      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)     :: z_pnt       ! Lat/lon coordinates of the point of cell (i,j)
       REAL(wp), ALLOCATABLE, DIMENSION(:,:)       :: z_fld       ! Working array to determine where to rotate cells
       REAL(wp), ALLOCATABLE, DIMENSION(:,:)       :: z_rot       ! Lat/lon working array for rotation of cells
@@ -1320,35 +1318,14 @@
       INTEGER :: ji, jj, jn, ni, nj
 
-      ALLOCATE( z_bnds(4,jpi,jpj,2), z_cnr(jpi,jpj,2), z_pnt(jpi,jpj,2), z_fld(jpi,jpj), z_rot(4,2)  )
-
-      ! Grid information
+      ALLOCATE( z_bnds(4,jpi,jpj,2), z_fld(jpi,jpj), z_rot(4,2)  )
+
+      ! Offset of coordinate representing bottom-left corner
       SELECT CASE ( TRIM(cdgrd) )
          CASE ('T', 'W')
             icnr = -1 ; jcnr = -1
-            IF( TRIM(cdname) == "nemo_crs" ) THEN
-               z_cnr(:,:,1) = gphif_crs ; z_cnr(:,:,2) = glamf_crs
-               z_pnt(:,:,1) = gphit_crs ; z_pnt(:,:,2) = glamt_crs
-            ELSE
-               z_cnr(:,:,1) = gphif ; z_cnr(:,:,2) = glamf
-               z_pnt(:,:,1) = gphit ; z_pnt(:,:,2) = glamt
-            ENDIF
          CASE ('U')
             icnr =  0 ; jcnr = -1
-            IF( TRIM(cdname) == "nemo_crs" ) THEN
-               z_cnr(:,:,1) = gphiv_crs ; z_cnr(:,:,2) = glamv_crs
-               z_pnt(:,:,1) = gphiu_crs ; z_pnt(:,:,2) = glamu_crs
-            ELSE
-               z_cnr(:,:,1) = gphiv ; z_cnr(:,:,2) = glamv
-               z_pnt(:,:,1) = gphiu ; z_pnt(:,:,2) = glamu
-            ENDIF
          CASE ('V')
             icnr = -1 ; jcnr =  0
-            IF( TRIM(cdname) == "nemo_crs" ) THEN
-               z_cnr(:,:,1) = gphiu_crs ; z_cnr(:,:,2) = glamu_crs
-               z_pnt(:,:,1) = gphiv_crs ; z_pnt(:,:,2) = glamv_crs
-            ELSE
-               z_cnr(:,:,1) = gphiu ; z_cnr(:,:,2) = glamu
-               z_pnt(:,:,1) = gphiv ; z_pnt(:,:,2) = glamv
-            ENDIF
       END SELECT
 
@@ -1361,8 +1338,12 @@
       DO jj = 2, jpjm1
          DO ji = 2, jpim1
-            z_bnds(1,ji,jj,:) = z_cnr(ji+icnr,  jj+jcnr  ,:) ! Bottom-left
-            z_bnds(2,ji,jj,:) = z_cnr(ji+icnr+1,jj+jcnr  ,:) ! Bottom-right
-            z_bnds(3,ji,jj,:) = z_cnr(ji+icnr+1,jj+jcnr+1,:) ! Top-right
-            z_bnds(4,ji,jj,:) = z_cnr(ji+icnr,  jj+jcnr+1,:) ! Top-left
+            z_bnds(1,ji,jj,1) = plat_cnr(ji+icnr,  jj+jcnr  ) ! Bottom-left
+            z_bnds(2,ji,jj,1) = plat_cnr(ji+icnr+1,jj+jcnr  ) ! Bottom-right
+            z_bnds(3,ji,jj,1) = plat_cnr(ji+icnr+1,jj+jcnr+1) ! Top-right
+            z_bnds(4,ji,jj,1) = plat_cnr(ji+icnr,  jj+jcnr+1) ! Top-left
+            z_bnds(1,ji,jj,2) = plon_cnr(ji+icnr,  jj+jcnr  ) ! Bottom-left
+            z_bnds(2,ji,jj,2) = plon_cnr(ji+icnr+1,jj+jcnr  ) ! Bottom-right
+            z_bnds(3,ji,jj,2) = plon_cnr(ji+icnr+1,jj+jcnr+1) ! Top-right
+            z_bnds(4,ji,jj,2) = plon_cnr(ji+icnr,  jj+jcnr+1) ! Top-left
          END DO
       END DO
@@ -1374,16 +1355,27 @@
       END DO
 
-      ! Zero-size cells at closed boundaries
-      IF( (nbondi == -1 .OR. nbondi == 2) .AND. .NOT. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6) ) THEN
-         DO jn = 1, 4  ;  z_bnds(jn,1,:,:) = z_pnt(1,:,:)        ;  END DO      ! (West or jpni = 1), closed E-W
-      ENDIF
-      IF( (nbondi == 1 .OR. nbondi == 2) .AND. .NOT. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6) ) THEN
-         DO jn = 1, 4  ;  z_bnds(jn,nlci,:,:) = z_pnt(nlci,:,:)  ;  END DO      ! (East or jpni = 1), closed E-W
-      ENDIF
-      IF( nbondj == -1 .OR. (nbondj == 2 .AND. jperio /= 2) ) THEN
-         DO jn = 1, 4  ;  z_bnds(jn,:,1,:) = z_pnt(:,1,:)        ;  END DO      ! South or (jpnj = 1, not symmetric)
-      ENDIF
-      IF( (nbondj == 1 .OR. nbondj == 2) .AND. jperio  < 3 ) THEN
-         DO jn = 1, 4  ;  z_bnds(jn,:,nlcj,:) = z_pnt(:,nlcj,:)  ;  END DO      ! (North or jpnj = 1), no north fold
+      ! Zero-size cells at closed boundaries if cell points provided,
+      ! otherwise they are closed cells with unrealistic bounds
+      IF( PRESENT(plon_pnt) .AND. PRESENT(plat_pnt) ) THEN
+         IF( (nbondi == -1 .OR. nbondi == 2) .AND. .NOT. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6) ) THEN
+            DO jn = 1, 4        ! (West or jpni = 1), closed E-W
+               z_bnds(jn,1,:,1) = plat_pnt(1,:)  ;  z_bnds(jn,1,:,2) = plon_pnt(1,:)
+            END DO
+         ENDIF
+         IF( (nbondi == 1 .OR. nbondi == 2) .AND. .NOT. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6) ) THEN
+            DO jn = 1, 4        ! (East or jpni = 1), closed E-W
+               z_bnds(jn,nlci,:,1) = plat_pnt(nlci,:)  ;  z_bnds(jn,nlci,:,2) = plon_pnt(nlci,:)
+            END DO
+         ENDIF
+         IF( nbondj == -1 .OR. (nbondj == 2 .AND. jperio /= 2) ) THEN
+            DO jn = 1, 4        ! South or (jpnj = 1, not symmetric)
+               z_bnds(jn,:,1,1) = plat_pnt(:,1)  ;  z_bnds(jn,:,1,2) = plon_pnt(:,1)
+            END DO
+         ENDIF
+         IF( (nbondj == 1 .OR. nbondj == 2) .AND. jperio  < 3 ) THEN
+            DO jn = 1, 4        ! (North or jpnj = 1), no north fold
+               z_bnds(jn,:,nlcj,1) = plat_pnt(:,nlcj)  ;  z_bnds(jn,:,nlcj,2) = plon_pnt(:,nlcj)
+            END DO
+         ENDIF
       ENDIF
 
@@ -1412,5 +1404,5 @@
                                                bounds_lon = RESHAPE(z_bnds(:,nldi:nlei,nldj:nlej,2),(/ 4,ni*nj /)), nvertex=4 )
 
-      DEALLOCATE( z_bnds, z_cnr, z_pnt, z_fld, z_rot ) 
+      DEALLOCATE( z_bnds, z_fld, z_rot ) 
 
    END SUBROUTINE set_grid_bounds
@@ -1424,10 +1416,22 @@
       !!
       !!----------------------------------------------------------------------
-      REAL(wp), DIMENSION(1) ::   zz = 1.
+      REAL(wp), DIMENSION(1)   ::   zz = 0.
+      REAL(wp), DIMENSION(4,1) ::   z_lat, z_lon
       !!----------------------------------------------------------------------
       CALL iom_set_domain_attr('scalarpoint', ni_glo=jpnij, nj_glo=1, ibegin=narea, jbegin=1, ni=1, nj=1)
       CALL iom_set_domain_attr('scalarpoint', data_dim=2, data_ibegin = 1, data_ni = 1, data_jbegin = 1, data_nj = 1)
+      
+      z_lon(1,:) = MINVAL(glamt) ; z_lon(2,:) = MAXVAL(glamt) ; z_lon(3,:) = MAXVAL(glamt) ; z_lon(4,:) = MINVAL(glamt)
+      z_lat(1,:) = MINVAL(gphit) ; z_lat(2,:) = MINVAL(gphit) ; z_lat(3,:) = MAXVAL(gphit) ; z_lat(4,:) = MAXVAL(gphit)
+
+      IF( lk_mpp ) THEN
+         CALL mpp_min( z_lon(1,1) ) ; CALL mpp_min( z_lon(4,1) ) ; CALL mpp_max( z_lon(2,1) ) ; CALL mpp_max( z_lon(3,1) )
+         CALL mpp_min( z_lat(1,1) ) ; CALL mpp_min( z_lat(2,1) ) ; CALL mpp_max( z_lat(3,1) ) ; CALL mpp_max( z_lat(4,1) )
+      ENDIF
+
+      CALL iom_set_domain_attr('globalscalar', lonvalue=zz, latvalue=zz, bounds_lon=z_lon, bounds_lat=z_lat, nvertex=4)
+
       zz=REAL(narea,wp)
-      CALL iom_set_domain_attr('scalarpoint', lonvalue=zz, latvalue=zz)
+      CALL iom_set_domain_attr('1point', lonvalue=zz, latvalue=zz)
 
    END SUBROUTINE set_scalar
