Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5417)
@@ -177,5 +177,4 @@
    LOGICAL, PUBLIC ::   ln_sco        !: s-coordinate or hybrid z-s coordinate
    LOGICAL, PUBLIC ::   ln_isfcav     !: presence of ISF 
-   LOGICAL, PUBLIC ::   ln_read_zenv  !:  whether to read zenv or calculate it
 
    !! All coordinates
@@ -246,5 +245,4 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hift  , hifu       !: and quasi-uniform spacing             t--u points (m)
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rx1                !: Maximum grid stiffness ratio
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zenv               !: Envelope Bathymetry
 
    !!----------------------------------------------------------------------
@@ -394,5 +392,5 @@
          &     tmask_i(jpi,jpj) , umask_i(jpi,jpj), vmask_i(jpi,jpj), fmask_i(jpi,jpj), &
          &     bmask(jpi,jpj)   ,                                                       &
-         &     mbkt   (jpi,jpj) , mbku (jpi,jpj) , mbkv(jpi,jpj) , zenv(jpi,jpj) , STAT=ierr(9) )
+         &     mbkt   (jpi,jpj) , mbku (jpi,jpj) , mbkv(jpi,jpj) , STAT=ierr(9) )
 
 ! (ISF) Allocation of basic array   
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5417)
@@ -146,6 +146,4 @@
          &             ppa2, ppkth2, ppacr2
       NAMELIST/namcla/ nn_cla
-      NAMELIST/namrun/ ln_rstdate, cn_rst_dir 
-
 #if defined key_netcdf4
       NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip
@@ -172,5 +170,4 @@
          WRITE(numout,*) '      file prefix restart input       cn_ocerst_in= ', cn_ocerst_in
          WRITE(numout,*) '      file prefix restart output      cn_ocerst_out= ', cn_ocerst_out
-         WRITE(numout,*) '      restart directory               cn_rst_dir = ', cn_rst_dir
          WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart
          WRITE(numout,*) '      start with forward time step    nn_euler   = ', nn_euler
@@ -182,5 +179,4 @@
          WRITE(numout,*) '      initial state output            nn_istate  = ', nn_istate
          WRITE(numout,*) '      frequency of restart file       nn_stock   = ', nn_stock
-         WRITE(numout,*) '      use date in restart name        ln_rstdate = ', ln_rstdate
          WRITE(numout,*) '      frequency of output file        nn_write   = ', nn_write
          WRITE(numout,*) '      multi file dimgout              ln_dimgnnn = ', ln_dimgnnn
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 5417)
@@ -102,5 +102,5 @@
       INTEGER ::   ios
       !
-      NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav, ln_read_zenv
+      NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav
       !!----------------------------------------------------------------------
       !
@@ -125,5 +125,4 @@
          WRITE(numout,*) '             s- or hybrid z-s-coordinate    ln_sco    = ', ln_sco
          WRITE(numout,*) '             ice shelf cavities             ln_isfcav = ', ln_isfcav
-         WRITE(numout,*) '             Read zenv from Bathy T/F ln_read_zenv    = ', ln_read_zenv
       ENDIF
 
@@ -541,7 +540,4 @@
                CALL iom_get  ( inum, jpdom_data, 'Bathymetry'    , bathy, lrowattr=ln_use_jattr  )
             END IF
-            IF ( ln_read_zenv ) THEN                  ! Whether we should read zenv or not 
-               CALL iom_get  ( inum, jpdom_data, 'zenv', zenv )
-            ENDIF
             CALL iom_close( inum )
             !                                                
@@ -1822,5 +1818,5 @@
       !
       REAL(wp), POINTER, DIMENSION(:,:  ) :: ztmpi1, ztmpi2, ztmpj1, ztmpj2
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: ztmp, zmsk, zri, zrj, zhbat
+      REAL(wp), POINTER, DIMENSION(:,:  ) :: zenv, ztmp, zmsk, zri, zrj, zhbat
 
       NAMELIST/namzgr_sco/ln_s_sh94, ln_s_sf12, ln_sigcrit, rn_sbot_min, rn_sbot_max, rn_hc, rn_rmax,rn_theta, &
@@ -1830,5 +1826,5 @@
       IF( nn_timing == 1 )  CALL timing_start('zgr_sco')
       !
-      CALL wrk_alloc( jpi, jpj, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 )
+      CALL wrk_alloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 )
       !
       REWIND( numnam_ref )              ! Namelist namzgr_sco in reference namelist : Sigma-stretching parameters
@@ -1884,9 +1880,4 @@
       !                                        ! =============================
       ! use r-value to create hybrid coordinates
