New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 12610 for branches/UKMO/dev_r5518_obs_oper_update/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90 – NEMO

Ignore:
Timestamp:
2020-03-26T11:57:02+01:00 (4 years ago)
Author:
dcarneir
Message:

Inclusion of sea ice thickness in OBS branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_obs_oper_update/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90

    r12140 r12610  
    2222   USE obs_read_surf            ! Reading and allocation of surface obs 
    2323   USE obs_readmdt              ! Reading and allocation of MDT for SLA. 
     24   USE obs_readsnowdepth        ! Get model snow depth for conversion of freeboard to ice thickness  
    2425   USE obs_prep                 ! Preparation of obs. (grid search etc). 
    2526   USE obs_oper                 ! Observation operators 
     
    5354   LOGICAL :: ln_sst_fp_indegs     !: T=>     SST obs footprint size specified in degrees, F=> in metres 
    5455   LOGICAL :: ln_sss_fp_indegs     !: T=>     SSS obs footprint size specified in degrees, F=> in metres 
    55    LOGICAL :: ln_sic_fp_indegs     !: T=> sea-ice obs footprint size specified in degrees, F=> in metres 
     56   LOGICAL :: ln_sic_fp_indegs     !: T=> SIC obs footprint size specified in degrees, F=> in metres 
     57   LOGICAL :: ln_sit_fp_indegs     !: T=> SIT obs footprint size specified in degrees, F=> in metres 
    5658   LOGICAL :: ln_output_clim       !: Logical switch for interpolating and writing T/S climatology 
    5759   LOGICAL :: ln_time_mean_sla_bkg !: Logical switch for applying time mean of SLA background to remove tidal signal 
     
    6567   REAL(wp) :: rn_sss_avglamscl     !: E/W diameter of SSS observation footprint 
    6668   REAL(wp) :: rn_sss_avgphiscl     !: N/S diameter of SSS observation footprint 
    67    REAL(wp) :: rn_sic_avglamscl     !: E/W diameter of sea-ice observation footprint 
    68    REAL(wp) :: rn_sic_avgphiscl     !: N/S diameter of sea-ice observation footprint 
     69   REAL(wp) :: rn_sic_avglamscl     !: E/W diameter of SIC observation footprint 
     70   REAL(wp) :: rn_sic_avgphiscl     !: N/S diameter of SIC observation footprint 
     71   REAL(wp) :: rn_sit_avglamscl     !: E/W diameter of SIT observation footprint 
     72   REAL(wp) :: rn_sit_avgphiscl     !: N/S diameter of SIT observation footprint 
    6973   REAL(wp), PUBLIC :: & 
    7074      &        MeanPeriodHours = 24. + (5./6.) !: Meaning period for surface data. 
     
    7680   INTEGER :: nn_2dint_sst     !: SST horizontal interpolation method (-1 = default) 
    7781   INTEGER :: nn_2dint_sss     !: SSS horizontal interpolation method (-1 = default) 
    78    INTEGER :: nn_2dint_sic     !: Seaice horizontal interpolation method (-1 = default) 
     82   INTEGER :: nn_2dint_sic     !: SIC horizontal interpolation method (-1 = default) 
     83   INTEGER :: nn_2dint_sit     !: SIT horizontal interpolation method (-1 = default) 
    7984  
    8085   INTEGER, DIMENSION(imaxavtypes) :: & 
     
    136141      !!        !  15-02  (M. Martin) Simplification of namelist and code 
    137142      !!---------------------------------------------------------------------- 
     143#if defined key_cice 
     144USE sbc_oce, ONLY : &        ! CICE variables 
     145   & thick_s                 ! snow depth for freeboard conversion  
     146#endif 
    138147 
    139148      IMPLICIT NONE 
     
    157166         & cn_slafbfiles,      & ! Sea level anomaly input filenames 
    158167         & cn_sicfbfiles,      & ! Seaice concentration input filenames 
     168         & cn_sitfbfiles,      & ! Seaice thickness input filenames 
    159169         & cn_velfbfiles,      & ! Velocity profile input filenames 
    160170         & cn_sssfbfiles,      & ! Sea surface salinity input filenames 
     
    189199 
    190200 
     201      LOGICAL :: ln_seaicetypes = .FALSE.          ! Logical switch indicating data type is sea ice 
    191202      LOGICAL :: ln_t3d          ! Logical switch for temperature profiles 
    192203      LOGICAL :: ln_s3d          ! Logical switch for salinity profiles 
     
    194205      LOGICAL :: ln_sst          ! Logical switch for sea surface temperature 
    195206      LOGICAL :: ln_sic          ! Logical switch for sea ice concentration 
     207      LOGICAL :: ln_sit          ! Logical switch for sea ice thickness 
    196208      LOGICAL :: ln_sss          ! Logical switch for sea surface salinity obs 
    197209      LOGICAL :: ln_vel3d        ! Logical switch for velocity (u,v) obs 
     
    252264 
    253265      NAMELIST/namobs/ln_diaobs, ln_t3d, ln_s3d, ln_sla,              & 
    254          &            ln_sst, ln_sic, ln_sss, ln_vel3d,               & 
     266         &            ln_sst, ln_sic, ln_sit, ln_sss, ln_vel3d,               & 
    255267         &            ln_slchltot, ln_slchldia, ln_slchlnon,          & 
    256268         &            ln_slchldin, ln_slchlmic, ln_slchlnan,          & 
     
    269281         &            ln_sla_fp_indegs, ln_sst_fp_indegs,             & 
    270282         &            ln_sss_fp_indegs, ln_sic_fp_indegs,             & 
     283         &            ln_sit_fp_indegs,                               & 
    271284         &            cn_profbfiles, cn_slafbfiles,                   & 
    272285         &            cn_sstfbfiles, cn_sicfbfiles,                   & 
     286         &            cn_sitfbfiles,                                  & 
    273287         &            cn_velfbfiles, cn_sssfbfiles,                   & 
    274288         &            cn_slchltotfbfiles, cn_slchldiafbfiles,         & 
     
    292306         &            rn_sss_avglamscl, rn_sss_avgphiscl,             & 
    293307         &            rn_sic_avglamscl, rn_sic_avgphiscl,             & 
     308         &            rn_sit_avglamscl, rn_sit_avgphiscl,             & 
    294309         &            nn_1dint, nn_2dint_default,                     & 
    295310         &            nn_2dint_sla, nn_2dint_sst,                     & 
    296          &            nn_2dint_sss, nn_2dint_sic,                     & 
     311         &            nn_2dint_sss, nn_2dint_sic, nn_2dint_sit,       & 
    297312         &            nn_msshc, rn_mdtcorr, rn_mdtcutoff,             & 
    298313         &            nn_profdavtypes 
     
    307322      cn_sstfbfiles(:)      = '' 
    308323      cn_sicfbfiles(:)      = '' 
     324      cn_sitfbfiles(:)      = '' 
    309325      cn_velfbfiles(:)      = '' 
    310326      cn_sssfbfiles(:)      = '' 
     
    369385         WRITE(numout,*) '             Logical switch for SLA observations                      ln_sla = ', ln_sla 
    370386         WRITE(numout,*) '             Logical switch for SST observations                      ln_sst = ', ln_sst 
    371          WRITE(numout,*) '             Logical switch for Sea Ice observations                  ln_sic = ', ln_sic 
     387         WRITE(numout,*) '             Logical switch for SIC observations                      ln_sic = ', ln_sic 
     388         WRITE(numout,*) '             Logical switch for SIT observations                      ln_sit = ', ln_sit 
    372389         WRITE(numout,*) '             Logical switch for velocity observations               ln_vel3d = ', ln_vel3d 
    373390         WRITE(numout,*) '             Logical switch for SSS observations                      ln_sss = ', ln_sss 
     
    408425         WRITE(numout,*) '             Type of horizontal interpolation method for SSS    nn_2dint_sss = ', nn_2dint_sss 
    409426         WRITE(numout,*) '             Type of horizontal interpolation method for SIC    nn_2dint_sic = ', nn_2dint_sic 
     427         WRITE(numout,*) '             Type of horizontal interpolation method for SIT    nn_2dint_sit = ', nn_2dint_sit 
    410428         WRITE(numout,*) '             Default E/W diameter of obs footprint      rn_default_avglamscl = ', rn_default_avglamscl 
    411429         WRITE(numout,*) '             Default N/S diameter of obs footprint      rn_default_avgphiscl = ', rn_default_avgphiscl 
     
    420438         WRITE(numout,*) '             SIC N/S diameter of obs footprint              rn_sic_avgphiscl = ', rn_sic_avgphiscl 
    421439         WRITE(numout,*) '             SIC obs footprint in deg [T] or m [F]          ln_sic_fp_indegs = ', ln_sic_fp_indegs 
     440         WRITE(numout,*) '             SIT E/W diameter of obs footprint              rn_sit_avglamscl = ', rn_sit_avglamscl 
     441         WRITE(numout,*) '             SIT N/S diameter of obs footprint              rn_sit_avgphiscl = ', rn_sit_avgphiscl 
     442         WRITE(numout,*) '             SIT obs footprint in deg [T] or m [F]          ln_sit_fp_indegs = ', ln_sit_fp_indegs 
    422443         WRITE(numout,*) '             Rejection of observations near land switch               ln_nea = ', ln_nea 
    423444         WRITE(numout,*) '             Rejection of obs near open bdys                 ln_bound_reject = ', ln_bound_reject 
     
    441462         &                  ln_pchltot,  ln_pno3,     ln_psi4,     ln_ppo4,     & 
    442463         &                  ln_pdic,     ln_palk,     ln_pph,      ln_po2 /) ) 
    443       nsurftypes = COUNT( (/ln_sla, ln_sst, ln_sic, ln_sss,                     & 
     464      nsurftypes = COUNT( (/ln_sla, ln_sst, ln_sic, ln_sit, ln_sss,             & 
    444465         &                  ln_slchltot, ln_slchldia, ln_slchlnon, ln_slchldin, & 
    445466         &                  ln_slchlmic, ln_slchlnan, ln_slchlpic, ln_schltot,  & 
     
    560581            cobstypessurf(jtype) = 'sic' 
    561582            clsurffiles(jtype,:) = cn_sicfbfiles 
     583         ENDIF 
     584         IF (ln_sit) THEN 
     585            jtype = jtype + 1 
     586            cobstypessurf(jtype) = 'sit' 
     587            clsurffiles(jtype,:) = cn_sitfbfiles 
    562588         ENDIF 
    563589         IF (ln_sss) THEN 
     
    675701               ztype_avgphiscl = rn_sic_avgphiscl 
    676702               ltype_fp_indegs = ln_sic_fp_indegs 
     703               ltype_night     = .FALSE. 
     704            ELSE IF ( TRIM(cobstypessurf(jtype)) == 'sit' ) THEN 
     705               IF ( nn_2dint_sit == -1 ) THEN 
     706                  n2dint_type  = nn_2dint_default 
     707               ELSE 
     708                  n2dint_type  = nn_2dint_sit 
     709               ENDIF 
     710               ztype_avglamscl = rn_sit_avglamscl 
     711               ztype_avgphiscl = rn_sit_avgphiscl 
     712               ltype_fp_indegs = ln_sit_fp_indegs 
    677713               ltype_night     = .FALSE. 
    678714            ELSE IF ( TRIM(cobstypessurf(jtype)) == 'sss' ) THEN 
     
    863899               & ltype_clim = .TRUE. 
    864900 
    865             IF ( TRIM(cobstypessurf(jtype)) == 'sla' ) THEN 
     901            IF ( (TRIM(cobstypessurf(jtype)) == 'sla') .OR. & 
     902               & (TRIM(cobstypessurf(jtype)) == 'sit') ) THEN 
    866903               nvarssurf(jtype) = 1 
    867904               nextrsurf(jtype) = 2 
     
    879916            ELSE IF ( TRIM(cobstypessurf(jtype)) == 'sic' ) THEN 
    880917               clvars(1) = 'ICECONC' 
     918            ELSE IF ( TRIM(cobstypessurf(jtype)) == 'sit' ) THEN 
     919               clvars(1) = 'FBD' 
     920               ln_seaicetypes = .TRUE. 
    881921            ELSE IF ( TRIM(cobstypessurf(jtype)) == 'sss' ) THEN 
    882922               clvars(1) = 'SSS' 
     
    920960               &               llnightav(jtype), ltype_clim, ln_time_mean_sla_bkg, clvars ) 
    921961 
    922             CALL obs_pre_surf( surfdata(jtype), surfdataqc(jtype), ln_nea, ln_bound_reject ) 
     962            CALL obs_pre_surf( surfdata(jtype), surfdataqc(jtype), ln_nea, ln_bound_reject, ln_seaicetypes ) 
    923963 
    924964            IF ( TRIM(cobstypessurf(jtype)) == 'sla' ) THEN 
     
    927967                  & CALL obs_rea_altbias ( surfdataqc(jtype), n2dintsurf(jtype), cn_altbiasfile ) 
    928968            ENDIF 
     969 
     970#if defined key_cice 
     971            IF ( TRIM(cobstypessurf(jtype)) == 'sit' ) THEN 
     972               CALL obs_rea_snowdepth( surfdataqc(jtype), n2dintsurf(jtype), thick_s(:,:) ) 
     973            ENDIF  
     974#endif 
    929975 
    930976            IF ( TRIM(cobstypessurf(jtype)) == 'sst' .AND. ln_sstbias ) THEN 
     
    9951041#endif 
    9961042#if defined key_cice 
    997       USE sbc_oce, ONLY : fr_i     ! ice fraction 
     1043      USE sbc_oce, ONLY : &        ! CICE variables 
     1044         & fr_i,          &        ! ice fraction 
     1045         & thick_i                 ! ice thickness 
    9981046#endif 
    9991047#if defined key_top 
     
    13291377                        &           'time-step but some obs are valid then.' ) 
    13301378                     WRITE(numout,*)surfdataqc(jtype)%nsstpmpp(1), & 
    1331                         &           ' sea-ice obs will be missed' 
     1379                        &           ' sea-ice concentration obs will be missed' 
    13321380                  ENDIF 
    1333                   surfdataqc(jtype)%nsurfup = surfdataqc(jtype)%nsurfup + & 
    1334                      &                        surfdataqc(jtype)%nsstp(1) 
    1335                   CYCLE 
    13361381               ELSE 
    13371382#if defined key_cice 
     
    13401385                  zsurfvar(:,:) = 1._wp - frld(:,:) 
    13411386#else 
    1342                CALL ctl_stop( ' Trying to run sea-ice observation operator', & 
     1387               CALL ctl_stop( ' Trying to run sea-ice concentration observation operator', & 
    13431388                  &           ' but no sea-ice model appears to have been defined' ) 
     1389#endif 
     1390               ENDIF 
     1391 
     1392            CASE('sit') 
     1393               IF ( kstp == 0 ) THEN 
     1394                  IF ( lwp .AND. surfdataqc(jtype)%nsstpmpp(1) > 0 ) THEN 
     1395                     CALL ctl_warn( 'Sea-ice not initialised on zeroth '// & 
     1396                        &           'time-step but some obs are valid then.' ) 
     1397                     WRITE(numout,*)surfdataqc(jtype)%nsstpmpp(1), & 
     1398                        &           ' sea-ice thickness obs will be missed and QC flag set to 4' 
     1399                  ENDIF                                  
     1400               ELSE        
     1401#if defined key_cice 
     1402                  zsurfvar(:,:) = thick_i(:,:) 
     1403#elif defined key_lim2 || defined key_lim3 
     1404                  CALL ctl_stop( ' No sea-ice thickness observation operator defined for LIM model' ) 
     1405#else 
     1406                  CALL ctl_stop( ' Trying to run sea-ice thickness observation operator', & 
     1407                     &           ' but no sea-ice model appears to have been defined' ) 
    13441408#endif 
    13451409               ENDIF 
     
    16411705                  &               lfpindegs(jtype), kmeanstp = imeanstp ) 
    16421706 
     1707 
    16431708            ELSE 
    16441709               CALL obs_surf_opt( surfdataqc(jtype), kstp, jpi, jpj,       & 
     
    16481713                  &               ravglamscl(jtype), ravgphiscl(jtype),    & 
    16491714                  &               lfpindegs(jtype) ) 
     1715            ENDIF 
     1716 
     1717            ! Change label of data from FBD ("freeboard") to SIT ("Sea Ice 
     1718            ! Thickness") 
     1719            IF ( TRIM(surfdataqc(jtype)%cvars(1)) == 'FBD' ) THEN 
     1720                 surfdata(jtype)%cvars(1) = 'SIT' 
    16501721            ENDIF 
    16511722 
Note: See TracChangeset for help on using the changeset viewer.