MODFLOW-USGS / mfusg

Public repository for MODFLOW-USG
https://water.usgs.gov/ogw/mfusg/
7 stars 4 forks source link

Undeclared variable in CLN well assigned to CL1 in SFILLPGF_CLN #42

Open langevin-usgs opened 5 years ago

langevin-usgs commented 5 years ago

For the case where IFCON is 3, the FRAD variable is undefined. I think the solution is to make a call to CLNR in when IFCON is 3. The proposed fix is shown with add this

          IF(IFCON.EQ.3)THEN
C
C5A-----------CONNECTION IS ACROSS A LEAKANCE TERM LIKE CONDUIT FLOW PROCESS OF MF2K5, COMPUTE LEAKANCE
            FLENG = ACLNGWC(IFN,6)
            CWCn =  FSKIN * FPER * FLENG/ FANISO
            CALL CLNR(IFTYP,FRAD)  *** add this ***
          ELSEIF(IFCON.EQ.2)THEN
C
C5B-----------CONNECTION IS ACROSS A LEAKANCE TERM LIKE CONDUIT FLOW PROCESS PACKAGE, LEAKANCE IS INPUT
            CWCn = FSKIN
          ELSEIF(IFCON.EQ.0.OR.IFCON.EQ.1)THEN
C
C5C-----------CONNECTION USES THIEM EQUATION LIKE MULTI-NODE WELL PACKAGE
            FLENG = ACLNGWC(IFN,6)
            CALL CLNR(IFTYP,FRAD)
            CWND = LOG(RO / FRAD) + FSKIN
C5C1------------COMPUTE THE CONDUCTANCE TERM
            CWCn = 2.0*PI*HK(NL) * SQRT(1.0/FANISO)*FLENG / CWND
          ENDIF
          PGF(IIS) = CWCn
C--------------------------------------------------------------------------------------
C6-----------ALSO FILL AREA, IVC, CL1, CL2 - NEEDED FOR TRANSPORT
          FAHL(IIS) = FPER * FLENG
          IVC(IIS) = 4
          CL1(IIS) = FRAD
          CL2(IIS) = RO
        ENDDO
langevin-usgs commented 5 years ago

The suggested fix shown above was added to https://github.com/MODFLOW-USGS/mfusg/commit/bbe3ae356bec4f10fc16e1f789665c658d8471e6.