Ignore:
Timestamp:
2019-11-01T21:54:15+01:00 (13 months ago)
Author:
mathiot
Message:

rm useless lbclnk + fix reproducibility WED025 + add isf debug option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isftbl.F90

    r11541 r11844  
    1616   USE dom_oce ! vertical scale factor 
    1717   USE lbclnk  ! lbc_lnk subroutine 
     18   USE isfutils 
     19   USE isf 
    1820 
    1921   IMPLICIT NONE 
     
    4850      REAL(wp), DIMENSION(jpi,jpj), OPTIONAL, INTENT(in   ) :: pfrac         ! fraction of bottom cell affected by tbl 
    4951      !!-------------------------------------------------------------------- 
    50       INTEGER ::   ji, jj                   ! loop index 
    51       INTEGER , DIMENSION(jpi,jpj) :: ikbot ! bottom level of the tbl 
    52       REAL(wp), DIMENSION(jpi,jpj) :: zhtbl ! thickness of the tbl 
    53       REAL(wp), DIMENSION(jpi,jpj) :: zfrac ! thickness of the tbl 
     52      INTEGER ::   ji, jj                     ! loop index 
     53      INTEGER , DIMENSION(jpi,jpj) :: ikbot   ! bottom level of the tbl 
     54      REAL(wp), DIMENSION(jpi,jpj) :: zvarout ! 2d average of pvarin 
     55      REAL(wp), DIMENSION(jpi,jpj) :: zhtbl   ! thickness of the tbl 
     56      REAL(wp), DIMENSION(jpi,jpj) :: zfrac   ! thickness of the tbl 
    5457      !!-------------------------------------------------------------------- 
    5558      !  
     
    6467         ! 
    6568         ! compute tbl property at U point 
    66          CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u_n, pvarin, pvarout ) 
     69         CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u_n, pvarin, zvarout ) 
     70         ! 
     71         ! check if needed (probably yes) 
     72         CALL lbc_lnk('sbcisf', pvarout,'U',-1.) 
    6773         ! 
    6874         ! compute tbl property at T point 
     75         pvarout(1,:) = 0._wp 
    6976         DO jj = 1, jpj 
    7077            DO ji = 2, jpi 
    71                pvarout(ji,jj) = 0.5_wp * (pvarout(ji,jj) + pvarout(ji-1,jj)) 
     78               pvarout(ji,jj) = 0.5_wp * (zvarout(ji,jj) + zvarout(ji-1,jj)) 
    7279            END DO 
    7380         END DO 
    74          ! 
    75          ! check if needed (probably yes) 
    76          CALL lbc_lnk('sbcisf', pvarout,'T',-1.) 
     81         ! lbclnk not needed as a final communication is done after the computation of fwf 
    7782         !  
    7883      CASE ( 'V' ) 
     
    8590         ! 
    8691         ! compute tbl property at V point 
    87          CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v_n, pvarin, pvarout ) 
     92         CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v_n, pvarin, zvarout ) 
     93         ! 
     94         ! check if needed (probably yes) 
     95         CALL lbc_lnk('sbcisf', pvarout,'V',-1.) 
    8896         ! 
    8997         ! pvarout is an averaging of wet point 
     98         pvarout(:,1) = 0._wp 
    9099         DO jj = 2, jpj 
    91100            DO ji = 1, jpi 
    92                pvarout(ji,jj) = 0.5_wp * (pvarout(ji,jj) + pvarout(ji,jj-1)) 
     101               pvarout(ji,jj) = 0.5_wp * (zvarout(ji,jj) + zvarout(ji,jj-1)) 
    93102            END DO 
    94103         END DO 
    95          ! 
    96          ! check if needed (probably yes) 
    97          CALL lbc_lnk('sbcisf', pvarout,'T',-1.) 
     104         ! lbclnk not needed as a final communication is done after the computation of fwf 
    98105         ! 
    99106      CASE ( 'T' ) 
     
    103110         ! 
    104111      END SELECT 
     112      ! 
     113      IF (ln_isfdebug) CALL debug('isf_tbl pvarout:',pvarout) 
    105114      ! 
    106115   END SUBROUTINE isf_tbl 
Note: See TracChangeset for help on using the changeset viewer.