Changeset 12255


Ignore:
Timestamp:
2019-12-16T13:52:25+01:00 (9 months ago)
Author:
smasson
Message:

rev12240_dev_r11943_MERGE_2019: bugfix in fldread offset in bdy, see #2263. all sette tests ok

Location:
NEMO/branches/2019/dev_r11943_MERGE_2019/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/BDY/bdydta.F90

    r12250 r12255  
    7575CONTAINS 
    7676 
    77    SUBROUTINE bdy_dta( kt, Kmm, pt_offset ) 
     77   SUBROUTINE bdy_dta( kt, Kmm ) 
    7878      !!---------------------------------------------------------------------- 
    7979      !!                   ***  SUBROUTINE bdy_dta  *** 
     
    8686      INTEGER, INTENT(in)           ::   kt           ! ocean time-step index  
    8787      INTEGER, INTENT(in)           ::   Kmm          ! ocean time level index 
    88       REAL(wp),INTENT(in), OPTIONAL ::   pt_offset    ! time offset in units of timesteps 
    8988      ! 
    9089      INTEGER ::  jbdy, jfld, jstart, jend, ib, jl    ! dummy loop indices 
     
    211210         ! read/update all bdy data 
    212211         ! ------------------------ 
    213          CALL fld_read( kt, 1, bf_alias, pt_offset = pt_offset, Kmm = Kmm ) 
     212         ! BDY: use pt_offset=0.5 as applied at the end of the step and fldread is referenced at the middle of the step 
     213         CALL fld_read( kt, 1, bf_alias, pt_offset = 0.5_wp, Kmm = Kmm ) 
    214214         ! apply some corrections in some specific cases... 
    215215         ! -------------------------------------------------- 
     
    341341         ELSE ! Add tides if not split-explicit free surface else this is done in ts loop 
    342342            ! 
    343             CALL bdy_dta_tides( kt=kt, pt_offset=pt_offset ) 
     343            ! BDY: use pt_offset=1.0 as applied at the end of the step and bdy_dta_tides is referenced at the middle of the step 
     344            CALL bdy_dta_tides( kt=kt, pt_offset = 1._wp ) 
    344345         ENDIF 
    345346      ENDIF 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/fldread.F90

    r12250 r12255  
    164164 
    165165      IF( nn_components == jp_iam_sas ) THEN   ;   zt_offset = REAL( nn_fsbc, wp ) 
    166       ELSE                                      ;   zt_offset = 0. 
     166      ELSE                                     ;   zt_offset = 0. 
    167167      ENDIF 
    168168      IF( PRESENT(pt_offset) )   zt_offset = pt_offset 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/step.F90

    r12250 r12255  
    121121      IF( ln_tide    )   CALL tide_update( kstp )                     ! update tide potential 
    122122      IF( ln_apr_dyn )   CALL sbc_apr ( kstp )                        ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib)  
    123       IF( ln_bdy     )   CALL bdy_dta ( kstp, Nnn, pt_offset = 1. )   ! update dynamic & tracer data at open boundaries 
     123      IF( ln_bdy     )   CALL bdy_dta ( kstp, Nnn )                   ! update dynamic & tracer data at open boundaries 
    124124      IF( ln_isf     )   CALL isf_stp ( kstp, Nnn ) 
    125125                         CALL sbc     ( kstp, Nbb, Nnn )              ! Sea Boundary Condition (including sea-ice) 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/SAS/step.F90

    r12250 r12255  
    102102      !           This is not clean and should be changed in the future.  
    103103      ! ==> 
    104       IF( ln_bdy     )       CALL bdy_dta( kstp,      Nnn, pt_offset=1. )     ! update dynamic & tracer data at open boundaries 
     104      IF( ln_bdy     )       CALL bdy_dta( kstp,      Nnn )                   ! update dynamic & tracer data at open boundaries 
    105105                             CALL sbc    ( kstp, Nbb, Nnn )                   ! Sea Boundary Condition (including sea-ice) 
    106106 
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/trcbc.F90

    r12250 r12255  
    367367      IF( PRESENT(jit) ) THEN  
    368368         ! 
    369          ! OPEN boundary conditions (use pt_offset=1. as they are applied at the end of the step) 
     369         ! BDY: use pt_offset=0.5 as applied at the end of the step and fldread is referenced at the middle of the step 
    370370         IF( nb_trcobc > 0 ) THEN 
    371371           if (lwp) write(numout,'(a,i5,a,i10)') '   reading OBC data for ', nb_trcobc ,' variable(s) at step ', kt 
    372            CALL fld_read( kt=kt, kn_fsbc=1, sd=sf_trcobc, kit=jit, pt_offset=1.) 
     372           CALL fld_read( kt=kt, kn_fsbc=1, sd=sf_trcobc, kit=jit, pt_offset = 0.5_wp ) 
    373373         ENDIF 
    374374         ! 
     
    387387      ELSE 
    388388         ! 
    389          ! OPEN boundary conditions (use pt_offset=1. as they are applied at the end of the step) 
     389         ! BDY: use pt_offset=0.5 as applied at the end of the step and fldread is referenced at the middle of the step 
    390390         IF( nb_trcobc > 0 ) THEN 
    391391           if (lwp) write(numout,'(a,i5,a,i10)') '   reading OBC data for ', nb_trcobc ,' variable(s) at step ', kt 
    392            CALL fld_read( kt=kt, kn_fsbc=1, sd=sf_trcobc, pt_offset=1.) 
     392           CALL fld_read( kt=kt, kn_fsbc=1, sd=sf_trcobc, pt_offset = 0.5_wp ) 
    393393         ENDIF 
    394394         ! 
Note: See TracChangeset for help on using the changeset viewer.