Index: trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 2524)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 2528)
@@ -11,4 +11,5 @@
    !!   NEMO     1.0  !  2002-08  (G. Madec)  F90: Free form and module
    !!            2.0  !  2005-11  (V. Garnier) Surface pressure gradient organization
+   !!            3.3  !  2010-11  (G. Madec)  initialisation in C1D configuration
    !!----------------------------------------------------------------------
    
@@ -18,6 +19,6 @@
    !!   dom_ctl        : control print for the ocean domain
    !!----------------------------------------------------------------------
-   USE oce             ! 
-   USE dom_oce         ! ocean space and time domain
+   USE oce             ! ocean variables
+   USE dom_oce         ! domain: ocean
    USE sbc_oce         ! surface boundary condition: ocean
    USE phycst          ! physical constants
@@ -32,4 +33,6 @@
    USE domwri          ! domain: write the meshmask file
    USE domvvl          ! variable volume
+   USE c1d             ! 1D vertical configuration
+   USE dyncor_c1d      ! Coriolis term (c1d case)         (cor_c1d routine)
 
    IMPLICIT NONE
@@ -41,9 +44,8 @@
 #  include "domzgr_substitute.h90"
    !!-------------------------------------------------------------------------
-   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
-   !! Software is governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence        (NEMOGCM/NEMO_CeCILL.txt)
    !!-------------------------------------------------------------------------
-
 CONTAINS
 
@@ -62,4 +64,5 @@
       !!              - dom_stp: defined the model time step
       !!              - dom_wri: create the meshmask file if nmsh=1
+      !!              - 1D configuration, move Coriolis, u and v at T-point
       !!----------------------------------------------------------------------
       INTEGER ::   jk                ! dummy loop argument
@@ -79,4 +82,10 @@
                              CALL dom_msk      ! Masks
       IF( lk_vvl         )   CALL dom_vvl      ! Vertical variable mesh
+      !
+      IF( lk_c1d ) THEN                        ! 1D configuration 
+         CALL cor_c1d                          ! Coriolis set at T-point
+         umask(:,:,:) = tmask(:,:,:)           ! U, V moved at T-point
+         vmask(:,:,:) = tmask(:,:,:)
+      END IF
       !
       hu(:,:) = 0.e0                           ! Ocean depth at U- and V-points
@@ -106,4 +115,5 @@
       !!              - namdom namelist
       !!              - namcla namelist
+      !!              - namnc4 namelist   ! "key_netcdf4" only
       !!----------------------------------------------------------------------
       USE ioipsl
@@ -111,8 +121,11 @@
          &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   &
          &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz
-      NAMELIST/namdom/ nn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh   ,   &
-         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin,   &
+      NAMELIST/namdom/ nn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh    , rn_hmin,   &
+         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,            &
          &             rn_rdtmax, rn_rdth     , nn_baro     , nn_closea
       NAMELIST/namcla/ nn_cla
+#if defined key_netcdf4
+      NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip
+#endif
       !!----------------------------------------------------------------------
 
@@ -166,19 +179,23 @@
       ENDIF
 
+#if defined key_agrif
       IF( Agrif_Root() ) THEN
-         SELECT CASE ( nleapy )        ! Choose calendar for IOIPSL
-         CASE (  1 ) 
-            CALL ioconf_calendar('gregorian')
-            IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "gregorian", i.e. leap year'
-         CASE (  0 )
-            CALL ioconf_calendar('noleap')
-            IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "noleap", i.e. no leap year'
-         CASE ( 30 )
-            CALL ioconf_calendar('360d')
-            IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "360d", i.e. 360 days in a year'
-         END SELECT
-      ENDIF
-
-      REWIND( numnam )             ! Namelist namdom : space & time domain (bathymetry, mesh, timestep)
+#endif
+      SELECT CASE ( nleapy )        ! Choose calendar for IOIPSL
+      CASE (  1 ) 
+         CALL ioconf_calendar('gregorian')
+         IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "gregorian", i.e. leap year'
+      CASE (  0 )
+         CALL ioconf_calendar('noleap')
+         IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "noleap", i.e. no leap year'
+      CASE ( 30 )
+         CALL ioconf_calendar('360d')
+         IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "360d", i.e. 360 days in a year'
+      END SELECT
+#if defined key_agrif
+      ENDIF
+#endif
+
+      REWIND( numnam )              ! Namelist namdom : space & time domain (bathymetry, mesh, timestep)
       READ  ( numnam, namdom )
 
