Index: /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 8407)
+++ /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 8408)
@@ -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,18 +109,9 @@
          slf_i(jp_emp ) = sn_emp
          !
-            ALLOCATE( sf(jpfld), STAT=ierror )        ! set sf structure
-            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), STAT=ierror )        ! set sf structure
          IF( ierror > 0 ) THEN   
             CALL ctl_stop( 'sbc_flx: unable to allocate sf structure' )   ;   RETURN  
          ENDIF
-         DO ji= 1, jpfld_local
+         DO ji= 1, jpfld
             ALLOCATE( sf(ji)%fnow(jpi,jpj,1) )
             IF( slf_i(ji)%ln_tint ) ALLOCATE( sf(ji)%fdta(jpi,jpj,1,2) )
@@ -151,39 +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
@@ -191,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 )
@@ -217,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/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 8407)
+++ /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 8408)
@@ -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/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 8407)
+++ /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 8408)
@@ -25,5 +25,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
@@ -139,5 +138,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/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 8407)
+++ /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 8408)
@@ -25,5 +25,4 @@
    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
@@ -31,5 +30,4 @@
 
    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)
Index: /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90
===================================================================
--- /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 8407)
+++ /branches/UKMO/r6232_CO6_CO5_zenv_pomsdwl/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 8408)
@@ -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 
@@ -80,14 +78,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 array')
-      IF( trc_oce_alloc /= 0 )   CALL ctl_warn('trc_oce_alloc: failed to allocate etot3, facvol or rlambda2 array')
    END FUNCTION trc_oce_alloc
 
