Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/cfgs/SHARED/namelist_ice_ref
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/cfgs/SHARED/namelist_ice_ref	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/cfgs/SHARED/namelist_ice_ref	(revision 12075)
@@ -60,5 +60,5 @@
       rn_icebfr     =  15.            !        maximum bottom stress per unit volume [N/m3]
       rn_lfrelax    =   1.e-5         !        relaxation time scale to reach static friction [s-1]
-      rn_tensile    =   0.05          !        isotropic tensile strength [0-0.5??]
+      rn_tensile    =   0.2           !        isotropic tensile strength [0-0.5??]
 /
 !------------------------------------------------------------------------------
@@ -91,5 +91,5 @@
 !------------------------------------------------------------------------------
    ln_rhg_EVP       = .true.          !  EVP rheology
-      ln_aEVP       = .true.          !     adaptive rheology (Kimmritz et al. 2016 & 2017)
+      ln_aEVP       = .false.         !     adaptive rheology (Kimmritz et al. 2016 & 2017)
       rn_creepl     =   2.0e-9        !     creep limit [1/s]
       rn_ecc        =   2.0           !     eccentricity of the elliptical yield curve          
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/conf.py
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/conf.py	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/conf.py	(revision 12075)
@@ -230,5 +230,5 @@
 texinfo_documents = [
   ('guide', 'NEMO', u'NEMO Documentation',
-   u'NEMO System Team', 'NEMO', 'One line description of project.',
+   u'NEMO System Team', 'NEMO', 'Community Ocean Model',
    'Miscellaneous'),
 ]
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/docutils.conf
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/docutils.conf	(revision 12075)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/docutils.conf	(revision 12075)
@@ -0,0 +1,2 @@
+[restructuredtext parser]
+syntax_highlight = short
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/global.rst
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/global.rst	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/doc/rst/source/global.rst	(revision 12075)
@@ -1,3 +1,5 @@
-.. Roles (custom styles related to CSS classes in 'source/_static/style.css')
+.. Roles
+
+.. custom styles related to CSS classes in './_static/style.css'
 
 .. role:: blue
@@ -5,4 +7,18 @@
 .. role:: grey
 .. role:: greysup(sup)
+
+.. inline code snippets
+
+.. role:: python(code)
+   :language: python
+   :class: highlight
+
+.. role:: fortran(code)
+   :language: fortran
+   :class: highlight
+
+.. role:: console(code)
+   :language: console
+   :class: highlight
 
 .. Substitutions
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/BDY/bdydta.F90
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/BDY/bdydta.F90	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/BDY/bdydta.F90	(revision 12075)
@@ -171,6 +171,6 @@
                         ii = idx_bdy(jbdy)%nbi(ib,igrd)
                         ij = idx_bdy(jbdy)%nbj(ib,igrd)
-                        dta_bdy(jbdy)%tem(ib,ik) = tsn(ii,ij,ik,jp_bdytem) * tmask(ii,ij,ik)         
-                        dta_bdy(jbdy)%sal(ib,ik) = tsn(ii,ij,ik,jp_bdysal) * tmask(ii,ij,ik)         
+                        dta_bdy(jbdy)%tem(ib,ik) = tsn(ii,ij,ik,jp_tem) * tmask(ii,ij,ik)         
+                        dta_bdy(jbdy)%sal(ib,ik) = tsn(ii,ij,ik,jp_sal) * tmask(ii,ij,ik)         
                      END DO
                   END DO
@@ -447,4 +447,5 @@
                ELSE                                                            ;   ipl = 1            ! xy or xyt
                ENDIF
+               bf(jp_bdya_i,jbdy)%clrootname = 'NOT USED'   ! reset to default value as this subdomain may not need to read this bdy
             ENDIF
          ENDIF
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/DYN/dynnxt.F90
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/DYN/dynnxt.F90	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/DYN/dynnxt.F90	(revision 12075)
@@ -175,4 +175,6 @@
       IF( neuler == 0 .AND. kt == nit000 ) THEN        !* Euler at first time-step: only swap
          DO jk = 1, jpkm1
