Skip to content

Commit

Permalink
Merge pull request #45 from mwtoews/warnings
Browse files Browse the repository at this point in the history
Tidy whitespace warnings
  • Loading branch information
emorway-usgs authored Mar 5, 2019
2 parents 707723e + 92e2bb3 commit e5cbef9
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 130 deletions.
20 changes: 10 additions & 10 deletions mt3dms/src/mt_hss5.for
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ c distribute to multiple cells
enddo
c
num=0
area_total=0
area_total=0
do i=1,nrow
do j=1,ncol
R=sqrt((xbc(j)-xbc(jsource))**2+(ybc(i)-ybc(isource))**2)
R=R-0.5*sqrt(delr(j)**2+delc(i)**2)
if(R.gt.1.5*radius_lnapl) cycle !1.5 is a safety factor
if(R.gt.1.5*radius_lnapl) cycle !1.5 is a safety factor
call GetArea(ncol,nrow,nPoint,p,nSubGrid,delr,xbc,
& delc,ybc,j,i,area_cell)
c
Expand Down Expand Up @@ -324,9 +324,9 @@ C
C
C--LOOP over all HSS_LNAPL sources
DO is=1,nHSSSource
c
c
iHSSComp=int(HSSData(4,1,is))
if(iHSSComp.ne.ICOMP) cycle
if(iHSSComp.ne.ICOMP) cycle
c
666 DO icell=1,MaxHSSCells
c
Expand Down Expand Up @@ -389,7 +389,7 @@ c
c--get interpolated conc at beginning and ending of transport step
cTime1=0.
if(iTime1.lt.MaxHSSStep) then
cstart=HSSData(4+icell,iTime1, isource)
cstart=HSSData(4+icell,iTime1, isource)
cend= HSSData(4+icell,iTime1+1,isource)
tstart=HSSData(1,iTime1, isource)
tend =HSSData(1,iTime1+1,isource)
Expand All @@ -400,11 +400,11 @@ c--get interpolated conc at beginning and ending of transport step
c
cTime2=0.
if(iTime2.lt.MaxHSSStep) then
cstart=HSSData(4+icell,iTime2, isource)
cstart=HSSData(4+icell,iTime2, isource)
cend= HSSData(4+icell,iTime2+1,isource)
tstart=HSSData(1,iTime2, isource)
tend =HSSData(1,iTime2+1,isource)
if(tend.ne.tstart.and.time2.ge.tstart.and.time2.le.tend) then
if(tend.ne.tstart.and.time2.ge.tstart.and.time2.le.tend) then
cTime2=((cend-cstart)/(tend-tstart))*(time2-tstart)+cstart
endif
endif
Expand Down Expand Up @@ -459,8 +459,8 @@ c
real delr,delc,xbc,ybc,area,pmin,pmax,p,subpoint,
& x0,y0,dx,dy
logical inside
dimension delr(ncol),delc(nrow),xbc(ncol),ybc(nrow),
& p(2,npoint),subpoint(2),pmin(2),pmax(2)
dimension delr(ncol),delc(nrow),xbc(ncol),ybc(nrow),
& p(2,npoint),subpoint(2),pmin(2),pmax(2)
c
pmin(1)=0
pmin(2)=0
Expand All @@ -479,7 +479,7 @@ c
if(inside(npoint,p,subpoint,pmin) .and.
& inside(npoint,p,subpoint,pmax)) then
nsub=nsub+1
endif
endif
enddo
enddo
if(nsub.gt.0) then
Expand Down
8 changes: 4 additions & 4 deletions src/adv1.f
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ SUBROUTINE SADV1M(NCOL,NROW,NLAY,MXPART,NCOUNT,NPCHEK,XP,YP,ZP,
C LEVEL DUE TO ADVECTION USING THE FORWARD TRACKING MOC PROCEDURE.
C **********************************************************************
C
USE MT3DMS_MODULE, ONLY : HORIGN,XMAX,YMAX,ZMAX,UNIDX,UNIDY,UNIDZ,
USE MT3DMS_MODULE, ONLY : HORIGN,XMAX,YMAX,ZMAX,UNIDX,UNIDY,UNIDZ,
& PERCEL,ITRACK,WD,ISEED,DCEPS,NPLANE,NPL,NPH,
& NPMIN,NPMAX,SRMULT,INTERP,NLSINK,NPSINK,DCHMOC
C
Expand Down Expand Up @@ -825,7 +825,7 @@ SUBROUTINE SADV1B(NCOL,NROW,NLAY,MIXELM,ICBUND,DELR,DELC,DZ,
C LEVEL DUE TO ADVECTION WITH THE BACKWARD TRACKING MMOC PROCEDURE.
C **********************************************************************
C
USE MT3DMS_MODULE, ONLY : HORIGN,XMAX,YMAX,ZMAX,UNIDX,UNIDY,UNIDZ,
USE MT3DMS_MODULE, ONLY : HORIGN,XMAX,YMAX,ZMAX,UNIDX,UNIDY,UNIDZ,
& PERCEL,ITRACK,WD,ISEED,DCEPS,NPLANE,NPL,NPH,
& NPMIN,NPMAX,SRMULT,INTERP,NLSINK,NPSINK,DCHMOC
C
Expand Down Expand Up @@ -1271,7 +1271,7 @@ SUBROUTINE PARMGR(IOUT,NCOL,NROW,NLAY,MIXELM,MXPART,NCOUNT,NPINS,
C DELETING OR INSERTING PARTICLES AS NECESSARY.
C **********************************************************************
C
USE MT3DMS_MODULE, ONLY : HORIGN,XMAX,YMAX,ZMAX,UNIDX,UNIDY,UNIDZ,
USE MT3DMS_MODULE, ONLY : HORIGN,XMAX,YMAX,ZMAX,UNIDX,UNIDY,UNIDZ,
& PERCEL,ITRACK,WD,ISEED,DCEPS,NPLANE,NPL,NPH,
& NPMIN,NPMAX,SRMULT,INTERP,NLSINK,NPSINK,DCHMOC
C
Expand Down Expand Up @@ -1936,7 +1936,7 @@ SUBROUTINE VRK4(P,V,DT,J0,I0,K0,NCOL,NROW,NLAY,ICBUND,
C PARTICLE P OVER DT USING THE 4TH-ORDER RUNGE-KUTTA SOLUTION.
C *******************************************************************
C
USE MT3DMS_MODULE, ONLY : HORIGN,XMAX,YMAX,ZMAX,UNIDX,UNIDY,UNIDZ
USE MT3DMS_MODULE, ONLY : HORIGN,XMAX,YMAX,ZMAX,UNIDX,UNIDY,UNIDZ
C
IMPLICIT NONE
INTEGER NCOL,NROW,NLAY,ICBUND,JP,IP,KP,J0,I0,K0,J,I,K,N
Expand Down
18 changes: 9 additions & 9 deletions src/btn1.f
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ SUBROUTINE BTN1AR(IN)
C***********************************************************************
C
USE UZTVARS, ONLY: PRSITYSAV,IUZFOPTG
USE MT3DMS_MODULE
USE MT3DMS_MODULE
USE MIN_SAT
USE RCTMOD, ONLY: IREACTION
USE MT3DUTIL
Expand Down Expand Up @@ -301,13 +301,13 @@ SUBROUTINE BTN1AR(IN)
ALLOCATE(TUNIT)
ALLOCATE(LUNIT)
ALLOCATE(MUNIT)
ALLOCATE(ISOTHM)
ALLOCATE(HT1)
ALLOCATE(HT2)
ALLOCATE(DTRANS)
ALLOCATE(DELT)
ALLOCATE(TIME1)
ALLOCATE(TIME2)
ALLOCATE(ISOTHM)
ALLOCATE(HT1)
ALLOCATE(HT2)
ALLOCATE(DTRANS)
ALLOCATE(DELT)
ALLOCATE(TIME1)
ALLOCATE(TIME2)
ALLOCATE(CINACT)
ALLOCATE(THKMIN)
ALLOCATE(RFMIN)
Expand Down Expand Up @@ -344,7 +344,7 @@ SUBROUTINE BTN1AR(IN)
ALLOCATE(IUZFOPTG)
C
C--INITIALIZE VARIABLES THAT DEPEND ON OTHER PACKAGES
ISOTHM=0
ISOTHM=0
IF(FPRT.EQ.' ') FPRT='N'
C
C--READ AND PRINT HEADING
Expand Down
31 changes: 20 additions & 11 deletions src/cts1.f
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ SUBROUTINE CTS1FM(ICOMP)
ENDDO
C
C--SKIP IF NOT ACTIVE CELL
IF(ICBUND(JJ,II,KK,ICOMP).LE.0.OR.IQ.LE.0) THEN !EXTRACTION IS FORMULATED IN SSM PACKAGE
IF(ICBUND(JJ,II,KK,ICOMP).LE.0.OR.IQ.LE.0) THEN
! EXTRACTION IS FORMULATED IN SSM PACKAGE
IF(ICBUND(JJ,II,KK,ICOMP).EQ.0.AND.IQ.GT.0) THEN
IF(DRYON) THEN
Q=SS(5,IWELL)*DELR(JJ)*DELC(II)*ABS(DH(JJ,II,KK))
Expand All @@ -416,7 +417,7 @@ SUBROUTINE CTS1FM(ICOMP)
IF(ITRTINJ(ICTS).EQ.0) THEN !NO TREATMENT
CINJ=CCTS(ICOMP,ICTS)
ELSEIF(ITRTINJ(ICTS).EQ.1) THEN !SAME TREATMENT TO ALL
IF(IOPTINJ(ICOMP,1,ICTS).EQ.1) THEN !PERCENT REMOVAL/ADDITION
IF(IOPTINJ(ICOMP,1,ICTS).EQ.1) THEN !PERCENT REMOVAL/ADDITION
CINJ=CCTS(ICOMP,ICTS)*(1.0E0+CMCHGINJ(ICOMP,1,ICTS))
ELSEIF(IOPTINJ(ICOMP,1,ICTS).EQ.2) THEN !CONC REMOVAL/ADDITION
CINJ=CCTS(ICOMP,ICTS)+CMCHGINJ(ICOMP,1,ICTS)
Expand Down Expand Up @@ -480,12 +481,16 @@ SUBROUTINE CTS1FM(ICOMP)
ENDIF
ENDDO
C
IF(ITRTINJ(ICTS).EQ.2) THEN !SEPARATE TREATMENT TO EACH INJ WELL
IF(IOPTINJ(ICOMP,I,ICTS).EQ.1) THEN !PERCENT REMOVAL/ADDITION
IF(ITRTINJ(ICTS).EQ.2) THEN
!SEPARATE TREATMENT TO EACH INJ WELL
IF(IOPTINJ(ICOMP,I,ICTS).EQ.1) THEN
!PERCENT REMOVAL/ADDITION
CINJ=CCTS(ICOMP,ICTS)*(1.0E0+CMCHGINJ(ICOMP,I,ICTS))
ELSEIF(IOPTINJ(ICOMP,I,ICTS).EQ.2) THEN !CONC REMOVAL/ADDITION
ELSEIF(IOPTINJ(ICOMP,I,ICTS).EQ.2) THEN
!CONC REMOVAL/ADDITION
CINJ=CCTS(ICOMP,ICTS)+CMCHGINJ(ICOMP,I,ICTS)
ELSEIF(IOPTINJ(ICOMP,I,ICTS).EQ.3) THEN !MASS REMOVAL/ADDITION
ELSEIF(IOPTINJ(ICOMP,I,ICTS).EQ.3) THEN
!MASS REMOVAL/ADDITION
IF(ABS(Q).LT.1.0E-20) THEN
WRITE(IOUT,*) '***WARNING: FLOW SET TO 1E-20 FOR CTS',
& ICTS
Expand Down Expand Up @@ -711,7 +716,7 @@ SUBROUTINE CTS1BD(KSTP,KPER,ICOMP,DTRANS,NTRANS)
IF(ITRTINJ(ICTS).EQ.0) THEN !NO TREATMENT
CINJ=CCTS(ICOMP,ICTS)
ELSEIF(ITRTINJ(ICTS).EQ.1) THEN !SAME TREATMENT TO ALL
IF(IOPTINJ(ICOMP,1,ICTS).EQ.1) THEN !PERCENT REMOVAL/ADDITION
IF(IOPTINJ(ICOMP,1,ICTS).EQ.1) THEN !PERCENT REMOVAL/ADDITION
CINJ=CCTS(ICOMP,ICTS)*(1.0E0+CMCHGINJ(ICOMP,1,ICTS))
ELSEIF(IOPTINJ(ICOMP,1,ICTS).EQ.2) THEN !CONC REMOVAL/ADDITION
CINJ=CCTS(ICOMP,ICTS)+CMCHGINJ(ICOMP,1,ICTS)
Expand Down Expand Up @@ -773,12 +778,16 @@ SUBROUTINE CTS1BD(KSTP,KPER,ICOMP,DTRANS,NTRANS)
ENDDO
C
C
IF(ITRTINJ(ICTS).EQ.2) THEN !SEPARATE TREATMENT TO EACH INJ WELL
IF(IOPTINJ(ICOMP,I,ICTS).EQ.1) THEN !PERCENT REMOVAL/ADDITION
IF(ITRTINJ(ICTS).EQ.2) THEN
!SEPARATE TREATMENT TO EACH INJ WELL
IF(IOPTINJ(ICOMP,I,ICTS).EQ.1) THEN
!PERCENT REMOVAL/ADDITION
CINJ=CCTS(ICOMP,ICTS)*(1.0E0+CMCHGINJ(ICOMP,I,ICTS))
ELSEIF(IOPTINJ(ICOMP,I,ICTS).EQ.2) THEN !CONC REMOVAL/ADDITION
ELSEIF(IOPTINJ(ICOMP,I,ICTS).EQ.2) THEN
!CONC REMOVAL/ADDITION
CINJ=CCTS(ICOMP,ICTS)+CMCHGINJ(ICOMP,I,ICTS)
ELSEIF(IOPTINJ(ICOMP,I,ICTS).EQ.3) THEN !MASS REMOVAL/ADDITION
ELSEIF(IOPTINJ(ICOMP,I,ICTS).EQ.3) THEN
!MASS REMOVAL/ADDITION
IF(ABS(Q).LT.1.0E-20) THEN
WRITE(IOUT,*) '***WARNING: FLOW SET TO 1E-20 FOR CTS',
& ICTS
Expand Down
13 changes: 8 additions & 5 deletions src/fmi1.f
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ SUBROUTINE FMI1AR()
READ(INFTL,*) TEXT1
ENDIF
C
!NSY: NOT SUPPORTED YET
IF(TEXT1.EQ.' STR') FSTR=.TRUE.
IF(TEXT1.EQ.' RES') FRES=.TRUE.
IF(TEXT1.EQ.' FHB') FFHB=.TRUE.
Expand All @@ -140,7 +141,7 @@ SUBROUTINE FMI1AR()
IF(TEXT1.EQ.' LAK') FLAK=.TRUE.
IF(TEXT1.EQ.' LAK FLOWS') FLAKFLOWS=.TRUE.
IF(TEXT1.EQ.' MNW') FMNW=.TRUE.
IF(TEXT1.EQ.' MNW FLOWS') FMNWFLOWS=.TRUE. !NOT SUPPORTED YET
IF(TEXT1.EQ.' MNW FLOWS') FMNWFLOWS=.TRUE. !NSY
IF(TEXT1.EQ.' SWT') FSWT=.TRUE.
IF(TEXT1.EQ.' SFR') FSFR=.TRUE.
IF(TEXT1.EQ.' SFR FLOWS SS' .OR.
Expand All @@ -152,7 +153,7 @@ SUBROUTINE FMI1AR()
IF(TEXT1.EQ.' UZF') FUZF=.TRUE.
IF(TEXT1.EQ.' UZF FLOWS') FUZFFLOWS=.TRUE.
IF(TEXT1.EQ.' SWR') FSWR=.TRUE.
IF(TEXT1.EQ.' SWR FLOWS') FSWRFLOWS=.TRUE. !NOT SUPPORTED YET
IF(TEXT1.EQ.' SWR FLOWS') FSWRFLOWS=.TRUE. !NSY
IF(TEXT1.EQ.' CONNECT SFR LAK') FSFRLAK=.TRUE.
IF(TEXT1.EQ.' CONNECT SFR UZF') FSFRUZF=.TRUE.
IF(TEXT1.EQ.' CONNECT LAK UZF') FLAKUZF=.TRUE.
Expand Down Expand Up @@ -295,7 +296,8 @@ SUBROUTINE FMI1AR()
READ(INFTL,*) KKPER,KKSTP,NC,NR,NL,LABEL
ENDIF
C
! file pointer will be on recognizable values if single precision
! file pointer will be on recognizable values
! if single precision
IF (KKPER.ne.KPER .or. NC.ne.NCOL .or.
& NR.ne.NROW .or. NL.ne.NLAY) THEN
WRITE(IOUT,11)
Expand Down Expand Up @@ -339,7 +341,7 @@ SUBROUTINE FMI1AR()
& 'Possibly Caused by:',
& /1X,'1. Incompatible Styles of Unformatted Files ',
& 'Used by MODFLOW and MT3D-USGS, ensure usage ',
& /1X 'of FREE in MT3D-USGS name file matches LMT;',
& /1X,'of FREE in MT3D-USGS name file matches LMT;',
& /1X,'2. Unformatted Flow-Transport Link File Saved by ',
& 'Version 1 of LinkMT3D',
& /1X,' Package Which Is No Longer Supported by ',
Expand Down Expand Up @@ -586,7 +588,8 @@ SUBROUTINE FMI1RP1(KPER,KSTP)
ENDDO
C
420 IF(NLAY.LT.2) GOTO 430
IF(FUZFFLOWS) GOTO 430 ! THIS CALCULATION IS REPEATED IN RP2 WHEN FUZFFLOWS>0
IF(FUZFFLOWS) GOTO 430 ! THIS CALCULATION IS REPEATED
! IN RP2 WHEN FUZFFLOWS>0
DO J=1,NCOL
DO I=1,NROW
DO K=2,NLAY
Expand Down
8 changes: 4 additions & 4 deletions src/hss1.f
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ SUBROUTINE HSS1AR(IN)
ENDIF
c
num=0
area_total=0
area_total=0
DO i=1,nrow
DO j=1,ncol
IF(IHSSGEN.NE.2) THEN
Expand Down Expand Up @@ -485,7 +485,7 @@ SUBROUTINE HSS1BD(ICOMP,ICBUND,IQ,time1,time2,DTRANS)
C--LOOP over all HSS_LNAPL sources
DO is=1,nHSSSource
IF(MAXDSSL.EQ.0) THEN
C
C
iHSSComp=int(HSSData(4,1,is))
IF(iHSSComp.ne.ICOMP) CYCLE
c
Expand Down Expand Up @@ -663,7 +663,7 @@ SUBROUTINE GetArea(ncol,nrow,nPoint,p,nSubGrid,
& x0,y0,dx,dy
logical inside,l1,l2
dimension delr(ncol),delc(nrow),xbc(ncol),ybc(nrow),
& p(2,npoint),subpoint(2),pmin(2),pmax(2)
& p(2,npoint),subpoint(2),pmin(2),pmax(2)
c
pmin(1)=0
pmin(2)=0
Expand All @@ -690,7 +690,7 @@ SUBROUTINE GetArea(ncol,nrow,nPoint,p,nSubGrid,
ENDIF
IF(l1.and.l2) THEN
nsub=nsub+1
ENDIF
ENDIF
ENDDO
ENDDO
IF(nsub.gt.0) THEN
Expand Down
Loading

0 comments on commit e5cbef9

Please sign in to comment.