Index: NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/nemogcm.F90
===================================================================
--- NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/nemogcm.F90	(revision 14769)
+++ NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/nemogcm.F90	(revision 14770)
@@ -30,10 +30,9 @@
    USE step_c1d       ! Time stepping loop for the 1D configuration
    !
-   USE prtctl         ! Print control
    USE in_out_manager ! I/O manager
    USE lib_mpp        ! distributed memory computing
    USE mppini         ! shared/distributed memory setting (mpp_init routine)
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
-#if defined key_iomput
+#if defined key_xios
    USE xios           ! xIOserver
 #endif
@@ -47,7 +46,12 @@
    CHARACTER(lc) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing
 
+#if ! defined key_mpi_off
+   ! need MPI_Wtime
+   INCLUDE 'mpif.h'
+#endif
+
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
-   !! $Id: nemogcm.F90 12489 2020-02-28 15:55:11Z davestorkey $
+   !! $Id: nemogcm.F90 13286 2020-07-09 15:48:29Z smasson $
    !! Software governed by the CeCILL license (see ./LICENSE)
    !!----------------------------------------------------------------------
@@ -109,6 +113,6 @@
       CALL nemo_closefile
       !
-#if defined key_iomput
-                                    CALL xios_finalize  ! end mpp communications with xios
+#if defined key_xios
+      CALL xios_finalize  ! end mpp communications with xios
 #else
       IF( lk_mpp )                  CALL mppstop      ! end mpp communications
@@ -144,11 +148,11 @@
       !                             !-------------------------------------------------!
       !
-#if defined key_iomput
+#if defined key_xios
       IF( Agrif_Root() ) THEN
-            CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios
+         CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios
       ENDIF
       CALL mpp_start( ilocal_comm )
 #else
-         CALL mpp_start( )
+      CALL mpp_start( )
 #endif
       !
@@ -163,16 +167,15 @@
       IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
       ! open reference and configuration namelist files
-                  CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm )
-                  CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm )
+      CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm )
+      CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm )
       IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
       ! open /dev/null file to be able to supress output write easily
       IF( Agrif_Root() ) THEN
-                  CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
+         CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
 #ifdef key_agrif
       ELSE
-                  numnul = Agrif_Parent(numnul)   
-#endif
-      ENDIF
-      !
+         numnul = Agrif_Parent(numnul)
+#endif
+      ENDIF
       !                             !--------------------!
       !                             ! Open listing units !  -> need sn_cfctl from namctl to define lwp
@@ -215,4 +218,12 @@
          WRITE(numout,*) "     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "
          WRITE(numout,*)
+
+         ! Print the working precision to ocean.output
+         IF (wp == dp) THEN
+            WRITE(numout,*) "Working precision = double-precision"
+         ELSE
+            WRITE(numout,*) "Working precision = single-precision"
+         ENDIF
+         WRITE(numout,*)
          !
          WRITE(numout,cform_aaa)                                        ! Flag AAAAAAA
@@ -229,10 +240,10 @@
 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' )
       READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )
-904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )   
+904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )
       !
       IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file
-         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ELSE                              ! user-defined namelist
-         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ENDIF
       !
@@ -263,13 +274,19 @@
                            CALL     eos_init        ! Equation of state
       IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration
-                           CALL     dom_init( Nbb, Nnn, Naa, "OPA") ! Domain
+                           CALL     dom_init( Nbb, Nnn, Naa ) ! Domain
       IF( sn_cfctl%l_prtctl )   &
          &                 CALL prt_ctl_init        ! Print control
-      !
-      
+
                            CALL  istate_init( Nbb, Nnn, Naa )    ! ocean initial state (Dynamics and tracers)
 
-      !                                      ! external forcing 
+      !                                      ! external forcing
                            CALL     sbc_init( Nbb, Nnn, Naa )    ! surface boundary conditions (including sea-ice)
+
+      !#LB:
+#if defined key_si3
+      IF(lwp) WRITE(numout,*) 'LOLO: nemo_init@nemogcm.F90: shape of fr_i ==>', SIZE(fr_i,1), SIZE(fr_i,2)
+      fr_i(:,:) = 0._wp
+#endif
+      !#LB.
 
       !
@@ -302,8 +319,8 @@
          WRITE(numout,*) '                              sn_cfctl%l_prttrc  = ', sn_cfctl%l_prttrc
          WRITE(numout,*) '                              sn_cfctl%l_oasout  = ', sn_cfctl%l_oasout
-         WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin  
-         WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax  
-         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr 
-         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr 
+         WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin
+         WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax
+         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr
+         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr
          WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing
          WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl
@@ -356,5 +373,5 @@
       !!                     ***  ROUTINE nemo_alloc  ***
       !!
-      !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules
+      !! ** Purpose :   Allocate all the dynamic arrays of the OCE modules
       !!
       !! ** Method  :
@@ -366,5 +383,5 @@
       !!----------------------------------------------------------------------
       !
-      ierr =        oce_alloc    ()    ! ocean 
+      ierr =        oce_alloc    ()    ! ocean
       ierr = ierr + dia_wri_alloc()
       ierr = ierr + dom_oce_alloc()    ! ocean domain
@@ -375,5 +392,5 @@
    END SUBROUTINE nemo_alloc
 
-   
+
    SUBROUTINE nemo_set_cfctl(sn_cfctl, setto )
       !!----------------------------------------------------------------------
@@ -399,3 +416,2 @@
    !!======================================================================
 END MODULE nemogcm
-