-      scosrf(:,:) = 0._wp             ! ocean surface depth (here zero: no under ice-shelf sea)
-      scobot(:,:) = bathy(:,:)        ! ocean bottom  depth
-      IF( ln_read_zenv) THEN
-           WRITE(numout,*) '      Zenv is not calculated but read from Bathy File ln_read_zenv        = ', ln_read_zenv
-      ELSE
       zenv(:,:) = bathy(:,:)
       !
@@ -1910,4 +1901,6 @@
       ! 
       ! smooth the bathymetry (if required)
+      scosrf(:,:) = 0._wp             ! ocean surface depth (here zero: no under ice-shelf sea)
+      scobot(:,:) = bathy(:,:)        ! ocean bottom  depth
       !
       jl = 0
@@ -1973,7 +1966,4 @@
       END DO                                                !     End loop     !
       !                                                     ! ================ !
-
-      ENDIF ! End of IF Block for reading in zenv
-      CALL lbc_lnk( zenv, 'T', 1._wp, 'no0' )
       DO jj = 1, jpj
          DO ji = 1, jpi
@@ -2251,5 +2241,5 @@
       END DO
       !
-      CALL wrk_dealloc( jpi, jpj,  ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 )
+      CALL wrk_dealloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 )
       !
       IF( nn_timing == 1 )  CALL timing_stop('zgr_sco')
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 5417)
@@ -27,7 +27,5 @@
    CHARACTER(lc) ::   cn_ocerst_in     !: suffix of ocean restart name (input)
    CHARACTER(lc) ::   cn_ocerst_out    !: suffix of ocean restart name (output)
-   CHARACTER(lc) ::   cn_rst_dir = "./"!: restart directory
    LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file
-   LOGICAL       ::   ln_rstdate       !: Use calendar date rather than time-step in restart names
    INTEGER       ::   nn_no            !: job number
    INTEGER       ::   nn_rstctl        !: control of the time step (0, 1 or 2)
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5417)
@@ -55,10 +55,7 @@
       !!----------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt     ! ocean time-step
-      INTEGER             ::   iyear, imonth, iday
-      REAL (wp)           ::   zsec
       !!
       CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
       CHARACTER(LEN=50)   ::   clname   ! ice output restart file name
-      CHARACTER(len=150)  ::   clpath   ! full path to ocean output restart file
       !!----------------------------------------------------------------------
       !
@@ -77,23 +74,14 @@
       IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN
          ! beware of the format used to write kt (default is i8.8, that should be large enough...)
-         IF ( ln_rstdate ) THEN
-            CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec)
-            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
-         ELSE
-            IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
-            ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
-            ENDIF
+         IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
+         ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
          ENDIF
          ! create the file
          clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out)
-         clpath = TRIM(cn_rst_dir)
-         IF( clpath(LEN_TRIM(clpath):) /= '/' ) THEN
-           clpath = TRIM(clpath) // '/'
-         ENDIF
          IF(lwp) THEN
             WRITE(numout,*)
             SELECT CASE ( jprstlib )
-            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ocean restart binary file: ',TRIM(clpath)//clname
-            CASE DEFAULT         ;   WRITE(numout,*) '             open ocean restart NetCDF file: ',TRIM(clpath)//clname
+            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ocean restart binary file: '//clname
+            CASE DEFAULT         ;   WRITE(numout,*) '             open ocean restart NetCDF file: '//clname
             END SELECT
             IF ( snc4set%luse )      WRITE(numout,*) '             opened for NetCDF4 chunking and compression'
@@ -103,5 +91,5 @@
          ENDIF
          !
