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 15227 for NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_oper.F90 – NEMO

Ignore:
Timestamp:
2021-09-03T16:02:35+02:00 (3 years ago)
Author:
dford
Message:

Implement FBD/SIT (compiles but otherwise not tested).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_oper.F90

    r15226 r15227  
    1818   USE lib_mpp,       ONLY :   ctl_warn, ctl_stop           ! Warning and stopping routines 
    1919   USE sbcdcy,        ONLY :   sbc_dcy, nday_qsr            ! For calculation of where it is night-time 
    20    USE obs_grid,      ONLY :   obs_level_search      
     20   USE obs_grid,      ONLY :   obs_level_search 
     21   USE obs_field,     ONLY : cobsname_sla, cobsname_fbd, imaxavtypes 
     22#if defined key_si3 || defined key_cice 
     23   USE phycst,        ONLY : rhos, rhoi, rhow               ! For conversion from sea ice freeboard to thickness 
     24#endif 
    2125   ! 
    2226   USE par_kind     , ONLY :   wp   ! Precision variables 
     
    2832   PUBLIC   obs_prof_opt   !: Compute the model counterpart of profile obs 
    2933   PUBLIC   obs_surf_opt   !: Compute the model counterpart of surface obs 
    30  
    31    INTEGER, PARAMETER, PUBLIC ::   imaxavtypes = 20   !: Max number of daily avgd obs types 
    3234 
    3335   !!---------------------------------------------------------------------- 
     
    453455      &                     kit000, kdaystp, kvar, psurf, psurfmask, & 
    454456      &                     k2dint, ldnightav, plamscl, pphiscl,     & 
    455       &                     lindegrees, kssh, kmdt ) 
     457      &                     lindegrees, kssh, kmdt, kfbd, ksnow ) 
    456458 
    457459      !!----------------------------------------------------------------------- 
     
    514516      INTEGER, OPTIONAL, INTENT(IN) :: & 
    515517         & kmdt                        ! Index of extra variable representing MDT 
     518      INTEGER, OPTIONAL, INTENT(IN) :: & 
     519         & kfbd                        ! Index of additional variable representing ice freeboard 
     520      INTEGER, OPTIONAL, INTENT(IN) :: & 
     521         & ksnow                       ! Index of extra variable representing ice snow thickness 
    516522 
    517523      !! * Local declarations 
     
    756762         ENDIF 
    757763 
    758          IF ( TRIM(surfdataqc%cvars(kvar)) == 'SLA' .AND. PRESENT(kssh) .AND. PRESENT(kmdt) ) THEN 
     764         IF ( TRIM(surfdataqc%cvars(kvar)) == cobsname_sla .AND. PRESENT(kssh) .AND. PRESENT(kmdt) ) THEN 
    759765            ! ... Remove the MDT from the SSH at the observation point to get the SLA 
    760766            surfdataqc%radd(jobs,kssh,kvar) = zext(1) 
    761767            surfdataqc%rmod(jobs,kvar) = surfdataqc%radd(jobs,kssh,kvar) - surfdataqc%rext(jobs,kmdt) 
     768#if defined key_si3 || defined key_cice 
     769         ELSE IF ( TRIM(surfdataqc%cvars(kvar)) == cobsname_fbd .AND. PRESENT(kfbd) .AND. PRESENT(ksnow) ) THEN 
     770            ! Convert radar freeboard to true freeboard 
     771            ! (add 1/4 snow depth; 1/4 based on ratio of speed of light in vacuum 
     772            !  compared to snow (3.0e8 vs 2.4e8 m/s)) 
     773            surfdataqc%radd(jobs,kfbd,kvar) = surfdataqc%robs(jobs,kvar) 
     774            surfdataqc%robs(jobs,kvar) = surfdataqc%radd(jobs,kfbd,kvar) + 0.25*surfdataqc%rext(jobs,ksnow) 
     775            ! If the corrected freeboard observation is outside -0.3 to 3.0 m (CPOM) then set the QC flag to bad 
     776            IF ((surfdataqc%robs(jobs,kvar) < -0.3) .OR. (surfdataqc%robs(jobs,kvar) > 3.0)) THEN 
     777               surfdataqc%nqc(jobs) = 4 
     778            ENDIF            
     779            ! Convert corrected freeboard to ice thickness following Tilling et al. (2016) 
     780            surfdataqc%robs(jobs,kvar) = (surfdataqc%robs(jobs,kvar)*rhow + surfdataqc%rext(jobs,ksnow)*rhos)/ & 
     781               &                         (rhow - rhoi) 
     782#endif 
    762783         ELSE 
    763784            surfdataqc%rmod(jobs,kvar) = zext(1) 
    764785         ENDIF 
    765 ! DO THIS FOR FBD TOO 
    766786 
    767787         IF ( zext(1) == obfillflt ) THEN 
Note: See TracChangeset for help on using the changeset viewer.