Index: /branches/UKMO/dev_r5518_obs_oper_update_sit/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/UKMO/dev_r5518_obs_oper_update_sit/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 11928)
+++ /branches/UKMO/dev_r5518_obs_oper_update_sit/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 11929)
@@ -1198,5 +1198,6 @@
    ln_sla     = .false.             ! Logical switch for SLA observations
    ln_sst     = .false.             ! Logical switch for SST observations
-   ln_sic     = .false.             ! Logical switch for Sea Ice observations
+   ln_sic     = .false.             ! Logical switch for Sea Ice Concentration observations
+   ln_sit     = .false.             ! Logical switch for Sea Ice Thickness observations
    ln_vel3d   = .false.             ! Logical switch for velocity observations
    ln_sss     = .false.             ! Logical swithc for SSS observations
@@ -1239,4 +1240,5 @@
    ln_sss_fp_indegs = .true.
    ln_sic_fp_indegs = .true.
+   ln_sit_fp_indegs = .true.
 ! All of the *files* variables below are arrays. Use namelist_cfg to add more files
    cn_profbfiles = 'profiles_01.nc'      ! Profile feedback input observation file names
@@ -1244,4 +1246,5 @@
    cn_sstfbfiles = 'sst_01.nc'           ! SST feedback input observation file names
    cn_sicfbfiles = 'sic_01.nc'           ! SIC feedback input observation file names
+   cn_sitfbfiles = 'sit_01.nc'           ! SIT feedback input observation file names
    cn_velfbfiles = 'vel_01.nc'           ! Velocity feedback input observation file names
    cn_sssfbfiles = 'sss_01.nc'           ! SSS feedback input observation file names
@@ -1284,4 +1287,6 @@
    rn_sic_avglamscl = 0.                 ! E/W diameter of SIC observation footprint (metres/degrees)
    rn_sic_avgphiscl = 0.                 ! N/S diameter of SIC observation footprint (metres/degrees)
+   rn_sit_avglamscl = 0.                 ! E/W diameter of SIT observation footprint (metres/degrees)
+   rn_sit_avgphiscl = 0.                 ! N/S diameter of SIT observation footprint (metres/degrees)
    nn_1dint = 0                          ! Type of vertical interpolation method
    nn_2dint_default = 0                  ! Default horizontal interpolation method
@@ -1290,4 +1295,5 @@
    nn_2dint_sss = -1                     ! Horizontal interpolation method for SSS
    nn_2dint_sic = -1                     ! Horizontal interpolation method for SIC
+   nn_2dint_sit = -1                     ! Horizontal interpolation method for SIT
    nn_msshc = 0                          ! MSSH correction scheme
    rn_mdtcorr = 1.61                     ! MDT  correction
Index: /branches/UKMO/dev_r5518_obs_oper_update_sit/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
===================================================================
--- /branches/UKMO/dev_r5518_obs_oper_update_sit/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 11928)
+++ /branches/UKMO/dev_r5518_obs_oper_update_sit/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 11929)
@@ -22,4 +22,5 @@
    USE obs_read_surf            ! Reading and allocation of surface obs
    USE obs_readmdt              ! Reading and allocation of MDT for SLA.
+   USE obs_readsnowdepth        ! Get model snow depth for conversion of freeboard to ice thickness 
    USE obs_prep                 ! Preparation of obs. (grid search etc).
    USE obs_oper                 ! Observation operators
@@ -53,5 +54,6 @@
    LOGICAL :: ln_sst_fp_indegs     !: T=>     SST obs footprint size specified in degrees, F=> in metres
    LOGICAL :: ln_sss_fp_indegs     !: T=>     SSS obs footprint size specified in degrees, F=> in metres
-   LOGICAL :: ln_sic_fp_indegs     !: T=> sea-ice obs footprint size specified in degrees, F=> in metres
+   LOGICAL :: ln_sic_fp_indegs     !: T=> SIC obs footprint size specified in degrees, F=> in metres
+   LOGICAL :: ln_sit_fp_indegs     !: T=> SIT obs footprint size specified in degrees, F=> in metres
    LOGICAL :: ln_output_clim       !: Logical switch for interpolating and writing T/S climatology
 
@@ -64,6 +66,8 @@
    REAL(wp) :: rn_sss_avglamscl     !: E/W diameter of SSS observation footprint
    REAL(wp) :: rn_sss_avgphiscl     !: N/S diameter of SSS observation footprint
