Ignore:
Timestamp:
Nov 22, 2016, 10:05:03 AM (8 years ago)
Author:
Laurent Fairhead
Message:

knon/klon does not seem to agree with the WHERE construct and crashes MPI
parallelisation.
LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/ocean_albedo.F90

    r2697 r2709  
    6969!
    7070INTEGER                         :: JWL, INU    ! indexes
     71INTEGER                         :: JI
    7172REAL                            :: ZWL         ! input parameter: wavelength and diffuse/direct fraction of light
    7273REAL:: ZCHLABS, ZAW, ZBW, ZREFM, ZYLMD, ZUE, ZUE2 ! scalar computation variables
     
    154155  ZAP(1:knon) = 0.06*ZCHLABS*ZWORK1(1:knon) +0.2*(XAW440+0.06*ZWORK1(1:knon))*ZYLMD
    155156   
    156   WHERE ( ZCHL(1:knon) > 0.02 )
    157     ZNU(:)=MIN(0.0,0.5*(ZWORK3(:)-0.3))
    158     ZBBP(:)=(0.002+0.01*(0.5-0.25*ZWORK3(:))*(ZWL/550.)**ZNU(:))*ZWORK2(:)
    159   ELSEWHERE
    160     ZBBP(:)=0.019*(550./ZWL)*ZWORK2(:)       !ZBBPf=0.0113 at chl<=0.02
    161   ENDWHERE
    162    
     157!!  WHERE ( ZCHL(1:knon) > 0.02 )
     158!!    ZNU(:)=MIN(0.0,0.5*(ZWORK3(:)-0.3))
     159!!    ZBBP(:)=(0.002+0.01*(0.5-0.25*ZWORK3(:))*(ZWL/550.)**ZNU(:))*ZWORK2(:)
     160!!  ELSEWHERE
     161!!    ZBBP(:)=0.019*(550./ZWL)*ZWORK2(:)       !ZBBPf=0.0113 at chl<=0.02
     162!!  ENDWHERE
     163
     164    do JI = 1, knon
     165      IF (ZCHL(JI) > 0.02) THEN
     166        ZNU(JI)=MIN(0.0,0.5*(ZWORK3(JI)-0.3))
     167        ZBBP(JI)=(0.002+0.01*(0.5-0.25*ZWORK3(JI))*(ZWL/550.)**ZNU(JI)) &
     168                  *ZWORK2(JI)
     169      ELSE
     170        ZBBP(JI)=0.019*(550./ZWL)*ZWORK2(JI)       !ZBBPf=0.0113 at chl<=0.02
     171      ENDIF
     172    ENDDO
     173
    163174  ! Morel-Gentili(1991), Eq (12)
    164175  ! ZHB=h/(h+2*ZBBPf*(1.-h))       
Note: See TracChangeset for help on using the changeset viewer.