-         CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib )
+         CALL iom_open( clname, numrow, ldwrt = .TRUE., kiolib = jprstlib )
          lrst_oce = .TRUE.
       ENDIF
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/inv_bar_vel_mod.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/inv_bar_vel_mod.F90	(revision 5389)
+++ 	(revision )
@@ -1,44 +1,0 @@
-MODULE inv_bar_vel_mod
-
-!! Modules used
-  USE oce
-  USE dom_oce
-  USE sbcflx
-  USE sbc_oce
-
-!  REAL(wp), DIMENSION(jpi,jpj) :: apgu, apgv  !Pres grad force u and v component
-  PUBLIC inv
-
-CONTAINS
-
-  SUBROUTINE inv(kt)
-  USE oce
-  USE dom_oce
-  USE sbcflx
-  USE sbc_oce
-
-  INTEGER, INTENT ( in ) :: kt ! ocean time step
-
-!  REAL(wp), INTENT(in, out) :: ua,va
-!  REAL(wp), DIMENSION(jpi,jpj) :: apgu, apgv  !Pres grad force u and v component
-  
-!  IF ( ln_shelf_flx ) then
-! Adjust the velocity
-!  write(10,*)'kt = ', kt
-
-  Do jk = 1, jpk
-   Do jj = 1, jpj !should this be jpjm1 because the apgu and apgv were calcd with jpjm1?
-     Do ji = 1, jpi
-!  Do jk = 1, jpk-1
-!   Do jj = 2, jpj-1 !should this be jpjm1 because the apgu and apgv were calcd with jpjm1?
-!     Do ji = 2, jpi-1
-       ua(ji,jj,jk) = ua(ji,jj,jk) + apgu(ji,jj)
-       va(ji,jj,jk) = va(ji,jj,jk) + apgv(ji,jj)
-!       write(10,*)ua(ji,jj,jk)
-!       write(11,*)va(ji,jj,jk)
-     End do
-   End do
-  End do
-!  ENDIF
-END SUBROUTINE inv
-END MODULE inv_bar_vel_mod
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 5417)
@@ -108,7 +108,4 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sprecip           !: solid precipitation                          [Kg/m2/s]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fr_i              !: ice fraction = 1 - lead fraction      (between 0 to 1)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   pressnow          !: UKMO SHELF pressure
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   apgu              !: UKMO SHELF pressure forcing
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   apgv              !: UKMO SHELF pressure forcing
 #if defined key_cpl_carbon_cycle
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   atm_co2           !: atmospheric pCO2                             [ppm]
@@ -155,5 +152,4 @@
          !
       ALLOCATE( tprecip(jpi,jpj) , sprecip(jpi,jpj) , fr_i(jpi,jpj) ,     &
-         &      pressnow(jpi,jpj), apgu(jpi,jpj)    , apgv(jpi,jpj) ,     &
 #if defined key_cpl_carbon_cycle
          &      atm_co2(jpi,jpj) ,                                        &
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 5417)
@@ -28,5 +28,5 @@
    PUBLIC sbc_flx       ! routine called by step.F90
 
-   INTEGER , PARAMETER ::   jpfld   = 6   ! maximum number of files to read 
+   INTEGER , PARAMETER ::   jpfld   = 5   ! maximum number of files to read 
    INTEGER , PARAMETER ::   jp_utau = 1   ! index of wind stress (i-component) file
    INTEGER , PARAMETER ::   jp_vtau = 2   ! index of wind stress (j-component) file
@@ -34,8 +34,5 @@
    INTEGER , PARAMETER ::   jp_qsr  = 4   ! index of solar heat file
    INTEGER , PARAMETER ::   jp_emp  = 5   ! index of evaporation-precipation file
-   INTEGER , PARAMETER ::   jp_press = 6  ! index of pressure for UKMO shelf fluxes
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf    ! structure of input fields (file informations, fields read)
-   LOGICAL , PUBLIC    ::   ln_shelf_flx = .FALSE. ! UKMO SHELF specific flux flag
-   INTEGER             ::   jpfld_local   ! maximum number of files to read (locally modified depending on ln_shelf_flx) 
 
    !! * Substitutions
@@ -85,16 +82,9 @@
       REAL(wp) ::   zcdrag = 1.5e-3       ! drag coefficient
       REAL(wp) ::   ztx, zty, zmod, zcoef ! temporary variables
-      REAL     ::   cs                    ! UKMO SHELF: Friction co-efficient at surface
-      REAL     ::   totwindspd            ! UKMO SHELF: Magnitude of wind speed vector
-   
-      REAL(wp) ::   rhoa  = 1.22         ! Air density kg/m3
-      REAL(wp) ::   cdrag = 1.5e-3       ! drag coefficient 
       !!
       CHARACTER(len=100) ::  cn_dir                               ! Root directory for location of flx files
       TYPE(FLD_N), DIMENSION(jpfld) ::   slf_i                    ! array of namelist information structures
-      TYPE(FLD_N) ::   sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp, sn_press  !  informations about the fields to be read
-      LOGICAL     ::   ln_foam_flx  = .FALSE.                     ! UKMO FOAM specific flux flag
-      NAMELIST/namsbc_flx/ cn_dir, sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp,   &
-      &                    ln_foam_flx, sn_press, ln_shelf_flx
+      TYPE(FLD_N) ::   sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp  ! informations about the fields to be read
+      NAMELIST/namsbc_flx/ cn_dir, sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp
       !!---------------------------------------------------------------------
       !
@@ -119,14 +109,5 @@
          slf_i(jp_emp ) = sn_emp
          !
-         IF( ln_shelf_flx ) slf_i(jp_press) = sn_press
-
-         ! define local jpfld depending on shelf_flx logical
-         IF( ln_shelf_flx ) THEN
-            jpfld_local = jpfld
-         ELSE
-            jpfld_local = jpfld-1
-         ENDIF
-         !
-         ALLOCATE( sf(jpfld_local), STAT=ierror )        ! set sf structure
+         ALLOCATE( sf(jpfld), STAT=ierror )        ! set sf structure
          IF( ierror > 0 ) THEN   
             CALL ctl_stop( 'sbc_flx: unable to allocate sf structure' )   ;   RETURN  