-   REAL(wp) :: rn_sic_avglamscl     !: E/W diameter of sea-ice observation footprint
-   REAL(wp) :: rn_sic_avgphiscl     !: N/S diameter of sea-ice observation footprint
+   REAL(wp) :: rn_sic_avglamscl     !: E/W diameter of SIC observation footprint
+   REAL(wp) :: rn_sic_avgphiscl     !: N/S diameter of SIC observation footprint
+   REAL(wp) :: rn_sit_avglamscl     !: E/W diameter of SIT observation footprint
+   REAL(wp) :: rn_sit_avgphiscl     !: N/S diameter of SIT observation footprint
 
    INTEGER :: nn_1dint         !: Vertical interpolation method
@@ -72,5 +76,6 @@
    INTEGER :: nn_2dint_sst     !: SST horizontal interpolation method (-1 = default)
    INTEGER :: nn_2dint_sss     !: SSS horizontal interpolation method (-1 = default)
-   INTEGER :: nn_2dint_sic     !: Seaice horizontal interpolation method (-1 = default)
+   INTEGER :: nn_2dint_sic     !: SIC horizontal interpolation method (-1 = default)
+   INTEGER :: nn_2dint_sit     !: SIT horizontal interpolation method (-1 = default)
  
    INTEGER, DIMENSION(imaxavtypes) :: &
@@ -132,4 +137,8 @@
       !!        !  15-02  (M. Martin) Simplification of namelist and code
       !!----------------------------------------------------------------------
+#if defined key_cice
+USE sbc_oce, ONLY : &        ! CICE variables
+   & thick_s                 ! snow depth for freeboard conversion 
+#endif
 
       IMPLICIT NONE
@@ -153,4 +162,5 @@
          & cn_slafbfiles,      & ! Sea level anomaly input filenames
          & cn_sicfbfiles,      & ! Seaice concentration input filenames
+         & cn_sitfbfiles,      & ! Seaice thickness input filenames
          & cn_velfbfiles,      & ! Velocity profile input filenames
          & cn_sssfbfiles,      & ! Sea surface salinity input filenames
@@ -185,4 +195,5 @@
 
 
+      LOGICAL :: ln_seaicetypes = .FALSE.          ! Logical switch inindicating data type is sea ice
       LOGICAL :: ln_t3d          ! Logical switch for temperature profiles
       LOGICAL :: ln_s3d          ! Logical switch for salinity profiles
@@ -190,4 +201,5 @@
       LOGICAL :: ln_sst          ! Logical switch for sea surface temperature
       LOGICAL :: ln_sic          ! Logical switch for sea ice concentration
+      LOGICAL :: ln_sit          ! Logical switch for sea ice thickness
       LOGICAL :: ln_sss          ! Logical switch for sea surface salinity obs
       LOGICAL :: ln_vel3d        ! Logical switch for velocity (u,v) obs
@@ -248,5 +260,5 @@
 
       NAMELIST/namobs/ln_diaobs, ln_t3d, ln_s3d, ln_sla,              &
-         &            ln_sst, ln_sic, ln_sss, ln_vel3d,               &
+         &            ln_sst, ln_sic, ln_sit, ln_sss, ln_vel3d,               &
          &            ln_slchltot, ln_slchldia, ln_slchlnon,          &
          &            ln_slchldin, ln_slchlmic, ln_slchlnan,          &
@@ -265,6 +277,8 @@
          &            ln_sla_fp_indegs, ln_sst_fp_indegs,             &
          &            ln_sss_fp_indegs, ln_sic_fp_indegs,             &
+         &            ln_sit_fp_indegs,                               &
          &            cn_profbfiles, cn_slafbfiles,                   &
          &            cn_sstfbfiles, cn_sicfbfiles,                   &
+         &            cn_sitfbfiles,                                  &
          &            cn_velfbfiles, cn_sssfbfiles,                   &
          &            cn_slchltotfbfiles, cn_slchldiafbfiles,         &
@@ -288,7 +302,8 @@
          &            rn_sss_avglamscl, rn_sss_avgphiscl,             &
          &            rn_sic_avglamscl, rn_sic_avgphiscl,             &
+         &            rn_sit_avglamscl, rn_sit_avgphiscl,             &
          &            nn_1dint, nn_2dint_default,                     &
          &            nn_2dint_sla, nn_2dint_sst,                     &
-         &            nn_2dint_sss, nn_2dint_sic,                     &
+         &            nn_2dint_sss, nn_2dint_sic, nn_2dint_sit,       &
          &            nn_msshc, rn_mdtcorr, rn_mdtcutoff,             &
          &            nn_profdavtypes
