diff --git a/model/src/w3fld1md.F90 b/model/src/w3fld1md.F90 index 960fd185a..10b2fce08 100644 --- a/model/src/w3fld1md.F90 +++ b/model/src/w3fld1md.F90 @@ -550,9 +550,13 @@ SUBROUTINE W3FLD1( ASPC, FPI, WNDX,WNDY, ZWND, & TAUDIR=atan2(TAUY, TAUX) ! Note: add another criterion (stress direction) for iteration. CRIT1=(ABS(USTAR-USTRB)*100.0)/((USTAR+USTRB)*0.5) .GT. 0.1 - CRIT2=(ABS(TAUDIR-TAUDIRB)*100.0/(TAUDIR+TAUDIRB)*0.5) .GT. 0.1 + IF ((TAUDIR+TAUDIRB).NE.0.) THEN + CRIT2=(ABS(TAUDIR-TAUDIRB)*100.0/(TAUDIR+TAUDIRB)*0.5) .GT. 0.1 + ELSE + CRIT2=.TRUE. + ENDIF IF (CRIT1 .OR. CRIT2) THEN - ! IF ((ABS(USTAR-USTRB)*100.0)/((USTAR+USTRB)*0.5) .GT. 0.1) THEN + ! IF ((ABS(USTAR-USTRB)*100.0)/((USTAR+USTRB)*0.5) .GT. 0.1) THEN USTRB=USTAR TAUDIRB=TAUDIR CTR=CTR+1