Changeset 12044


Ignore:
Timestamp:
2019-12-03T17:48:25+01:00 (7 weeks ago)
Author:
kingr
Message:

Bugfix to only alter times of SLA when bkg is time-averaged.

File:
1 edited

Legend:

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

    r12036 r12044  
    283283            ENDIF 
    284284 
    285             !If the observations are representing a time mean then set the time 
     285            !If SLA observations are representing a time mean then set the time 
    286286            !of the obs to the end of that meaning period relative to the start of the run 
    287             IF ( MeanPeriodHours > 0._wp .AND. ln_time_mean_sla_bkg ) THEN 
     287            IF ( ln_time_mean_sla_bkg .AND. ( TRIM( clvarsin(1) ) == 'SLA' ) ) THEN 
    288288               DO ji = 1, inpfiles(jj)%nobs 
    289                   inpfiles(jj)%ptim(ji) = & 
    290                         & djulini(jj) + (MeanPeriodHours/24.) 
     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       
    291295               END DO 
    292296            ENDIF    
Note: See TracChangeset for help on using the changeset viewer.