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 11844 for NEMO/branches/2019/ENHANCE-02_ISF_nemo/src – NEMO

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

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

Location:
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE
Files:
7 edited

Legend:

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

    r11281 r11844  
    428428                  ikv = mikv(ji,jj)       ! (first wet ocean u- and v-points) 
    429429                  ze3va =  ( 1._wp - r_vvl ) * e3v_n(ji,jj,ikv) + r_vvl * e3v_a(ji,jj,ikv)   ! after scale factor at T-point 
    430                   zwd(ji,jj,iku) = zwd(ji,jj,iku) - r2dt * 0.5*( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) / ze3va 
     430                  zwd(ji,jj,ikv) = zwd(ji,jj,ikv) - r2dt * 0.5*( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) / ze3va 
    431431               END DO 
    432432            END DO 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90

    r11553 r11844  
    3131   CHARACTER(LEN=256), PUBLIC :: cn_isfdir 
    3232   LOGICAL           , PUBLIC :: ln_isf 
     33   LOGICAL           , PUBLIC :: ln_isfdebug=.TRUE. 
    3334   ! 
    3435   ! 0.2 -------- ice shelf cavity opened namelist parameter ------------- 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcav.F90

    r11553 r11844  
    1515   USE oce            ! ocean dynamics and tracers 
    1616   USE isf            ! ice shelf public variables 
     17   USE isfutils 
    1718   USE isftbl         ! ice shelf top boundary layer properties 
    1819   USE isfcavmlt      ! ice shelf melt formulation 
     
    139140      ptsc(:,:,jp_tem) = - zqh(:,:) * r1_rau0_rcp 
    140141      ! 
     142      IF ( ln_isfdebug ) THEN 
     143         CALL debug('isf_cav: ptsc T',ptsc(:,:,1)) 
     144         CALL debug('isf_cav: ptsc S',ptsc(:,:,2)) 
     145         CALL debug('isf_cav: pqfwf fwf',pqfwf(:,:)) 
     146      END IF 
     147      ! 
    141148   END SUBROUTINE isf_cav 
    142149 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavgam.F90

    r11541 r11844  
    1212   USE oce            ! ocean dynamics and tracers 
    1313   USE isf 
     14   USE isfutils 
    1415   USE isftbl 
    1516   USE dom_oce        ! ocean space and time domain 
     
    9192      CALL iom_put('isfgammas', pgs(:,:)) 
    9293      ! 
     94      IF (ln_isfdebug) THEN 
     95         CALL debug( 'isfcav_gam pgt:', pgt(:,:) ) 
     96         CALL debug( 'isfcav_gam pgs:', pgs(:,:) ) 
     97      END IF 
     98      ! 
    9399   END SUBROUTINE isfcav_gammats 
    94100   ! 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90

    r11541 r11844  
    1313   USE oce            ! ocean dynamics and tracers 
    1414   USE isf            ! ice shelf public variables 
     15   USE isfutils       ! ice shelf debug subroutine 
    1516   USE dom_oce        ! ocean space and time domain 
    1617   USE phycst         ! physical constants 
     
    7475      END SELECT 
    7576      ! 
     77      IF (ln_isfdebug) THEN 
     78         CALL debug( 'isfcav_mlt:', pqhc (:,:) ) 
     79         CALL debug( 'isfcav_mlt:', pqoce(:,:) ) 
     80         CALL debug( 'isfcav_mlt:', pqfwf(:,:) ) 
     81      END IF 
     82      ! 
    7683   END SUBROUTINE isfcav_mlt 
    7784 
  • 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 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfutils.F90

    r11521 r11844  
    6565      !!-------------------------------------------------------------------- 
    6666      ! 
    67       zsum = glob_sum_full( 'debug', pvar(:,:) ) 
    68       zmin = MINVAL( pvar(:,:) ) ; CALL mpp_min( 'debug', zmin ) ! min over the global domain 
    69       zmax = MAXVAL( pvar(:,:) ) ; CALL mpp_max( 'debug', zmax ) ! max over the global domain 
     67      zsum = glob_sum( 'debug', pvar(:,:) ) 
     68      zmin = glob_min( 'debug', pvar(:,:) ) 
     69      zmax = glob_max( 'debug', pvar(:,:) ) 
    7070      ! 
    71       WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum 
     71      IF (lwp) WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum 
    7272      ! 
    73       FLUSH(numout) 
     73      CALL FLUSH(numout) 
     74      ! 
    7475   END SUBROUTINE debug2d 
    7576 
     
    8990      !!-------------------------------------------------------------------- 
    9091      ! 
    91       zsum = glob_sum_full( 'debug', pvar(:,:,:) ) 
    92       zmin = MINVAL( pvar(:,:,:) ) ; CALL mpp_min( 'debug', zmin ) ! min over the global domain 
    93       zmax = MAXVAL( pvar(:,:,:) ) ; CALL mpp_max( 'debug', zmax ) ! max over the global domain 
     92      zsum = glob_sum( 'debug', pvar(:,:,:) ) 
     93      zmin = glob_min( 'debug', pvar(:,:,:) ) 
     94      zmax = glob_max( 'debug', pvar(:,:,:) ) 
    9495      ! 
    95       WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum 
     96      IF (lwp) WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum 
    9697      ! 
    97       FLUSH(numout) 
     98      CALL FLUSH(numout) 
    9899      ! 
    99100   END SUBROUTINE debug3d 
Note: See TracChangeset for help on using the changeset viewer.