Index: branches/2016/dev_CNRS_2016/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- branches/2016/dev_CNRS_2016/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 7276)
+++ branches/2016/dev_CNRS_2016/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 7280)
@@ -4,12 +4,25 @@
    !! Ocean forcing:  read input field for surface boundary condition
    !!=====================================================================
-   !! History :  2.0  !  06-2006  (S. Masson, G. Madec)  Original code
-   !!                 !  05-2008  (S. Alderson)  Modified for Interpolation in memory from input grid to model grid
-   !!                 !  10-2013  (D. Delrosso, P. Oddo)  suppression of land point prior to interpolation
+   !! History :  2.0  !  2006-06  (S. Masson, G. Madec)  Original code
+   !!            3.0  !  2008-05  (S. Alderson)  Modified for Interpolation in memory from input grid to model grid
+   !!            3.4  !  2013-10  (D. Delrosso, P. Oddo)  suppression of land point prior to interpolation
    !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
-   !!   fld_read      : read input fields used for the computation of the
-   !!                   surface boundary condition
+   !!   fld_read      : read input fields used for the computation of the surface boundary condition
+   !!   fld_init      : initialization of field read
+   !!   fld_rec       : determined the record(s) to be read
+   !!   fld_get       : read the data
+   !!   fld_map       : read global data from file and map onto local data using a general mapping (use for open boundaries)
+   !!   fld_rot       : rotate the vector fields onto the local grid direction
+   !!   fld_clopn     : update the data file name and close/open the files
+   !!   fld_fill      : fill the data structure with the associated information read in namelist
+   !!   wgt_list      : manage the weights used for interpolation
+   !!   wgt_print     : print the list of known weights
+   !!   fld_weight    : create a WGT structure and fill in data from file, restructuring as required
+   !!   apply_seaoverland : fill land with ocean values
+   !!   seaoverland   : create shifted matrices for seaoverland application
+   !!   fld_interp    : apply weights to input gridded data to create data on model grid
+   !!   ksec_week     : function returning the first 3 letters of the first day of the weekly file
    !!----------------------------------------------------------------------
    USE oce            ! ocean dynamics and tracers
@@ -274,9 +287,9 @@
             IF( sd(jf)%ln_tint ) THEN              ! temporal interpolation
                IF(lwp .AND. kt - nit000 <= 100 ) THEN 
-                  clfmt = "('fld_read: var ', a, ' kt = ', i8, ' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," //   &
+                  clfmt = "('   fld_read: var ', a, ' kt = ', i8, ' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," //   &
                      &    "', records b/a: ', i6.4, '/', i6.4, ' (days ', f9.4,'/', f9.4, ')')"
                   WRITE(numout, clfmt)  TRIM( sd(jf)%clvar ), kt, REAL(isecsbc,wp)/rday, nyear, nmonth, nday,   &            
                      & sd(jf)%nrec_b(1), sd(jf)%nrec_a(1), REAL(sd(jf)%nrec_b(2),wp)/rday, REAL(sd(jf)%nrec_a(2),wp)/rday
-                  WRITE(numout, *) 'it_offset is : ',it_offset
+                  WRITE(numout, *) '      it_offset is : ',it_offset
                ENDIF
                ! temporal interpolation weights
@@ -286,5 +299,5 @@
             ELSE   ! nothing to do...
                IF(lwp .AND. kt - nit000 <= 100 ) THEN
-                  clfmt = "('fld_read: var ', a, ' kt = ', i8,' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," //   &
+                  clfmt = "('   fld_read: var ', a, ' kt = ', i8,' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," //   &
                      &    "', record: ', i6.4, ' (days ', f9.4, ' <-> ', f9.4, ')')"
                   WRITE(numout, clfmt) TRIM(sd(jf)%clvar), kt, REAL(isecsbc,wp)/rday, nyear, nmonth, nday,    &
@@ -407,5 +420,5 @@
          CALL fld_get( sdjf, map )         ! read before data in after arrays(as we will swap it later)
          !
