Ignore:
Timestamp:
2019-12-10T12:38:10+01:00 (20 months ago)
Author:
kingr
Message:

Added option to remove tides from SLA bkg by taking average over 24h50m.

File:
1 edited

Legend:

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

    r11546 r12140  
    3939 
    4040   SUBROUTINE obs_rea_surf( surfdata, knumfiles, cdfilenames, & 
    41       &                     kvars, kextr, kstp, ddobsini, ddobsend, & 
    42       &                     ldignmis, ldmod, ldnightav, ldclim, cdvars ) 
     41      &                     kvars, kextr, kstp, ddobsini, ddobsend, MeanPeriodHours, & 
     42      &                     ldignmis, ldmod, ldnightav, ldclim, ln_time_mean_sla_bkg, cdvars ) 
    4343      !!--------------------------------------------------------------------- 
    4444      !! 
     
    7272      LOGICAL, INTENT(IN) :: ldnightav  ! Observations represent a night-time average 
    7373      LOGICAL, INTENT(IN) :: ldclim     ! Will include climatology at obs points. 
     74      LOGICAL, INTENT(IN) :: ln_time_mean_sla_bkg     ! Will reset times to end of averaging period. 
    7475      REAL(dp), INTENT(IN) :: ddobsini   ! Obs. ini time in YYYYMMDD.HHMMSS 
    7576      REAL(dp), INTENT(IN) :: ddobsend   ! Obs. end time in YYYYMMDD.HHMMSS 
     77      REAL(wp), INTENT(IN) :: MeanPeriodHours ! Averaging period in hours 
    7678      CHARACTER(len=8), DIMENSION(kvars), INTENT(IN) :: cdvars 
    7779 
     
    280282               inpfiles(jj)%iobsj = -1 
    281283            ENDIF 
     284 
     285            !If SLA observations are representing a time mean then set the time 
     286            !of the obs to the end of that meaning period relative to the start of the run 
     287            IF ( ln_time_mean_sla_bkg .AND. ( TRIM( clvarsin(1) ) == 'SLA' ) ) THEN 
     288               DO ji = 1, inpfiles(jj)%nobs 
     289                  ! Only do this for obs within time window 
     290                  IF ( ( inpfiles(jj)%ptim(ji) > djulini(jj) ) .AND. & 
     291                     & ( inpfiles(jj)%ptim(ji) <= djulend(jj) ) ) THEN 
     292                     inpfiles(jj)%ptim(ji) = & 
     293                           & djulini(jj) + (MeanPeriodHours/24.) 
     294                  ENDIF       
     295               END DO 
     296            ENDIF    
     297 
    282298            inowin = 0 
    283299            DO ji = 1, inpfiles(jj)%nobs 
Note: See TracChangeset for help on using the changeset viewer.