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 10359 for NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_umx.F90 – NEMO

Ignore:
Timestamp:
2018-11-25T22:33:50+01:00 (5 years ago)
Author:
smasson
Message:

dev_r10164_HPC09_ESIWACE_PREP_MERGE: action 4c: introduce a better version of the non-blocking mpp_max, see #2133

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_umx.F90

    r10345 r10359  
    7373      INTEGER  ::   ipl                     ! third dimention of tracer array 
    7474 
    75       REAL(wp) ::   zcfl , zusnit, zdt      !   -      - 
     75      REAL(wp) ::   zcfl(2), zusnit, zdt      !   -      - 
    7676      REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   zudy, zvdx, zcu_box, zcv_box 
    7777      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zpato 
     
    8686      !     When needed, the advection split is applied at the next time-step in order to avoid blocking global comm. 
    8787      !     ...this should not affect too much the stability... Was ok on the tests we did... 
    88       zcfl =            MAXVAL( ABS( pu_ice(:,:) ) * rdt_ice * r1_e1u(:,:) ) 
    89       zcfl = MAX( zcfl, MAXVAL( ABS( pv_ice(:,:) ) * rdt_ice * r1_e2v(:,:) ) ) 
    90       IF( zcfl > 0.5 ) THEN   ;   l_split_advumx(1) = .TRUE.    ! split advection time-step if CFL violated 
    91       ELSE                    ;   l_split_advumx(1) = .FALSE. 
    92       ENDIF 
     88      zcfl(1) =               MAXVAL( ABS( pu_ice(:,:) ) * rdt_ice * r1_e1u(:,:) ) 
     89      zcfl(1) = MAX( zcfl(1), MAXVAL( ABS( pv_ice(:,:) ) * rdt_ice * r1_e2v(:,:) ) ) 
    9390       
    94       ! non-blocking global communication send l_split_advumx(1) and receive l_split_advumx(2) 
    95       IF( lk_mpp )   CALL mpp_ilor( l_split_advumx, ldlast = kt == nitend - nn_fsbc + 1 ) 
    96  
    97       IF( l_split_advumx(2) ) THEN   ;   initad = 2   ;   zusnit = 0.5_wp    ! split defined at the previous time-step 
    98       ELSE                           ;   initad = 1   ;   zusnit = 1.0_wp 
     91      ! non-blocking global communication send zcfl(1) and receive zcfl(2) 
     92      IF( lk_mpp )   CALL mpp_delay_max( 'icedyn_adv_umx', 'advumx_delay', zcfl, kt == nitend - nn_fsbc + 1 ) 
     93 
     94      IF( zcfl(2) > .5 ) THEN   ;   initad = 2   ;   zusnit = 0.5_wp   ! zcfl(2) corresponding to zcfl(1) of the previous time-step 
     95      ELSE                      ;   initad = 1   ;   zusnit = 1.0_wp 
    9996      ENDIF 
    10097 
Note: See TracChangeset for help on using the changeset viewer.