Index: branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/TOOLS/SIREN/src/global.f90
===================================================================
--- branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/TOOLS/SIREN/src/global.f90	(revision 4771)
+++ branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/TOOLS/SIREN/src/global.f90	(revision 5075)
@@ -6,11 +6,10 @@
 !
 ! DESCRIPTION:
-!> @brief This module defines global variables, and parameters that can't 
-!> be associated with a module
+!> @brief This module defines global variables and parameters.
 !
 !> @author
 !> J.paul
 ! REVISION HISTORY:
-!> @date Nov, 2013 - Initial Version
+!> @date November, 2013 - Initial Version
 !
 !> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -22,64 +21,72 @@
    IMPLICIT NONE
 
-   PUBLIC :: dg_fill !< default fill value
-   PUBLIC :: ig_nsep !< number of separator listed
-   PUBLIC :: ig_ncom !< number of comment character listed
-   PUBLIC :: cg_sep  !< list of separator
-   PUBLIC :: cg_com  !< list of comment character
+   PUBLIC :: dp_fill         !< default fill value
+   PUBLIC :: ip_nsep         !< number of separator listed
+   PUBLIC :: ip_ncom         !< number of comment character listed
+   PUBLIC :: cp_sep          !< list of separator
+   PUBLIC :: cp_com          !< list of comment character
 
-   PUBLIC :: ig_npoint
-   PUBLIC :: jp_T
-   PUBLIC :: jp_U
-   PUBLIC :: jp_V
-   PUBLIC :: jp_F
+   PUBLIC :: ip_npoint       !< number of point on ARAKAWA C-grid 
+   PUBLIC :: jp_T            !< indice for T-point on ARAKAWA C-grid
+   PUBLIC :: jp_U            !< indice for U-point on ARAKAWA C-grid
+   PUBLIC :: jp_V            !< indice for V-point on ARAKAWA C-grid
+   PUBLIC :: jp_F            !< indice for F-point on ARAKAWA C-grid
+   PUBLIC :: cp_grid_point   !< list of grid_point character
 
-   PUBLIC :: ig_ndim
-   PUBLIC :: jp_I
-   PUBLIC :: jp_J
-   PUBLIC :: jp_K
-   PUBLIC :: jp_L
+   PUBLIC :: ip_maxdim       !< maximum number of dimension to be used
+   PUBLIC :: jp_I            !< indice for I-direction
+   PUBLIC :: jp_J            !< indice for J-direction
+   PUBLIC :: jp_K            !< indice for K-direction
+   PUBLIC :: jp_L            !< indice for L-direction
+   PUBLIC :: cp_dimorder     !< dimension order
 
-   PUBLIC :: ig_maxvar  !< maximum number of variable
-   PUBLIC :: ig_maxmtx  !< matrix variable maximum dimension
-   PUBLIC :: ig_maxseg  !< maximum number of segment
-   PUBLIC :: ig_ghost   !< number of ghost cell
+   PUBLIC :: ip_maxvar       !< maximum number of variable
+   PUBLIC :: ip_maxmtx       !< matrix variable maximum dimension
+   PUBLIC :: ip_maxseg       !< maximum number of segment
+   PUBLIC :: ip_ghost        !< number of ghost cell
 
-   PUBLIC :: ig_ninterp      !< number of available interpolation method
-   PUBLIC :: cg_interp_list  !< list of interpolation name
+   PUBLIC :: ip_ninterp      !< number of available interpolation method
+   PUBLIC :: cp_interp_list  !< list of interpolation name
    
-   PUBLIC :: ig_nextrap      !< number of available extrapolation method
-   PUBLIC :: cg_extrap_list  !< list of extrapolation name
+   PUBLIC :: ip_nextrap      !< number of available extrapolation method
+   PUBLIC :: cp_extrap_list  !< list of extrapolation name
    
-   PUBLIC :: ig_nfilter      !< number of available filter
-   PUBLIC :: cg_filter_list  !< list of filter name
+   PUBLIC :: ip_nfilter      !< number of available filter
+   PUBLIC :: cp_filter_list  !< list of filter name
 
-   PRIVATE
+   PUBLIC :: ip_ncard        !< number of cardinal point
+   PUBLIC :: cp_card         !< array of cardinal point
+   PUBLIC :: jp_north        !< indice for north boundary
+   PUBLIC :: jp_south        !< indice for south boundary
+   PUBLIC :: jp_east         !< indice for east  boundary
+   PUBLIC :: jp_west         !< indice for west  boundary
+
    ! NOTE_avoid_public_variables_if_possible
 
-   INTEGER(i4)                             , PARAMETER :: ig_maxvar =200   !< maximum number of variable
-   INTEGER(i4)                             , PARAMETER :: ig_maxmtx =100   !< matrix variable maximum dimension (cf create_bathy)
-   INTEGER(i4)                             , PARAMETER :: ig_maxseg =50    !< maximum number of segment for each boundary
+   INTEGER(i4)                             , PARAMETER :: ip_maxvar =200   !< maximum number of variable
+   INTEGER(i4)                             , PARAMETER :: ip_maxmtx =100   !< matrix variable maximum dimension (cf create_bathy)
+   INTEGER(i4)                             , PARAMETER :: ip_maxseg =50    !< maximum number of segment for each boundary
 
