Index: /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 11252)
+++ /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 11253)
@@ -1213,4 +1213,5 @@
    ln_slphynon = .false.            ! Logical switch for surface non-diatom log10(phytoplankton carbon) obs
    ln_sspm     = .false.            ! Logical switch for surface suspended particulate matter obs
+   ln_skd490   = .false.            ! Logical switch for surface attenuation coefficient of downwelling radiation at 490 nm
    ln_sfco2    = .false.            ! Logical switch for surface fugacity         of carbon dioxide obs
    ln_spco2    = .false.            ! Logical switch for surface partial pressure of carbon dioxide obs
@@ -1256,4 +1257,5 @@
    cn_slphynonfbfiles = 'slphynon_01.nc' ! Surface non-diatom log10(phytoplankton carbon) obs file names
    cn_sspmfbfiles     = 'sspm_01.nc'     ! Surface suspended particulate matter obs file names
+   cn_skd490fbfiles   = 'skd490_01.nc'   ! Surface Kd490 obs file names
    cn_sfco2fbfiles    = 'sfco2_01.nc'    ! Surface fugacity         of carbon dioxide obs file names
    cn_spco2fbfiles    = 'spco2_01.nc'    ! Surface partial pressure of carbon dioxide obs file names
Index: /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
===================================================================
--- /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 11252)
+++ /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 11253)
@@ -165,4 +165,5 @@
          & cn_slphynonfbfiles, & ! Surface non-diatom log10(phytoplankton carbon) input filenames
          & cn_sspmfbfiles,     & ! Surface suspended particulate matter input filenames
+         & cn_skd490fbfiles,   & ! Surface Kd490 input filenames
          & cn_sfco2fbfiles,    & ! Surface fugacity         of carbon dioxide input filenames
          & cn_spco2fbfiles,    & ! Surface partial pressure of carbon dioxide input filenames
@@ -201,4 +202,5 @@
       LOGICAL :: ln_slphynon     ! Logical switch for surface non-diatom log10(phytoplankton carbon) obs
       LOGICAL :: ln_sspm         ! Logical switch for surface suspended particulate matter obs
+      LOGICAL :: ln_skd490       ! Logical switch for surface Kd490
       LOGICAL :: ln_sfco2        ! Logical switch for surface fugacity         of carbon dioxide obs
       LOGICAL :: ln_spco2        ! Logical switch for surface partial pressure of carbon dioxide obs
@@ -248,4 +250,5 @@
          &            ln_slphytot, ln_slphydia, ln_slphynon,          &
          &            ln_sspm,     ln_sfco2,    ln_spco2,             &
+         &            ln_skd490,                                      &
          &            ln_plchltot, ln_pchltot,  ln_pno3,              &
          &            ln_psi4,     ln_ppo4,     ln_pdic,              &
@@ -266,4 +269,5 @@
          &            cn_slphytotfbfiles, cn_slphydiafbfiles,         &
          &            cn_slphynonfbfiles, cn_sspmfbfiles,             &
+         &            cn_skd490fbfiles,                               &
          &            cn_sfco2fbfiles, cn_spco2fbfiles,               &
          &            cn_plchltotfbfiles, cn_pchltotfbfiles,          &
@@ -308,4 +312,5 @@
       cn_slphynonfbfiles(:) = ''
       cn_sspmfbfiles(:)     = ''
+      cn_skd490fbfiles(:)   = ''
       cn_sfco2fbfiles(:)    = ''
       cn_spco2fbfiles(:)    = ''
@@ -370,4 +375,5 @@
          WRITE(numout,*) '             Logical switch for surface non-diatom log(phyC) obs ln_slphynon = ', ln_slphynon
          WRITE(numout,*) '             Logical switch for surface SPM observations             ln_sspm = ', ln_sspm
+         WRITE(numout,*) '             Logical switch for surface Kd490 observations         ln_skd490 = ', ln_skd490
          WRITE(numout,*) '             Logical switch for surface fCO2 observations           ln_sfco2 = ', ln_sfco2
          WRITE(numout,*) '             Logical switch for surface pCO2 observations           ln_spco2 = ', ln_spco2
@@ -428,5 +434,5 @@
          &                  ln_slchlmic, ln_slchlnan, ln_slchlpic, ln_schltot,  &
          &                  ln_slphytot, ln_slphydia, ln_slphynon, ln_sspm,     &
-         &                  ln_sfco2,    ln_spco2 /) )
+         &                  ln_skd490,   ln_sfco2,    ln_spco2 /) )
 
       IF ( nproftypes == 0 .AND. nsurftypes == 0 ) THEN