-         clfmt = "('fld_init : time-interpolation for ', a, ' read previous record = ', i6, ' at time = ', f7.2, ' days')"
+         clfmt = "('   fld_init : time-interpolation for ', a, ' read previous record = ', i6, ' at time = ', f7.2, ' days')"
          IF(lwp) WRITE(numout, clfmt) TRIM(sdjf%clvar), sdjf%nrec_a(1), REAL(sdjf%nrec_a(2),wp)/rday
          !
@@ -791,5 +804,5 @@
       !!                    ***  ROUTINE fld_clopn  ***
       !!
-      !! ** Purpose :   update the file name and open the file
+      !! ** Purpose :   update the file name and close/open the files
       !!----------------------------------------------------------------------
       TYPE(FLD)        , INTENT(inout) ::   sdjf     ! input field related variables
@@ -882,18 +895,20 @@
 
 
-   SUBROUTINE fld_fill( sdf, sdf_n, cdir, cdcaller, cdtitle, cdnam )
+   SUBROUTINE fld_fill( sdf, sdf_n, cdir, cdcaller, cdtitle, cdnam, knoprint )
       !!---------------------------------------------------------------------
       !!                    ***  ROUTINE fld_fill  ***
       !!
-      !! ** Purpose :   fill sdf with sdf_n and control print
-      !!----------------------------------------------------------------------
-      TYPE(FLD)  , DIMENSION(:), INTENT(inout) ::   sdf        ! structure of input fields (file informations, fields read)
-      TYPE(FLD_N), DIMENSION(:), INTENT(in   ) ::   sdf_n      ! array of namelist information structures
-      CHARACTER(len=*)         , INTENT(in   ) ::   cdir       ! Root directory for location of flx files
-      CHARACTER(len=*)         , INTENT(in   ) ::   cdcaller   ! 
-      CHARACTER(len=*)         , INTENT(in   ) ::   cdtitle    ! 
-      CHARACTER(len=*)         , INTENT(in   ) ::   cdnam      ! 
-      !
-      INTEGER  ::   jf       ! dummy indices
+      !! ** Purpose :   fill the data structure (sdf) with the associated information 
+      !!              read in namelist (sdf_n) and control print
+      !!----------------------------------------------------------------------
+      TYPE(FLD)  , DIMENSION(:)          , INTENT(inout) ::   sdf        ! structure of input fields (file informations, fields read)
+      TYPE(FLD_N), DIMENSION(:)          , INTENT(in   ) ::   sdf_n      ! array of namelist information structures
+      CHARACTER(len=*)                   , INTENT(in   ) ::   cdir       ! Root directory for location of flx files
+      CHARACTER(len=*)                   , INTENT(in   ) ::   cdcaller   ! name of the calling routine
+      CHARACTER(len=*)                   , INTENT(in   ) ::   cdtitle    ! description of the calling routine 
+      CHARACTER(len=*)                   , INTENT(in   ) ::   cdnam      ! name of the namelist from which sdf_n comes
+      INTEGER                  , OPTIONAL, INTENT(in   ) ::   knoprint   ! no calling routine information printed
+      !
+      INTEGER  ::   jf   ! dummy indices
       !!---------------------------------------------------------------------
       !
@@ -922,18 +937,20 @@
       IF(lwp) THEN      ! control print
          WRITE(numout,*)
-         WRITE(numout,*) TRIM( cdcaller )//' : '//TRIM( cdtitle )
-         WRITE(numout,*) (/ ('~', jf = 1, LEN_TRIM( cdcaller ) ) /)
-         WRITE(numout,*) '          '//TRIM( cdnam )//' Namelist'
-         WRITE(numout,*) '          list of files and frequency (>0: in hours ; <0 in months)'
+         IF( .NOT.PRESENT( knoprint) ) THEN
+            WRITE(numout,*) TRIM( cdcaller )//' : '//TRIM( cdtitle )
+            WRITE(numout,*) (/ ('~', jf = 1, LEN_TRIM( cdcaller ) ) /)
+         ENDIF
+         WRITE(numout,*) '   fld_fill : fill data structure with information from namelist '//TRIM( cdnam )
+         WRITE(numout,*) '   ~~~~~~~~'
+         WRITE(numout,*) '      list of files and frequency (>0: in hours ; <0 in months)'
          DO jf = 1, SIZE(sdf)
