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 13186 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/SAS/stpctl.F90 – NEMO

Ignore:
Timestamp:
2020-07-01T09:18:17+02:00 (4 years ago)
Author:
smasson
Message:

Extra_Halo: merge with trunk@13136, see #2366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/SAS/stpctl.F90

    r13124 r13186  
    112112      !                                   !==  done by all processes at every time step  ==! 
    113113      llmsk(:,:) = tmask(:,:,1) == 1._wp 
    114       zmax(1) = MAXVAL(      vt_i (:,:)            , mask = llmsk )   ! max ice thickness 
    115       zmax(2) = MAXVAL( ABS( u_ice(:,:) )          , mask = llmsk )   ! max ice velocity (zonal only) 
    116       zmax(3) = MAXVAL(     -tm_i (:,:) + 273.15_wp, mask = llmsk )   ! min ice temperature 
     114      IF( COUNT( llmsk(:,:) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
     115         zmax(1) = MAXVAL(      vt_i (:,:)            , mask = llmsk )   ! max ice thickness 
     116         zmax(2) = MAXVAL( ABS( u_ice(:,:) )          , mask = llmsk )   ! max ice velocity (zonal only) 
     117         zmax(3) = MAXVAL(     -tm_i (:,:) + 273.15_wp, mask = llmsk )   ! min ice temperature 
     118      ELSE 
     119         IF( ll_colruns ) THEN    ! default value: must not be kept when calling mpp_max -> must be as small as possible 
     120            zmax(1:3) = -HUGE(1._wp) 
     121         ELSE                     ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 
     122            zmax(1:3) = 0._wp 
     123         ENDIF 
     124      ENDIF 
    117125      zmax(4) = REAL( nstop, wp )                                     ! stop indicator 
    118126      !                                   !==               get global extrema             ==! 
Note: See TracChangeset for help on using the changeset viewer.