@@ -599,4 +605,9 @@
             cobstypessurf(jtype) = 'sspm'
             clsurffiles(jtype,:) = cn_sspmfbfiles
+         ENDIF
+         IF (ln_skd490) THEN
+            jtype = jtype + 1
+            cobstypessurf(jtype) = 'skd490'
+            clsurffiles(jtype,:) = cn_skd490fbfiles
          ENDIF
          IF (ln_sfco2) THEN
@@ -938,5 +949,5 @@
 #if defined key_fabm
       REAL(wp), POINTER, DIMENSION(:,:,:) :: &
-         & pco2_3d                 ! 3D pCO2 from FABM
+         & fabm_3d                 ! 3D variable from FABM
 #endif
 
@@ -1177,5 +1188,5 @@
          CALL wrk_alloc( jpi, jpj, zsurfmask )
 #if defined key_fabm
-         CALL wrk_alloc( jpi, jpj, jpk, pco2_3d )
+         CALL wrk_alloc( jpi, jpj, jpk, fabm_3d )
 #endif
 
@@ -1407,4 +1418,20 @@
 #endif
 
+            CASE('skd490')
+#if defined key_hadocc
+               CALL ctl_stop( ' Trying to run skd490 observation operator', &
+                  &           ' but HadOCC does not explicitly simulate Kd490' )
+#elif defined key_medusa
+               CALL ctl_stop( ' Trying to run skd490 observation operator', &
+                  &           ' but MEDUSA does not explicitly simulate Kd490' )
+#elif defined key_fabm
+               ! light_xEPS diagnostic variable
+               fabm_3d(:,:,:) = fabm_get_interior_diagnostic_data(model, jp_fabm_xeps)
+               zsurfvar(:,:) = fabm_3d(:,:,1)
+#else
+               CALL ctl_stop( ' Trying to run skd490 observation operator', &
+                  &           ' but no biogeochemical model appears to have been defined' )
+#endif
+
             CASE('sfco2')
 #if defined key_hadocc
@@ -1421,6 +1448,6 @@
 #elif defined key_fabm
                ! First, get pCO2 from FABM
-               pco2_3d(:,:,:) = fabm_get_interior_diagnostic_data(model, jp_fabm_o3pc)
-               zsurfvar(:,:) = pco2_3d(:,:,1)
+               fabm_3d(:,:,:) = fabm_get_interior_diagnostic_data(model, jp_fabm_o3pc)
+               zsurfvar(:,:) = fabm_3d(:,:,1)
                ! Now, convert pCO2 to fCO2, based on SST in K. This follows the standard methodology of:
                ! Pierrot et al. (2009), Recommendations for autonomous underway pCO2 measuring systems
@@ -1460,6 +1487,6 @@
                zsurfvar(:,:) = f2_pco2w(:,:)
 #elif defined key_fabm
-               pco2_3d(:,:,:) = fabm_get_interior_diagnostic_data(model, jp_fabm_o3pc)
-               zsurfvar(:,:) = pco2_3d(:,:,1)
+               fabm_3d(:,:,:) = fabm_get_interior_diagnostic_data(model, jp_fabm_o3pc)
+               zsurfvar(:,:) = fabm_3d(:,:,1)
 #else
                CALL ctl_stop( ' Trying to run spco2 observation operator', &
@@ -1495,5 +1522,5 @@
          CALL wrk_dealloc( jpi, jpj, zsurfmask )
 #if defined key_fabm
-         CALL wrk_dealloc( jpi, jpj, jpk, pco2_3d )
+         CALL wrk_dealloc( jpi, jpj, jpk, fabm_3d )
 #endif
 
Index: /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/NEMO/OPA_SRC/OBS/obs_write.F90
===================================================================
--- /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/NEMO/OPA_SRC/OBS/obs_write.F90	(revision 11252)
+++ /branches/UKMO/dev_r5518_obs_oper_update_kd490/NEMOGCM/NEMO/OPA_SRC/OBS/obs_write.F90	(revision 11253)
@@ -582,4 +582,11 @@
          cllongname = 'Surface suspended particulate matter'
          clunits    = 'g/m3'
+         clgrid     = 'T'
+
+      CASE('SKD490')
+
+         clfiletype = 'skd490fb'
+         cllongname = 'Surface attenuation coefficient of downwelling radiation at 490 nm'
+         clunits    = 'm-1'
          clgrid     = 'T'
 
