Index: branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 4670)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 4708)
@@ -147,10 +147,10 @@
 
       IF( lk_vvl ) THEN
-         z3d(:,:,:) = tsn(:,:,:,jp_tem) * fse3t_n(:,:,:)
+         z3d(:,:,:) = tsn(:,:,:,jp_tem) !* fse3t_n(:,:,:)
          CALL iom_put( "toce" , z3d                        )   ! heat content
          CALL iom_put( "sst"  , z3d(:,:,1)                 )   ! sea surface heat content
          z3d(:,:,1) = tsn(:,:,1,jp_tem) * z3d(:,:,1)
          CALL iom_put( "sst2" , z3d(:,:,1)                 )   ! sea surface content of squared temperature
-         z3d(:,:,:) = tsn(:,:,:,jp_sal) * fse3t_n(:,:,:)            
+         z3d(:,:,:) = tsn(:,:,:,jp_sal) !* fse3t_n(:,:,:)            
          CALL iom_put( "soce" , z3d                        )   ! salinity content
          CALL iom_put( "sss"  , z3d(:,:,1)                 )   ! sea surface salinity content
@@ -166,6 +166,6 @@
       END IF
       IF( lk_vvl .AND. (.NOT. ln_dynadv_vec) ) THEN
-         CALL iom_put( "uoce" , un(:,:,:) * fse3u_n(:,:,:) )    ! i-transport
-         CALL iom_put( "voce" , vn(:,:,:) * fse3v_n(:,:,:) )    ! j-transport
+         CALL iom_put( "uoce" , un(:,:,:) )!* fse3u_n(:,:,:) )    ! i-transport
+         CALL iom_put( "voce" , vn(:,:,:) )!* fse3v_n(:,:,:) )    ! j-transport
       ELSE
          CALL iom_put( "uoce" , un                         )    ! i-current
Index: branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 4670)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 4708)
@@ -203,4 +203,7 @@
       INTEGER  :: ji, jj, jk
       REAL(wp) ::   zsal = 35.50
+#if defined key_surge
+      REAL(wp) ::   ztem = 10.0
+#endif
       !!----------------------------------------------------------------------
       !
@@ -209,4 +212,8 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~   and constant salinity (',zsal,' psu)'
       !
+#if defined key_surge
+      tsn(:,:,:,jp_tem) = ztem * tmask(:,:,:)
+      tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem)
+#else
       DO jk = 1, jpk
          tsn(:,:,jk,jp_tem) = (  ( ( 7.5 - 0. * ABS( gphit(:,:) )/30. ) * ( 1.-TANH((fsdept(:,:,jk)-80.)/30.) )   &
@@ -214,4 +221,5 @@
          tsb(:,:,jk,jp_tem) = tsn(:,:,jk,jp_tem)
       END DO
+#endif
       tsn(:,:,:,jp_sal) = zsal * tmask(:,:,:)
       tsb(:,:,:,jp_sal) = tsn(:,:,:,jp_sal)
Index: branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4670)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4708)
@@ -303,4 +303,8 @@
       ! ocean albedo assumed to be constant + modify now Qsr to include the diurnal cycle                    ! Short Wave
       zztmp = 1. - albo
+#if defined key_surge
+      qsr(:,:)=0._wp
+      zqlw(:,:) = 0._wp
+#else
       IF( ln_dm2dc ) THEN   ;   qsr(:,:) = zztmp * sbc_dcy( sf(jp_qsr)%fnow(:,:,1) ) * tmask(:,:,1)
       ELSE                  ;   qsr(:,:) = zztmp *          sf(jp_qsr)%fnow(:,:,1)   * tmask(:,:,1)
@@ -308,4 +312,5 @@
 !CDIR COLLAPSE
       zqlw(:,:) = (  sf(jp_qlw)%fnow(:,:,1) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:)  ) * tmask(:,:,1)   ! Long  Wave
+#endif
       ! ----------------------------------------------------------------------------- !
       !     II    Turbulent FLUXES                                                    !
@@ -382,4 +387,5 @@
       !  Turbulent fluxes over ocean
       ! -----------------------------
+#if ! defined key_surge
       IF( ln_2m .OR. ( ln_bulk2z .AND. rn_zqt /= rn_zu ) ) THEN
          ! Values of temp. and hum. adjusted to height of wind must be used
@@ -394,4 +400,5 @@
 !CDIR COLLAPSE
       zqla (:,:) = Lv * zevap(:,:)                                                              ! Latent Heat
+#endif
 
       IF(ln_ctl) THEN
@@ -410,4 +417,8 @@
       ! ----------------------------------------------------------------------------- !
      
+#if defined key_surge
+      emp (:,:) = 0._wp
+      qns(:,:)  = 0._wp
+#else
 !CDIR COLLAPSE
       emp (:,:) = (  zevap(:,:)                                          &   ! mass flux (evap. - precip.)
@@ -421,4 +432,5 @@
          &     + sf(jp_snow)%fnow(:,:,1) * rn_pfac                                &   ! add solid  precip heat content at min(Tair,Tsnow)
          &     * ( MIN( sf(jp_tair)%fnow(:,:,1), rt0_snow ) - rt0 ) * cpic 
+#endif
       !
       CALL iom_put( "qlw_oce",   zqlw )                 ! output downward longwave heat over the ocean
Index: branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 4670)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 4708)
@@ -252,4 +252,6 @@
          nstop = nstop + 1
       ENDIF
+      IF ( lk_surge .and. .not. ( ln_blk_core .or. ln_ana ) ) &
+         &   CALL ctl_stop( ' surge model only compatible with analytical fluxes or core formulae' )     
       IF(lwp) THEN
          WRITE(numout,*)
Index: branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 4670)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 4708)
@@ -419,8 +419,11 @@
          &                  CALL zdf_ddm_init      ! double diffusive mixing
       !                                         ! Lateral physics
+#if ! defined key_surge
                             CALL ldf_tra_init      ! Lateral ocean tracer physics
+#endif
                             CALL ldf_dyn_init      ! Lateral ocean momentum physics
       IF( lk_ldfslp     )   CALL ldf_slp_init      ! slope of lateral mixing
 
+#if ! defined key_surge
       !                                     ! Active tracers
                             CALL tra_qsr_init   ! penetrative solar radiation qsr
@@ -431,4 +434,5 @@
                             CALL tra_ldf_init   ! lateral mixing
                             CALL tra_zdf_init   ! vertical mixing and after tracer fields
+#endif
 
       !                                     ! Dynamics
Index: branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/par_oce.F90
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/par_oce.F90	(revision 4670)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/par_oce.F90	(revision 4708)
@@ -99,4 +99,9 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_loop = .FALSE.  !: vector optimization flag
 #endif
+#if defined key_surge
+   LOGICAL, PUBLIC, PARAMETER ::   lk_surge     = .TRUE.   ! flag for 2d baratropic modelling
+#else
+   LOGICAL, PUBLIC, PARAMETER ::   lk_surge     = .FALSE.  ! flag for 2d baratropic modelling
+#endif
 
    !!----------------------------------------------------------------------
Index: branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4670)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4708)
@@ -223,4 +223,5 @@
       ! Active tracers                              (ua, va used as workspace)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+#if ! defined key_surge
                              tsa(:,:,:,:) = 0.e0            ! set tracer trends to zero
 
@@ -257,5 +258,5 @@
                              CALL tra_nxt( kstp )                ! tracer fields at next time step
       ENDIF
-
+#endif
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
       ! Dynamics                                    (tsa used as workspace)