@@ -187,11 +204,13 @@
          WRITE(numout,*) '   Namelist namdom : space & time domain'
          WRITE(numout,*) '      flag read/compute bathymetry      nn_bathy     = ', nn_bathy
+         WRITE(numout,*) '      min depth of the ocean    (>0) or    rn_hmin   = ', rn_hmin
+         WRITE(numout,*) '      min number of ocean level (<0)       '
          WRITE(numout,*) '      minimum thickness of partial      rn_e3zps_min = ', rn_e3zps_min, ' (m)'
          WRITE(numout,*) '         step level                     rn_e3zps_rat = ', rn_e3zps_rat
          WRITE(numout,*) '      create mesh/mask file(s)          nn_msh       = ', nn_msh
-         WRITE(numout,*) '           = 0   no file created                 '
-         WRITE(numout,*) '           = 1   mesh_mask                       '
-         WRITE(numout,*) '           = 2   mesh and mask                   '
-         WRITE(numout,*) '           = 3   mesh_hgr, msh_zgr and mask      '
+         WRITE(numout,*) '           = 0   no file created           '
+         WRITE(numout,*) '           = 1   mesh_mask                 '
+         WRITE(numout,*) '           = 2   mesh and mask             '
+         WRITE(numout,*) '           = 3   mesh_hgr, msh_zgr and mask'
          WRITE(numout,*) '      ocean time step                      rn_rdt    = ', rn_rdt
          WRITE(numout,*) '      asselin time filter parameter        rn_atfp   = ', rn_atfp
@@ -216,5 +235,5 @@
       nclosea   = nn_closea
 
-      REWIND( numnam )             ! Namelist cross land advection
+      REWIND( numnam )              ! Namelist cross land advection
       READ  ( numnam, namcla )
       IF(lwp) THEN
@@ -224,7 +243,26 @@
       ENDIF
 
-      n_cla = nn_cla                ! conversion DOCTOR names into model names (this should disappear soon)
-
-      IF( nbit_cmp == 1 .AND. n_cla /= 0 )   CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require n_cla = 0' )
+#if defined key_netcdf4
+      !                             ! NetCDF 4 case   ("key_netcdf4" defined)
+      REWIND( numnam )                    ! Namelist namnc4 : netcdf4 chunking parameters
+      READ  ( numnam, namnc4 )
+      IF(lwp) THEN                        ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) '   Namelist namnc4 - Netcdf4 chunking parameters'
+         WRITE(numout,*) '      number of chunks in i-dimension      nn_nchunks_i   = ', nn_nchunks_i
+         WRITE(numout,*) '      number of chunks in j-dimension      nn_nchunks_j   = ', nn_nchunks_j
+         WRITE(numout,*) '      number of chunks in k-dimension      nn_nchunks_k   = ', nn_nchunks_k
+         WRITE(numout,*) '      apply netcdf4/hdf5 chunking & compression ln_nc4zip = ', ln_nc4zip
+      ENDIF
+
+      ! Put the netcdf4 settings into a simple structure (snc4set, defined in in_out_manager module)
+      ! Note the chunk size in the unlimited (time) dimension will be fixed at 1
+      snc4set%ni   = nn_nchunks_i
+      snc4set%nj   = nn_nchunks_j
+      snc4set%nk   = nn_nchunks_k
+      snc4set%luse = ln_nc4zip
+#else
+      snc4set%luse = .FALSE.        ! No NetCDF 4 case
+#endif
       !
    END SUBROUTINE dom_nam