@@ -151,38 +132,10 @@
          ENDIF
 !CDIR COLLAPSE
-            !!UKMO SHELF effect of atmospheric pressure on SSH
-            ! If using ln_apr_dyn, this is done there so don't repeat here.
-            IF( ln_shelf_flx .AND. .NOT. ln_apr_dyn) THEN
-               DO jj = 1, jpjm1
-                  DO ji = 1, jpim1
-                     apgu(ji,jj) = (-1.0/rau0)*(sf(jp_press)%fnow(ji+1,jj,1)-sf(jp_press)%fnow(ji,jj,1))/e1u(ji,jj)
-                     apgv(ji,jj) = (-1.0/rau0)*(sf(jp_press)%fnow(ji,jj+1,1)-sf(jp_press)%fnow(ji,jj,1))/e2v(ji,jj)
-                  END DO
-               END DO
-            ENDIF ! ln_shelf_flx
          DO jj = 1, jpj                                           ! set the ocean fluxes from read fields
             DO ji = 1, jpi
-                IF( ln_shelf_flx ) THEN
-                   !! UKMO SHELF - need atmospheric pressure to calculate Haney forcing
-                   pressnow(ji,jj) = sf(jp_press)%fnow(ji,jj,1)
-                   !! UKMO SHELF flux files contain wind speed not wind stress
-                   totwindspd = sqrt((sf(jp_utau)%fnow(ji,jj,1))**2.0 + (sf(jp_vtau)%fnow(ji,jj,1))**2.0)
-                   cs = 0.63 + (0.066 * totwindspd)
-                   utau(ji,jj) = cs * (rhoa/rau0) * sf(jp_utau)%fnow(ji,jj,1) * totwindspd
-                   vtau(ji,jj) = cs * (rhoa/rau0) * sf(jp_vtau)%fnow(ji,jj,1) * totwindspd
-                ELSE
-                   utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1)
-                   vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1)
-                ENDIF
-                qsr (ji,jj) = sf(jp_qsr )%fnow(ji,jj,1)
-                IF( ln_foam_flx .OR. ln_shelf_flx ) THEN
-                   !! UKMO FOAM flux files contain non-solar heat flux (qns) rather than total heat flux (qtot)
-                   qns (ji,jj) = sf(jp_qtot)%fnow(ji,jj,1)
-                   !! UKMO FOAM flux files contain the net DOWNWARD freshwater flux P-E rather then E-P
-                   emp (ji,jj) = -1. * sf(jp_emp )%fnow(ji,jj,1)
-                ELSE
-                   qns (ji,jj) = sf(jp_qtot)%fnow(ji,jj,1) - sf(jp_qsr)%fnow(ji,jj,1)
-                   emp (ji,jj) = sf(jp_emp )%fnow(ji,jj,1)
-                ENDIF
+               utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1)
+               vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1)
+               qns (ji,jj) = sf(jp_qtot)%fnow(ji,jj,1) - sf(jp_qsr)%fnow(ji,jj,1)
+               emp (ji,jj) = sf(jp_emp )%fnow(ji,jj,1)
             END DO
          END DO
@@ -190,11 +143,4 @@
          qns(:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp        ! mass flux is at SST
          !
-
-         !! UKMO FOAM wind fluxes need lbc_lnk calls owing to a bug in interp.exe
-         IF( ln_foam_flx ) THEN
-            CALL lbc_lnk( utau(:,:), 'U', -1. )
-            CALL lbc_lnk( vtau(:,:), 'V', -1. )
-         ENDIF
-    
          !                                                        ! module of wind stress and wind speed at T-point
          zcoef = 1. / ( zrhoa * zcdrag )
@@ -216,5 +162,5 @@
             WRITE(numout,*) 
             WRITE(numout,*) '        read daily momentum, heat and freshwater fluxes OK'
-            DO jf = 1, jpfld_local
+            DO jf = 1, jpfld
                IF( jf == jp_utau .OR. jf == jp_vtau )   zfact =     1.
                IF( jf == jp_qtot .OR. jf == jp_qsr  )   zfact =     0.1
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 5417)
@@ -42,5 +42,4 @@
    LOGICAL         ::   ln_sssr_bnd     ! flag to bound erp term 
    REAL(wp)        ::   rn_sssr_bnd     ! ABS(Max./Min.) value of erp term [mm/day]
-   LOGICAL         ::   ln_UKMO_haney   ! UKMO specific flag to calculate Haney forcing
 
    REAL(wp) , ALLOCATABLE, DIMENSION(:) ::   buffer   ! Temporary buffer for exchange
@@ -80,12 +79,4 @@
       INTEGER  ::   ierror   ! return error code
       !!