-   INTEGER(i4)                             , PARAMETER :: ig_nsep=2  !< number of separator listed
-   CHARACTER(1)     , DIMENSION(ig_nsep)   , PARAMETER :: cg_sep = (/'.','_'/) !< list of separator 
+   INTEGER(i4)                             , PARAMETER :: ip_nsep=2        !< number of separator listed
+   CHARACTER(1)     , DIMENSION(ip_nsep)   , PARAMETER :: cp_sep = (/'.','_'/) !< list of separator 
 
-   INTEGER(i4)                             , PARAMETER :: ig_ncom=2  !< number of comment character listed
-   CHARACTER(1)     , DIMENSION(ig_ncom)   , PARAMETER :: cg_com = (/'#','!'/) !< list of comment character 
+   INTEGER(i4)                             , PARAMETER :: ip_ncom=2        !< number of comment character listed
+   CHARACTER(1)     , DIMENSION(ip_ncom)   , PARAMETER :: cp_com = (/'#','!'/) !< list of comment character 
     
-   INTEGER(i4)                             , PARAMETER :: ig_ghost=1    !< number of ghost cell
+   INTEGER(i4)                             , PARAMETER :: ip_ghost=1       !< number of ghost cell
 
-   INTEGER(i4)                             , PARAMETER :: ig_ninterp=3
-   CHARACTER(LEN=lc), DIMENSION(ig_ninterp), PARAMETER :: cg_interp_list = &
+   INTEGER(i4)                             , PARAMETER :: ip_ninterp=3
+   CHARACTER(LEN=lc), DIMENSION(ip_ninterp), PARAMETER :: cp_interp_list = &
    &  (/ 'nearest', &
    &     'cubic  ', &
    &     'linear '  /)
 
-   INTEGER(i4)                             , PARAMETER :: ig_nextrap=2
-   CHARACTER(LEN=lc), DIMENSION(ig_nextrap), PARAMETER :: cg_extrap_list = &
+   INTEGER(i4)                             , PARAMETER :: ip_nextrap=2
+   CHARACTER(LEN=lc), DIMENSION(ip_nextrap), PARAMETER :: cp_extrap_list = &
    &  (/ 'dist_weight', &
    &     'min_error  ' /)
 
-   INTEGER(i4)                             , PARAMETER :: ig_nfilter=5
-   CHARACTER(LEN=lc), DIMENSION(ig_nfilter), PARAMETER :: cg_filter_list = &
+   INTEGER(i4)                             , PARAMETER :: ip_nfilter=5
+   CHARACTER(LEN=lc), DIMENSION(ip_nfilter), PARAMETER :: cp_filter_list = &
    &  (/ 'butterworth', &
    &     'blackman   ', &
@@ -88,18 +95,35 @@
    &     'gauss      '/)
 
-   REAL(dp)                                , PARAMETER :: dg_fill=NF90_FILL_DOUBLE !< default fill value
-   INTEGER(i4)                             , PARAMETER :: ig_fill=NF90_FILL_INT    !< default fill value
+   REAL(dp)                                , PARAMETER :: dp_fill=NF90_FILL_DOUBLE !< default fill value
 
-   INTEGER(i4)                             , PARAMETER :: ig_npoint=4
+   INTEGER(i4)                             , PARAMETER :: ip_npoint=4
    INTEGER(i4)                             , PARAMETER :: jp_T=1
    INTEGER(i4)                             , PARAMETER :: jp_U=2
    INTEGER(i4)                             , PARAMETER :: jp_V=3
    INTEGER(i4)                             , PARAMETER :: jp_F=4
+   CHARACTER(LEN=1), DIMENSION(ip_npoint)  , PARAMETER :: cp_grid_point = &
+   &  (/ 'T', 'U', 'V', 'F' /)
 
-   INTEGER(i4)                             , PARAMETER :: ig_ndim=2
+
+   INTEGER(i4)                             , PARAMETER :: ip_maxdim=4
    INTEGER(i4)                             , PARAMETER :: jp_I=1
    INTEGER(i4)                             , PARAMETER :: jp_J=2
    INTEGER(i4)                             , PARAMETER :: jp_K=3
    INTEGER(i4)                             , PARAMETER :: jp_L=4
+   CHARACTER(LEN=ip_maxdim)                , PARAMETER :: cp_dimorder = 'xyzt' !< dimension order to output
+
+   INTEGER(i4), PARAMETER :: ip_ncard=4
+   CHARACTER(LEN=lc), DIMENSION(ip_ncard), PARAMETER :: cp_card = &
+   &  (/ 'north', &
+   &     'south', &
+   &     'east ', &
+   &     'west ' /)
+
+   INTEGER(i4), PARAMETER :: jp_north=1
+   INTEGER(i4), PARAMETER :: jp_south=2
+   INTEGER(i4), PARAMETER :: jp_east =3
+   INTEGER(i4), PARAMETER :: jp_west =4
+
+
 
 END MODULE global