+            ub(:,:,jk) = un(:,:,jk)                         ! ub <-- un
+            vb(:,:,jk) = vn(:,:,jk)
             un(:,:,jk) = ua(:,:,jk)                         ! un <-- ua
             vn(:,:,jk) = va(:,:,jk)
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/DYN/dynspg_ts.F90
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/DYN/dynspg_ts.F90	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/DYN/dynspg_ts.F90	(revision 12075)
@@ -687,6 +687,6 @@
             hvr_e(2:jpim1,2:jpjm1) = ssvmask(2:jpim1,2:jpjm1) / ( hv_e(2:jpim1,2:jpjm1) + 1._wp - ssvmask(2:jpim1,2:jpjm1) )
             CALL lbc_lnk_multi( 'dynspg_ts', ua_e , 'U', -1._wp, va_e , 'V', -1._wp  &
-                 &                         , hu_e , 'U', -1._wp, hv_e , 'V', -1._wp  &
-                 &                         , hur_e, 'U', -1._wp, hvr_e, 'V', -1._wp  )
+                 &                         , hu_e , 'U',  1._wp, hv_e , 'V',  1._wp  &
+                 &                         , hur_e, 'U',  1._wp, hvr_e, 'V',  1._wp  )
          ELSE
             CALL lbc_lnk_multi( 'dynspg_ts', ua_e , 'U', -1._wp, va_e , 'V', -1._wp  )
@@ -803,4 +803,6 @@
 
       IF ( ln_wd_dl .and. ln_wd_dl_bc) THEN 
+         ! need to set lbc here because not done prior time averaging
+         CALL lbc_lnk_multi( 'dynspg_ts', zuwdav2, 'U', 1._wp, zvwdav2, 'V', 1._wp)
          DO jk = 1, jpkm1
             un(:,:,jk) = ( un_adv(:,:)*r1_hu_n(:,:) &
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/TRA/traadv_fct.F90
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/TRA/traadv_fct.F90	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OCE/TRA/traadv_fct.F90	(revision 12075)
@@ -659,5 +659,5 @@
          DO ji = fs_2, fs_jpim1
             ikt = mikt(ji,jj) + 1            ! w-point below the 1st  wet point
-            ikb = mbkt(ji,jj)                !     -   above the last wet point
+            ikb = MAX(mbkt(ji,jj), 2)        !     -   above the last wet point
             !
             zwd (ji,jj,ikt) = 1._wp          ! top
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OFF/nemogcm.F90
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OFF/nemogcm.F90	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/OFF/nemogcm.F90	(revision 12075)
@@ -114,7 +114,9 @@
 #else
                                 CALL dta_dyn    ( istp )         ! Interpolation of the dynamical fields
+#endif
+                                CALL trc_stp    ( istp )         ! time-stepping
+#if ! defined key_sed_off
          IF( .NOT.ln_linssh )   CALL dta_dyn_swp( istp )         ! swap of sea  surface height and vertical scale factors
 #endif
-                                CALL trc_stp    ( istp )         ! time-stepping
                                 CALL stp_ctl    ( istp, indic )  ! Time loop: control and print
          istp = istp + 1
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/TOP/TRP/trcnxt.F90
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/TOP/TRP/trcnxt.F90	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/src/TOP/TRP/trcnxt.F90	(revision 12075)
@@ -139,5 +139,14 @@
       ENDIF
       !                                ! Leap-Frog + Asselin filter time stepping
-      IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN    ! Euler time-stepping (only swap)
+      IF( (neuler == 0 .AND. kt == nittrc000) ) THEN
+         ! set up for leapfrog on second timestep
+         DO jn = 1, jptra
+            DO jk = 1, jpkm1
+               trb(:,:,jk,jn) = trn(:,:,jk,jn)  
+               trn(:,:,jk,jn) = tra(:,:,jk,jn)
+            END DO
+         END DO
+      ELSE IF( ln_top_euler ) THEN
+         ! always doing euler timestepping
          DO jn = 1, jptra
             DO jk = 1, jpkm1
@@ -146,4 +155,6 @@
             END DO
          END DO
+      ENDIF
+      IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN    ! Euler time-stepping (only swap)
          IF (l_trdtrc .AND. .NOT. ln_linssh ) THEN   ! Zero Asselin filter contribution must be explicitly written out since for vvl
             !                                        ! Asselin filter is output by tra_nxt_vvl that is not called on this time step
Index: /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/tests/CANAL/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/tests/CANAL/MY_SRC/usrdef_nam.F90	(revision 12074)
+++ /NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/tests/CANAL/MY_SRC/usrdef_nam.F90	(revision 12075)
@@ -86,5 +86,5 @@
       REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only)
       READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist', cdtxt )
+902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' )
       !
       IF(lwm)   WRITE( numond, namusr_def )