-      REAL(wp) ::   sst1,sst2                      ! sea surface temperature
-      REAL(wp) ::   e_sst1, e_sst2                 ! saturation vapour pressure
-      REAL(wp) ::   qs1,qs2                        ! specific humidity
-      REAL(wp) ::   pr_tmp                         ! temporary variable for pressure
- 
-      REAL(wp), DIMENSION(jpi,jpj) ::  hny_frc1    ! Haney forcing for sensible heat, correction for latent heat   
-      REAL(wp), DIMENSION(jpi,jpj) ::  hny_frc2    ! Haney forcing for sensible heat, correction for latent heat   
-      !!
       CHARACTER(len=100) ::  cn_dir          ! Root directory for location of ssr files
       TYPE(FLD_N) ::   sn_sst, sn_sss        ! informations about the fields to be read
@@ -104,32 +95,11 @@
             !
             IF( nn_sstr == 1 ) THEN                                   !* Temperature restoring term
-                 IF( ln_UKMO_haney ) THEN
-                     DO jj = 1, jpj
-                        DO ji = 1, jpi
-                           sst1   =  sst_m(ji,jj)
-                           sst2   =  sf_sst(1)%fnow(ji,jj,1)   
-                           e_sst1 = 10**((0.7859+0.03477*sst1)/(1.+0.00412*sst1))
-                           e_sst2 = 10**((0.7859+0.03477*sst2)/(1.+0.00412*sst2))         
-                           pr_tmp = 0.01*pressnow(ji,jj)  !pr_tmp = 1012.0
-                           qs1    = (0.62197*e_sst1)/(pr_tmp-0.378*e_sst1)
-                           qs2    = (0.62197*e_sst2)/(pr_tmp-0.378*e_sst2)
-                           hny_frc1(ji,jj) = sst1-sst2                   
-                           hny_frc2(ji,jj) = qs1-qs2                     
-                          !Might need to mask off land points.
-                           hny_frc1(ji,jj)=-hny_frc1(ji,jj)*wndm(ji,jj)*1.42
-                           hny_frc2(ji,jj)=-hny_frc2(ji,jj)*wndm(ji,jj)*4688.0
-                           qns(ji,jj)=qns(ji,jj)+hny_frc1(ji,jj)+hny_frc2(ji,jj)   
-                           qrp(ji,jj) = 0.e0
-                        END DO
-                     END DO
-                  ELSE
-                     DO jj = 1, jpj
-                        DO ji = 1, jpi
-                           zqrp = rn_dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj,1) )
-                           qns(ji,jj) = qns(ji,jj) + zqrp
-                           qrp(ji,jj) = zqrp
-                        END DO
-                     END DO
-                  ENDIF
+               DO jj = 1, jpj
+                  DO ji = 1, jpi
+                     zqrp = rn_dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj,1) )
+                     qns(ji,jj) = qns(ji,jj) + zqrp
+                     qrp(ji,jj) = zqrp
+                  END DO
+               END DO
                CALL iom_put( "qrp", qrp )                             ! heat flux damping
             ENDIF
@@ -193,5 +163,5 @@
       CHARACTER(len=100) ::  cn_dir          ! Root directory for location of ssr files
       TYPE(FLD_N) ::   sn_sst, sn_sss        ! informations about the fields to be read
-      NAMELIST/namsbc_ssr/ cn_dir, nn_sstr, nn_sssr, rn_dqdt, rn_deds, sn_sst, sn_sss, ln_sssr_bnd, rn_sssr_bnd, ln_UKMO_haney
+      NAMELIST/namsbc_ssr/ cn_dir, nn_sstr, nn_sssr, rn_dqdt, rn_deds, sn_sst, sn_sss, ln_sssr_bnd, rn_sssr_bnd
       INTEGER     ::  ios
       !!----------------------------------------------------------------------
@@ -219,5 +189,4 @@
          WRITE(numout,*) '      flag to bound erp term                 ln_sssr_bnd = ', ln_sssr_bnd
          WRITE(numout,*) '      ABS(Max./Min.) erp threshold           rn_sssr_bnd = ', rn_sssr_bnd, ' mm/day'
