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 6326 for branches/UKMO/dev_r4650_general_vert_coord_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90 – NEMO

Ignore:
Timestamp:
2016-02-18T16:10:11+01:00 (8 years ago)
Author:
kingr
Message:

Manually merged sst bias correction code from branches/2014/dev_r4650_UKMO14.5_SST_BIAS_CORRECTION@r4768. Had merge issues when using branch directly, possibly due to svn keywords not having been fully cleared.

File:
1 edited

Legend:

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

    r6016 r6326  
    2525   USE obs_read_sla             ! Reading and allocation of SLA observations   
    2626   USE obs_read_sst             ! Reading and allocation of SST observations   
     27   USE obs_sstbias              ! Bias correction routine for SST 
    2728   USE obs_readmdt              ! Reading and allocation of MDT for SLA. 
    2829   USE obs_read_seaice          ! Reading and allocation of Sea Ice observations   
     
    8788   LOGICAL, PUBLIC :: ln_ignmis      !: Logical switch for ignoring missing files 
    8889   LOGICAL, PUBLIC :: ln_s_at_t      !: Logical switch to compute model S at T observations 
     90   LOGICAL, PUBLIC :: ln_sstbias     !: Logical switch for bias corection of SST 
    8991 
    9092   REAL(KIND=dp), PUBLIC :: dobsini   !: Observation window start date YYYYMMDD.HHMMSS 
     
    103105      & ln_profb_enatim !: Change tim for 820 enact data set. 
    104106    
     107   INTEGER, DIMENSION(MaxNumFiles), PUBLIC :: sstbias_type !SST bias type 
     108 
    105109   LOGICAL, DIMENSION(MaxNumFiles) :: & 
    106110      & ln_velfb_av   !: Is the velocity feedback files daily average? 
     
    137141      !!        !  06-10  (A. Weaver) Cleaning and add controls 
    138142      !!        !  07-03  (K. Mogensen) General handling of profiles 
     143      !!        !  14-08  (J.While) Incorporated SST bias correction 
    139144      !!---------------------------------------------------------------------- 
    140145 
     
    146151      CHARACTER(len=128) :: profbfiles(MaxNumFiles) 
    147152      CHARACTER(len=128) :: sstfiles(MaxNumFiles)       
    148       CHARACTER(len=128) :: sstfbfiles(MaxNumFiles)  
     153      CHARACTER(len=128) :: sstfbfiles(MaxNumFiles) 
     154      CHARACTER(len=128) :: sstbias_files(MaxNumFiles)  
    149155      CHARACTER(len=128) :: slafilesact(MaxNumFiles)       
    150156      CHARACTER(len=128) :: slafilespas(MaxNumFiles)       
     
    182188         &            ln_velhradcp, velhradcpfiles,                   & 
    183189         &            ln_velfb, velfbfiles, ln_velfb_av,              & 
    184          &            ln_profb_enatim, ln_ignmis, ln_cl4 
     190         &            ln_profb_enatim, ln_ignmis, ln_cl4,             & 
     191         &            ln_sstbias, sstbias_files 
    185192 
    186193      INTEGER :: jprofset 
     
    195202      INTEGER :: jnumsst 
    196203      INTEGER :: jnumsstfb 
     204      INTEGER :: jnumsstbias 
    197205      INTEGER :: jnumseaice 
    198206      INTEGER :: jnumvelavcur 
     
    229237      velcurfiles(:) = '' 
    230238      veladcpfiles(:) = '' 
     239      sstbias_files(:) = '' 
    231240      endailyavtypes(:) = -1 
    232241      endailyavtypes(1) = 820 
     
    290299         lmask(:) = .FALSE. 
    291300      ENDIF 
     301      IF (ln_sstbias) THEN   
     302         lmask(:) = .FALSE.   
     303         WHERE (sstbias_files(:) /= '') lmask(:) = .TRUE.   
     304         jnumsstbias = COUNT(lmask)   
     305         lmask(:) = .FALSE.   
     306      ENDIF        
    292307      IF (ln_seaice) THEN 
    293308         lmask(:) = .FALSE. 
     
    341356         WRITE(numout,*) '             Logical switch for GHRSST observations          ln_ghrsst = ', ln_ghrsst 
    342357         WRITE(numout,*) '             Logical switch for feedback SST data             ln_sstfb = ', ln_sstfb 
     358         WRITE(numout,*) '             Logical switch for SST bias correction         ln_sstbias = ', ln_sstbias 
    343359         WRITE(numout,*) '             Logical switch for night-time SST obs         ln_sstnight = ', ln_sstnight 
    344360         WRITE(numout,*) '             Logical switch for SSS observations                ln_sss = ', ln_sss 
     
    776792 
    777793         ENDIF 
     794          
     795         !Read in bias field and correct SST.  
     796         IF ( ln_sstbias ) THEN  
     797            IF ( jnumsstbias == 0 ) CALL ctl_stop("ln_sstbias set,"// &  
     798                                             "  but no bias"// &  
     799                                             " files to read in")     
     800            CALL obs_app_sstbias( nsstsets, sstdatqc, n2dint, &  
     801                                  jnumsstbias, &   
     802                                  sstbias_files(1:jnumsstbias) )  
     803         ENDIF  
    778804 
    779805      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.