-            WRITE(numout,*) '               root filename: '  , TRIM( sdf(jf)%clrootname ),   &
-               &                          ' variable name: '  , TRIM( sdf(jf)%clvar      )
-            WRITE(numout,*) '               frequency: '      ,       sdf(jf)%nfreqh      ,   &
-               &                          ' time interp: '    ,       sdf(jf)%ln_tint     ,   &
-               &                          ' climatology: '    ,       sdf(jf)%ln_clim     ,   &
-               &                          ' weights    : '    , TRIM( sdf(jf)%wgtname    ),   &
-               &                          ' pairing    : '    , TRIM( sdf(jf)%vcomp      ),   &
-               &                          ' data type: '      ,       sdf(jf)%cltype      ,   &
-               &                          ' land/sea mask:'   , TRIM( sdf(jf)%lsmname    )
+            WRITE(numout,*) '      root filename: '  , TRIM( sdf(jf)%clrootname ), '   variable name: ', TRIM( sdf(jf)%clvar )
+            WRITE(numout,*) '         frequency: '      ,       sdf(jf)%nfreqh      ,   &
+               &                  '   time interp: '    ,       sdf(jf)%ln_tint     ,   &
+               &                  '   climatology: '    ,       sdf(jf)%ln_clim
+            WRITE(numout,*) '         weights: '        , TRIM( sdf(jf)%wgtname    ),   &
+               &                  '   pairing: '        , TRIM( sdf(jf)%vcomp      ),   &
+               &                  '   data type: '      ,       sdf(jf)%cltype      ,   &
+               &                  '   land/sea mask:'   , TRIM( sdf(jf)%lsmname    )
             call flush(numout)
          END DO
@@ -947,8 +964,7 @@
       !!                    ***  ROUTINE wgt_list  ***
       !!
-      !! ** Purpose :   search array of WGTs and find a weights file
-      !!                entry, or return a new one adding it to the end
-      !!                if it is a new entry, the weights data is read in and
-      !!                restructured (fld_weight)
+      !! ** Purpose :   search array of WGTs and find a weights file entry,
+      !!                or return a new one adding it to the end if new entry.
+      !!                the weights data is read in and restructured (fld_weight)
       !!----------------------------------------------------------------------
       TYPE( FLD ), INTENT(in   ) ::   sd        ! field with name of weights file
@@ -1019,6 +1035,6 @@
       !!                    ***  ROUTINE fld_weight  ***
       !!
-      !! ** Purpose :   create a new WGT structure and fill in data from  
-      !!                file, restructuring as required
+      !! ** Purpose :   create a new WGT structure and fill in data from file,
+      !!              restructuring as required
       !!----------------------------------------------------------------------
       TYPE( FLD ), INTENT(in) ::   sd   ! field with name of weights file
@@ -1163,5 +1179,5 @@
 
    SUBROUTINE apply_seaoverland( clmaskfile, zfieldo, jpi1_lsm, jpi2_lsm, jpj1_lsm,   &
-                          &      jpj2_lsm, itmpi, itmpj, itmpz, rec1_lsm, recn_lsm )
+      &                          jpj2_lsm, itmpi, itmpj, itmpz, rec1_lsm, recn_lsm )
       !!---------------------------------------------------------------------
       !!                    ***  ROUTINE apply_seaoverland  ***
@@ -1492,11 +1508,10 @@
       !!                    ***  FUNCTION kshift_week *** 
       !!
-      !! ** Purpose :  
-      !!---------------------------------------------------------------------
-      CHARACTER(len=*), INTENT(in)   ::   cdday   !3 first letters of the first day of the weekly file
-      !!
-      INTEGER                        ::   ksec_week  ! output variable
-      INTEGER                        ::   ijul       !temp variable
-      INTEGER                        ::   ishift     !temp variable
+      !! ** Purpose :   return the first 3 letters of the first day of the weekly file
+      !!---------------------------------------------------------------------
+      CHARACTER(len=*), INTENT(in)   ::   cdday   ! first 3 letters of the first day of the weekly file
+      !!
+      INTEGER                        ::   ksec_week      ! output variable
+      INTEGER                        ::   ijul, ishift   ! local integer
       CHARACTER(len=3),DIMENSION(7)  ::   cl_week 
       !!----------------------------------------------------------------------