-         WRITE(numout,*) '      Haney forcing                          ln_UKMO_haney = ', ln_UKMO_haney
       ENDIF
       !
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/TRA/tradwl.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/TRA/tradwl.F90	(revision 5389)
+++ 	(revision )
@@ -1,238 +1,0 @@
-MODULE tradwl
-   !!======================================================================
-   !!                       ***  MODULE  tradwl  ***
-   !! Ocean physics: solar radiation penetration in the top ocean levels
-   !!======================================================================
-   !! History :  POLCOMS  !  1996-10  (J. Holt)  Original code
-   !!   NEMO     3.2  !  2010-03  (E. O'Dea)  Import to Nemo for use in Shelf Model
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   tra_dwl      : trend due to the solar radiation penetration
-   !!   tra_dwl_init : solar radiation penetration initialization
-   !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and active tracers
-   USE dom_oce         ! ocean space and time domain
-   USE sbc_oce         ! surface boundary condition: ocean
-   USE trc_oce         ! share SMS/Ocean variables
-   USE trd_oce        !  ocean variables trends
-   USE trdtra          ! ocean active tracers trends 
-   USE in_out_manager  ! I/O manager
-   USE phycst          ! physical constants
-   USE prtctl          ! Print control
-   USE iom             ! I/O manager
-   USE fldread         ! read input fields
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   tra_dwl        ! routine called by step.F90 (ln_tradwl=T)
-
-   !                                           !!* Namelist namtra_qsr: penetrative solar radiation
-   LOGICAL , PUBLIC ::   ln_tradwl  = .TRUE.    ! light absorption (dwl) flag
-   LOGICAL , PUBLIC ::   ln_vary_lambda  = .TRUE.    ! vary Lambda or not flag
-   
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-#  include "vectopt_loop_substitute.h90"
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
-   !! $Id: traqsr.F90 1756 2009-11-25 14:15:20Z smasson $
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE tra_dwl( kt )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE tra_qsr  ***
-      !!
-      !! ** Purpose :   Compute the temperature trend due to the solar radiation
-      !!      penetration and add it to the general temperature trend.
-      !!
-      !! ** Method  : The profile of the solar radiation within the ocean is defined
-      !!
-      !!          Jason Holt Oct 96
-      !!
-      !!          Calculates change in temperature due to penetrating
-      !!          radiation, with cooling at the surface layer
-      !!
-      !!          rad=rad0*exp(lambda*z)
-      !!
-      !!       Heat input into box is between z=K and z=K+1 is RAD(K)-RAD(K+1)
-      !!
-      !!
-      !! ** Action  : - update ta with the penetrative solar radiation trend
-      !!              - save the trend in ttrd ('key_trdtra')
-      !!
-      !!----------------------------------------------------------------------
-      USE oce, ONLY :   ztrdt => ua   ! use ua as 3D workspace   
-      USE oce, ONLY :   ztrds => va   ! use va as 3D workspace   
-      !!
-      INTEGER, INTENT(in) ::   kt     ! ocean time-step
-      !!
-      INTEGER  ::   ji, jj, jk           ! dummy loop indices
-      INTEGER  ::   irgb                 ! temporary integers
-      REAL(wp) ::   zchl, zcoef, zsi0r   ! temporary scalars
-      REAL(wp) ::   zc0, zc1, zc2, zc3   !    -         -
-      REAL(wp), DIMENSION(jpi,jpj)     ::   zekb, zekg, zekr            ! 2D workspace
-      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ze0, ze1 , ze2, ze3, zea    ! 3D workspace
-      !!----------------------------------------------------------------------
-      !! HERE GO VARIABLES USED IN POLCOMS CLEAN UP LATER
-
-      integer i,j,k
-!      real*8 dtmp(n-1)
-      real*8 dtmp(jpkm1)
-      real*8 z1,z2,Rad0,Rad1,Rad2,rD,SurfOut,cp
-      logical first
-      save first
-      data first/.true./
-      !!--------------------------End of POLCOMS variables Note instead of using saves
-      !!--------------------------Could shift this into initial code
-
-      IF( kt == nit000 ) THEN
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'tra_dwl : penetration of the surface solar radiation'
-         IF(lwp) WRITE(numout,*) '~~~~~~~'
-         CALL tra_dwl_init
-         IF( .NOT.ln_tradwl )   RETURN
-      ENDIF
-
-      IF( l_trdtra ) THEN      ! Save ta and sa trends
-         ztrdt(:,:,:) = tsa(:,:,:,jp_tem)
-         ztrds(:,:,:) = 0.e0
-      ENDIF
-!--------------------------------------------------------------------
-!  Set transmissivity
-!--------------------------------------------------------------------
-!
-!  Normal value
-!
-!---------------------------------------------------------------------------
-!
-!  Convert Heat fluxes to units used in POL subroutine dwl
-!
-!---------------------------------------------------------------------------
-      cp=3986.0d0
-
-    DO jj = 2, jpj
-         DO ji = fs_2, fs_jpim1
-           qsr(ji,jj)  = qsr(ji,jj)  * (r1_rau0_rcp)
-         ENDDO       !ji
-    ENDDO            !jj
-!--------------------------------------------------------------------------------
-      if ( first ) then
-        rlambda2(:,:) = 0.0
-        first=.false.
-           if ( ln_vary_lambda ) then
-!        do j=1,jesub    ! Original Polcoms style Loop
-!          do i=1,iesub  ! Original Polcoms style Loop
-
-        do jj=2,jpjm1
-          do ji = fs_2, fs_jpim1   ! vector opt.
-
-!            if(ipexb(i,j).ne. 0) then  (Mask, use Tmask instead)
-
-              rlambda2(ji,jj)=-0.033*log(hbatt(ji,jj))+0.2583    ! JIAs formula
-              rlambda2(ji,jj)=max(0.05,rlambda2(ji,jj))     ! limit in deep water
-          enddo ! ji
-        enddo ! jj
-      rlambda = 0.0
-       else
-      rLambda=0.154
-       endif ! If vary lambda
-      endif ! If first
-
-!      do j=1,jesub      ! Original Polcoms Style Loop
-!        do i=1,iesub    ! Original Polcoms Style Loop
-              do jk=2,jpk
-        DO jj=2,jpjm1
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-
-!--------------------------------------------------------------------
-! Calculate change in temperature
-!--------------------------------------------------------------------
-!
-!        rad0 = hfl_in(i,j)   ! change hfl_in to qsr I assume
-
-               rad0 = qsr(ji,jj)
-                     rD = rLambda2(ji,jj)  +rLambda      !  Transmissivity to be used here
-!       if rlambda 0 then rlambda2 not zer and vica versa 
-
-                z2=gdepw_0(ji,jj,jk-1)    ! grid box is from z=z1 to z=z2
-                z1=gdepw_0(ji,jj,jk)
-
-                Rad2=Rad0*(exp(-z2*rD)) ! radiation entering box
-                Rad1=Rad0*(exp(-z1*rD)) ! radiation leaving box
-
-
-                dtmp(jk)=1.0/(e3t_0(ji,jj,jk))*(Rad2-Rad1) !change in temperature
-                tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) + dtmp(jk)
-         enddo  ! ji
-         enddo  ! jj
-             enddo !jk
-
-
-      IF( l_trdtra ) THEN     ! qsr tracers trends saved for diagnostics
-         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:)
-!CEOD         CALL trd_tra( ztrdt, ztrds, jptra_qsr, 'TRA', kt )
-      ENDIF
-      !                       ! print mean trends (used for debugging)
-      IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' qsr  - Ta: ', mask1=tmask, clinfo3='tra-ta' )
-      !
-   END SUBROUTINE tra_dwl
-
-
-   SUBROUTINE tra_dwl_init
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE tra_dwl_init  ***
-      !!
-      !! ** Purpose :   Initialization for the penetrative solar radiation for Downwell routine
-      !!
-      !! ** Method  :   The profile of solar radiation within the ocean is set
-      !!      from two length scale of penetration (rn_si0,rn_si1) and a ratio
-      !!      (rn_abs). These parameters are read in the namtra_qsr namelist. The
-      !!      default values correspond to clear water (type I in Jerlov' 
-      !!      (1968) classification.
-      !!         called by tra_qsr at the first timestep (nit000)
-      !!
-      !! ** Action  : - initialize rn_si0, rn_si1 and rn_abs
-      !!
-      !! Reference : Jerlov, N. G., 1968 Optical Oceanography, Elsevier, 194pp.
-      !!----------------------------------------------------------------------
-      INTEGER  ::   ji, jj, jk            ! dummy loop indices
-      INTEGER  ::   ios                   ! Local integer output status for namelist read
-      INTEGER  ::   irgb, ierror          ! temporary integer
-      INTEGER  ::   ioptio, nqsr          ! temporary integer
-      REAL(wp) ::   zc0  , zc1            ! temporary scalars
-      REAL(wp) ::   zc2  , zc3  , zchl    !    -         -
-      REAL(wp) ::   zsi0r, zsi1r, zcoef   !    -         -
-      REAL(wp), DIMENSION(jpi,jpj)     ::   zekb, zekg, zekr              ! 2D workspace
-      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ze0 , ze1 , ze2 , ze3 , zea   ! 3D workspace
-      !!
-      CHARACTER(len=100) ::   cn_dir   ! Root directory for location of ssr files
-      TYPE(FLD_N)        ::   sn_chl   ! informations about the chlorofyl field to be read
-      NAMELIST/namtra_dwl/  ln_tradwl, ln_vary_lambda
-      !!----------------------------------------------------------------------
-
-      REWIND( numnam_ref )            ! Read Namelist namtra_dwl in reference namelist :
-      READ  ( numnam_ref, namtra_dwl, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_qsr in reference namelist', lwp )
-      
-      REWIND( numnam_cfg )            ! Read Namelist namtra_dwl in configuration namelist :
-      READ  ( numnam_cfg, namtra_dwl, IOSTAT = ios, ERR = 902)
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_qsr in configuration namelist', lwp )
-      !
-      IF(lwp) THEN                ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) 'tra_dwl_init : '
-         WRITE(numout,*) '~~~~~~~~~~~~'
-         WRITE(numout,*) '   Namelist namtra_dwl : set the parameter of penetration'
-         WRITE(numout,*) '      Light penetration (T) or not (F)         ln_tradwl  = ', ln_tradwl
-         WRITE(numout,*) '      Vary Lambda  (T) or not (F))             ln_vary_lambda  = ', ln_vary_lambda
-      ENDIF
-
-   END SUBROUTINE tra_dwl_init
-
-   !!======================================================================
-END MODULE tradwl
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 5417)
@@ -24,5 +24,4 @@
    USE trd_oce         ! trends: ocean variables
    USE trdtra          ! trends manager: tracers 