@@ -303,4 +318,5 @@
       cn_sstfbfiles(:)      = ''
       cn_sicfbfiles(:)      = ''
+      cn_sitfbfiles(:)      = ''
       cn_velfbfiles(:)      = ''
       cn_sssfbfiles(:)      = ''
@@ -365,5 +381,6 @@
          WRITE(numout,*) '             Logical switch for SLA observations                      ln_sla = ', ln_sla
          WRITE(numout,*) '             Logical switch for SST observations                      ln_sst = ', ln_sst
-         WRITE(numout,*) '             Logical switch for Sea Ice observations                  ln_sic = ', ln_sic
+         WRITE(numout,*) '             Logical switch for SIC observations                      ln_sic = ', ln_sic
+         WRITE(numout,*) '             Logical switch for SIT observations                      ln_sit = ', ln_sit
          WRITE(numout,*) '             Logical switch for velocity observations               ln_vel3d = ', ln_vel3d
          WRITE(numout,*) '             Logical switch for SSS observations                      ln_sss = ', ln_sss
@@ -404,4 +421,5 @@
          WRITE(numout,*) '             Type of horizontal interpolation method for SSS    nn_2dint_sss = ', nn_2dint_sss
          WRITE(numout,*) '             Type of horizontal interpolation method for SIC    nn_2dint_sic = ', nn_2dint_sic
+         WRITE(numout,*) '             Type of horizontal interpolation method for SIT    nn_2dint_sit = ', nn_2dint_sit
          WRITE(numout,*) '             Default E/W diameter of obs footprint      rn_default_avglamscl = ', rn_default_avglamscl
          WRITE(numout,*) '             Default N/S diameter of obs footprint      rn_default_avgphiscl = ', rn_default_avgphiscl
@@ -416,4 +434,7 @@
          WRITE(numout,*) '             SIC N/S diameter of obs footprint              rn_sic_avgphiscl = ', rn_sic_avgphiscl
          WRITE(numout,*) '             SIC obs footprint in deg [T] or m [F]          ln_sic_fp_indegs = ', ln_sic_fp_indegs
+         WRITE(numout,*) '             SIT E/W diameter of obs footprint              rn_sit_avglamscl = ', rn_sit_avglamscl
+         WRITE(numout,*) '             SIT N/S diameter of obs footprint              rn_sit_avgphiscl = ', rn_sit_avgphiscl
+         WRITE(numout,*) '             SIT obs footprint in deg [T] or m [F]          ln_sit_fp_indegs = ', ln_sit_fp_indegs
          WRITE(numout,*) '             Rejection of observations near land switch               ln_nea = ', ln_nea
          WRITE(numout,*) '             Rejection of obs near open bdys                 ln_bound_reject = ', ln_bound_reject
@@ -436,5 +457,5 @@
          &                  ln_pchltot,  ln_pno3,     ln_psi4,     ln_ppo4,     &
          &                  ln_pdic,     ln_palk,     ln_pph,      ln_po2 /) )