-   USE tradwl          ! solar radiation penetration (downwell method)
    !
    USE in_out_manager  ! I/O manager
@@ -142,5 +141,5 @@
 
 !!gm      IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration
-      IF( .NOT.ln_traqsr .and. .NOT.ln_tradwl ) THEN     ! no solar radiation penetration
+      IF( .NOT.ln_traqsr ) THEN     ! no solar radiation penetration
          qns(:,:) = qns(:,:) + qsr(:,:)      ! total heat flux in qns
          qsr(:,:) = 0.e0                     ! qsr set to zero
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5417)
@@ -100,10 +100,8 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       IF( lk_tide    )   CALL sbc_tide( kstp )
+      IF( lk_bdy     )   CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries
 
                          CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
                                                       ! clem: moved here for bdy ice purpose
-          IF ( ln_shelf_flx .AND. &
-              & .NOT. ln_apr_dyn) CALL inv( kstp )             !  modification to vel from atmos pres 
-      IF( lk_bdy     )   CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -245,5 +243,4 @@
                              CALL tra_sbc    ( kstp )       ! surface boundary condition
       IF( ln_traqsr      )   CALL tra_qsr    ( kstp )       ! penetrative solar radiation qsr
-      IF( ln_tradwl      )   CALL tra_dwl    ( kstp )       ! Polcoms Style Short Wave Radiation 
       IF( ln_trabbc      )   CALL tra_bbc    ( kstp )       ! bottom heat flux
       IF( lk_trabbl      )   CALL tra_bbl    ( kstp )       ! advective (and/or diffusive) bottom boundary layer scheme
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 5417)
@@ -25,10 +25,8 @@
    USE sbcrnf           ! surface boundary condition: runoff variables
    USE sbccpl           ! surface boundary condition: coupled formulation (call send at end of step)
-   USE sbcflx           ! surface boundary condition: Fluxes
    USE sbc_oce          ! surface boundary condition: ocean
    USE sbctide          ! Tide initialisation
 
    USE traqsr           ! solar radiation penetration      (tra_qsr routine)
-   USE tradwl           ! POLCOMS style solar radiation    (tra_dwl routine)  
    USE trasbc           ! surface boundary condition       (tra_sbc routine)
    USE trabbc           ! bottom boundary condition        (tra_bbc routine)
@@ -63,5 +61,4 @@
 
    USE sshwzv           ! vertical velocity and ssh        (ssh_nxt routine)
-   USE inv_bar_vel_mod  ! Atmos press effect on vel 
    !                                                       (ssh_swp routine)
    !                                                       (wzv     routine)
Index: branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90
===================================================================
--- branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 5389)
+++ branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 5417)
@@ -27,6 +27,4 @@
    REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   etot3         !: light absortion coefficient
    REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   facvol        !: volume for degraded regions
-   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   rlambda2      !: Lambda2 for downwell version of Short wave Radiation
-   REAL(wp), PUBLIC                                      ::   rlambda       !: Lambda  for downwell version of Short wave Radiation 
 
 #if defined key_top 
@@ -78,13 +76,12 @@
       !!                  ***  trc_oce_alloc  ***
       !!----------------------------------------------------------------------
-      INTEGER ::   ierr(3)        ! Local variables
+      INTEGER ::   ierr(2)        ! Local variables
       !!----------------------------------------------------------------------
       ierr(:) = 0
                      ALLOCATE( etot3 (jpi,jpj,jpk), STAT=ierr(1) )
       IF( lk_degrad) ALLOCATE( facvol(jpi,jpj,jpk), STAT=ierr(2) )
-                     ALLOCATE( rlambda2(jpi,jpj),   STAT=ierr(3) )
       trc_oce_alloc  = MAXVAL( ierr )
       !
-      IF( trc_oce_alloc /= 0 )   CALL ctl_warn('trc_oce_alloc: failed to allocate etot3, facvol or rlambda2 array')
+      IF( trc_oce_alloc /= 0 )   CALL ctl_warn('trc_oce_alloc: failed to allocate etot3 array')
    END FUNCTION trc_oce_alloc
 