-      nsurftypes = COUNT( (/ln_sla, ln_sst, ln_sic, ln_sss,                     &
+      nsurftypes = COUNT( (/ln_sla, ln_sst, ln_sic, ln_sit, ln_sss,             &
          &                  ln_slchltot, ln_slchldia, ln_slchlnon, ln_slchldin, &
          &                  ln_slchlmic, ln_slchlnan, ln_slchlpic, ln_schltot,  &
@@ -555,4 +576,9 @@
             cobstypessurf(jtype) = 'sic'
             clsurffiles(jtype,:) = cn_sicfbfiles
+         ENDIF
+         IF (ln_sit) THEN
+            jtype = jtype + 1
+            cobstypessurf(jtype) = 'sit'
+            clsurffiles(jtype,:) = cn_sitfbfiles
          ENDIF
          IF (ln_sss) THEN
@@ -670,4 +696,14 @@
                ztype_avgphiscl = rn_sic_avgphiscl
                ltype_fp_indegs = ln_sic_fp_indegs
+               ltype_night     = .FALSE.
+            ELSE IF ( TRIM(cobstypessurf(jtype)) == 'sit' ) THEN
+               IF ( nn_2dint_sit == -1 ) THEN
+                  n2dint_type  = nn_2dint_default
+               ELSE
+                  n2dint_type  = nn_2dint_sit
+               ENDIF
+               ztype_avglamscl = rn_sit_avglamscl
+               ztype_avgphiscl = rn_sit_avgphiscl
+               ltype_fp_indegs = ln_sit_fp_indegs
                ltype_night     = .FALSE.
             ELSE IF ( TRIM(cobstypessurf(jtype)) == 'sss' ) THEN
@@ -858,5 +894,6 @@
                & ltype_clim = .TRUE.
 
-            IF ( TRIM(cobstypessurf(jtype)) == 'sla' ) THEN
+            IF ( (TRIM(cobstypessurf(jtype)) == 'sla') .OR. &
+               & (TRIM(cobstypessurf(jtype)) == 'sit') ) THEN
                nvarssurf(jtype) = 1
                nextrsurf(jtype) = 2
@@ -915,5 +952,10 @@
                &               llnightav(jtype), ltype_clim, clvars )
 
-            CALL obs_pre_surf( surfdata(jtype), surfdataqc(jtype), ln_nea, ln_bound_reject )
+            IF ( TRIM(cobstypessurf(jtype)) == 'sit' ) THEN
+               ln_seaicetypes = .TRUE.
+            ELSE
+               ln_seaicetypes = .FALSE.
+            ENDIF           
+            CALL obs_pre_surf( surfdata(jtype), surfdataqc(jtype), ln_nea, ln_bound_reject, ln_seaicetypes )
 
             IF ( TRIM(cobstypessurf(jtype)) == 'sla' ) THEN
@@ -922,4 +964,8 @@
                   & CALL obs_rea_altbias ( surfdataqc(jtype), n2dintsurf(jtype), cn_altbiasfile )
             ENDIF
+
+            IF ( TRIM(cobstypessurf(jtype)) == 'sit' ) THEN
+               CALL obs_rea_snowdepth( surfdataqc(jtype), n2dintsurf(jtype), thick_s(:,:) )
+            ENDIF 
 
             IF ( TRIM(cobstypessurf(jtype)) == 'sst' .AND. ln_sstbias ) THEN
@@ -990,5 +1036,7 @@
 #endif
 #if defined key_cice
-      USE sbc_oce, ONLY : fr_i     ! ice fraction
+      USE sbc_oce, ONLY : &        ! CICE variables
+         & fr_i,          &        ! ice fraction
+         & thick_i                 ! ice thickness
 #endif
 #if defined key_top
@@ -1323,9 +1371,6 @@
                         &           'time-step but some obs are valid then.' )
                      WRITE(numout,*)surfdataqc(jtype)%nsstpmpp(1), &
-                        &           ' sea-ice obs will be missed'
+                        &           ' sea-ice concentration obs will be missed'
                   ENDIF
-                  surfdataqc(jtype)%nsurfup = surfdataqc(jtype)%nsurfup + &
-                     &                        surfdataqc(jtype)%nsstp(1)
-                  CYCLE
                ELSE
 #if defined key_cice
@@ -1334,8 +1379,26 @@
                   zsurfvar(:,:) = 1._wp - frld(:,:)
 #else
-               CALL ctl_stop( ' Trying to run sea-ice observation operator', &
+               CALL ctl_stop( ' Trying to run sea-ice concentration observation operator', &
                   &           ' but no sea-ice model appears to have been defined' )
 #endif
                ENDIF
+
+            CASE('sit')
+              IF ( kstp == 0 ) THEN
+                 IF ( lwp .AND. surfdataqc(jtype)%nsstpmpp(1) > 0 ) THEN
+                    CALL ctl_warn( 'Sea-ice not initialised on zeroth '// &
+                       &           'time-step but some obs are valid then.' )
+                    WRITE(numout,*)surfdataqc(jtype)%nsstpmpp(1), &
+                       &           ' sea-ice thickness obs will be missed and QC flag set to 4'
+                 ENDIF                                 
+              ELSE       
+#if defined key_cice
+                 zsurfvar(:,:) = thick_i(:,:)
+#elif defined key_lim2 || defined key_lim3
+                 CALL ctl_stop( ' No sea-ice thickness observation operator defined for LIM model' )
+#else
+                 CALL ctl_stop( ' Trying to run sea-ice thickness observation operator', &
+                  &           ' but no sea-ice model appears to have been defined' )
+#endif
 
             CASE('slchltot')
@@ -1631,4 +1694,11 @@
                &               lfpindegs(jtype) )
 
+
+           ! Change label of data from FBD ("freeboard") to SIT ("Sea Ice
+           ! Thickness")
+            IF ( TRIM(surfdataqc(jtype)%cvars(1)) == 'FBD' ) THEN
+                 surfdata(jtype)%cvars(1) = 'SIT'
+            ENDIF
+
          END DO
 
