From 57732dd77ef0dc4bc7b123623b4f327e9d8e20f9 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Mon, 27 Aug 2018 18:39:47 -0400 Subject: [PATCH 001/170] Initial changes to address #36. Still need to test and perform clean up. --- README.md | 4 +- code.json | 18 +- doc/version.tex | 4 +- src/Exchange/GhostNode.f90 | 22 +-- src/Exchange/GwfGwfExchange.f90 | 12 +- src/Exchange/NumericalExchange.f90 | 12 +- src/Model/GroundWaterFlow/gwf3dis8.f90 | 20 +- src/Model/GroundWaterFlow/gwf3disu8.f90 | 20 +- src/Model/GroundWaterFlow/gwf3disv8.f90 | 24 +-- src/Model/GroundWaterFlow/gwf3evt8.f90 | 5 +- src/Model/GroundWaterFlow/gwf3hfb8.f90 | 36 ++-- src/Model/GroundWaterFlow/gwf3ic8.f90 | 2 +- src/Model/GroundWaterFlow/gwf3lak8.f90 | 178 +++++++++--------- src/Model/GroundWaterFlow/gwf3maw8.f90 | 66 +++---- src/Model/GroundWaterFlow/gwf3mvr8.f90 | 16 +- src/Model/GroundWaterFlow/gwf3npf8.f90 | 62 +++--- src/Model/GroundWaterFlow/gwf3obs8.f90 | 14 +- src/Model/GroundWaterFlow/gwf3oc8.f90 | 4 +- src/Model/GroundWaterFlow/gwf3rch8.f90 | 5 +- src/Model/GroundWaterFlow/gwf3sfr8.f90 | 20 +- src/Model/GroundWaterFlow/gwf3sto8.f90 | 14 +- src/Model/GroundWaterFlow/gwf3uzf8.f90 | 68 +++---- src/Model/ModelUtilities/BndUzfKinematic.f90 | 8 +- src/Model/ModelUtilities/BoundaryPackage.f90 | 38 ++-- src/Model/ModelUtilities/Connections.f90 | 24 +-- .../ModelUtilities/DiscretizationBase.f90 | 26 +-- src/Model/ModelUtilities/Mover.f90 | 2 +- src/Model/ModelUtilities/PackageMover.f90 | 8 +- src/Model/ModelUtilities/Xt3dInterface.f90 | 60 +++--- src/Model/NumericalModel.f90 | 24 +-- src/Solution/NumericalSolution.f90 | 40 ++-- .../SparseMatrixSolver/ims8linear.f90 | 10 +- src/Timing/tdis.f90 | 6 +- src/Utilities/ArrayHandlers.f90 | 8 +- src/Utilities/Budget.f90 | 4 +- src/Utilities/ListReader.f90 | 22 +-- src/Utilities/Memory/MemoryManager.f90 | 44 ++--- src/Utilities/Observation/Obs3.f90 | 6 +- src/Utilities/Observation/Observe.f90 | 16 +- src/Utilities/OutputControl/OutputControl.f90 | 2 +- .../OutputControl/OutputControlData.f90 | 8 +- src/Utilities/TimeSeries/TimeArray.f90 | 70 +++---- .../TimeSeries/TimeArraySeriesLink.f90 | 76 ++++---- .../TimeSeries/TimeArraySeriesManager.f90 | 4 +- src/Utilities/TimeSeries/TimeSeries.f90 | 2 +- src/Utilities/version.f90 | 2 +- version.txt | 6 +- 47 files changed, 574 insertions(+), 568 deletions(-) diff --git a/README.md b/README.md index 67c673c3105..5eafb28e8d9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Automated Testing Status on Travis-CI -### Version 6.0.3 +### Version 6.0.3 develop — build 5 [![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6) ## Introduction @@ -31,7 +31,7 @@ MODFLOW 6 is the latest core version of MODFLOW. It synthesizes many of the capa #### ***Software/Code citation for MODFLOW 6:*** -[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2018, MODFLOW 6 Modular Hydrologic Model version 6.0.3: U.S. Geological Survey Software Release, 13 August 2018, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV) +[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2018, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 27 August 2018, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV) ## Instructions for building definition files for new packages diff --git a/code.json b/code.json index 6690c11b262..1220c4e80d3 100755 --- a/code.json +++ b/code.json @@ -1,26 +1,26 @@ [ { "status": "Release Candidate", - "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", + "languages": [ + "Fortran2008" + ], "repositoryURL": "https://code.usgs.gov/usgs/modflow/modflow6.git", "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md", - "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", + "name": "modflow6", "tags": [ "MODFLOW", "groundwater model" ], - "vcs": "git", - "languages": [ - "Fortran2008" - ], "contact": { "name": "Christian D. Langevin", "email": "langevin@usgs.gov" }, + "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", + "vcs": "git", "laborHours": -1, - "version": "6.0.3.0", + "version": "6.0.3.5", "date": { - "metadataLastUpdated": "2018-08-13" + "metadataLastUpdated": "2018-08-27" }, "organization": "U.S. Geological Survey", "permissions": { @@ -33,6 +33,6 @@ "usageType": "openSource" }, "homepageURL": "https://code.usgs.gov/usgs/modflow/modflow6/", - "name": "modflow6" + "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions." } ] \ No newline at end of file diff --git a/doc/version.tex b/doc/version.tex index 775b0383d50..cef7d915b2f 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,3 +1,3 @@ -\newcommand{\modflowversion}{mf6.0.3} -\newcommand{\modflowdate}{August 13, 2018} +\newcommand{\modflowversion}{mf6.0.3.5} +\newcommand{\modflowdate}{August 27, 2018} \newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate} diff --git a/src/Exchange/GhostNode.f90 b/src/Exchange/GhostNode.f90 index 941dc458eac..1a7b5b5cf8e 100644 --- a/src/Exchange/GhostNode.f90 +++ b/src/Exchange/GhostNode.f90 @@ -20,17 +20,17 @@ module GhostNodeModule integer(I4B), pointer :: numjs => null() ! number of connecting nodes class(NumericalModelType), pointer :: m1 => null() ! pointer to model 1 class(NumericalModelType), pointer :: m2 => null() ! pointer to model 2 - integer(I4B), dimension(:), pointer :: nodem1 => null() ! array of nodes in model 1 - integer(I4B), dimension(:), pointer :: nodem2 => null() ! array of nodes in model 2 - integer(I4B), dimension(:, :), pointer :: nodesj => null() ! array of interpolation nodes - real(DP), dimension(:), pointer :: cond => null() ! array of conductance - integer(I4B), dimension(:), pointer :: idxglo => null() ! connection position in amat - integer(I4B), dimension(:), pointer :: idxsymglo => null() ! symmetric position in amat - real(DP), dimension(:, :), pointer :: alphasj => null() ! interpolation factors - integer(I4B), dimension(:), pointer :: idiagn => null() ! amat diagonal position of n - integer(I4B), dimension(:), pointer :: idiagm => null() ! amat diagonal position of m - integer(I4B), dimension(:,:), pointer :: jposinrown => null() ! amat j position in row n - integer(I4B), dimension(:,:), pointer :: jposinrowm => null() ! amat j position in row m + integer(I4B), dimension(:), pointer, contiguous :: nodem1 => null() ! array of nodes in model 1 + integer(I4B), dimension(:), pointer, contiguous :: nodem2 => null() ! array of nodes in model 2 + integer(I4B), dimension(:, :), pointer, contiguous :: nodesj => null() ! array of interpolation nodes + real(DP), dimension(:), pointer, contiguous :: cond => null() ! array of conductance + integer(I4B), dimension(:), pointer, contiguous :: idxglo => null() ! connection position in amat + integer(I4B), dimension(:), pointer, contiguous :: idxsymglo => null() ! symmetric position in amat + real(DP), dimension(:, :), pointer, contiguous :: alphasj => null() ! interpolation factors + integer(I4B), dimension(:), pointer, contiguous :: idiagn => null() ! amat diagonal position of n + integer(I4B), dimension(:), pointer, contiguous :: idiagm => null() ! amat diagonal position of m + integer(I4B), dimension(:,:), pointer, contiguous :: jposinrown => null() ! amat j position in row n + integer(I4B), dimension(:,:), pointer, contiguous :: jposinrowm => null() ! amat j position in row m contains procedure :: gnc_df procedure :: gnc_ac diff --git a/src/Exchange/GwfGwfExchange.f90 b/src/Exchange/GwfGwfExchange.f90 index e6f8deca5ab..835f2c2a524 100644 --- a/src/Exchange/GwfGwfExchange.f90 +++ b/src/Exchange/GwfGwfExchange.f90 @@ -33,18 +33,18 @@ module GwfGwfExchangeModule integer(I4B), pointer :: icdist => null() ! flag indicating cdist was read, if read, icdist is index in auxvar integer(I4B), pointer :: inamedbound => null() ! flag to read boundnames real(DP), pointer :: satomega => null() ! saturation smoothing - integer(I4B), dimension(:), pointer :: ihc => null() ! horizontal connection indicator array - real(DP), dimension(:), pointer :: condsat => null() ! saturated conductance - real(DP), dimension(:), pointer :: cl1 => null() ! connection length 1 - real(DP), dimension(:), pointer :: cl2 => null() ! connection length 2 - real(DP), dimension(:), pointer :: hwva => null() ! horizontal widths, vertical flow areas + integer(I4B), dimension(:), pointer, contiguous :: ihc => null() ! horizontal connection indicator array + real(DP), dimension(:), pointer, contiguous :: condsat => null() ! saturated conductance + real(DP), dimension(:), pointer, contiguous :: cl1 => null() ! connection length 1 + real(DP), dimension(:), pointer, contiguous :: cl2 => null() ! connection length 2 + real(DP), dimension(:), pointer, contiguous :: hwva => null() ! horizontal widths, vertical flow areas integer(I4B), pointer :: ingnc => null() ! unit number for gnc (0 if off) type(GhostNodeType), pointer :: gnc => null() ! gnc object integer(I4B), pointer :: inmvr => null() ! unit number for mover (0 if off) type(GwfMvrType), pointer :: mvr => null() ! water mover object integer(I4B), pointer :: inobs => null() ! unit number for GWF-GWF observations type(ObsType), pointer :: obs => null() ! observation object - character(len=LENBOUNDNAME), pointer, dimension(:) :: boundname => null() ! boundnames + character(len=LENBOUNDNAME), dimension(:), pointer, contiguous :: boundname => null() ! boundnames contains procedure :: exg_df => gwf_gwf_df procedure :: exg_ac => gwf_gwf_ac diff --git a/src/Exchange/NumericalExchange.f90 b/src/Exchange/NumericalExchange.f90 index 5347f2b4a29..a0f811eb654 100644 --- a/src/Exchange/NumericalExchange.f90 +++ b/src/Exchange/NumericalExchange.f90 @@ -22,16 +22,16 @@ module NumericalExchangeModule integer(I4B), pointer :: iprflow !print flag for cell by cell flows integer(I4B), pointer :: ipakcb !save flag for cell by cell flows integer(I4B), pointer :: nexg !number of exchanges - integer(I4B), dimension(:), pointer :: nodem1 !node numbers in model 1 - integer(I4B), dimension(:), pointer :: nodem2 !node numbers in model 2 - real(DP), pointer, dimension(:) :: cond !conductance - integer(I4B), dimension(:), pointer :: idxglo !pointer to solution amat for each connection - integer(I4B), dimension(:), pointer :: idxsymglo !pointer to symmetric amat position for each connection + integer(I4B), dimension(:), pointer, contiguous :: nodem1 !node numbers in model 1 + integer(I4B), dimension(:), pointer, contiguous :: nodem2 !node numbers in model 2 + real(DP), dimension(:), pointer, contiguous :: cond !conductance + integer(I4B), dimension(:), pointer, contiguous :: idxglo !pointer to solution amat for each connection + integer(I4B), dimension(:), pointer, contiguous :: idxsymglo !pointer to symmetric amat position for each connection class(NumericalModelType), pointer :: m1 !pointer to model 1 class(NumericalModelType), pointer :: m2 !pointer to model 2 integer(I4B), pointer :: naux !number of auxiliary variables character(len=16), allocatable, dimension(:) :: auxname !array of auxiliary variable names - real(DP), pointer, dimension(:, :) :: auxvar !array of auxiliary variable values + real(DP), dimension(:, :), pointer, contiguous :: auxvar !array of auxiliary variable values type(BlockParserType) :: parser !block parser contains procedure :: exg_df diff --git a/src/Model/GroundWaterFlow/gwf3dis8.f90 b/src/Model/GroundWaterFlow/gwf3dis8.f90 index b632645cddf..3786025fd46 100644 --- a/src/Model/GroundWaterFlow/gwf3dis8.f90 +++ b/src/Model/GroundWaterFlow/gwf3dis8.f90 @@ -19,10 +19,10 @@ module GwfDisModule integer(I4B), pointer :: nlay => null() ! number of layers integer(I4B), pointer :: nrow => null() ! number of rows integer(I4B), pointer :: ncol => null() ! number of columns - integer(I4B), dimension(:), pointer :: nodereduced => null() ! (size:nodesuser)contains reduced nodenumber (size 0 if not reduced); -1 means vertical pass through, 0 is idomain = 0 - integer(I4B), dimension(:), pointer :: nodeuser => null() ! (size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) - real(DP), dimension(:), pointer :: delr => null() ! spacing along a row - real(DP), dimension(:), pointer :: delc => null() ! spacing along a column + integer(I4B), dimension(:), pointer, contiguous :: nodereduced => null() ! (size:nodesuser)contains reduced nodenumber (size 0 if not reduced); -1 means vertical pass through, 0 is idomain = 0 + integer(I4B), dimension(:), pointer, contiguous :: nodeuser => null() ! (size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) + real(DP), dimension(:), pointer, contiguous :: delr => null() ! spacing along a row + real(DP), dimension(:), pointer, contiguous :: delc => null() ! spacing along a column real(DP), dimension(:, :, :), pointer :: botm => null() ! top and bottom elevations for each cell (ncol, nrow, nlay) integer(I4B), dimension(:, :, :), pointer :: idomain => null() ! idomain (ncol, nrow, nlay) contains @@ -1282,7 +1282,7 @@ subroutine read_int_array(this, line, lloc, istart, istop, iout, in, & integer(I4B), intent(inout) :: istop integer(I4B), intent(in) :: in integer(I4B), intent(in) :: iout - integer(I4B), dimension(:), pointer, intent(inout) :: iarray + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: iarray character(len=*), intent(in) :: aname ! -- local integer(I4B) :: ival @@ -1292,7 +1292,7 @@ subroutine read_int_array(this, line, lloc, istart, istop, iout, in, & integer(I4B) :: ncol integer(I4B) :: nval integer(I4B) :: nodeu, noder - integer(I4B), dimension(:), pointer :: itemp + integer(I4B), dimension(:), pointer, contiguous :: itemp ! ------------------------------------------------------------------------------ ! ! -- Point the temporary pointer array, which is passed to the reading @@ -1357,7 +1357,7 @@ subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, & integer(I4B), intent(inout) :: istop integer(I4B), intent(in) :: in integer(I4B), intent(in) :: iout - real(DP), dimension(:), pointer, intent(inout) :: darray + real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray character(len=*), intent(in) :: aname ! -- local integer(I4B) :: ival @@ -1367,7 +1367,7 @@ subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, & integer(I4B) :: ncol integer(I4B) :: nval integer(I4B) :: nodeu, noder - real(DP), dimension(:), pointer :: dtemp + real(DP), dimension(:), pointer, contiguous :: dtemp ! ------------------------------------------------------------------------------ ! ! -- Point the temporary pointer array, which is passed to the reading @@ -1524,7 +1524,7 @@ subroutine record_array(this, darray, iout, iprint, idataun, aname, & ! -- modules ! -- dummy class(GwfDisType), intent(inout) :: this - real(DP), dimension(:), pointer, intent(inout) :: darray + real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray integer(I4B), intent(in) :: iout integer(I4B), intent(in) :: iprint integer(I4B), intent(in) :: idataun @@ -1542,7 +1542,7 @@ subroutine record_array(this, darray, iout, iprint, idataun, aname, & integer(I4B) :: nval integer(I4B) :: nodeu, noder integer(I4B) :: istart, istop - real(DP), dimension(:), pointer :: dtemp + real(DP), dimension(:), pointer, contiguous :: dtemp ! -- formats character(len=*),parameter :: fmthsv = & "(1X,/1X,a,' WILL BE SAVED ON UNIT ',I4, & diff --git a/src/Model/GroundWaterFlow/gwf3disu8.f90 b/src/Model/GroundWaterFlow/gwf3disu8.f90 index beb1627ae51..267b6f05976 100644 --- a/src/Model/GroundWaterFlow/gwf3disu8.f90 +++ b/src/Model/GroundWaterFlow/gwf3disu8.f90 @@ -19,10 +19,10 @@ module GwfDisuModule type, extends(DisBaseType) :: GwfDisuType integer(I4B), pointer :: nvert => null() ! number of x,y vertices - real(DP), dimension(:,:), pointer :: vertices => null() ! cell vertices stored as 2d array of x and y - real(DP), dimension(:,:), pointer :: cellxy => null() ! cell center stored as 2d array of x and y - integer(I4B), dimension(:), pointer :: iavert => null() ! cell vertex pointer ia array - integer(I4B), dimension(:), pointer :: javert => null() ! cell vertex pointer ja array + real(DP), dimension(:,:), pointer, contiguous :: vertices => null() ! cell vertices stored as 2d array of x and y + real(DP), dimension(:,:), pointer, contiguous :: cellxy => null() ! cell center stored as 2d array of x and y + integer(I4B), dimension(:), pointer, contiguous :: iavert => null() ! cell vertex pointer ia array + integer(I4B), dimension(:), pointer, contiguous :: javert => null() ! cell vertex pointer ja array contains procedure :: dis_df => disu_df procedure :: dis_da => disu_da @@ -1217,7 +1217,7 @@ subroutine read_int_array(this, line, lloc, istart, istop, iout, in, & integer(I4B), intent(inout) :: istop integer(I4B), intent(in) :: in integer(I4B), intent(in) :: iout - integer(I4B), dimension(:), pointer, intent(inout) :: iarray + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: iarray character(len=*), intent(in) :: aname ! -- local integer(I4B) :: nlay @@ -1225,7 +1225,7 @@ subroutine read_int_array(this, line, lloc, istart, istop, iout, in, & integer(I4B) :: ncol integer(I4B) :: nval integer(I4B) :: nodeu, noder - integer(I4B), dimension(:), pointer :: itemp + integer(I4B), dimension(:), pointer, contiguous :: itemp ! ------------------------------------------------------------------------------ ! ! -- Point the temporary pointer array, which is passed to the reading @@ -1281,7 +1281,7 @@ subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, & integer(I4B), intent(inout) :: istop integer(I4B), intent(in) :: in integer(I4B), intent(in) :: iout - real(DP), dimension(:), pointer, intent(inout) :: darray + real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray character(len=*), intent(in) :: aname ! -- local integer(I4B) :: nlay @@ -1289,7 +1289,7 @@ subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, & integer(I4B) :: ncol integer(I4B) :: nval integer(I4B) :: nodeu, noder - real(DP), dimension(:), pointer :: dtemp + real(DP), dimension(:), pointer, contiguous :: dtemp ! ------------------------------------------------------------------------------ ! ! -- Point the temporary pointer array, which is passed to the reading @@ -1385,7 +1385,7 @@ subroutine record_array(this, darray, iout, iprint, idataun, aname, & ! -- modules ! -- dummy class(GwfDisuType), intent(inout) :: this - real(DP), dimension(:), pointer, intent(inout) :: darray + real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray integer(I4B), intent(in) :: iout integer(I4B), intent(in) :: iprint integer(I4B), intent(in) :: idataun @@ -1402,7 +1402,7 @@ subroutine record_array(this, darray, iout, iprint, idataun, aname, & integer(I4B) :: ncol integer(I4B) :: nval integer(I4B) :: istart, istop - real(DP), dimension(:), pointer :: dtemp + real(DP), dimension(:), pointer, contiguous :: dtemp ! -- formats character(len=*),parameter :: fmthsv = & "(1X,/1X,a,' WILL BE SAVED ON UNIT ',I4, & diff --git a/src/Model/GroundWaterFlow/gwf3disv8.f90 b/src/Model/GroundWaterFlow/gwf3disv8.f90 index fec0dad1c49..2d3861620ae 100644 --- a/src/Model/GroundWaterFlow/gwf3disv8.f90 +++ b/src/Model/GroundWaterFlow/gwf3disv8.f90 @@ -20,12 +20,12 @@ module GwfDisvModule integer(I4B), pointer :: nlay => null() ! number of layers integer(I4B), pointer :: ncpl => null() ! number of cells per layer integer(I4B), pointer :: nvert => null() ! number of x,y vertices - integer(I4B), dimension(:), pointer :: nodereduced => null() ! (size:nodesuser)contains reduced nodenumber (size 0 if not reduced); -1 means vertical pass through, 0 is idomain = 0 - integer(I4B), dimension(:), pointer :: nodeuser => null() ! (size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) - real(DP), dimension(:,:), pointer :: vertices => null() ! cell vertices stored as 2d array of x and y - real(DP), dimension(:,:), pointer :: cellxy => null() ! cell center stored as 2d array of x and y - integer(I4B), dimension(:), pointer :: iavert => null() ! cell vertex pointer ia array - integer(I4B), dimension(:), pointer :: javert => null() ! cell vertex pointer ja array + integer(I4B), dimension(:), pointer, contiguous :: nodereduced => null() ! (size:nodesuser)contains reduced nodenumber (size 0 if not reduced); -1 means vertical pass through, 0 is idomain = 0 + integer(I4B), dimension(:), pointer, contiguous :: nodeuser => null() ! (size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) + real(DP), dimension(:,:), pointer, contiguous :: vertices => null() ! cell vertices stored as 2d array of x and y + real(DP), dimension(:,:), pointer, contiguous :: cellxy => null() ! cell center stored as 2d array of x and y + integer(I4B), dimension(:), pointer, contiguous :: iavert => null() ! cell vertex pointer ia array + integer(I4B), dimension(:), pointer, contiguous :: javert => null() ! cell vertex pointer ja array real(DP), dimension(:, :, :), pointer :: botm => null() ! top and bottom elevations for each cell (ncpl, 1, 0:nlay) integer(I4B), dimension(:, :, :), pointer :: idomain => null() ! idomain (ncpl, 1, nlay) type(DisvGeomType) :: cell1 ! cell object used to calculate geometric properties @@ -1703,7 +1703,7 @@ subroutine read_int_array(this, line, lloc, istart, istop, iout, in, & integer(I4B), intent(inout) :: istop integer(I4B), intent(in) :: in integer(I4B), intent(in) :: iout - integer(I4B), dimension(:), pointer, intent(inout) :: iarray + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: iarray character(len=*), intent(in) :: aname ! -- local integer(I4B) :: ival @@ -1713,7 +1713,7 @@ subroutine read_int_array(this, line, lloc, istart, istop, iout, in, & integer(I4B) :: ncol integer(I4B) :: nval integer(I4B) :: nodeu, noder - integer(I4B), dimension(:), pointer :: itemp + integer(I4B), dimension(:), pointer, contiguous :: itemp ! ------------------------------------------------------------------------------ ! ! -- Point the temporary pointer array, which is passed to the reading @@ -1778,7 +1778,7 @@ subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, & integer(I4B), intent(inout) :: istop integer(I4B), intent(in) :: in integer(I4B), intent(in) :: iout - real(DP), dimension(:), pointer, intent(inout) :: darray + real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray character(len=*), intent(in) :: aname ! -- local integer(I4B) :: ival @@ -1788,7 +1788,7 @@ subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, & integer(I4B) :: ncol integer(I4B) :: nval integer(I4B) :: nodeu, noder - real(DP), dimension(:), pointer :: dtemp + real(DP), dimension(:), pointer, contiguous :: dtemp ! ------------------------------------------------------------------------------ ! ! -- Point the temporary pointer array, which is passed to the reading @@ -1923,7 +1923,7 @@ subroutine record_array(this, darray, iout, iprint, idataun, aname, & ! -- modules ! -- dummy class(GwfDisvType), intent(inout) :: this - real(DP), dimension(:), pointer, intent(inout) :: darray + real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray integer(I4B), intent(in) :: iout integer(I4B), intent(in) :: iprint integer(I4B), intent(in) :: idataun @@ -1941,7 +1941,7 @@ subroutine record_array(this, darray, iout, iprint, idataun, aname, & integer(I4B) :: nval integer(I4B) :: nodeu, noder integer(I4B) :: istart, istop - real(DP), dimension(:), pointer :: dtemp + real(DP), dimension(:), pointer, contiguous :: dtemp ! -- formats character(len=*),parameter :: fmthsv = & "(1X,/1X,a,' WILL BE SAVED ON UNIT ',I4, & diff --git a/src/Model/GroundWaterFlow/gwf3evt8.f90 b/src/Model/GroundWaterFlow/gwf3evt8.f90 index cc3d3b33542..e877f6edd0c 100644 --- a/src/Model/GroundWaterFlow/gwf3evt8.f90 +++ b/src/Model/GroundWaterFlow/gwf3evt8.f90 @@ -28,7 +28,7 @@ module EvtModule integer(I4B), pointer :: inievt => null() integer(I4B), pointer, private :: nseg => null() ! -- arrays - integer(I4B), pointer, dimension(:) :: nodesontop => null() + integer(I4B), dimension(:), pointer, contiguous :: nodesontop => null() contains procedure :: evt_allocate_scalars procedure :: bnd_options => evt_options @@ -724,6 +724,9 @@ subroutine evt_rp_array(this, line, inrate, insurf, indepth, & character(len=100) :: ermsg, keyword logical :: found, endOfBlock logical :: convertFlux + ! + ! -- these time array series pointers need to be non-contiguous + ! beacuse a slice of bound is passed real(DP), dimension(:), pointer :: bndArrayPtr => null() real(DP), dimension(:), pointer :: auxArrayPtr => null() real(DP), dimension(:), pointer :: auxMultArray => null() diff --git a/src/Model/GroundWaterFlow/gwf3hfb8.f90 b/src/Model/GroundWaterFlow/gwf3hfb8.f90 index cf3899e74bb..d7211d286c3 100644 --- a/src/Model/GroundWaterFlow/gwf3hfb8.f90 +++ b/src/Model/GroundWaterFlow/gwf3hfb8.f90 @@ -16,25 +16,25 @@ module GwfHfbModule type, extends(NumericalPackageType) :: GwfHfbType integer(I4B), pointer :: maxhfb => null() !max number of hfb's integer(I4B), pointer :: nhfb => null() !number of hfb's - integer(I4B), dimension(:), pointer :: noden => null() !first cell - integer(I4B), dimension(:), pointer :: nodem => null() !second cell - integer(I4B), dimension(:), pointer :: idxloc => null() !position in model ja - real(DP), dimension(:), pointer :: hydchr => null() !hydraulic characteristic of the barrier - real(DP), dimension(:), pointer :: csatsav => null() !value of condsat prior to hfb modification - real(DP), dimension(:), pointer :: condsav => null() !saved conductance of combined npf and hfb + integer(I4B), dimension(:), pointer, contiguous :: noden => null() !first cell + integer(I4B), dimension(:), pointer, contiguous :: nodem => null() !second cell + integer(I4B), dimension(:), pointer, contiguous :: idxloc => null() !position in model ja + real(DP), dimension(:), pointer, contiguous :: hydchr => null() !hydraulic characteristic of the barrier + real(DP), dimension(:), pointer, contiguous :: csatsav => null() !value of condsat prior to hfb modification + real(DP), dimension(:), pointer, contiguous :: condsav => null() !saved conductance of combined npf and hfb type(Xt3dType), pointer :: xt3d => null() !pointer to xt3d object ! - integer(I4B), pointer, dimension(:) :: ibound => null() !pointer to model ibound - integer(I4B), pointer, dimension(:) :: icelltype => null() !pointer to model icelltype - integer(I4B), pointer, dimension(:) :: ihc => null() !pointer to model ihc - integer(I4B), pointer, dimension(:) :: ia => null() !pointer to model ia - integer(I4B), pointer, dimension(:) :: ja => null() !pointer to model ja - integer(I4B), pointer, dimension(:) :: jas => null() !pointer to model jas - integer(I4B), pointer, dimension(:) :: isym => null() !pointer to model isym - real(DP), pointer, dimension(:) :: condsat => null() !pointer to model condsat - real(DP), pointer, dimension(:) :: top => null() !pointer to model top - real(DP), pointer, dimension(:) :: bot => null() !pointer to model bot - real(DP), pointer, dimension(:) :: hwva => null() !pointer to model hwva + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound + integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !pointer to model icelltype + integer(I4B), dimension(:), pointer, contiguous :: ihc => null() !pointer to model ihc + integer(I4B), dimension(:), pointer, contiguous :: ia => null() !pointer to model ia + integer(I4B), dimension(:), pointer, contiguous :: ja => null() !pointer to model ja + integer(I4B), dimension(:), pointer, contiguous :: jas => null() !pointer to model jas + integer(I4B), dimension(:), pointer, contiguous :: isym => null() !pointer to model isym + real(DP), dimension(:), pointer, contiguous :: condsat => null() !pointer to model condsat + real(DP), dimension(:), pointer, contiguous :: top => null() !pointer to model top + real(DP), dimension(:), pointer, contiguous :: bot => null() !pointer to model bot + real(DP), dimension(:), pointer, contiguous :: hwva => null() !pointer to model hwva contains procedure :: hfb_ar procedure :: hfb_rp @@ -98,7 +98,7 @@ subroutine hfb_ar(this, ibound, xt3d, dis) use MemoryManagerModule, only: mem_setptr ! -- dummy class(GwfHfbType) :: this - integer(I4B), dimension(:), pointer :: ibound + integer(I4B), dimension(:), pointer, contiguous :: ibound type(Xt3dType), pointer :: xt3d class(DisBaseType), pointer, intent(inout) :: dis ! -- formats diff --git a/src/Model/GroundWaterFlow/gwf3ic8.f90 b/src/Model/GroundWaterFlow/gwf3ic8.f90 index f63bb815ae7..268b44c154b 100644 --- a/src/Model/GroundWaterFlow/gwf3ic8.f90 +++ b/src/Model/GroundWaterFlow/gwf3ic8.f90 @@ -11,7 +11,7 @@ module GwfIcModule public :: ic_cr type, extends(NumericalPackageType) :: GwfIcType - real(DP), dimension(:), pointer :: strt => null() ! starting head + real(DP), dimension(:), pointer, contiguous :: strt => null() ! starting head contains procedure :: ic_ar procedure :: ic_da diff --git a/src/Model/GroundWaterFlow/gwf3lak8.f90 b/src/Model/GroundWaterFlow/gwf3lak8.f90 index dbe384b6c2f..c7fbd9ef8c4 100644 --- a/src/Model/GroundWaterFlow/gwf3lak8.f90 +++ b/src/Model/GroundWaterFlow/gwf3lak8.f90 @@ -37,17 +37,17 @@ module LakModule character(len=LENPACKAGENAME) :: text = ' LAK' ! type LakTabType - real(DP), pointer, dimension(:) :: tabstage => null() - real(DP), pointer, dimension(:) :: tabvolume => null() - real(DP), pointer, dimension(:) :: tabsarea => null() - real(DP), pointer, dimension(:) :: tabwarea => null() + real(DP), dimension(:), pointer, contiguous :: tabstage => null() + real(DP), dimension(:), pointer, contiguous :: tabvolume => null() + real(DP), dimension(:), pointer, contiguous :: tabsarea => null() + real(DP), dimension(:), pointer, contiguous :: tabwarea => null() end type LakTabType ! type, extends(BndType) :: LakType ! -- scalars ! -- characters - character(len=16), dimension(:), pointer :: clakbudget => NULL() - character(len=16), dimension(:), pointer :: cauxcbc => NULL() + character(len=16), dimension(:), pointer, contiguous :: clakbudget => NULL() + character(len=16), dimension(:), pointer, contiguous :: cauxcbc => NULL() ! -- integers integer(I4B), pointer :: iprhed => null() integer(I4B), pointer :: istageout => null() @@ -70,86 +70,86 @@ module LakModule integer(I4B), pointer :: bditems => NULL() ! -- vectors ! -- lake data - integer(I4B), pointer, dimension(:) :: nlakeconn => null() - integer(I4B), pointer, dimension(:) :: idxlakeconn => null() - integer(I4B), pointer, dimension(:) :: ntabrow => null() - real(DP), pointer, dimension(:) :: strt => null() - real(DP), pointer, dimension(:) :: laketop => null() - real(DP), pointer, dimension(:) :: lakebot => null() - real(DP), pointer, dimension(:) :: sareamax => null() - character(len=LENBOUNDNAME), pointer, dimension(:) :: lakename => null() - character (len=8), pointer, dimension(:) :: status => null() - real(DP), pointer, dimension(:) :: avail => null() - real(DP), pointer, dimension(:) :: lkgwsink => null() + integer(I4B), dimension(:), pointer, contiguous :: nlakeconn => null() + integer(I4B), dimension(:), pointer, contiguous :: idxlakeconn => null() + integer(I4B), dimension(:), pointer, contiguous :: ntabrow => null() + real(DP), dimension(:), pointer, contiguous :: strt => null() + real(DP), dimension(:), pointer, contiguous :: laketop => null() + real(DP), dimension(:), pointer, contiguous :: lakebot => null() + real(DP), dimension(:), pointer, contiguous :: sareamax => null() + character(len=LENBOUNDNAME), dimension(:), pointer, contiguous :: lakename => null() + character (len=8), dimension(:), pointer, contiguous :: status => null() + real(DP), dimension(:), pointer, contiguous :: avail => null() + real(DP), dimension(:), pointer, contiguous :: lkgwsink => null() ! -- time series aware data - type (MemoryTSType), pointer, dimension(:) :: stage => null() - type (MemoryTSType), pointer, dimension(:) :: rainfall => null() - type (MemoryTSType), pointer, dimension(:) :: evaporation => null() - type (MemoryTSType), pointer, dimension(:) :: runoff => null() - type (MemoryTSType), pointer, dimension(:) :: inflow => null() - type (MemoryTSType), pointer, dimension(:) :: withdrawal => null() - type (MemoryTSType), pointer, dimension(:) :: lauxvar => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: stage => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: rainfall => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: evaporation => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: runoff => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: inflow => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: withdrawal => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: lauxvar => null() ! ! -- table data - type (LakTabType), pointer, dimension(:) :: laketables => null() + type (LakTabType), dimension(:), pointer, contiguous :: laketables => null() ! ! -- lake solution data - integer(I4B), pointer, dimension(:) :: ncncvr => null() - real(DP), pointer, dimension(:) :: surfin => null() - real(DP), pointer, dimension(:) :: surfout => null() - real(DP), pointer, dimension(:) :: surfout1 => null() - real(DP), pointer, dimension(:) :: precip => null() - real(DP), pointer, dimension(:) :: precip1 => null() - real(DP), pointer, dimension(:) :: evap => null() - real(DP), pointer, dimension(:) :: evap1 => null() - real(DP), pointer, dimension(:) :: evapo => null() - real(DP), pointer, dimension(:) :: withr => null() - real(DP), pointer, dimension(:) :: withr1 => null() - real(DP), pointer, dimension(:) :: flwin => null() - real(DP), pointer, dimension(:) :: flwiter => null() - real(DP), pointer, dimension(:) :: flwiter1 => null() - real(DP), pointer, dimension(:) :: seep => null() - real(DP), pointer, dimension(:) :: seep1 => null() - real(DP), pointer, dimension(:) :: seep0 => null() - real(DP), pointer, dimension(:) :: stageiter => null() - real(DP), pointer, dimension(:) :: chterm => null() + integer(I4B), dimension(:), pointer, contiguous :: ncncvr => null() + real(DP), dimension(:), pointer, contiguous :: surfin => null() + real(DP), dimension(:), pointer, contiguous :: surfout => null() + real(DP), dimension(:), pointer, contiguous :: surfout1 => null() + real(DP), dimension(:), pointer, contiguous :: precip => null() + real(DP), dimension(:), pointer, contiguous :: precip1 => null() + real(DP), dimension(:), pointer, contiguous :: evap => null() + real(DP), dimension(:), pointer, contiguous :: evap1 => null() + real(DP), dimension(:), pointer, contiguous :: evapo => null() + real(DP), dimension(:), pointer, contiguous :: withr => null() + real(DP), dimension(:), pointer, contiguous :: withr1 => null() + real(DP), dimension(:), pointer, contiguous :: flwin => null() + real(DP), dimension(:), pointer, contiguous :: flwiter => null() + real(DP), dimension(:), pointer, contiguous :: flwiter1 => null() + real(DP), dimension(:), pointer, contiguous :: seep => null() + real(DP), dimension(:), pointer, contiguous :: seep1 => null() + real(DP), dimension(:), pointer, contiguous :: seep0 => null() + real(DP), dimension(:), pointer, contiguous :: stageiter => null() + real(DP), dimension(:), pointer, contiguous :: chterm => null() ! ! -- lake convergence - integer(I4B), pointer, dimension(:) :: iseepc => null() - integer(I4B), pointer, dimension(:) :: idhc => null() - real(DP), pointer, dimension(:) :: en1 => null() - real(DP), pointer, dimension(:) :: en2 => null() - real(DP), pointer, dimension(:) :: r1 => null() - real(DP), pointer, dimension(:) :: r2 => null() - real(DP), pointer, dimension(:) :: dh0 => null() - real(DP), pointer, dimension(:) :: s0 => null() + integer(I4B), dimension(:), pointer, contiguous :: iseepc => null() + integer(I4B), dimension(:), pointer, contiguous :: idhc => null() + real(DP), dimension(:), pointer, contiguous :: en1 => null() + real(DP), dimension(:), pointer, contiguous :: en2 => null() + real(DP), dimension(:), pointer, contiguous :: r1 => null() + real(DP), dimension(:), pointer, contiguous :: r2 => null() + real(DP), dimension(:), pointer, contiguous :: dh0 => null() + real(DP), dimension(:), pointer, contiguous :: s0 => null() ! ! -- lake connection data - integer(I4B), pointer, dimension(:) :: imap => null() - integer(I4B), pointer, dimension(:) :: cellid => null() - integer(I4B), pointer, dimension(:) :: nodesontop => null() - integer(I4B), pointer, dimension(:) :: ictype => null() - real(DP), pointer, dimension(:) :: bedleak => null() - real(DP), pointer, dimension(:) :: belev => null() - real(DP), pointer, dimension(:) :: telev => null() - real(DP), pointer, dimension(:) :: connlength => null() - real(DP), pointer, dimension(:) :: connwidth => null() - real(DP), pointer, dimension(:) :: sarea => null() - real(DP), pointer, dimension(:) :: warea => null() - real(DP), pointer, dimension(:) :: satcond => null() - real(DP), pointer, dimension(:) :: simcond => null() - real(DP), pointer, dimension(:) :: simlakgw => null() + integer(I4B), dimension(:), pointer, contiguous :: imap => null() + integer(I4B), dimension(:), pointer, contiguous :: cellid => null() + integer(I4B), dimension(:), pointer, contiguous :: nodesontop => null() + integer(I4B), dimension(:), pointer, contiguous :: ictype => null() + real(DP), dimension(:), pointer, contiguous :: bedleak => null() + real(DP), dimension(:), pointer, contiguous :: belev => null() + real(DP), dimension(:), pointer, contiguous :: telev => null() + real(DP), dimension(:), pointer, contiguous :: connlength => null() + real(DP), dimension(:), pointer, contiguous :: connwidth => null() + real(DP), dimension(:), pointer, contiguous :: sarea => null() + real(DP), dimension(:), pointer, contiguous :: warea => null() + real(DP), dimension(:), pointer, contiguous :: satcond => null() + real(DP), dimension(:), pointer, contiguous :: simcond => null() + real(DP), dimension(:), pointer, contiguous :: simlakgw => null() ! ! -- lake outlet data - integer(I4B), pointer, dimension(:) :: lakein => null() - integer(I4B), pointer, dimension(:) :: lakeout => null() - integer(I4B), pointer, dimension(:) :: iouttype => null() - type (MemoryTSType), pointer, dimension(:) :: outrate => null() - type (MemoryTSType), pointer, dimension(:) :: outinvert => null() - type (MemoryTSType), pointer, dimension(:) :: outwidth => null() - type (MemoryTSType), pointer, dimension(:) :: outrough => null() - type (MemoryTSType), pointer, dimension(:) :: outslope => null() - real(DP), pointer, dimension(:) :: simoutrate => null() + integer(I4B), dimension(:), pointer, contiguous :: lakein => null() + integer(I4B), dimension(:), pointer, contiguous :: lakeout => null() + integer(I4B), dimension(:), pointer, contiguous :: iouttype => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: outrate => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: outinvert => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: outwidth => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: outrough => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: outslope => null() + real(DP), dimension(:), pointer, contiguous :: simoutrate => null() ! ! -- lake output data real(DP), dimension(:), pointer, contiguous :: qauxcbc => null() @@ -161,15 +161,15 @@ module LakModule type(BudgetType), pointer :: budget => NULL() ! -- pointer to gwf iss and gwf hk integer(I4B), pointer :: gwfiss => NULL() - real(DP), dimension(:), pointer :: gwfk11 => NULL() - real(DP), dimension(:), pointer :: gwfk33 => NULL() - real(DP), dimension(:), pointer :: gwfsat => NULL() + real(DP), dimension(:), pointer, contiguous :: gwfk11 => NULL() + real(DP), dimension(:), pointer, contiguous :: gwfk33 => NULL() + real(DP), dimension(:), pointer, contiguous :: gwfsat => NULL() integer(I4B), pointer :: gwfik33 => NULL() ! ! -- package x, xold, and ibound - integer(I4B), pointer, dimension(:) :: iboundpak => null() !package ibound - real(DP), pointer, dimension(:) :: xnewpak => null() !package x vector - real(DP), pointer, dimension(:) :: xoldpak => null() !package xold vector + integer(I4B), dimension(:), pointer, contiguous :: iboundpak => null() !package ibound + real(DP), dimension(:), pointer, contiguous :: xnewpak => null() !package x vector + real(DP), dimension(:), pointer, contiguous :: xoldpak => null() !package xold vector ! ! -- type bound procedures contains @@ -434,7 +434,7 @@ subroutine lak_read_lakes(this) integer(I4B) :: itmp integer(I4B) :: nlak integer(I4B) :: nconn - integer(I4B), dimension(:), pointer :: nboundchk + integer(I4B), dimension(:), pointer, contiguous :: nboundchk ! -- format ! ! -- code @@ -671,7 +671,7 @@ subroutine lak_read_lake_connections(this) integer(I4B) :: ipos, ipos0 integer(I4B) :: icellid, icellid0 real(DP) :: top, bot - integer(I4B), dimension(:), pointer :: nboundchk + integer(I4B), dimension(:), pointer, contiguous :: nboundchk ! -- format ! @@ -970,7 +970,7 @@ subroutine lak_read_tables(this) logical :: isfound, endOfBlock integer(I4B) :: n integer(I4B) :: ntabs - integer(I4B), dimension(:), pointer :: nboundchk + integer(I4B), dimension(:), pointer, contiguous :: nboundchk ! ------------------------------------------------------------------------------ ! -- format @@ -1337,7 +1337,7 @@ subroutine lak_read_outlets(this) !integer(I4B) :: ii, jj, kk, nn integer(I4B) :: jj real(DP) :: endtim - integer(I4B), dimension(:), pointer :: nboundchk + integer(I4B), dimension(:), pointer, contiguous :: nboundchk ! ! -- format ! @@ -4897,10 +4897,10 @@ subroutine lak_set_pointers(this, neq, ibound, xnew, xold, flowja) ! ------------------------------------------------------------------------------ class(LakType) :: this integer(I4B), pointer :: neq - integer(I4B), dimension(:), pointer :: ibound - real(DP), dimension(:), pointer :: xnew - real(DP), dimension(:), pointer :: xold - real(DP), dimension(:), pointer :: flowja + integer(I4B), dimension(:), pointer, contiguous :: ibound + real(DP), dimension(:), pointer, contiguous :: xnew + real(DP), dimension(:), pointer, contiguous :: xold + real(DP), dimension(:), pointer, contiguous :: flowja ! -- local ! ------------------------------------------------------------------------------ ! diff --git a/src/Model/GroundWaterFlow/gwf3maw8.f90 b/src/Model/GroundWaterFlow/gwf3maw8.f90 index 9bc16db05f4..383a55ab78f 100644 --- a/src/Model/GroundWaterFlow/gwf3maw8.f90 +++ b/src/Model/GroundWaterFlow/gwf3maw8.f90 @@ -58,16 +58,16 @@ module mawmodule real(DP), pointer :: shutoffdq => null() real(DP), pointer :: shutoffqold => null() ! -- vectors - integer(I4B), pointer, dimension(:), contiguous :: gwfnodes => NULL() - real(DP), pointer, dimension(:), contiguous :: sradius => NULL() - real(DP), pointer, dimension(:), contiguous :: hk => NULL() - real(DP), pointer, dimension(:), contiguous :: satcond => NULL() - real(DP), pointer, dimension(:), contiguous :: simcond => NULL() - real(DP), pointer, dimension(:), contiguous :: topscrn => NULL() - real(DP), pointer, dimension(:), contiguous :: botscrn => NULL() + integer(I4B), dimension(:), pointer, contiguous :: gwfnodes => NULL() + real(DP), dimension(:), pointer, contiguous :: sradius => NULL() + real(DP), dimension(:), pointer, contiguous :: hk => NULL() + real(DP), dimension(:), pointer, contiguous :: satcond => NULL() + real(DP), dimension(:), pointer, contiguous :: simcond => NULL() + real(DP), dimension(:), pointer, contiguous :: topscrn => NULL() + real(DP), dimension(:), pointer, contiguous :: botscrn => NULL() ! -- time-series aware data ! -- aux data - type (MawWellTSType), pointer, dimension(:) :: auxvar => null() + type (MawWellTSType), dimension(:), pointer, contiguous :: auxvar => null() ! -- pumping rate type(MawWellTSType), pointer :: rate => null() ! -- well head @@ -80,8 +80,8 @@ module mawmodule type, extends(BndType) :: MawType ! -- scalars ! -- characters - character(len=16), dimension(:), pointer :: cmawbudget => NULL() - character(len=LENAUXNAME), dimension(:), pointer :: cauxcbc => NULL() + character(len=16), dimension(:), pointer, contiguous :: cmawbudget => NULL() + character(len=LENAUXNAME), dimension(:), pointer, contiguous :: cauxcbc => NULL() ! -- integers integer(I4B), pointer :: iprhed => null() integer(I4B), pointer :: iheadout => null() @@ -102,28 +102,28 @@ module mawmodule real(DP), pointer :: kappa => NULL() ! -- derived types type(BudgetType), pointer :: budget => NULL() - type(MawWellType), pointer, dimension(:) :: mawwells => NULL() + type(MawWellType), dimension(:), pointer, contiguous :: mawwells => NULL() ! -- pointer to gwf iss and gwf hk integer(I4B), pointer :: gwfiss => NULL() - real(DP), dimension(:), pointer :: gwfk11 => NULL() - real(DP), dimension(:), pointer :: gwfk22 => NULL() + real(DP), dimension(:), pointer, contiguous :: gwfk11 => NULL() + real(DP), dimension(:), pointer, contiguous :: gwfk22 => NULL() integer(I4B), pointer :: gwfik22 => NULL() - real(DP), dimension(:), pointer :: gwfsat => NULL() + real(DP), dimension(:), pointer, contiguous :: gwfsat => NULL() ! -- arrays for handling the rows added to the solution matrix - integer(I4B), pointer, dimension(:) :: idxlocnode => null() !map position in global rhs and x array of pack entry - integer(I4B), pointer, dimension(:) :: idxdglo => null() !map position in global array of package diagonal row entries - integer(I4B), pointer, dimension(:) :: idxoffdglo => null() !map position in global array of package off diagonal row entries - integer(I4B), pointer, dimension(:) :: idxsymdglo => null() !map position in global array of package diagonal entries to model rows - integer(I4B), pointer, dimension(:) :: idxsymoffdglo => null() !map position in global array of package off diagonal entries to model rows - integer(I4B), pointer, dimension(:) :: iboundpak => null() !package ibound - real(DP), pointer, dimension(:) :: xnewpak => null() !package x vector - real(DP), pointer, dimension(:) :: xoldpak => null() !package xold vector - real(DP), pointer, dimension(:) :: cterm => null() !package c vector + integer(I4B), dimension(:), pointer, contiguous :: idxlocnode => null() !map position in global rhs and x array of pack entry + integer(I4B), dimension(:), pointer, contiguous :: idxdglo => null() !map position in global array of package diagonal row entries + integer(I4B), dimension(:), pointer, contiguous :: idxoffdglo => null() !map position in global array of package off diagonal row entries + integer(I4B), dimension(:), pointer, contiguous :: idxsymdglo => null() !map position in global array of package diagonal entries to model rows + integer(I4B), dimension(:), pointer, contiguous :: idxsymoffdglo => null() !map position in global array of package off diagonal entries to model rows + integer(I4B), dimension(:), pointer, contiguous :: iboundpak => null() !package ibound + real(DP), dimension(:), pointer, contiguous :: xnewpak => null() !package x vector + real(DP), dimension(:), pointer, contiguous :: xoldpak => null() !package xold vector + real(DP), dimension(:), pointer, contiguous :: cterm => null() !package c vector ! -- vector data (start of flattening for future removal of MawWellType) - character (len=LENBOUNDNAME), dimension(:), pointer :: cmawname => null() - integer(I4B), pointer, dimension(:) :: idxmawconn => null() + character (len=LENBOUNDNAME), dimension(:), pointer, contiguous :: cmawname => null() + integer(I4B), dimension(:), pointer, contiguous :: idxmawconn => null() ! -- imap vector - integer(I4B), pointer, dimension(:) :: imap => null() + integer(I4B), dimension(:), pointer, contiguous :: imap => null() ! ! -- maw output data real(DP), dimension(:), pointer, contiguous :: qauxcbc => null() @@ -390,7 +390,7 @@ subroutine maw_read_wells(this) integer(I4B) :: itmp integer(I4B) :: ierr real(DP) :: endtim - integer(I4B), dimension(:), pointer :: nboundchk + integer(I4B), dimension(:), pointer, contiguous :: nboundchk ! -- format character(len=*),parameter :: fmthdbot = & "('well head (',G0,') must be >= BOTTOM_ELEVATION (',G0',).')" @@ -621,8 +621,8 @@ subroutine maw_read_well_connections(this) integer(I4B) :: n integer(I4B) :: nn integer(I4B) :: nn2 - integer(I4B), dimension(:), pointer :: nboundchk - integer(I4B), dimension(:), pointer :: iachk + integer(I4B), dimension(:), pointer, contiguous :: nboundchk + integer(I4B), dimension(:), pointer, contiguous :: iachk ! ------------------------------------------------------------------------------ ! -- format @@ -3179,10 +3179,10 @@ subroutine maw_set_pointers(this, neq, ibound, xnew, xold, flowja) ! ------------------------------------------------------------------------------ class(MawType) :: this integer(I4B), pointer :: neq - integer(I4B), dimension(:), pointer :: ibound - real(DP), dimension(:), pointer :: xnew - real(DP), dimension(:), pointer :: xold - real(DP), dimension(:), pointer :: flowja + integer(I4B), dimension(:), pointer, contiguous :: ibound + real(DP), dimension(:), pointer, contiguous :: xnew + real(DP), dimension(:), pointer, contiguous :: xold + real(DP), dimension(:), pointer, contiguous :: flowja ! -- local integer(I4B) :: n integer(I4B) :: istart, iend diff --git a/src/Model/GroundWaterFlow/gwf3mvr8.f90 b/src/Model/GroundWaterFlow/gwf3mvr8.f90 index 3766ea653d3..89a8f60c0a0 100644 --- a/src/Model/GroundWaterFlow/gwf3mvr8.f90 +++ b/src/Model/GroundWaterFlow/gwf3mvr8.f90 @@ -24,10 +24,10 @@ ! Mover aware packages define the following members: ! ! integer(I4B), pointer :: imover => null() -! real(DP), pointer, dimension(:) :: qtformvr => null() -! real(DP), pointer, dimension(:) :: qformvr => null() -! real(DP), pointer, dimension(:) :: qtomvr => null() -! real(DP), pointer, dimension(:) :: qfrommvr => null() +! real(DP), dimension(:), pointer, contiguous :: qtformvr => null() +! real(DP), dimension(:), pointer, contiguous :: qformvr => null() +! real(DP), dimension(:), pointer, contiguous :: qtomvr => null() +! real(DP), dimension(:), pointer, contiguous :: qfrommvr => null() ! ! Note qtformvr is filled as a positive number to indicate that it is ! water available to be moved. If qtformvr is negative, then @@ -114,12 +114,12 @@ module GwfMvrModule integer(I4B), pointer :: iexgmvr => null() !flag to indicate mover is for an exchange (not for a single model) integer(I4B), pointer :: imodelnames => null() !flag to indicate package input file has model names in it real(DP), pointer :: omega => null() !temporal weighting factor (not presently used) - integer(I4B), dimension(:), pointer :: ientries => null() !number of entries for each combination + integer(I4B), dimension(:), pointer, contiguous :: ientries => null() !number of entries for each combination character(len=LENORIGIN+1), & - dimension(:), pointer :: pakorigins !array of model//package names + dimension(:), pointer, contiguous :: pakorigins !array of model//package names character(len=LENPACKAGENAME), & - dimension(:), pointer :: paknames !array of package names - type(MvrType), pointer, dimension(:) :: mvr => null() !array of movers + dimension(:), pointer, contiguous :: paknames !array of package names + type(MvrType), dimension(:), pointer, contiguous :: mvr => null() !array of movers type(BudgetType), pointer :: budget => null() !mover budget object contains procedure :: mvr_ar diff --git a/src/Model/GroundWaterFlow/gwf3npf8.f90 b/src/Model/GroundWaterFlow/gwf3npf8.f90 index 7717bc813f0..e1346727f64 100644 --- a/src/Model/GroundWaterFlow/gwf3npf8.f90 +++ b/src/Model/GroundWaterFlow/gwf3npf8.f90 @@ -27,8 +27,8 @@ module GwfNpfModule type(GwfIcType), pointer :: ic => null() ! initial conditions object type(Xt3dType), pointer :: xt3d => null() ! xt3d pointer - integer(I4B), dimension(:), pointer :: ibound => null() ! pointer to model ibound - real(DP), dimension(:), pointer :: hnew => null() ! pointer to model xnew + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() ! pointer to model ibound + real(DP), dimension(:), pointer, contiguous :: hnew => null() ! pointer to model xnew integer(I4B), pointer :: ixt3d => null() ! xt3d flag (0 is off, 1 is lhs, 2 is rhs) integer(I4B), pointer :: iperched => null() ! vertical flow corrections if 1 integer(I4B), pointer :: ivarcv => null() ! CV is function of water table @@ -47,33 +47,33 @@ module GwfNpfModule integer(I4B), pointer :: icellavg => null() ! harmonic(0), logarithmic(1), or arithmetic thick-log K (2) real(DP), pointer :: wetfct => null() ! wetting factor real(DP), pointer :: hdry => null() ! default is -1.d30 - integer(I4B), dimension(:), pointer :: icelltype => null() ! confined (0) or convertible (1) + integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() ! confined (0) or convertible (1) ! ! K properties - real(DP), dimension(:), pointer :: k11 => null() ! hydraulic conductivity; if anisotropic, then this is Kx prior to rotation - real(DP), dimension(:), pointer :: k22 => null() ! hydraulic conductivity; if specified then this is Ky prior to rotation - real(DP), dimension(:), pointer :: k33 => null() ! hydraulic conductivity; if specified then this is Kz prior to rotation + real(DP), dimension(:), pointer, contiguous :: k11 => null() ! hydraulic conductivity; if anisotropic, then this is Kx prior to rotation + real(DP), dimension(:), pointer, contiguous :: k22 => null() ! hydraulic conductivity; if specified then this is Ky prior to rotation + real(DP), dimension(:), pointer, contiguous :: k33 => null() ! hydraulic conductivity; if specified then this is Kz prior to rotation integer(I4B), pointer :: ik22 => null() ! flag that k22 is specified integer(I4B), pointer :: ik33 => null() ! flag that k33 is specified integer(I4B), pointer :: iangle1 => null() ! flag to indicate angle1 was read integer(I4B), pointer :: iangle2 => null() ! flag to indicate angle2 was read integer(I4B), pointer :: iangle3 => null() ! flag to indicate angle3 was read - real(DP), dimension(:), pointer :: angle1 => null() ! k ellipse rotation in xy plane around z axis (yaw) - real(DP), dimension(:), pointer :: angle2 => null() ! k ellipse rotation up from xy plane around y axis (pitch) - real(DP), dimension(:), pointer :: angle3 => null() ! k tensor rotation around x axis (roll) + real(DP), dimension(:), pointer, contiguous :: angle1 => null() ! k ellipse rotation in xy plane around z axis (yaw) + real(DP), dimension(:), pointer, contiguous :: angle2 => null() ! k ellipse rotation up from xy plane around y axis (pitch) + real(DP), dimension(:), pointer, contiguous :: angle3 => null() ! k tensor rotation around x axis (roll) ! - real(DP), dimension(:), pointer :: wetdry => null() ! wetdry array - real(DP), dimension(:), pointer :: sat => null() ! saturation (0. to 1.) for each cell - real(DP), dimension(:), pointer :: condsat => null() ! saturated conductance (symmetric array) + real(DP), dimension(:), pointer, contiguous :: wetdry => null() ! wetdry array + real(DP), dimension(:), pointer, contiguous :: sat => null() ! saturation (0. to 1.) for each cell + real(DP), dimension(:), pointer, contiguous :: condsat => null() ! saturated conductance (symmetric array) real(DP), pointer :: satmin => null() ! minimum saturated thickness - integer(I4B), dimension(:), pointer :: ibotnode => null() ! bottom node used if igwfnewtonur /= 0 + integer(I4B), dimension(:), pointer, contiguous :: ibotnode => null() ! bottom node used if igwfnewtonur /= 0 ! - real(DP), dimension(:, :), pointer :: spdis => null() ! specific discharge : qx, qy, qz (nodes, 3) + real(DP), dimension(:, :), pointer, contiguous :: spdis => null() ! specific discharge : qx, qy, qz (nodes, 3) integer(I4B), pointer :: nedges => null() ! number of cell edges integer(I4B), pointer :: lastedge => null() ! last edge number - integer(I4B), dimension(:), pointer :: nodedge => null() ! array of node numbers that have edges - integer(I4B), dimension(:), pointer :: ihcedge => null() ! edge type (horizontal or vertical) - real(DP), dimension(:, :), pointer :: propsedge => null() ! edge properties (Q, area, nx, ny, distance) + integer(I4B), dimension(:), pointer, contiguous :: nodedge => null() ! array of node numbers that have edges + integer(I4B), dimension(:), pointer, contiguous :: ihcedge => null() ! edge type (horizontal or vertical) + real(DP), dimension(:, :), pointer, contiguous :: propsedge => null() ! edge properties (Q, area, nx, ny, distance) ! contains procedure :: npf_df @@ -252,8 +252,8 @@ subroutine npf_ar(this, dis, ic, ibound, hnew) class(GwfNpftype) :: this class(DisBaseType), pointer, intent(inout) :: dis type(GwfIcType), pointer, intent(in) :: ic - integer(I4B), pointer, dimension(:), intent(inout) :: ibound - real(DP), pointer, dimension(:), intent(inout) :: hnew + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: ibound + real(DP), dimension(:), pointer, contiguous, intent(inout) :: hnew ! -- local ! -- formats ! -- data @@ -1746,7 +1746,7 @@ subroutine prepcheck(this) integer(I4B) :: n, m, ii, nn, ihc integer(I4B) :: nextn real(DP) :: minbot, botm - integer(I4B), dimension(:), pointer :: ithickstartflag + integer(I4B), dimension(:), pointer, contiguous :: ithickstartflag ! -- format character(len=*),parameter :: fmtcnv = & "(1X,'CELL ', A, & @@ -2358,7 +2358,7 @@ function hcond(ibdn, ibdm, ictn, ictm, inewton, inwtup, ihc, icellavg, iusg, & real(DP), intent(in) :: clm real(DP), intent(in) :: fawidth real(DP), intent(in) :: satomega - real(DP), optional, intent(in) :: satminopt + real(DP), optional, intent(in) :: satminopt ! -- local integer(I4B) :: indk real(DP) :: satmin @@ -2372,11 +2372,11 @@ function hcond(ibdn, ibdm, ictn, ictm, inewton, inwtup, ihc, icellavg, iusg, & real(DP) :: athk real(DP) :: afac ! ------------------------------------------------------------------------------ - if (present(satminopt)) then - satmin = satminopt - else - satmin = DZERO - end if + if (present(satminopt)) then + satmin = satminopt + else + satmin = DZERO + end if ! ! -- If either n or m is inactive then conductance is zero if(ibdn == 0 .or. ibdm == 0) then @@ -3192,11 +3192,11 @@ function thksatnm(ibdn, ibdm, ictn, ictm, inwtup, ihc, iusg, & real(DP) :: tpn, tpm real(DP) :: top, bot ! ------------------------------------------------------------------------------ - if (present(satminopt)) then - satmin = satminopt - else - satmin = DZERO - end if + if (present(satminopt)) then + satmin = satminopt + else + satmin = DZERO + end if ! ! -- If either n or m is inactive then saturated thickness is zero if(ibdn == 0 .or. ibdm == 0) then diff --git a/src/Model/GroundWaterFlow/gwf3obs8.f90 b/src/Model/GroundWaterFlow/gwf3obs8.f90 index bc8da86def8..769794c39df 100644 --- a/src/Model/GroundWaterFlow/gwf3obs8.f90 +++ b/src/Model/GroundWaterFlow/gwf3obs8.f90 @@ -16,8 +16,8 @@ module GwfObsModule type, extends(ObsType) :: GwfObsType ! -- Private members type(GwfIcType), pointer, private :: ic => null() ! initial conditions - real(DP), pointer, dimension(:), private :: x => null() ! head - real(DP), dimension(:), pointer, private :: flowja => null() ! intercell flows + real(DP), dimension(:), pointer, contiguous, private :: x => null() ! head + real(DP), dimension(:), pointer, contiguous, private :: flowja => null() ! intercell flows contains ! -- Public procedures procedure, public :: gwf_obs_ar @@ -59,8 +59,8 @@ subroutine gwf_obs_ar(this, ic, x, flowja) ! -- dummy class(GwfObsType), intent(inout) :: this type(GwfIcType), pointer, intent(in) :: ic - real(DP), pointer, dimension(:), intent(in) :: x - real(DP), pointer, dimension(:), intent(in) :: flowja + real(DP), dimension(:), pointer, contiguous, intent(in) :: x + real(DP), dimension(:), pointer, contiguous, intent(in) :: flowja ! ! Call ar method of parent class call this%obs_ar() @@ -181,8 +181,8 @@ subroutine set_pointers(this, ic, x, flowja) ! -- dummy class(GwfObsType), intent(inout) :: this type(GwfIcType), pointer, intent(in) :: ic - real(DP), pointer, dimension(:), intent(in) :: x - real(DP), pointer, dimension(:), intent(in) :: flowja + real(DP), dimension(:), pointer, contiguous, intent(in) :: x + real(DP), dimension(:), pointer, contiguous, intent(in) :: flowja ! this%ic => ic this%x => x @@ -223,7 +223,7 @@ subroutine gwf_process_head_drawdown_obs_id(obsrv, dis, inunitobs, iout) call store_error(ermsg) call store_error_unit(inunitobs) call ustop() - endif + endif ! return end subroutine gwf_process_head_drawdown_obs_id diff --git a/src/Model/GroundWaterFlow/gwf3oc8.f90 b/src/Model/GroundWaterFlow/gwf3oc8.f90 index 1aac05b3c02..14c677c9ae3 100644 --- a/src/Model/GroundWaterFlow/gwf3oc8.f90 +++ b/src/Model/GroundWaterFlow/gwf3oc8.f90 @@ -57,13 +57,13 @@ subroutine oc_ar(this, head, dis, dnodata) ! ------------------------------------------------------------------------------ ! -- dummy class(GwfOcType) :: this - real(DP), dimension(:), pointer, intent(in) :: head + real(DP), dimension(:), pointer, contiguous, intent(in) :: head class(DisBaseType), pointer, intent(in) :: dis real(DP), intent(in) :: dnodata ! -- local integer(I4B) :: i, nocdobj, inodata type(OutputControlDataType), pointer :: ocdobjptr - real(DP), dimension(:), pointer :: nullvec => null() + real(DP), dimension(:), pointer, contiguous :: nullvec => null() ! ------------------------------------------------------------------------------ ! ! -- Initialize variables diff --git a/src/Model/GroundWaterFlow/gwf3rch8.f90 b/src/Model/GroundWaterFlow/gwf3rch8.f90 index 2b3376762ec..d8afae773b4 100644 --- a/src/Model/GroundWaterFlow/gwf3rch8.f90 +++ b/src/Model/GroundWaterFlow/gwf3rch8.f90 @@ -20,7 +20,7 @@ module RchModule ! type, extends(BndType) :: RchType integer(I4B), pointer :: inirch => NULL() - integer(I4B), pointer, dimension(:) :: nodesontop => NULL() ! User provided cell numbers; nodelist is cells where recharge is applied) + integer(I4B), dimension(:), pointer, contiguous :: nodesontop => NULL() ! User provided cell numbers; nodelist is cells where recharge is applied) logical, private :: fixed_cell = .false. logical, private :: read_as_arrays = .false. contains @@ -407,6 +407,9 @@ subroutine rch_rp_array(this, line, inrech) character(len=LINELENGTH) :: keyword logical :: found, endOfBlock logical :: convertFlux + ! + ! -- these time array series pointers need to be non-contiguous + ! beacuse a slice of bound is passed real(DP), dimension(:), pointer :: bndArrayPtr => null() real(DP), dimension(:), pointer :: auxArrayPtr => null() real(DP), dimension(:), pointer :: auxMultArray => null() diff --git a/src/Model/GroundWaterFlow/gwf3sfr8.f90 b/src/Model/GroundWaterFlow/gwf3sfr8.f90 index 716c67d6491..9aeeef3aaee 100644 --- a/src/Model/GroundWaterFlow/gwf3sfr8.f90 +++ b/src/Model/GroundWaterFlow/gwf3sfr8.f90 @@ -61,9 +61,9 @@ module SfrModule real(DP), pointer :: ftotnd => null() ! -- diversion data integer(I4B), pointer :: ndiv => null() - type (SfrDivType), dimension(:), pointer :: diversion => null() + type (SfrDivType), dimension(:), pointer, contiguous :: diversion => null() ! -- aux data - type (SfrTSType), pointer, dimension(:) :: auxvar => null() + type (SfrTSType), dimension(:), pointer, contiguous :: auxvar => null() ! -- boundary data type (SfrTSType), pointer :: rough => null() type (SfrTSType), pointer :: rain => null() @@ -94,8 +94,8 @@ module SfrModule ! -- scalars ! -- for budgets ! -- characters - character(len=16), dimension(:), pointer :: csfrbudget => NULL() - character(len=16), dimension(:), pointer :: cauxcbc => NULL() + character(len=16), dimension(:), pointer, contiguous :: csfrbudget => NULL() + character(len=16), dimension(:), pointer, contiguous :: cauxcbc => NULL() ! -- integers integer(I4B), pointer :: iprhed => null() integer(I4B), pointer :: istageout => null() @@ -121,9 +121,9 @@ module SfrModule real(DP), dimension(:), pointer, contiguous :: dbuff => null() ! -- derived types type(BudgetType), pointer :: budget => NULL() - type(SfrDataType), pointer, dimension(:) :: reaches => NULL() + type(SfrDataType), dimension(:), pointer, contiguous :: reaches => NULL() type(sparsematrix), pointer :: sparse => null() - type(RectangularChGeometryType), pointer, dimension(:) :: geo => null() + type(RectangularChGeometryType), dimension(:), pointer, contiguous :: geo => null() ! -- type bound procedures contains procedure :: sfr_allocate_scalars @@ -2249,10 +2249,10 @@ subroutine sfr_set_pointers(this, neq, ibound, xnew, xold, flowja) ! ------------------------------------------------------------------------------ class(SfrType) :: this integer(I4B), pointer :: neq - integer(I4B), dimension(:), pointer :: ibound - real(DP), dimension(:), pointer :: xnew - real(DP), dimension(:), pointer :: xold - real(DP), dimension(:), pointer :: flowja + integer(I4B), dimension(:), pointer, contiguous :: ibound + real(DP), dimension(:), pointer, contiguous :: xnew + real(DP), dimension(:), pointer, contiguous :: xold + real(DP), dimension(:), pointer, contiguous :: flowja ! -- local ! ------------------------------------------------------------------------------ ! diff --git a/src/Model/GroundWaterFlow/gwf3sto8.f90 b/src/Model/GroundWaterFlow/gwf3sto8.f90 index 1c7ebf1865c..b0e47e7113b 100644 --- a/src/Model/GroundWaterFlow/gwf3sto8.f90 +++ b/src/Model/GroundWaterFlow/gwf3sto8.f90 @@ -20,12 +20,12 @@ module GwfStoModule integer(I4B), pointer :: isseg => null() !indicates if ss is 0 below the top of a layer integer(I4B), pointer :: iss => null() !steady state flag integer(I4B), pointer :: iusesy => null() !flag set if any cell is convertible (0, 1) - integer(I4B), dimension(:), pointer :: iconvert => null() !confined (0) or convertible (1) - real(DP),dimension(:), pointer :: sc1 => null() !primary storage capacity (when cell is fully saturated) - real(DP),dimension(:), pointer :: sc2 => null() !secondary storage capacity (when cell is partially saturated) - real(DP), dimension(:), pointer :: strgss => null() !vector of specific storage rates - real(DP), dimension(:), pointer :: strgsy => null() !vector of specific yield rates - integer(I4B), dimension(:), pointer :: ibound => null() !pointer to model ibound + integer(I4B), dimension(:), pointer, contiguous :: iconvert => null() !confined (0) or convertible (1) + real(DP),dimension(:), pointer, contiguous :: sc1 => null() !primary storage capacity (when cell is fully saturated) + real(DP),dimension(:), pointer, contiguous :: sc2 => null() !secondary storage capacity (when cell is partially saturated) + real(DP), dimension(:), pointer, contiguous :: strgss => null() !vector of specific storage rates + real(DP), dimension(:), pointer, contiguous :: strgsy => null() !vector of specific yield rates + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound real(DP), pointer :: satomega => null() !newton-raphson saturation omega contains procedure :: sto_ar @@ -90,7 +90,7 @@ subroutine sto_ar(this, dis, ibound) ! -- dummy class(GwfStoType) :: this class(DisBaseType), pointer, intent(in) :: dis - integer(I4B), dimension(:), pointer :: ibound + integer(I4B), dimension(:), pointer, contiguous :: ibound ! -- local ! -- formats character(len=*), parameter :: fmtsto = & diff --git a/src/Model/GroundWaterFlow/gwf3uzf8.f90 b/src/Model/GroundWaterFlow/gwf3uzf8.f90 index e1cccac296d..5217fbfc9f5 100644 --- a/src/Model/GroundWaterFlow/gwf3uzf8.f90 +++ b/src/Model/GroundWaterFlow/gwf3uzf8.f90 @@ -41,19 +41,19 @@ module UzfModule type(BudgetType), pointer :: budget => null() !budget object integer(I4B), pointer :: bditems => null() !number of budget items integer(I4B), pointer :: nbdtxt => null() !number of budget text items - character(len=LENBUDTXT), dimension(:), pointer :: bdtxt => null() !budget items written to cbc file + character(len=LENBUDTXT), dimension(:), pointer, contiguous :: bdtxt => null() !budget items written to cbc file type(UzfKinematicType), pointer :: uzfobj => null() !uzf kinematic object type(UzfKinematicType), pointer :: uzfobjwork => null() !uzf kinematic work object type(UzfKinematicType), pointer :: uzfobjbelow => null() !uzf kinematic object of underlying cell - type(UzfKinematicType), pointer, dimension(:) :: elements => null() !array of all the kinematic uzf objects + type(UzfKinematicType), dimension(:), pointer, contiguous :: elements => null() !array of all the kinematic uzf objects character(len=72), pointer :: nameuzf => null() !cdl--(not sure. Delete?) ! ! -- pointer to gwf variables integer(I4B), pointer :: gwfiss => null() - real(DP), dimension(:), pointer :: gwftop => null() - real(DP), dimension(:), pointer :: gwfbot => null() - real(DP), dimension(:), pointer :: gwfarea => null() - real(DP), dimension(:), pointer :: gwfhcond => null() + real(DP), dimension(:), pointer, contiguous :: gwftop => null() + real(DP), dimension(:), pointer, contiguous :: gwfbot => null() + real(DP), dimension(:), pointer, contiguous :: gwfarea => null() + real(DP), dimension(:), pointer, contiguous :: gwfhcond => null() ! ! -- uzf data integer(I4B), pointer :: ntrail => null() @@ -68,21 +68,21 @@ module UzfModule integer(I4B), pointer :: igwetflag => null() integer(I4B), pointer :: iseepflag => null() integer(I4B), pointer :: imaxcellcnt => null() - integer(I4B), dimension(:), pointer :: mfcellid => null() - real(DP), dimension(:), pointer :: appliedinf => null() - real(DP), dimension(:), pointer :: rejinf => null() - real(DP), dimension(:), pointer :: rejinf0 => null() - real(DP), dimension(:), pointer :: rejinftomvr => null() - real(DP), dimension(:), pointer :: infiltration => null() - real(DP), dimension(:), pointer :: recharge => null() - real(DP), dimension(:), pointer :: gwet => null() - real(DP), dimension(:), pointer :: uzet => null() - real(DP), dimension(:), pointer :: gwd => null() - real(DP), dimension(:), pointer :: gwd0 => null() - real(DP), dimension(:), pointer :: gwdtomvr => null() - real(DP), dimension(:), pointer :: rch => null() - real(DP), dimension(:), pointer :: rch0 => null() - real(DP), dimension(:), pointer :: qsto => null() + integer(I4B), dimension(:), pointer, contiguous :: mfcellid => null() + real(DP), dimension(:), pointer, contiguous :: appliedinf => null() + real(DP), dimension(:), pointer, contiguous :: rejinf => null() + real(DP), dimension(:), pointer, contiguous :: rejinf0 => null() + real(DP), dimension(:), pointer, contiguous :: rejinftomvr => null() + real(DP), dimension(:), pointer, contiguous :: infiltration => null() + real(DP), dimension(:), pointer, contiguous :: recharge => null() + real(DP), dimension(:), pointer, contiguous :: gwet => null() + real(DP), dimension(:), pointer, contiguous :: uzet => null() + real(DP), dimension(:), pointer, contiguous :: gwd => null() + real(DP), dimension(:), pointer, contiguous :: gwd0 => null() + real(DP), dimension(:), pointer, contiguous :: gwdtomvr => null() + real(DP), dimension(:), pointer, contiguous :: rch => null() + real(DP), dimension(:), pointer, contiguous :: rch0 => null() + real(DP), dimension(:), pointer, contiguous :: qsto => null() integer(I4B), pointer :: iuzf2uzf => null() ! ! -- integer vectors @@ -90,21 +90,21 @@ module UzfModule integer(I4B), dimension(:), pointer, contiguous :: ja => null() ! ! -- timeseries aware variables - type (MemoryTSType), pointer, dimension(:) :: sinf => null() - type (MemoryTSType), pointer, dimension(:) :: pet => null() - type (MemoryTSType), pointer, dimension(:) :: extdp => null() - type (MemoryTSType), pointer, dimension(:) :: extwc => null() - type (MemoryTSType), pointer, dimension(:) :: ha => null() - type (MemoryTSType), pointer, dimension(:) :: hroot => null() - type (MemoryTSType), pointer, dimension(:) :: rootact => null() - type (MemoryTSType), pointer, dimension(:) :: lauxvar => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: sinf => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: pet => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: extdp => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: extwc => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: ha => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: hroot => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: rootact => null() + type (MemoryTSType), dimension(:), pointer, contiguous :: lauxvar => null() ! ! -- convergence check integer(I4B), pointer :: iconvchk => null() real(DP), pointer :: pdmax => null() ! ! formulate variables - real(DP), dimension(:), pointer :: deriv => null() + real(DP), dimension(:), pointer, contiguous :: deriv => null() ! ! budget variables real(DP), pointer :: totfluxtot => null() @@ -119,13 +119,13 @@ module UzfModule ! ! -- uzf cbc budget items integer(I4B), pointer :: cbcauxitems => NULL() - character(len=16), dimension(:), pointer :: cauxcbc => NULL() + character(len=16), dimension(:), pointer, contiguous :: cauxcbc => NULL() real(DP), dimension(:), pointer, contiguous :: qauxcbc => null() ! ! -- observations - real(DP), dimension(:), pointer :: obs_theta => null() - real(DP), dimension(:), pointer :: obs_depth => null() - integer(I4B), dimension(:), pointer :: obs_num => null() + real(DP), dimension(:), pointer, contiguous :: obs_theta => null() + real(DP), dimension(:), pointer, contiguous :: obs_depth => null() + integer(I4B), dimension(:), pointer, contiguous :: obs_num => null() contains diff --git a/src/Model/ModelUtilities/BndUzfKinematic.f90 b/src/Model/ModelUtilities/BndUzfKinematic.f90 index 722fa69503c..42b555ff6d7 100644 --- a/src/Model/ModelUtilities/BndUzfKinematic.f90 +++ b/src/Model/ModelUtilities/BndUzfKinematic.f90 @@ -21,10 +21,10 @@ module UzfKinematicModule real(DP), pointer :: hroot => null() real(DP), pointer :: rootact => null() real(DP), pointer :: etact => null() - real(DP), dimension(:), pointer :: uzspst => null() - real(DP), dimension(:), pointer :: uzthst => null() - real(DP), dimension(:), pointer :: uzflst => null() - real(DP), dimension(:), pointer :: uzdpst => null() + real(DP), dimension(:), pointer, contiguous :: uzspst => null() + real(DP), dimension(:), pointer, contiguous :: uzthst => null() + real(DP), dimension(:), pointer, contiguous :: uzflst => null() + real(DP), dimension(:), pointer, contiguous :: uzdpst => null() integer(I4B), pointer :: nwavst => null() real(DP), pointer :: uzolsflx => null() real(DP), pointer :: uzstor => null() diff --git a/src/Model/ModelUtilities/BoundaryPackage.f90 b/src/Model/ModelUtilities/BoundaryPackage.f90 index 1512e4ed420..48a80e577cf 100644 --- a/src/Model/ModelUtilities/BoundaryPackage.f90 +++ b/src/Model/ModelUtilities/BoundaryPackage.f90 @@ -32,7 +32,7 @@ module BndModule character(len=500) :: listlabel = '' !title of table written for RP character(len=LENPACKAGENAME) :: text = '' character(len=LENAUXNAME), allocatable, dimension(:):: auxname !name for each auxiliary variable - character(len=LENBOUNDNAME), pointer, dimension(:) :: boundname => null() !vector of boundnames + character(len=LENBOUNDNAME), dimension(:), pointer, contiguous :: boundname => null() !vector of boundnames ! -- scalars integer(I4B), pointer :: ibcnum => null() !consecutive package number for this boundary condition integer(I4B), pointer :: maxbound => null() !max number of boundaries @@ -45,13 +45,13 @@ module BndModule integer(I4B), pointer :: npakeq => null() !number of equations in this package (normally 0 unless package adds rows to matrix) integer(I4B), pointer :: ioffset => null() !offset of this package in the model ! -- arrays - integer(I4B), pointer, dimension(:) :: nodelist => null() !vector of reduced node numbers - real(DP), pointer, dimension(:,:) :: bound => null() !array of package specific boundary numbers - real(DP), pointer, dimension(:) :: hcof => null() !diagonal contribution - real(DP), pointer, dimension(:) :: rhs => null() !right-hand side contribution - real(DP), pointer, dimension(:,:) :: auxvar => null() !auxiliary variable array - real(DP), pointer, dimension(:) :: simvals => null() !simulated values - real(DP), pointer, dimension(:) :: simtomvr => null() !simulated values + integer(I4B), dimension(:), pointer, contiguous :: nodelist => null() !vector of reduced node numbers + real(DP), dimension(:,:), pointer, contiguous :: bound => null() !array of package specific boundary numbers + real(DP), dimension(:), pointer, contiguous :: hcof => null() !diagonal contribution + real(DP), dimension(:), pointer, contiguous :: rhs => null() !right-hand side contribution + real(DP), dimension(:,:), pointer, contiguous :: auxvar => null() !auxiliary variable array + real(DP), dimension(:), pointer, contiguous :: simvals => null() !simulated values + real(DP), dimension(:), pointer, contiguous :: simtomvr => null() !simulated values ! ! -- water mover flag and object integer(I4B), pointer :: imover => null() @@ -69,11 +69,11 @@ module BndModule ! ! -- pointers to model/solution variables integer(I4B), pointer :: neq !number of equations for model - integer(I4B), dimension(:), pointer :: ibound => null() !ibound array - real(DP), dimension(:), pointer :: xnew => null() !dependent variable (head) for this time step - real(DP), dimension(:), pointer :: xold => null() !dependent variable for last time step - real(DP), dimension(:), pointer :: flowja => null() !intercell flows - integer(I4B), dimension(:), pointer :: icelltype => null() !pointer to icelltype array in NPF + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !ibound array + real(DP), dimension(:), pointer, contiguous :: xnew => null() !dependent variable (head) for this time step + real(DP), dimension(:), pointer, contiguous :: xold => null() !dependent variable for last time step + real(DP), dimension(:), pointer, contiguous :: flowja => null() !intercell flows + integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !pointer to icelltype array in NPF contains procedure :: bnd_df @@ -934,8 +934,8 @@ subroutine allocate_arrays(this, nodelist, auxvar) use MemoryManagerModule, only: mem_allocate, mem_setptr ! -- dummy class(BndType) :: this - integer(I4B), dimension(:), pointer, optional :: nodelist - real(DP), dimension(:, :), pointer, optional :: auxvar + integer(I4B), dimension(:), pointer, contiguous, optional :: nodelist + real(DP), dimension(:, :), pointer, contiguous, optional :: auxvar ! -- local integer(I4B) :: i integer(I4B) :: j @@ -1035,10 +1035,10 @@ subroutine set_pointers(this, neq, ibound, xnew, xold, flowja) ! ------------------------------------------------------------------------------ class(BndType) :: this integer(I4B), pointer :: neq - integer(I4B), dimension(:), pointer :: ibound - real(DP), dimension(:), pointer :: xnew - real(DP), dimension(:), pointer :: xold - real(DP), dimension(:), pointer :: flowja + integer(I4B), dimension(:), pointer, contiguous :: ibound + real(DP), dimension(:), pointer, contiguous :: xnew + real(DP), dimension(:), pointer, contiguous :: xold + real(DP), dimension(:), pointer, contiguous :: flowja ! ------------------------------------------------------------------------------ ! ! -- Set the pointers diff --git a/src/Model/ModelUtilities/Connections.f90 b/src/Model/ModelUtilities/Connections.f90 index f44c7d5b4f3..ddd71c34fca 100644 --- a/src/Model/ModelUtilities/Connections.f90 +++ b/src/Model/ModelUtilities/Connections.f90 @@ -16,17 +16,17 @@ module ConnectionsModule integer(I4B), pointer :: nja => null() !number of connections integer(I4B), pointer :: njas => null() !number of symmetric connections integer(I4B), pointer :: ianglex => null() !indicates whether or not anglex was read - integer(I4B), pointer, dimension(:) :: ia => null() !(size:nodes+1) csr index array - integer(I4B), pointer, dimension(:) :: ja => null() !(size:nja) csr pointer array - real(DP), dimension(:), pointer :: cl1 => null() !(size:njas) connection length between node n and shared face with node m - real(DP), dimension(:), pointer :: cl2 => null() !(size:njas) connection length between node m and shared face with node n - real(DP), dimension(:), pointer :: hwva => null() !(size:njas) horizontal perpendicular width (ihc>0) or vertical flow area (ihc=0) - real(DP), dimension(:), pointer :: anglex => null() !(size:njas) connection angle of face normal with x axis (read in degrees, stored as radians) - integer(I4B), dimension(:), pointer :: isym => null() !(size:nja) returns csr index of symmetric counterpart - integer(I4B), dimension(:), pointer :: jas => null() !(size:nja) map any connection to upper triangle (for pulling out of symmetric array) - integer(I4B), dimension(:), pointer :: ihc => null() !(size:njas) horizontal connection (0:vertical, 1:mean thickness, 2:staggered) - integer(I4B), dimension(:), pointer :: iausr => null() !(size:nodesusr+1) - integer(I4B), dimension(:), pointer :: jausr => null() !(size:nja) + integer(I4B), dimension(:), pointer, contiguous :: ia => null() !(size:nodes+1) csr index array + integer(I4B), dimension(:), pointer, contiguous :: ja => null() !(size:nja) csr pointer array + real(DP), dimension(:), pointer, contiguous :: cl1 => null() !(size:njas) connection length between node n and shared face with node m + real(DP), dimension(:), pointer, contiguous :: cl2 => null() !(size:njas) connection length between node m and shared face with node n + real(DP), dimension(:), pointer, contiguous :: hwva => null() !(size:njas) horizontal perpendicular width (ihc>0) or vertical flow area (ihc=0) + real(DP), dimension(:), pointer, contiguous :: anglex => null() !(size:njas) connection angle of face normal with x axis (read in degrees, stored as radians) + integer(I4B), dimension(:), pointer, contiguous :: isym => null() !(size:nja) returns csr index of symmetric counterpart + integer(I4B), dimension(:), pointer, contiguous :: jas => null() !(size:nja) map any connection to upper triangle (for pulling out of symmetric array) + integer(I4B), dimension(:), pointer, contiguous :: ihc => null() !(size:njas) horizontal connection (0:vertical, 1:mean thickness, 2:staggered) + integer(I4B), dimension(:), pointer, contiguous :: iausr => null() !(size:nodesusr+1) + integer(I4B), dimension(:), pointer, contiguous :: jausr => null() !(size:nja) type(BlockParserType) :: parser !block parser contains procedure :: con_da @@ -627,7 +627,7 @@ subroutine disconnections(this, name_model, nodes, ncol, nrow, nlay, & integer(I4B), dimension(:), target, intent(in) :: nodereduced integer(I4B), dimension(:), intent(in) :: nodeuser ! -- local - integer(I4B), dimension(:, :, :), pointer, contiguous :: nrdcd_ptr => null() + integer(I4B), dimension(:, :, :), pointer :: nrdcd_ptr => null() !non-contiguous because is a slice integer(I4B), dimension(:), allocatable :: rowmaxnnz type(sparsematrix) :: sparse integer(I4B) :: i, j, k, kk, ierror, isympos, nodesuser diff --git a/src/Model/ModelUtilities/DiscretizationBase.f90 b/src/Model/ModelUtilities/DiscretizationBase.f90 index bf6b544fa49..e881d7c5419 100644 --- a/src/Model/ModelUtilities/DiscretizationBase.f90 +++ b/src/Model/ModelUtilities/DiscretizationBase.f90 @@ -33,14 +33,14 @@ module BaseDisModule real(DP), pointer :: yorigin => null() ! y-position of the lower-left grid corner (default is 0.) real(DP), pointer :: xorigin => null() ! x-position of the lower-left grid corner (default is 0.) real(DP), pointer :: angrot => null() ! counter-clockwise rotation angle of the lower-left corner (default is 0.0) - integer(I4B), pointer, dimension(:) :: mshape => null() !shape of the model; (nodes) for DisBaseType - real(DP), dimension(:), pointer :: top => null() !(size:nodes) cell top elevation - real(DP), dimension(:), pointer :: bot => null() !(size:nodes) cell bottom elevation - real(DP), dimension(:), pointer :: area => null() !(size:nodes) cell area, in plan view + integer(I4B), dimension(:), pointer, contiguous :: mshape => null() !shape of the model; (nodes) for DisBaseType + real(DP), dimension(:), pointer, contiguous :: top => null() !(size:nodes) cell top elevation + real(DP), dimension(:), pointer, contiguous :: bot => null() !(size:nodes) cell bottom elevation + real(DP), dimension(:), pointer, contiguous :: area => null() !(size:nodes) cell area, in plan view type(ConnectionsType), pointer :: con => null() !connections object type(BlockParserType) :: parser !object to read blocks - real(DP), dimension(:), pointer :: dbuff => null() - integer(I4B), dimension(:), pointer :: ibuff => null() + real(DP), dimension(:), pointer, contiguous :: dbuff => null() + integer(I4B), dimension(:), pointer, contiguous :: ibuff => null() contains procedure :: dis_df procedure :: dis_ac @@ -849,7 +849,7 @@ subroutine read_int_array(this, line, lloc, istart, istop, iout, in, & integer(I4B), intent(inout) :: istop integer(I4B), intent(in) :: in integer(I4B), intent(in) :: iout - integer(I4B), dimension(:), pointer, intent(inout) :: iarray + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: iarray character(len=*), intent(in) :: aname ! -- local character(len=LINELENGTH) :: ermsg @@ -880,7 +880,7 @@ subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, & integer(I4B), intent(inout) :: istop integer(I4B), intent(in) :: in integer(I4B), intent(in) :: iout - real(DP), dimension(:), pointer, intent(inout) :: darray + real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray character(len=*), intent(in) :: aname ! -- local integer(I4B) :: ival @@ -926,11 +926,11 @@ subroutine read_list(this, in, iout, iprpak, nlist, inamedbound, & integer(I4B), intent(inout) :: nlist integer(I4B), intent(in) :: inamedbound integer(I4B), intent(in) :: iauxmultcol - integer(I4B), pointer, dimension(:), intent(inout) :: nodelist - real(DP), pointer, dimension(:,:), intent(inout) :: rlist - real(DP), pointer, dimension(:,:), intent(inout) :: auxvar + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: nodelist + real(DP), dimension(:,:), pointer, contiguous, intent(inout) :: rlist + real(DP), dimension(:,:), pointer, contiguous, intent(inout) :: auxvar character(len=16), dimension(:), intent(inout) :: auxname - character(len=LENBOUNDNAME), pointer, dimension(:), & + character(len=LENBOUNDNAME), dimension(:), pointer, contiguous, & intent(inout) :: boundname character(len=500), intent(in) :: label character(len=*), intent(in) :: pkgName @@ -1108,7 +1108,7 @@ subroutine record_array(this, darray, iout, iprint, idataun, aname, & ! ------------------------------------------------------------------------------ ! -- dummy class(DisBaseType), intent(inout) :: this - real(DP), dimension(:), pointer, intent(inout) :: darray + real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray integer(I4B), intent(in) :: iout integer(I4B), intent(in) :: iprint integer(I4B), intent(in) :: idataun diff --git a/src/Model/ModelUtilities/Mover.f90 b/src/Model/ModelUtilities/Mover.f90 index e622674b0a9..08101c313fa 100644 --- a/src/Model/ModelUtilities/Mover.f90 +++ b/src/Model/ModelUtilities/Mover.f90 @@ -61,7 +61,7 @@ subroutine set(this, line, inunit, iout, mname) character(len=LENMODELNAME+LENPACKAGENAME+1) :: origin integer(I4B) :: lloc, istart, istop, ival, i real(DP) :: rval - real(DP), dimension(:), pointer :: temp_ptr => null() + real(DP), dimension(:), pointer, contiguous :: temp_ptr => null() logical :: valid character(len=LINELENGTH) :: errmsg logical :: mnamel diff --git a/src/Model/ModelUtilities/PackageMover.f90 b/src/Model/ModelUtilities/PackageMover.f90 index cc59b897ca4..fdc21f63ff0 100644 --- a/src/Model/ModelUtilities/PackageMover.f90 +++ b/src/Model/ModelUtilities/PackageMover.f90 @@ -14,10 +14,10 @@ module PackageMoverModule character(len=LENORIGIN) :: origin integer, pointer :: nproviders integer, pointer :: nreceivers - real(DP), pointer, dimension(:) :: qtformvr => null() - real(DP), pointer, dimension(:) :: qformvr => null() - real(DP), pointer, dimension(:) :: qtomvr => null() - real(DP), pointer, dimension(:) :: qfrommvr => null() + real(DP), dimension(:), pointer, contiguous :: qtformvr => null() + real(DP), dimension(:), pointer, contiguous :: qformvr => null() + real(DP), dimension(:), pointer, contiguous :: qtomvr => null() + real(DP), dimension(:), pointer, contiguous :: qfrommvr => null() contains procedure :: ar diff --git a/src/Model/ModelUtilities/Xt3dInterface.f90 b/src/Model/ModelUtilities/Xt3dInterface.f90 index f4a864fe9b4..c94a2eba5cb 100644 --- a/src/Model/ModelUtilities/Xt3dInterface.f90 +++ b/src/Model/ModelUtilities/Xt3dInterface.f90 @@ -13,42 +13,42 @@ module Xt3dModule integer(I4B), pointer :: inunit => null() integer(I4B), pointer :: iout => null() character(len=LENORIGIN), pointer :: origin => null() !origin name of this package (e.g. 'GWF_1 NPF') - integer(I4B), pointer, dimension(:) :: ibound => null() !pointer to model ibound - integer(I4B),dimension(:),pointer :: iax => null() !ia array for extended neighbors used by xt3d - integer(I4B),dimension(:),pointer :: jax => null() !ja array for extended neighbors used by xt3d - integer(I4B),dimension(:),pointer :: idxglox => null() !mapping array for extended neighbors used by xt3d + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound + integer(I4B),dimension(:), pointer, contiguous :: iax => null() !ia array for extended neighbors used by xt3d + integer(I4B),dimension(:), pointer, contiguous :: jax => null() !ja array for extended neighbors used by xt3d + integer(I4B),dimension(:), pointer, contiguous :: idxglox => null() !mapping array for extended neighbors used by xt3d integer(I4B), pointer :: numextnbrs => null() !dimension of jax array integer(I4B), pointer :: ixt3d => null() !xt3d flag (0 is off, 1 is lhs, 2 is rhs) logical, pointer :: nozee => null() !nozee flag real(DP), pointer :: vcthresh => null() !attenuation function threshold - real(DP),dimension(:,:),pointer :: rmatck => null() !rotation matrix for the conductivity tensor - real(DP),dimension(:,:),pointer :: vecc => null() !connection vectors - real(DP),dimension(:,:),pointer :: vecn => null() !interface normals - real(DP),dimension(:),pointer :: conlen => null() !direct connection lengths - real(DP), dimension(:),pointer :: qsat => null() !saturated flow saved for Newton - real(DP), dimension(:),pointer :: qrhs => null() !rhs part of flow saved for Newton + real(DP), dimension(:,:), pointer, contiguous :: rmatck => null() !rotation matrix for the conductivity tensor + real(DP), dimension(:,:), pointer, contiguous :: vecc => null() !connection vectors + real(DP), dimension(:,:), pointer, contiguous :: vecn => null() !interface normals + real(DP), dimension(:), pointer, contiguous :: conlen => null() !direct connection lengths + real(DP), dimension(:), pointer, contiguous :: qsat => null() !saturated flow saved for Newton + real(DP), dimension(:), pointer, contiguous :: qrhs => null() !rhs part of flow saved for Newton integer(I4B), pointer :: nbrmax => null() !maximum number of neighbors for any cell - real(DP), dimension(:),pointer :: amatpc => null() !saved contributions to amat from permanently confined connections, direct neighbors - real(DP), dimension(:),pointer :: amatpcx => null() !saved contributions to amat from permanently confined connections, extended neighbors - integer(I4B), dimension(:),pointer :: iallpc => null() !indicates for each node whether all connections processed by xt3d are permanently confined (0 no, 1 yes) + real(DP), dimension(:), pointer, contiguous :: amatpc => null() !saved contributions to amat from permanently confined connections, direct neighbors + real(DP), dimension(:), pointer, contiguous :: amatpcx => null() !saved contributions to amat from permanently confined connections, extended neighbors + integer(I4B), dimension(:), pointer, contiguous :: iallpc => null() !indicates for each node whether all connections processed by xt3d are permanently confined (0 no, 1 yes) logical, pointer :: lamatsaved => null() !indicates whether amat has been saved for permanently confined connections class(DisBaseType), pointer :: dis => null() !discretization object ! pointers to npf variables - real(DP),dimension(:),pointer :: k11 => null() !horizontal hydraulic conductivity - real(DP),dimension(:),pointer :: k22 => null() !minor axis of horizontal hydraulic conductivity ellipse - real(DP),dimension(:),pointer :: k33 => null() !vertical hydraulic conductivity + real(DP), dimension(:), pointer, contiguous :: k11 => null() !horizontal hydraulic conductivity + real(DP), dimension(:),pointer, contiguous :: k22 => null() !minor axis of horizontal hydraulic conductivity ellipse + real(DP), dimension(:), pointer, contiguous :: k33 => null() !vertical hydraulic conductivity integer(I4B), pointer :: ik22 => null() !flag indicates K22 was read integer(I4B), pointer :: ik33 => null() !flag indicates K33 was read - real(DP), dimension(:), pointer :: sat => null() !saturation (0. to 1.) for each cell + real(DP), dimension(:), pointer, contiguous :: sat => null() !saturation (0. to 1.) for each cell integer(I4B), pointer :: inewton => null() !Newton flag real(DP), pointer :: min_satthk => null() !min saturated thickness - integer(I4B), dimension(:), pointer :: icelltype => null() !cell type (confined or unconfined) + integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !cell type (confined or unconfined) integer(I4B), pointer :: iangle1 => null() !flag to indicate angle1 was read integer(I4B), pointer :: iangle2 => null() !flag to indicate angle2 was read integer(I4B), pointer :: iangle3 => null() !flag to indicate angle3 was read - real(DP), dimension(:), pointer :: angle1 => null() !k ellipse rotation in xy plane around z axis (yaw) - real(DP), dimension(:), pointer :: angle2 => null() !k ellipse rotation up from xy plane around y axis (pitch) - real(DP), dimension(:), pointer :: angle3 => null() !k tensor rotation around x axis (roll) + real(DP), dimension(:), pointer, contiguous :: angle1 => null() !k ellipse rotation in xy plane around z axis (yaw) + real(DP), dimension(:), pointer, contiguous :: angle2 => null() !k ellipse rotation up from xy plane around y axis (pitch) + real(DP), dimension(:), pointer, contiguous :: angle3 => null() !k tensor rotation around x axis (roll) logical, pointer :: ldispersion => null() !flag to indicate dispersion contains procedure :: xt3d_ac @@ -264,22 +264,22 @@ subroutine xt3d_ar(this, dis, ibound, k11, ik33, k33, sat, ik22, k22, & ! -- dummy class(Xt3dType) :: this class(DisBaseType),pointer,intent(inout) :: dis - integer(I4B), pointer, dimension(:), intent(inout) :: ibound - real(DP), dimension(:), intent(in), pointer :: k11 + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: ibound + real(DP), dimension(:), intent(in), pointer, contiguous :: k11 integer(I4B), intent(in), pointer :: ik33 - real(DP), dimension(:), intent(in), pointer :: k33 - real(DP), dimension(:), intent(in), pointer :: sat + real(DP), dimension(:), intent(in), pointer, contiguous :: k33 + real(DP), dimension(:), intent(in), pointer, contiguous :: sat integer(I4B), intent(in), pointer :: ik22 - real(DP), dimension(:), intent(in), pointer :: k22 + real(DP), dimension(:), intent(in), pointer, contiguous :: k22 integer(I4B), intent(in), pointer :: inewton real(DP), intent(in), pointer :: min_satthk - integer(I4B), dimension(:), intent(in), pointer :: icelltype + integer(I4B), dimension(:), intent(in), pointer, contiguous :: icelltype integer(I4B), intent(in), pointer :: iangle1 integer(I4B), intent(in), pointer :: iangle2 integer(I4B), intent(in), pointer :: iangle3 - real(DP), dimension(:), intent(in), pointer :: angle1 - real(DP), dimension(:), intent(in), pointer :: angle2 - real(DP), dimension(:), intent(in), pointer :: angle3 + real(DP), dimension(:), intent(in), pointer, contiguous :: angle1 + real(DP), dimension(:), intent(in), pointer, contiguous :: angle2 + real(DP), dimension(:), intent(in), pointer, contiguous :: angle3 ! -- local integer(I4B) :: n, nnbrs ! -- formats diff --git a/src/Model/NumericalModel.f90 b/src/Model/NumericalModel.f90 index 6f55c98377b..16b50d1dfa3 100644 --- a/src/Model/NumericalModel.f90 +++ b/src/Model/NumericalModel.f90 @@ -19,15 +19,15 @@ module NumericalModelModule integer(I4B), pointer :: nja => null() !number of connections integer(I4B), pointer :: moffset => null() !offset of this model in the solution integer(I4B), pointer :: icnvg => null() !convergence flag - integer(I4B), dimension(:), pointer :: ia => null() !csr row pointer - integer(I4B), dimension(:), pointer :: ja => null() !csr columns - real(DP), dimension(:), pointer :: x => null() !dependent variable (head, conc, etc) - real(DP), dimension(:), pointer :: rhs => null() !right-hand side vector - real(DP), dimension(:), pointer :: cond => null() !conductance matrix - integer(I4B), dimension(:), pointer :: idxglo => null() !pointer to position in solution matrix - real(DP), dimension(:), pointer :: xold => null() !dependent variable for previous timestep - real(DP), dimension(:), pointer :: flowja => null() !intercell flows - integer(I4B), dimension(:), pointer :: ibound => null() !ibound array + integer(I4B), dimension(:), pointer, contiguous :: ia => null() !csr row pointer + integer(I4B), dimension(:), pointer, contiguous :: ja => null() !csr columns + real(DP), dimension(:), pointer, contiguous :: x => null() !dependent variable (head, conc, etc) + real(DP), dimension(:), pointer, contiguous :: rhs => null() !right-hand side vector + real(DP), dimension(:), pointer, contiguous :: cond => null() !conductance matrix + integer(I4B), dimension(:), pointer, contiguous :: idxglo => null() !pointer to position in solution matrix + real(DP), dimension(:), pointer, contiguous :: xold => null() !dependent variable for previous timestep + real(DP), dimension(:), pointer, contiguous :: flowja => null() !intercell flows + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !ibound array ! ! -- Derived types type(ListType), pointer :: bndlist => null() !array of boundary packages for this model @@ -296,19 +296,19 @@ end subroutine allocate_arrays subroutine set_xptr(this, xsln) class(NumericalModelType) :: this - real(DP), dimension(:), pointer, intent(in) :: xsln + real(DP), dimension(:), pointer, contiguous, intent(in) :: xsln this%x => xsln(this%moffset + 1:this%moffset + this%neq) end subroutine set_xptr subroutine set_rhsptr(this, rhssln) class(NumericalModelType) :: this - real(DP), dimension(:), pointer, intent(in) :: rhssln + real(DP), dimension(:), pointer, contiguous, intent(in) :: rhssln this%rhs => rhssln(this%moffset + 1:this%moffset + this%neq) end subroutine set_rhsptr subroutine set_iboundptr(this, iboundsln) class(NumericalModelType) :: this - integer(I4B), dimension(:), pointer, intent(in) :: iboundsln + integer(I4B), dimension(:), pointer, contiguous, intent(in) :: iboundsln this%ibound => iboundsln(this%moffset + 1:this%moffset + this%neq) end subroutine set_iboundptr diff --git a/src/Solution/NumericalSolution.f90 b/src/Solution/NumericalSolution.f90 index 74560ec91fa..ff1718e1248 100644 --- a/src/Solution/NumericalSolution.f90 +++ b/src/Solution/NumericalSolution.f90 @@ -37,13 +37,13 @@ module NumericalSolutionModule real(DP), pointer :: ttsoln integer(I4B), pointer :: neq => NULL() integer(I4B), pointer :: nja => NULL() - integer(I4B), pointer, dimension(:), contiguous :: ia => NULL() - integer(I4B), pointer, dimension(:), contiguous :: ja => NULL() - real(DP), pointer, dimension(:), contiguous :: amat => NULL() - real(DP), pointer, dimension(:), contiguous :: rhs => NULL() - real(DP), pointer, dimension(:), contiguous :: x => NULL() - integer(I4B), pointer, dimension(:), contiguous :: active => NULL() - real(DP), pointer, dimension(:), contiguous :: xtemp => NULL() + integer(I4B), dimension(:), pointer, contiguous :: ia => NULL() + integer(I4B), dimension(:), pointer, contiguous :: ja => NULL() + real(DP), dimension(:), pointer, contiguous :: amat => NULL() + real(DP), dimension(:), pointer, contiguous :: rhs => NULL() + real(DP), dimension(:), pointer, contiguous :: x => NULL() + integer(I4B), dimension(:), pointer, contiguous :: active => NULL() + real(DP), dimension(:), pointer, contiguous :: xtemp => NULL() type(BlockParserType) :: parser ! !sparse matrix data @@ -70,26 +70,26 @@ module NumericalSolutionModule integer(I4B), pointer :: numtrack => NULL() integer(I4B), pointer :: iprims => NULL() integer(I4B), pointer :: ibflag => NULL() - integer(I4B), dimension(:,:), pointer :: lrch => NULL() - real(DP), dimension(:), pointer :: hncg => NULL() - real(DP), dimension(:), pointer :: dxold => NULL() - real(DP), dimension(:), pointer :: deold => NULL() - real(DP), dimension(:), pointer :: wsave => NULL() - real(DP), dimension(:), pointer :: hchold => NULL() + integer(I4B), dimension(:,:), pointer, contiguous :: lrch => NULL() + real(DP), dimension(:), pointer, contiguous :: hncg => NULL() + real(DP), dimension(:), pointer, contiguous :: dxold => NULL() + real(DP), dimension(:), pointer, contiguous :: deold => NULL() + real(DP), dimension(:), pointer, contiguous :: wsave => NULL() + real(DP), dimension(:), pointer, contiguous :: hchold => NULL() ! summary - character(len=31), pointer, dimension(:) :: caccel => NULL() + character(len=31), dimension(:), pointer, contiguous :: caccel => NULL() integer(I4B), pointer :: icsvout => NULL() integer(I4B), pointer :: nitermax => NULL() integer(I4B), pointer :: nitercnt => NULL() integer(I4B), pointer :: convnmod => NULL() - integer(I4B), pointer, dimension(:), contiguous :: convmodstart => NULL() - integer(I4B), pointer, dimension(:), contiguous :: locdv => NULL() - integer(I4B), pointer, dimension(:), contiguous :: locdr => NULL() - integer(I4B), pointer, dimension(:), contiguous :: itinner => NULL() + integer(I4B), dimension(:), pointer, contiguous :: convmodstart => NULL() + integer(I4B), dimension(:), pointer, contiguous :: locdv => NULL() + integer(I4B), dimension(:), pointer, contiguous :: locdr => NULL() + integer(I4B), dimension(:), pointer, contiguous :: itinner => NULL() integer(I4B), pointer, dimension(:,:), contiguous :: convlocdv => NULL() integer(I4B), pointer, dimension(:,:), contiguous :: convlocdr => NULL() - real(DP), pointer, dimension(:), contiguous :: dvmax => NULL() - real(DP), pointer, dimension(:), contiguous :: drmax => NULL() + real(DP), dimension(:), pointer, contiguous :: dvmax => NULL() + real(DP), dimension(:), pointer, contiguous :: drmax => NULL() real(DP), pointer, dimension(:,:), contiguous :: convdvmax => NULL() real(DP), pointer, dimension(:,:), contiguous :: convdrmax => NULL() ! ptc diff --git a/src/Solution/SparseMatrixSolver/ims8linear.f90 b/src/Solution/SparseMatrixSolver/ims8linear.f90 index 1203618a47b..b9f34173540 100644 --- a/src/Solution/SparseMatrixSolver/ims8linear.f90 +++ b/src/Solution/SparseMatrixSolver/ims8linear.f90 @@ -41,11 +41,11 @@ MODULE IMSLinearModule ! POINTERS TO SOLUTION VARIABLES integer(I4B), POINTER :: NEQ => NULL() integer(I4B), POINTER :: NJA => NULL() - integer(I4B), DIMENSION(:), POINTER, CONTIGUOUS :: IA => NULL() - integer(I4B), DIMENSION(:), POINTER, CONTIGUOUS :: JA => NULL() - real(DP), DIMENSION(:), POINTER, CONTIGUOUS :: AMAT => NULL() - real(DP), DIMENSION(:), POINTER :: RHS => NULL() - real(DP), DIMENSION(:), POINTER :: X => NULL() + integer(I4B), dimension(:), pointer, contiguous :: IA => NULL() + integer(I4B), dimension(:), pointer, contiguous :: JA => NULL() + real(DP), dimension(:), pointer, contiguous :: AMAT => NULL() + real(DP), dimension(:), pointer, contiguous :: RHS => NULL() + real(DP), dimension(:), pointer, contiguous :: X => NULL() ! VECTORS real(DP),POINTER,DIMENSION(:),CONTIGUOUS::DSCALE => NULL() real(DP),POINTER,DIMENSION(:),CONTIGUOUS::DSCALE2 => NULL() diff --git a/src/Timing/tdis.f90 b/src/Timing/tdis.f90 index e3ea5dccd65..c525b41ec5e 100644 --- a/src/Timing/tdis.f90 +++ b/src/Timing/tdis.f90 @@ -34,9 +34,9 @@ module TdisModule real(DP), public, pointer :: totimsav !saved value for totim, used for subtiming real(DP), public, pointer :: pertimsav !saved value for pertim, used for subtiming real(DP), public, pointer :: totalsimtime !time at end of simulation - real(DP), public, dimension(:), pointer :: perlen !length of each stress period - integer(I4B), public, dimension(:), pointer :: nstp !number of time steps in each stress period - real(DP), public, dimension(:), pointer :: tsmult !time step multiplier for each stress period + real(DP), public, dimension(:), pointer, contiguous :: perlen !length of each stress period + integer(I4B), public, dimension(:), pointer, contiguous :: nstp !number of time steps in each stress period + real(DP), public, dimension(:), pointer, contiguous :: tsmult !time step multiplier for each stress period character(len=LENDATETIME), pointer :: datetime0 !starting date and time for the simulation ! type(BlockParserType), private :: parser diff --git a/src/Utilities/ArrayHandlers.f90 b/src/Utilities/ArrayHandlers.f90 index b7fc330c4cb..3c5a6a0f580 100644 --- a/src/Utilities/ArrayHandlers.f90 +++ b/src/Utilities/ArrayHandlers.f90 @@ -186,11 +186,11 @@ end subroutine expand_character subroutine extend_double(array, increment) implicit none ! -- dummy - real(DP), pointer, dimension(:), intent(inout) :: array + real(DP), dimension(:), pointer, contiguous, intent(inout) :: array integer(I4B), optional, intent(in) :: increment ! -- local integer(I4B) :: i, inclocal, isize, istat, newsize - real(DP), pointer, dimension(:) :: array_temp => null() + real(DP), dimension(:), pointer, contiguous :: array_temp => null() character(len=100) :: ermsg ! ! -- initialize @@ -234,11 +234,11 @@ end subroutine extend_double subroutine extend_integer(array, increment) implicit none ! -- dummy - integer(I4B), pointer, dimension(:), intent(inout) :: array + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: array integer(I4B), optional, intent(in) :: increment ! -- local integer(I4B) :: i, inclocal, isize, istat, newsize - integer(I4B), pointer, dimension(:) :: array_temp => null() + integer(I4B), dimension(:), pointer, contiguous :: array_temp => null() character(len=100) :: ermsg ! ! -- initialize diff --git a/src/Utilities/Budget.f90 b/src/Utilities/Budget.f90 index 6ef9be8ce99..c2088becba4 100644 --- a/src/Utilities/Budget.f90 +++ b/src/Utilities/Budget.f90 @@ -27,10 +27,10 @@ module BudgetModule real(DP), pointer :: budperc => null() logical, pointer :: written_once => null() real(DP), dimension(:,:), pointer :: vbvl => null() - character(len=LENBUDTXT), dimension(:), pointer :: vbnm => null() + character(len=LENBUDTXT), dimension(:), pointer, contiguous :: vbnm => null() character(len=20), pointer :: bdtype => null() character(len=5), pointer :: bddim => null() - character(len=LENPACKAGENAME), dimension(:), pointer :: rowlabel => null() + character(len=LENPACKAGENAME), dimension(:), pointer, contiguous :: rowlabel => null() character(len=16), pointer :: labeltitle => null() character(len=20), pointer :: bdzone => null() logical, pointer :: labeled => null() diff --git a/src/Utilities/ListReader.f90 b/src/Utilities/ListReader.f90 index 1ab8c736d23..ba2798f1b59 100644 --- a/src/Utilities/ListReader.f90 +++ b/src/Utilities/ListReader.f90 @@ -25,12 +25,12 @@ module ListReaderModule integer(I4B) :: ntxtauxvar ! number of text entries found in auxvar character(len=LINELENGTH) :: label ! label for printing list character(len=LINELENGTH) :: line ! line string for reading file - integer(I4B), dimension(:), pointer :: mshape ! pointer to model shape - integer(I4B), dimension(:), pointer :: nodelist ! pointer to nodelist - real(DP), dimension(:, :), pointer :: rlist ! pointer to rlist - real(DP), dimension(:, :), pointer :: auxvar ! pointer to auxvar - character(len=16), dimension(:), pointer :: auxname ! pointer to aux names - character(len=LENBOUNDNAME), pointer, dimension(:) :: boundname ! pointer to boundname + integer(I4B), dimension(:), pointer, contiguous :: mshape ! pointer to model shape + integer(I4B), dimension(:), pointer, contiguous :: nodelist ! pointer to nodelist + real(DP), dimension(:, :), pointer, contiguous :: rlist ! pointer to rlist + real(DP), dimension(:, :), pointer, contiguous :: auxvar ! pointer to auxvar + character(len=16), dimension(:), pointer :: auxname ! pointer to aux names + character(len=LENBOUNDNAME), dimension(:), pointer, contiguous :: boundname ! pointer to boundname integer(I4B), dimension(:), allocatable :: idxtxtrow ! row locations of text in rlist integer(I4B), dimension(:), allocatable :: idxtxtcol ! col locations of text in rlist integer(I4B), dimension(:), allocatable :: idxtxtauxrow ! row locations of text in auxvar @@ -65,12 +65,12 @@ subroutine read_list(this, in, iout, nlist, inamedbound, mshape, nodelist, & integer(I4B), intent(in) :: iout integer(I4B), intent(inout) :: nlist integer(I4B), intent(in) :: inamedbound - integer(I4B), dimension(:), intent(in), pointer :: mshape - integer(I4B), dimension(:), intent(inout), pointer :: nodelist - real(DP), dimension(:, :), intent(inout), pointer :: rlist - real(DP), dimension(:, :), intent(inout), pointer :: auxvar + integer(I4B), dimension(:), intent(in), contiguous, pointer :: mshape + integer(I4B), dimension(:), intent(inout), contiguous, pointer :: nodelist + real(DP), dimension(:, :), intent(inout), contiguous, pointer :: rlist + real(DP), dimension(:, :), intent(inout), contiguous, pointer :: auxvar character(len=16), dimension(:), intent(inout), target :: auxname - character(len=LENBOUNDNAME), pointer, dimension(:), intent(inout) :: boundname + character(len=LENBOUNDNAME), dimension(:), pointer, contiguous, intent(inout) :: boundname character(len=500), intent(in) :: label ! -- local ! ------------------------------------------------------------------------------ diff --git a/src/Utilities/Memory/MemoryManager.f90 b/src/Utilities/Memory/MemoryManager.f90 index 6e55bf0467a..0a629d5d3e1 100644 --- a/src/Utilities/Memory/MemoryManager.f90 +++ b/src/Utilities/Memory/MemoryManager.f90 @@ -123,7 +123,7 @@ subroutine allocate_int(intsclr, name, origin) end subroutine allocate_int subroutine allocate_int1d(aint, isize, name, origin) - integer(I4B), dimension(:), pointer, intent(inout) :: aint + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint integer(I4B), intent(in) :: isize character(len=*), intent(in) :: name character(len=*), intent(in) :: origin @@ -150,7 +150,7 @@ subroutine allocate_int1d(aint, isize, name, origin) end subroutine allocate_int1d subroutine allocate_int2d(aint, ncol, nrow, name, origin) - integer(I4B), dimension(:, :), pointer, intent(inout) :: aint + integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint integer(I4B), intent(in) :: ncol integer(I4B), intent(in) :: nrow character(len=*), intent(in) :: name @@ -206,7 +206,7 @@ subroutine allocate_dbl(dblsclr, name, origin) end subroutine allocate_dbl subroutine allocate_dbl1d(adbl, isize, name, origin) - real(DP), dimension(:), pointer, intent(inout) :: adbl + real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl integer(I4B), intent(in) :: isize character(len=*), intent(in) :: name character(len=*), intent(in) :: origin @@ -233,7 +233,7 @@ subroutine allocate_dbl1d(adbl, isize, name, origin) end subroutine allocate_dbl1d subroutine allocate_dbl2d(adbl, ncol, nrow, name, origin) - real(DP), dimension(:, :), pointer, intent(inout) :: adbl + real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl integer(I4B), intent(in) :: ncol integer(I4B), intent(in) :: nrow character(len=*), intent(in) :: name @@ -263,7 +263,7 @@ subroutine allocate_dbl2d(adbl, ncol, nrow, name, origin) end subroutine allocate_dbl2d subroutine allocate_ts1d(ats, isize, name, origin) - type (MemoryTSType), dimension(:), pointer, intent(inout) :: ats + type (MemoryTSType), dimension(:), pointer, contiguous, intent(inout) :: ats integer(I4B), intent(in) :: isize character(len=*), intent(in) :: name character(len=*), intent(in) :: origin @@ -299,7 +299,7 @@ subroutine allocate_ts1d(ats, isize, name, origin) end subroutine allocate_ts1d subroutine reallocate_int1d(aint, isize, name, origin) - integer(I4B), dimension(:), pointer, intent(inout) :: aint + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint integer(I4B), intent(in) :: isize character(len=*), intent(in) :: name character(len=*), intent(in) :: origin @@ -343,7 +343,7 @@ subroutine reallocate_int1d(aint, isize, name, origin) end subroutine reallocate_int1d subroutine reallocate_int2d(aint, ncol, nrow, name, origin) - integer(I4B), dimension(:, :), pointer, intent(inout) :: aint + integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint integer(I4B), intent(in) :: ncol integer(I4B), intent(in) :: nrow character(len=*), intent(in) :: name @@ -394,7 +394,7 @@ subroutine reallocate_int2d(aint, ncol, nrow, name, origin) end subroutine reallocate_int2d subroutine reallocate_dbl1d(adbl, isize, name, origin) - real(DP), dimension(:), pointer, intent(inout) :: adbl + real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl integer(I4B), intent(in) :: isize character(len=*), intent(in) :: name character(len=*), intent(in) :: origin @@ -439,7 +439,7 @@ subroutine reallocate_dbl1d(adbl, isize, name, origin) end subroutine reallocate_dbl1d subroutine reallocate_dbl2d(adbl, ncol, nrow, name, origin) - real(DP), dimension(:, :), pointer, intent(inout) :: adbl + real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl integer(I4B), intent(in) :: ncol integer(I4B), intent(in) :: nrow character(len=*), intent(in) :: name @@ -522,7 +522,7 @@ subroutine setptr_int(intsclr, name, origin) end subroutine setptr_int subroutine setptr_int1d(aint, name, origin) - integer(I4B), dimension(:), pointer, intent(inout) :: aint + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint character(len=*), intent(in) :: name character(len=*), intent(in) :: origin class(MemoryType), pointer :: mt @@ -538,7 +538,7 @@ subroutine setptr_int1d(aint, name, origin) end subroutine setptr_int1d subroutine setptr_int2d(aint, name, origin) - integer(I4B), dimension(:, :), pointer, intent(inout) :: aint + integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint character(len=*), intent(in) :: name character(len=*), intent(in) :: origin class(MemoryType), pointer :: mt @@ -570,7 +570,7 @@ subroutine setptr_dbl(dblsclr, name, origin) end subroutine setptr_dbl subroutine setptr_dbl1d(adbl, name, origin) - real(DP), dimension(:), pointer, intent(inout) :: adbl + real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl character(len=*), intent(in) :: name character(len=*), intent(in) :: origin class(MemoryType), pointer :: mt @@ -586,7 +586,7 @@ subroutine setptr_dbl1d(adbl, name, origin) end subroutine setptr_dbl1d subroutine setptr_dbl2d(adbl, name, origin) - real(DP), dimension(:, :), pointer, intent(inout) :: adbl + real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl character(len=*), intent(in) :: name character(len=*), intent(in) :: origin class(MemoryType), pointer :: mt @@ -603,7 +603,7 @@ end subroutine setptr_dbl2d subroutine copyptr_int1d(aint, name, origin, origin2) - integer(I4B), dimension(:), pointer, intent(inout) :: aint + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint character(len=*), intent(in) :: name character(len=*), intent(in) :: origin character(len=*), intent(in), optional :: origin2 @@ -630,7 +630,7 @@ subroutine copyptr_int1d(aint, name, origin, origin2) end subroutine copyptr_int1d subroutine copyptr_int2d(aint, name, origin, origin2) - integer(I4B), dimension(:,:), pointer, intent(inout) :: aint + integer(I4B), dimension(:,:), pointer, contiguous, intent(inout) :: aint character(len=*), intent(in) :: name character(len=*), intent(in) :: origin character(len=*), intent(in), optional :: origin2 @@ -662,7 +662,7 @@ subroutine copyptr_int2d(aint, name, origin, origin2) end subroutine copyptr_int2d subroutine copyptr_dbl1d(adbl, name, origin, origin2) - real(DP), dimension(:), pointer, intent(inout) :: adbl + real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl character(len=*), intent(in) :: name character(len=*), intent(in) :: origin character(len=*), intent(in), optional :: origin2 @@ -689,7 +689,7 @@ subroutine copyptr_dbl1d(adbl, name, origin, origin2) end subroutine copyptr_dbl1d subroutine copyptr_dbl2d(adbl, name, origin, origin2) - real(DP), dimension(:,:), pointer, intent(inout) :: adbl + real(DP), dimension(:,:), pointer, contiguous, intent(inout) :: adbl character(len=*), intent(in) :: name character(len=*), intent(in) :: origin character(len=*), intent(in), optional :: origin2 @@ -787,7 +787,7 @@ subroutine deallocate_dbl(dblsclr) end subroutine deallocate_dbl subroutine deallocate_int1d(aint1d) - integer(I4B), dimension(:), pointer, intent(inout) :: aint1d + integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint1d class(MemoryType), pointer :: mt integer(I4B) :: ipos logical :: found @@ -809,7 +809,7 @@ subroutine deallocate_int1d(aint1d) end subroutine deallocate_int1d subroutine deallocate_int2d(aint2d) - integer(I4B), dimension(:, :), pointer, intent(inout) :: aint2d + integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint2d class(MemoryType), pointer :: mt integer(I4B) :: ipos logical :: found @@ -831,7 +831,7 @@ subroutine deallocate_int2d(aint2d) end subroutine deallocate_int2d subroutine deallocate_dbl1d(adbl1d) - real(DP), dimension(:), pointer, intent(inout) :: adbl1d + real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl1d class(MemoryType), pointer :: mt integer(I4B) :: ipos logical :: found @@ -853,7 +853,7 @@ subroutine deallocate_dbl1d(adbl1d) end subroutine deallocate_dbl1d subroutine deallocate_dbl2d(adbl2d) - real(DP), dimension(:, :), pointer, intent(inout) :: adbl2d + real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl2d class(MemoryType), pointer :: mt integer(I4B) :: ipos logical :: found @@ -875,7 +875,7 @@ subroutine deallocate_dbl2d(adbl2d) end subroutine deallocate_dbl2d subroutine deallocate_ts1d(ats1d) - type (MemoryTSType), dimension(:), pointer, intent(inout) :: ats1d + type (MemoryTSType), dimension(:), pointer, contiguous, intent(inout) :: ats1d class(MemoryType), pointer :: mt integer(I4B) :: ipos integer(I4B) :: i diff --git a/src/Utilities/Observation/Obs3.f90 b/src/Utilities/Observation/Obs3.f90 index 9108f9ee8f0..ec93dece0f5 100644 --- a/src/Utilities/Observation/Obs3.f90 +++ b/src/Utilities/Observation/Obs3.f90 @@ -163,8 +163,8 @@ module ObsModule character(len=2*LENPACKAGENAME+4), public :: pkgName = '' character(len=LENFTYPE), public :: filtyp = '' logical, pointer, public :: active => null() - type(ObsContainerType), dimension(:), pointer, public :: pakobs => null() - type(ObsDataType), dimension(:), pointer, public :: obsData => null() + type(ObsContainerType), dimension(:), pointer, contiguous, public :: pakobs => null() + type(ObsDataType), dimension(:), pointer, contiguous, public :: obsData => null() ! -- Private members integer(I4B), private :: iprecision = 2 ! 2=double; 1=single integer(I4B), private :: idigits = 5 @@ -927,7 +927,7 @@ subroutine get_obs_array(this, nObs, obsArray) ! -- dummy class(ObsType), intent(inout) :: this integer(I4B), intent(out) :: nObs - type(ObsContainerType), pointer, dimension(:), intent(inout) :: obsArray + type(ObsContainerType), dimension(:), pointer, contiguous, intent(inout) :: obsArray ! -- local ! nObs = this%get_num() diff --git a/src/Utilities/Observation/Observe.f90 b/src/Utilities/Observation/Observe.f90 index 8db7e76bbf5..befac9520f0 100644 --- a/src/Utilities/Observation/Observe.f90 +++ b/src/Utilities/Observation/Observe.f90 @@ -147,7 +147,7 @@ subroutine ConstructObservation(newObservation, defLine, numunit, & integer(I4B), intent(in) :: numunit ! Output unit number logical, intent(in) :: formatted ! Formatted output? integer(I4B), intent(in) :: indx ! Index in ObsOutput array - type(ObsDataType), dimension(:), pointer, intent(in) :: obsData + type(ObsDataType), dimension(:), pointer, contiguous, intent(in) :: obsData integer(I4B), intent(in) :: inunit ! -- local real(DP) :: r @@ -185,13 +185,13 @@ subroutine ConstructObservation(newObservation, defLine, numunit, & ! ! -- Remaining text is ID [and ID2]; store it ltrim = len_trim(defLine) - call urword(defLine,icol,istart,istop,1,n,r,iout,inunit) - ! - ! -- Test for quote at end of substring - if (istop < ltrim) then - if (defLine(istop+1:istop+1) == '''') then - ltrim = istop - end if + call urword(defLine,icol,istart,istop,1,n,r,iout,inunit) + ! + ! -- Test for quote at end of substring + if (istop < ltrim) then + if (defLine(istop+1:istop+1) == '''') then + ltrim = istop + end if end if newObservation%IDstring = (defLine(istart:ltrim)) ! diff --git a/src/Utilities/OutputControl/OutputControl.f90 b/src/Utilities/OutputControl/OutputControl.f90 index 305d345931e..df95a2e659a 100644 --- a/src/Utilities/OutputControl/OutputControl.f90 +++ b/src/Utilities/OutputControl/OutputControl.f90 @@ -16,7 +16,7 @@ module OutputControlModule integer(I4B), pointer :: iout => null() !unit number for output file integer(I4B), pointer :: iperoc => null() !stress period number for next output control integer(I4B), pointer :: iocrep => null() !output control repeat flag (period 0 step 0) - type(OutputControlDataType), dimension(:), pointer :: ocdobj => null() !output control objects + type(OutputControlDataType), dimension(:), pointer, contiguous :: ocdobj => null() !output control objects type(BlockParserType) :: parser contains procedure :: oc_df diff --git a/src/Utilities/OutputControl/OutputControlData.f90 b/src/Utilities/OutputControl/OutputControlData.f90 index 672bacc3ea1..dc831c02024 100644 --- a/src/Utilities/OutputControl/OutputControlData.f90 +++ b/src/Utilities/OutputControl/OutputControlData.f90 @@ -18,8 +18,8 @@ module OutputControlData integer(I4B), pointer :: nwidthp => null() real(DP), pointer :: dnodata => null() integer(I4B), pointer :: inodata => null() - real(DP), dimension(:), pointer :: dblvec => null() - integer(I4B), dimension(:), pointer :: intvec => null() + real(DP), dimension(:), pointer, contiguous :: dblvec => null() + integer(I4B), dimension(:), pointer, contiguous :: intvec => null() class(DisBaseType), pointer :: dis => null() type(PrintSaveManagerType), pointer :: psmobj => null() contains @@ -175,7 +175,7 @@ subroutine init_dbl(this, cname, dblvec, dis, cdefpsm, cdeffmp, iout, & ! -- dummy class(OutputControlDataType) :: this character(len=*), intent(in) :: cname - real(DP), dimension(:), pointer, intent(in) :: dblvec + real(DP), dimension(:), pointer, contiguous, intent(in) :: dblvec class(DisBaseType), pointer, intent(in) :: dis character(len=*), intent(in) :: cdefpsm character(len=*), intent(in) :: cdeffmp @@ -207,7 +207,7 @@ subroutine init_int(this, cname, intvec, dis, cdefpsm, cdeffmp, iout, & ! -- dummy class(OutputControlDataType) :: this character(len=*), intent(in) :: cname - integer(I4B), dimension(:), pointer, intent(in) :: intvec + integer(I4B), dimension(:), pointer, contiguous, intent(in) :: intvec class(DisBaseType), pointer, intent(in) :: dis character(len=*), intent(in) :: cdefpsm character(len=*), intent(in) :: cdeffmp diff --git a/src/Utilities/TimeSeries/TimeArray.f90 b/src/Utilities/TimeSeries/TimeArray.f90 index ad064fbdf92..5bffd00635f 100644 --- a/src/Utilities/TimeSeries/TimeArray.f90 +++ b/src/Utilities/TimeSeries/TimeArray.f90 @@ -5,7 +5,7 @@ module TimeArrayModule use KindModule, only: DP, I4B use ListModule, only: ListType use SimModule, only: store_error, ustop - + implicit none private public :: TimeArrayType, ConstructTimeArray, & @@ -15,7 +15,7 @@ module TimeArrayModule type :: TimeArrayType ! -- Public members real(DP), public :: taTime - real(DP), dimension(:), pointer, public :: taArray => null() + real(DP), dimension(:), pointer, contiguous, public :: taArray => null() contains ! -- Public procedures ! -- When gfortran adds support for finalization, the @@ -26,22 +26,22 @@ module TimeArrayModule contains subroutine ConstructTimeArray(newTa, dis) -! ****************************************************************************** -! ConstructTimeArray -- construct time array +! ****************************************************************************** +! ConstructTimeArray -- construct time array ! Allocate and assign members of a new TimeArrayType object. ! Allocate space for the array so that this subroutine can be ! called repeatedly with the same array (but with different contents). -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ ! -- dummy type(TimeArrayType), pointer, intent(out) :: newTa class(DisBaseType), pointer, intent(in) :: dis ! -- local integer(I4B) :: isize character(len=LINELENGTH) :: ermsg -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! ! Get dimensions for supported discretization type if (dis%supports_layers()) then @@ -57,16 +57,16 @@ subroutine ConstructTimeArray(newTa, dis) end subroutine ConstructTimeArray function CastAsTimeArrayType(obj) result(res) -! ****************************************************************************** +! ****************************************************************************** ! ConstructTimeArray -- Cast an unlimited polymorphic object as TimeArrayType -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ ! -- dummy class(*), pointer, intent(inout) :: obj type(TimeArrayType), pointer :: res -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! res => null() if (.not. associated(obj)) return @@ -79,18 +79,18 @@ function CastAsTimeArrayType(obj) result(res) end function CastAsTimeArrayType subroutine AddTimeArrayToList(list, timearray) -! ****************************************************************************** +! ****************************************************************************** ! AddTimeArrayToList -- add ta to list -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ ! -- dummy type(ListType), intent(inout) :: list type(TimeArrayType), pointer, intent(inout) :: timearray ! -- local class(*), pointer :: obj -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! obj => timearray call list%Add(obj) @@ -99,19 +99,19 @@ subroutine AddTimeArrayToList(list, timearray) end subroutine AddTimeArrayToList function GetTimeArrayFromList(list, indx) result (res) -! ****************************************************************************** +! ****************************************************************************** ! GetTimeArrayFromList -- get ta from list -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ ! -- dummy type(ListType), intent(inout) :: list integer(I4B), intent(in) :: indx type(TimeArrayType), pointer :: res ! -- local class(*), pointer :: obj -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! obj => list%GetItem(indx) res => CastAsTimeArrayType(obj) @@ -120,17 +120,17 @@ function GetTimeArrayFromList(list, indx) result (res) end function GetTimeArrayFromList subroutine ta_da(this) -! ****************************************************************************** +! ****************************************************************************** ! ta_da -- deallocate -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ - ! -- dummy +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ + ! -- dummy class(TimeArrayType) :: this -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! - deallocate(this%taArray) + deallocate(this%taArray) this%taArray => null() ! return diff --git a/src/Utilities/TimeSeries/TimeArraySeriesLink.f90 b/src/Utilities/TimeSeries/TimeArraySeriesLink.f90 index 3e33267f0f3..65970c6ffa0 100644 --- a/src/Utilities/TimeSeries/TimeArraySeriesLink.f90 +++ b/src/Utilities/TimeSeries/TimeArraySeriesLink.f90 @@ -20,7 +20,7 @@ module TimeArraySeriesLinkModule integer(I4B), public :: Iprpak = 1 logical, public :: UseDefaultProc = .true. logical, public :: ConvertFlux = .false. - integer(I4B), dimension(:), pointer, public :: nodelist => null() + integer(I4B), dimension(:), pointer, contiguous, public :: nodelist => null() ! BndArray can point to an array in either the bound or auxval ! array of BndType, or any other double precision variable or array ! element that contains a value that could be controlled by a time series. @@ -34,19 +34,19 @@ module TimeArraySeriesLinkModule contains subroutine tasl_da(this) -! ****************************************************************************** +! ****************************************************************************** ! tasl_da -- deallocate -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ ! -- dummy class(TimeArraySeriesLinkType), intent(inout) :: this -! ------------------------------------------------------------------------------ - ! - this%nodelist => null() - this%bndarray => null() - this%rmultarray => null() +! ------------------------------------------------------------------------------ + ! + this%nodelist => null() + this%bndarray => null() + this%rmultarray => null() this%TimeArraySeries => null() ! return @@ -54,12 +54,12 @@ end subroutine tasl_da subroutine ConstructTimeArraySeriesLink(newTasLink, timeArraySeries, & pkgName, bndArray, iprpak, text) -! ****************************************************************************** +! ****************************************************************************** ! ConstructTimeArraySeriesLink -- construct -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ ! -- dummy type(TimeArraySeriesLinkType), pointer, intent(out) :: newTasLink type(TimeArraySeriesType), pointer, intent(in) :: timeArraySeries @@ -69,7 +69,7 @@ subroutine ConstructTimeArraySeriesLink(newTasLink, timeArraySeries, & character(len=*), intent(in) :: text ! -- local character(len=LENPACKAGENAME) :: pkgNameTemp -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! allocate(newTasLink) ! Store package name as all caps @@ -85,16 +85,16 @@ subroutine ConstructTimeArraySeriesLink(newTasLink, timeArraySeries, & end subroutine ConstructTimeArraySeriesLink function CastAsTimeArraySeriesLinkType(obj) result(res) -! ****************************************************************************** -! CastAsTimeArraySeriesLinkType -- Cast an unlimited polymorphic object as +! ****************************************************************************** +! CastAsTimeArraySeriesLinkType -- Cast an unlimited polymorphic object as ! TimeArraySeriesLinkType -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ class(*), pointer, intent(inout) :: obj type(TimeArraySeriesLinkType), pointer :: res -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! res => null() if (.not. associated(obj)) return @@ -108,18 +108,18 @@ function CastAsTimeArraySeriesLinkType(obj) result(res) end function CastAsTimeArraySeriesLinkType subroutine AddTimeArraySeriesLinkToList(list, tasLink) -! ****************************************************************************** -! AddTimeArraySeriesLinkToList -- add to list -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! AddTimeArraySeriesLinkToList -- add to list +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ ! -- dummy type(ListType), intent(inout) :: list type(TimeArraySeriesLinkType), pointer, intent(inout) :: tasLink ! -- local class(*), pointer :: obj -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! obj => tasLink call list%Add(obj) @@ -128,19 +128,19 @@ subroutine AddTimeArraySeriesLinkToList(list, tasLink) end subroutine AddTimeArraySeriesLinkToList function GetTimeArraySeriesLinkFromList(list, idx) result (res) -! ****************************************************************************** -! GetTimeArraySeriesLinkFromList -- get from list -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ +! ****************************************************************************** +! GetTimeArraySeriesLinkFromList -- get from list +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ ! -- dummy type(ListType), intent(inout) :: list integer(I4B), intent(in) :: idx type(TimeArraySeriesLinkType), pointer :: res ! -- local class(*), pointer :: obj -! ------------------------------------------------------------------------------ +! ------------------------------------------------------------------------------ ! obj => list%GetItem(idx) res => CastAsTimeArraySeriesLinkType(obj) diff --git a/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 b/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 index f9659b02105..ddbe07c3504 100644 --- a/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 +++ b/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 @@ -28,7 +28,7 @@ module TimeArraySeriesManagerModule ! -- Private members type(ListType), pointer, private :: boundTasLinks => null() ! list of TAS links character(len=LINELENGTH), allocatable, dimension(:) :: tasfiles ! list of TA file names - type(TimeArraySeriesType), pointer, dimension(:) :: taslist ! array of TA pointers + type(TimeArraySeriesType), dimension(:), pointer, contiguous :: taslist ! array of TA pointers character(len=LENTIMESERIESNAME), allocatable, dimension(:) :: tasnames ! array of TA names contains ! -- Public procedures @@ -313,7 +313,7 @@ subroutine MakeTasLink(this, pkgName, bndArray, iprpak, & character(len=*), intent(in) :: tasName character(len=*), intent(in) :: text logical, intent(in) :: convertFlux - integer(I4B), dimension(:), pointer, intent(in) :: nodelist + integer(I4B), dimension(:), pointer, contiguous, intent(in) :: nodelist integer(I4B), intent(in) :: inunit ! -- local integer(I4B) :: i, nfiles, iloc diff --git a/src/Utilities/TimeSeries/TimeSeries.f90 b/src/Utilities/TimeSeries/TimeSeries.f90 index 1fb57c013c8..1c9824cb260 100644 --- a/src/Utilities/TimeSeries/TimeSeries.f90 +++ b/src/Utilities/TimeSeries/TimeSeries.f90 @@ -63,7 +63,7 @@ module TimeSeriesModule integer(I4B), public :: iout = 0 integer(I4B), public :: nTimeSeries = 0 character(len=LINELENGTH), public :: datafile = '' - type(TimeSeriesType), dimension(:), pointer, public :: timeSeries => null() + type(TimeSeriesType), dimension(:), pointer, contiguous, public :: timeSeries => null() type(BlockParserType), pointer, public :: parser contains ! -- Public procedures diff --git a/src/Utilities/version.f90 b/src/Utilities/version.f90 index af6337f1fe7..de02e8525ee 100644 --- a/src/Utilities/version.f90 +++ b/src/Utilities/version.f90 @@ -3,7 +3,7 @@ module VersionModule public ! -- modflow 6 version integer(I4B), parameter :: IDEVELOPMODE = 1 - character(len=40), parameter :: VERSION = '6.0.3.0 08/13/2018' + character(len=40), parameter :: VERSION = '6.0.3.5 08/27/2018' character(len=10), parameter :: MFVNAM = ' 6' character(len=*), parameter :: MFTITLE = & 'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL' diff --git a/version.txt b/version.txt index d23ea2e19fb..c69ecc20327 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ # MODFLOW 6 version file automatically created using...pre-commit.py -# created on...August 13, 2018 07:59:57 +# created on...August 27, 2018 18:39:47 # add some comments on how this version file # should be manually updated and used @@ -7,6 +7,6 @@ major = 6 minor = 0 micro = 3 -build = 0 -commit = 100 +build = 5 +commit = 106 From 5d6a1c8c4c6db6083bccf628ec9f3f91f4bb634a Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Tue, 28 Aug 2018 17:19:34 -0400 Subject: [PATCH 002/170] Updates to OBS to deallocate internal members with gfortran-8. Clean up of constants specified in code (DZERO and DONE) instead of relying on constants module. --- .travis.yml | 26 +++++++++++++ README.md | 4 +- code.json | 18 ++++----- doc/version.tex | 4 +- src/Model/ModelUtilities/BndUzfKinematic.f90 | 4 +- .../SparseMatrixSolver/ims8linear.f90 | 28 +++++++------- src/Utilities/Observation/Obs3.f90 | 38 ++++++++++--------- src/Utilities/Observation/Observe.f90 | 16 ++++---- src/Utilities/TimeSeries/TimeArraySeries.f90 | 22 +++++------ src/Utilities/TimeSeries/TimeSeries.f90 | 22 +++++------ src/Utilities/version.f90 | 2 +- version.txt | 6 +-- 12 files changed, 110 insertions(+), 80 deletions(-) diff --git a/.travis.yml b/.travis.yml index c86198151d1..13af12808d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,9 +91,30 @@ matrix: - tex-common - latex-xcolor - unzip + + - env: CVER=gfortran8 + language: c + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gfortran-8 + - texlive-base + - texlive-latex-base + - texlive-latex-extra + - texlive-latex-recommended + - texlive-science + - texlive-fonts-recommended + - texlive-fonts-extra + - dpkg + - tex-common + - latex-xcolor + - unzip allow_failures: - env: CVER=gfortran7 + - env: CVER=gfortran8 @@ -123,6 +144,11 @@ install: gfortran --version; ls -l /usr/bin/gfortran-7; fi + - if [[ $CVER == "gfortran8" ]]; then + ln -fs /usr/bin/gfortran-8 "$HOME/.local/bin/gfortran"; + gfortran --version; + ls -l /usr/bin/gfortran-8; + fi # install anaconda - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; diff --git a/README.md b/README.md index 5eafb28e8d9..99d938352e5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Automated Testing Status on Travis-CI -### Version 6.0.3 develop — build 5 +### Version 6.0.3 develop — build 6 [![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6) ## Introduction @@ -31,7 +31,7 @@ MODFLOW 6 is the latest core version of MODFLOW. It synthesizes many of the capa #### ***Software/Code citation for MODFLOW 6:*** -[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2018, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 27 August 2018, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV) +[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2018, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 28 August 2018, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV) ## Instructions for building definition files for new packages diff --git a/code.json b/code.json index 1220c4e80d3..16cc771ce1b 100755 --- a/code.json +++ b/code.json @@ -1,26 +1,26 @@ [ { "status": "Release Candidate", - "languages": [ - "Fortran2008" - ], + "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", "repositoryURL": "https://code.usgs.gov/usgs/modflow/modflow6.git", + "laborHours": -1, "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md", - "name": "modflow6", "tags": [ "MODFLOW", "groundwater model" ], + "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", + "languages": [ + "Fortran2008" + ], "contact": { "name": "Christian D. Langevin", "email": "langevin@usgs.gov" }, - "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", "vcs": "git", - "laborHours": -1, - "version": "6.0.3.5", + "version": "6.0.3.6", "date": { - "metadataLastUpdated": "2018-08-27" + "metadataLastUpdated": "2018-08-28" }, "organization": "U.S. Geological Survey", "permissions": { @@ -33,6 +33,6 @@ "usageType": "openSource" }, "homepageURL": "https://code.usgs.gov/usgs/modflow/modflow6/", - "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions." + "name": "modflow6" } ] \ No newline at end of file diff --git a/doc/version.tex b/doc/version.tex index cef7d915b2f..2def6fc3694 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,3 +1,3 @@ -\newcommand{\modflowversion}{mf6.0.3.5} -\newcommand{\modflowdate}{August 27, 2018} +\newcommand{\modflowversion}{mf6.0.3.6} +\newcommand{\modflowdate}{August 28, 2018} \newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate} diff --git a/src/Model/ModelUtilities/BndUzfKinematic.f90 b/src/Model/ModelUtilities/BndUzfKinematic.f90 index 42b555ff6d7..bb6d3c9a867 100644 --- a/src/Model/ModelUtilities/BndUzfKinematic.f90 +++ b/src/Model/ModelUtilities/BndUzfKinematic.f90 @@ -1875,8 +1875,8 @@ subroutine uzet(this,delt,ietflag,ierr) ! ! store original wave characteristics call uzfktemp%wave_shift(this,0,1,Nwv,1) - factor = 1.0d0 - this%etact = dzero + factor = DONE + this%etact = DZERO if ( this%thts-this%thtr < DEM7 ) then thtsrinv = 1.0/DEM7 else diff --git a/src/Solution/SparseMatrixSolver/ims8linear.f90 b/src/Solution/SparseMatrixSolver/ims8linear.f90 index b9f34173540..a5bfaea9098 100644 --- a/src/Solution/SparseMatrixSolver/ims8linear.f90 +++ b/src/Solution/SparseMatrixSolver/ims8linear.f90 @@ -731,7 +731,7 @@ SUBROUTINE SET_IMSLINEAR_INPUT(THIS, IFDPARAM) THIS%IORD = 0 THIS%HCLOSE = DEM3 THIS%RCLOSE = DEM1 - THIS%RELAX = 0.0D0 + THIS%RELAX = DZERO THIS%LEVEL = 0 THIS%DROPTOL = DZERO THIS%NORTH = 0 @@ -757,7 +757,7 @@ SUBROUTINE SET_IMSLINEAR_INPUT(THIS, IFDPARAM) THIS%IORD = 0 THIS%HCLOSE = DEM1 THIS%RCLOSE = DEM1 - THIS%RELAX = 0.0D0 + THIS%RELAX = DZERO THIS%LEVEL = 5 THIS%DROPTOL = DEM4 THIS%NORTH = 2 @@ -1057,7 +1057,7 @@ SUBROUTINE IMSLINEARSUB_SCALE(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, & DO n = 1, NEQ id = IA(n) v = AMAT(id) - c1 = 1.0D0 / SQRT( ABS( v ) ) + c1 = DONE / SQRT( ABS( v ) ) DSCALE(n) = c1 DSCALE2(n) = c1 END DO @@ -1076,17 +1076,17 @@ SUBROUTINE IMSLINEARSUB_SCALE(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, & CASE ( 2 ) ! SCALE EACH ROW SO THAT THE L-2 NORM IS 1 DO n = 1, NEQ - c1 = 0.0D0 + c1 = DZERO i0 = IA(n) i1 = IA(n+1) - 1 DO i = i0, i1 c1 = c1 + AMAT(i) * AMAT(i) END DO c1 = SQRT( c1 ) - IF (c1.EQ.0.0D0) THEN - c1 = 1.0D0 + IF (c1.EQ.DZERO) THEN + c1 = DONE ELSE - c1 = 1.0D0 / c1 + c1 = DONE / c1 END IF DSCALE(n) = c1 ! INITIAL SCALING OF AMAT -- AMAT = DSCALE(row) * AMAT(i) @@ -1096,9 +1096,9 @@ SUBROUTINE IMSLINEARSUB_SCALE(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, & END DO ! SCALE EACH COLUMN SO THAT THE L-2 NORM IS 1 DO n = 1, NEQ - DSCALE2(n) = 0.0D0 + DSCALE2(n) = DZERO END DO - c2 = 0.0D0 + c2 = DZERO DO n = 1, NEQ i0 = IA(n) i1 = IA(n+1) - 1 @@ -1110,10 +1110,10 @@ SUBROUTINE IMSLINEARSUB_SCALE(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, & END DO DO n = 1, NEQ c2 = DSCALE2(n) - IF (c2.EQ.0.0D0) THEN - c2 = 1.0D0 + IF (c2.EQ.DZERO) THEN + c2 = DONE ELSE - c2 = 1.0D0 / SQRT( c2 ) + c2 = DONE / SQRT( c2 ) END IF DSCALE2(n) = c2 END DO @@ -1145,7 +1145,7 @@ SUBROUTINE IMSLINEARSUB_SCALE(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, & DO i = i0, i1 jc = JA(i) c2 = DSCALE2(jc) - AMAT(i) = ( 1.0D0 / c1 ) * AMAT(i) * ( 1.0D0 / c2 ) + AMAT(i) = ( DONE / c1 ) * AMAT(i) * ( DONE / c2 ) END DO ! UNSCALE X AND B c2 = DSCALE2(n) @@ -1204,7 +1204,7 @@ SUBROUTINE IMSLINEARSUB_PCU(IOUT, NJA, NEQ, NIAPC, NJAPC, IPC, RELAX, & & /,' ADDING SMALL VALUE TO PIVOT (IMSLINEARSUB_PCU)') ! + + + CODE + + + izero = 0 - delta = 0.0D0 + delta = DZERO PCSCALE: DO SELECT CASE(IPC) ! ILU0 AND MILU0 diff --git a/src/Utilities/Observation/Obs3.f90 b/src/Utilities/Observation/Obs3.f90 index ec93dece0f5..8b1cf8a9041 100644 --- a/src/Utilities/Observation/Obs3.f90 +++ b/src/Utilities/Observation/Obs3.f90 @@ -163,8 +163,8 @@ module ObsModule character(len=2*LENPACKAGENAME+4), public :: pkgName = '' character(len=LENFTYPE), public :: filtyp = '' logical, pointer, public :: active => null() - type(ObsContainerType), dimension(:), pointer, contiguous, public :: pakobs => null() - type(ObsDataType), dimension(:), pointer, contiguous, public :: obsData => null() + type(ObsContainerType), dimension(:), pointer, public :: pakobs => null() + type(ObsDataType), dimension(:), pointer, public :: obsData => null() ! -- Private members integer(I4B), private :: iprecision = 2 ! 2=double; 1=single integer(I4B), private :: idigits = 5 @@ -416,6 +416,21 @@ subroutine obs_da(this) deallocate(this%inputFilename) deallocate(this%obsData) ! + ! -- deallocate pakobs components and pakobs + if (associated(this%pakobs)) then + do i = 1, this%npakobs + if (allocated(this%pakobs(i)%obsrv%indxbnds)) then + deallocate(this%pakobs(i)%obsrv%indxbnds) + end if + ! + ! -- nullify pointer to this%pakobs(i)%obsrv + ! deallocate does not work in gfortran-8 since no + ! allocatable variables in obsrv except for indxbnds + nullify(this%pakobs(i)%obsrv) + end do + deallocate(this%pakobs) + end if + ! ! -- deallocate obsOutputList call this%obsOutputList%DeallocObsOutputList() deallocate(this%obsOutputList) @@ -423,17 +438,6 @@ subroutine obs_da(this) ! -- deallocate obslist call this%obslist%Clear() ! - ! -- deallocate pakobs - if (associated(this%pakobs)) then - do i = 1, size(this%pakobs) - if (allocated(this%pakobs(i)%obsrv%indxbnds)) then - deallocate(this%pakobs(i)%obsrv%indxbnds) - endif - deallocate(this%pakobs(i)%obsrv) - enddo - deallocate(this%pakobs) - endif - ! ! -- nullify nullify(this%inUnitObs) ! @@ -605,9 +609,9 @@ subroutine obs_ar2(this, dis) class(DisBaseType) :: dis ! -- local integer(I4B) :: i - type(ObsDataType), pointer :: obsDat => null() - character(len=LENOBSTYPE) :: obsTypeID - class(ObserveType), pointer :: obsrv => null() + type(ObsDataType), pointer :: obsDat => null() + character(len=LENOBSTYPE) :: obsTypeID + class(ObserveType), pointer :: obsrv => null() ! call this%read_observations() ! -- allocate and populate observations array @@ -927,7 +931,7 @@ subroutine get_obs_array(this, nObs, obsArray) ! -- dummy class(ObsType), intent(inout) :: this integer(I4B), intent(out) :: nObs - type(ObsContainerType), dimension(:), pointer, contiguous, intent(inout) :: obsArray + type(ObsContainerType), dimension(:), pointer, intent(inout) :: obsArray ! -- local ! nObs = this%get_num() diff --git a/src/Utilities/Observation/Observe.f90 b/src/Utilities/Observation/Observe.f90 index befac9520f0..e501dd87834 100644 --- a/src/Utilities/Observation/Observe.f90 +++ b/src/Utilities/Observation/Observe.f90 @@ -14,7 +14,7 @@ module ObserveModule use KindModule, only: DP, I4B use BaseDisModule, only: DisBaseType use ConstantsModule, only: LENBOUNDNAME, LENOBSNAME, LENOBSTYPE, & - MAXOBSTYPES, DNODATA + MAXOBSTYPES, DNODATA, DZERO use InputOutputModule, only: dclosetest, urword use ListModule, only: ListType use SimModule, only: store_warning, store_error, & @@ -42,16 +42,16 @@ module ObserveModule integer(I4B), public :: JaIndex = -2 ! -- members that can be used as needed by packages or models integer(I4B), public :: intPak1 = 0 - real(DP), public :: Obsdepth = 0.0d0 - real(DP), public :: dblPak1 = 0.0d0 + real(DP), public :: Obsdepth = DZERO + real(DP), public :: dblPak1 = DZERO ! -- indxbnds is intended to hold indices of position(s) in bound ! array of boundaries included in the observation. integer(I4B), allocatable, dimension(:), public :: indxbnds ! Set FormattedOutput false if output unit is opened for unformatted i/o logical, public :: FormattedOutput = .true. logical, public :: BndFound = .false. - real(DP), public :: CurrentTimeStepEndValue = 0.0d0 - real(DP), public :: CurrentTimeStepEndTime = 0.0d0 + real(DP), public :: CurrentTimeStepEndValue = DZERO + real(DP), public :: CurrentTimeStepEndTime = DZERO ! -- Members specific to continuous observations integer(I4B), public :: indxObsOutput = -1 ! -- Private members @@ -59,7 +59,7 @@ module ObserveModule contains ! -- Public procedures procedure, public :: ResetCurrent - procedure, public :: WriteTo + procedure, public :: WriteTo end type ObserveType type :: ObsDataType @@ -106,7 +106,7 @@ subroutine ResetCurrent(this) class(ObserveType), intent(inout) :: this ! ! -- Reset current value to zero. - this%CurrentTimeStepEndValue = 0.0d0 + this%CurrentTimeStepEndValue = DZERO return end subroutine ResetCurrent @@ -147,7 +147,7 @@ subroutine ConstructObservation(newObservation, defLine, numunit, & integer(I4B), intent(in) :: numunit ! Output unit number logical, intent(in) :: formatted ! Formatted output? integer(I4B), intent(in) :: indx ! Index in ObsOutput array - type(ObsDataType), dimension(:), pointer, contiguous, intent(in) :: obsData + type(ObsDataType), dimension(:), pointer, intent(in) :: obsData integer(I4B), intent(in) :: inunit ! -- local real(DP) :: r diff --git a/src/Utilities/TimeSeries/TimeArraySeries.f90 b/src/Utilities/TimeSeries/TimeArraySeries.f90 index bd37d9e7782..ac45a864841 100644 --- a/src/Utilities/TimeSeries/TimeArraySeries.f90 +++ b/src/Utilities/TimeSeries/TimeArraySeries.f90 @@ -2,8 +2,8 @@ module TimeArraySeriesModule use ArrayReadersModule, only: ReadArray use BlockParserModule, only: BlockParserType - use ConstantsModule, only: LINELENGTH, UNDEFINED, STEPWISE, LINEAR, & - LENTIMESERIESNAME, LENBIGLINE + use ConstantsModule, only: LINELENGTH, UNDEFINED, STEPWISE, LINEAR, & + LENTIMESERIESNAME, LENBIGLINE, DZERO, DONE use InputOutputModule, only: dclosetest, GetUnit, openfile use KindModule, only: DP, I4B use ListModule, only: ListType, ListNodeType @@ -30,7 +30,7 @@ module TimeArraySeriesModule integer(I4B), private :: inunit = 0 integer(I4B), private :: iout = 0 integer(I4B), private :: iMethod = UNDEFINED - real(DP), private :: sfac = 1.0d0 + real(DP), private :: sfac = DONE character(len=LINELENGTH), private :: dataFile = '' logical, private :: autoDeallocate = .true. type(ListType), pointer, private :: list => null() @@ -556,7 +556,7 @@ subroutine get_integrated_values(this, nvals, values, time0, time1) integer(I4B) :: i real(DP) :: area, currTime, nextTime, ratio0, ratio1, t0, & t01, t1, timediff, value, value0, value1, valuediff - logical :: done + logical :: ldone character(len=LINELENGTH) :: ermsg type(ListNodeType), pointer :: precNode => null() type(ListNodeType), pointer :: currNode => null(), nextNode => null() @@ -568,14 +568,14 @@ subroutine get_integrated_values(this, nvals, values, time0, time1) g12.5,' to ',g12.5) ! ------------------------------------------------------------------------------ ! - values = 0.0d0 - value = 0.0d0 - done = .false. - t1 = -1.0d0 + values = DZERO + value = DZERO + ldone = .false. + t1 = -DONE call this%get_latest_preceding_node(time0, precNode) if (associated(precNode)) then currNode => precNode - do while (.not. done) + do while (.not. ldone) currObj => currNode%GetItem() currRecord => CastAsTimeArrayType(currObj) currTime = currRecord%taTime @@ -640,12 +640,12 @@ subroutine get_integrated_values(this, nvals, values, time0, time1) endif else ! Current node time = time1 so should be done - done = .true. + ldone = .true. endif ! ! -- Are we done yet? if (t1 >= time1) then - done = .true. + ldone = .true. else if (.not. associated(currNode%nextNode)) then ! -- try to read the next array diff --git a/src/Utilities/TimeSeries/TimeSeries.f90 b/src/Utilities/TimeSeries/TimeSeries.f90 index 1c9824cb260..ded69b203cf 100644 --- a/src/Utilities/TimeSeries/TimeSeries.f90 +++ b/src/Utilities/TimeSeries/TimeSeries.f90 @@ -4,7 +4,7 @@ module TimeSeriesModule use BlockParserModule, only: BlockParserType use ConstantsModule, only: LINELENGTH, UNDEFINED, STEPWISE, LINEAR, & LINEAREND, LENTIMESERIESNAME, LENHUGELINE, & - DONE, DNODATA + DZERO, DONE, DNODATA use InputOutputModule, only: GetUnit, openfile, ParseLine, upcase, & dclosetest use ListModule, only: ListType, ListNodeType @@ -627,7 +627,7 @@ function get_integrated_value(this, time0, time1) ! -- local real(DP) :: area, currTime, nextTime, ratio0, ratio1, t0, t01, t1, & timediff, value, value0, value1, valuediff - logical :: done + logical :: ldone character(len=LINELENGTH) :: errmsg type(ListNodeType), pointer :: tslNodePreceding => null() type(ListNodeType), pointer :: currNode => null(), nextNode => null() @@ -639,19 +639,19 @@ function get_integrated_value(this, time0, time1) ' for time series "',a,'" for time interval: ',g12.5,' to ',g12.5) ! ------------------------------------------------------------------------------ ! - value = 0.0d0 - done = .false. - t1 = -1.0d0 + value = DZERO + ldone = .false. + t1 = -DONE call this%get_latest_preceding_node(time0, tslNodePreceding) if (associated(tslNodePreceding)) then currNode => tslNodePreceding - do while (.not. done) + do while (.not. ldone) currObj => currNode%GetItem() currRecord => CastAsTimeSeriesRecordType(currObj) currTime = currRecord%tsrTime if (dclosetest(currTime, time1, epsil)) then - ! Current node time = time1 so should be done - done = .true. + ! Current node time = time1 so should be ldone + ldone = .true. elseif (currTime < time1) then if (.not. associated(currNode%nextNode)) then ! -- try to read the next record @@ -696,7 +696,7 @@ function get_integrated_value(this, time0, time1) if (this%iMethod == LINEAR) then area = 0.5d0 * t01 * (value0 + value1) elseif (this%iMethod == LINEAREND) then - area = 0.0d0 + area = DZERO value = value1 endif end select @@ -707,9 +707,9 @@ function get_integrated_value(this, time0, time1) ! ! -- Are we done yet? if (t1 > time1) then - done = .true. + ldone = .true. elseif (dclosetest(t1, time1, epsil)) then - done = .true. + ldone = .true. else ! -- We are not done yet if (.not. associated(currNode%nextNode)) then diff --git a/src/Utilities/version.f90 b/src/Utilities/version.f90 index de02e8525ee..ddbd5e50925 100644 --- a/src/Utilities/version.f90 +++ b/src/Utilities/version.f90 @@ -3,7 +3,7 @@ module VersionModule public ! -- modflow 6 version integer(I4B), parameter :: IDEVELOPMODE = 1 - character(len=40), parameter :: VERSION = '6.0.3.5 08/27/2018' + character(len=40), parameter :: VERSION = '6.0.3.6 08/28/2018' character(len=10), parameter :: MFVNAM = ' 6' character(len=*), parameter :: MFTITLE = & 'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL' diff --git a/version.txt b/version.txt index c69ecc20327..681459b38fc 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ # MODFLOW 6 version file automatically created using...pre-commit.py -# created on...August 27, 2018 18:39:47 +# created on...August 28, 2018 17:19:34 # add some comments on how this version file # should be manually updated and used @@ -7,6 +7,6 @@ major = 6 minor = 0 micro = 3 -build = 5 -commit = 106 +build = 6 +commit = 107 From eb92fc021c39166176988ea9e35e4c19e7e59b29 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Tue, 28 Aug 2018 18:34:48 -0400 Subject: [PATCH 003/170] Cleanup of variable definitions. Still more cleaning required. --- README.md | 2 +- code.json | 18 +- doc/version.tex | 2 +- src/Model/GroundWaterFlow/gwf3dis8.f90 | 18 +- src/Model/GroundWaterFlow/gwf3disu8.f90 | 10 +- src/Model/GroundWaterFlow/gwf3disv8.f90 | 26 +-- src/Model/GroundWaterFlow/gwf3evt8.f90 | 12 +- src/Model/GroundWaterFlow/gwf3hfb8.f90 | 42 ++-- src/Model/GroundWaterFlow/gwf3ic8.f90 | 2 +- src/Model/GroundWaterFlow/gwf3lak8.f90 | 18 +- src/Model/GroundWaterFlow/gwf3maw8.f90 | 34 ++-- src/Model/GroundWaterFlow/gwf3mvr8.f90 | 26 +-- src/Model/GroundWaterFlow/gwf3npf8.f90 | 94 ++++----- src/Model/GroundWaterFlow/gwf3obs8.f90 | 6 +- src/Model/GroundWaterFlow/gwf3rch8.f90 | 8 +- src/Model/GroundWaterFlow/gwf3sfr8.f90 | 3 +- src/Model/GroundWaterFlow/gwf3sto8.f90 | 22 +-- src/Model/GroundWaterFlow/gwf3uzf8.f90 | 20 +- src/Model/ModelUtilities/BndUzfKinematic.f90 | 88 ++++----- src/Model/ModelUtilities/BoundaryPackage.f90 | 70 +++---- src/Solution/NumericalSolution.f90 | 26 +-- .../SparseMatrixSolver/ims8linear.f90 | 182 +++++++++--------- src/Utilities/Observation/Observe.f90 | 47 +++-- src/Utilities/TimeSeries/TimeArraySeries.f90 | 16 +- .../TimeSeries/TimeArraySeriesLink.f90 | 16 +- .../TimeSeries/TimeArraySeriesManager.f90 | 10 +- src/Utilities/TimeSeries/TimeSeries.f90 | 10 +- src/Utilities/version.f90 | 2 +- version.txt | 6 +- 29 files changed, 433 insertions(+), 403 deletions(-) diff --git a/README.md b/README.md index 99d938352e5..4d63360911e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Automated Testing Status on Travis-CI -### Version 6.0.3 develop — build 6 +### Version 6.0.3 develop — build 7 [![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6) ## Introduction diff --git a/code.json b/code.json index 16cc771ce1b..98b4c83f76c 100755 --- a/code.json +++ b/code.json @@ -1,24 +1,24 @@ [ { "status": "Release Candidate", - "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", + "languages": [ + "Fortran2008" + ], "repositoryURL": "https://code.usgs.gov/usgs/modflow/modflow6.git", - "laborHours": -1, "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md", "tags": [ "MODFLOW", "groundwater model" ], - "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", - "languages": [ - "Fortran2008" - ], + "vcs": "git", + "name": "modflow6", + "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", "contact": { "name": "Christian D. Langevin", "email": "langevin@usgs.gov" }, - "vcs": "git", - "version": "6.0.3.6", + "laborHours": -1, + "version": "6.0.3.7", "date": { "metadataLastUpdated": "2018-08-28" }, @@ -33,6 +33,6 @@ "usageType": "openSource" }, "homepageURL": "https://code.usgs.gov/usgs/modflow/modflow6/", - "name": "modflow6" + "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions." } ] \ No newline at end of file diff --git a/doc/version.tex b/doc/version.tex index 2def6fc3694..a66400082bc 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,3 +1,3 @@ -\newcommand{\modflowversion}{mf6.0.3.6} +\newcommand{\modflowversion}{mf6.0.3.7} \newcommand{\modflowdate}{August 28, 2018} \newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate} diff --git a/src/Model/GroundWaterFlow/gwf3dis8.f90 b/src/Model/GroundWaterFlow/gwf3dis8.f90 index 3786025fd46..c6056640a4d 100644 --- a/src/Model/GroundWaterFlow/gwf3dis8.f90 +++ b/src/Model/GroundWaterFlow/gwf3dis8.f90 @@ -16,15 +16,15 @@ module GwfDisModule public dis_cr, GwfDisType type, extends(DisBaseType) :: GwfDisType - integer(I4B), pointer :: nlay => null() ! number of layers - integer(I4B), pointer :: nrow => null() ! number of rows - integer(I4B), pointer :: ncol => null() ! number of columns - integer(I4B), dimension(:), pointer, contiguous :: nodereduced => null() ! (size:nodesuser)contains reduced nodenumber (size 0 if not reduced); -1 means vertical pass through, 0 is idomain = 0 - integer(I4B), dimension(:), pointer, contiguous :: nodeuser => null() ! (size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) - real(DP), dimension(:), pointer, contiguous :: delr => null() ! spacing along a row - real(DP), dimension(:), pointer, contiguous :: delc => null() ! spacing along a column - real(DP), dimension(:, :, :), pointer :: botm => null() ! top and bottom elevations for each cell (ncol, nrow, nlay) - integer(I4B), dimension(:, :, :), pointer :: idomain => null() ! idomain (ncol, nrow, nlay) + integer(I4B), pointer :: nlay => null() ! number of layers + integer(I4B), pointer :: nrow => null() ! number of rows + integer(I4B), pointer :: ncol => null() ! number of columns + integer(I4B), dimension(:), pointer, contiguous :: nodereduced => null() ! (size:nodesuser)contains reduced nodenumber (size 0 if not reduced); -1 means vertical pass through, 0 is idomain = 0 + integer(I4B), dimension(:), pointer, contiguous :: nodeuser => null() ! (size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) + real(DP), dimension(:), pointer, contiguous :: delr => null() ! spacing along a row + real(DP), dimension(:), pointer, contiguous :: delc => null() ! spacing along a column + real(DP), dimension(:, :, :), pointer :: botm => null() ! top and bottom elevations for each cell (ncol, nrow, nlay) + integer(I4B), dimension(:, :, :), pointer :: idomain => null() ! idomain (ncol, nrow, nlay) contains procedure :: dis_df => dis3d_df procedure :: dis_da => dis3d_da diff --git a/src/Model/GroundWaterFlow/gwf3disu8.f90 b/src/Model/GroundWaterFlow/gwf3disu8.f90 index 267b6f05976..b1f194bdf85 100644 --- a/src/Model/GroundWaterFlow/gwf3disu8.f90 +++ b/src/Model/GroundWaterFlow/gwf3disu8.f90 @@ -18,11 +18,11 @@ module GwfDisuModule public :: disu_cr type, extends(DisBaseType) :: GwfDisuType - integer(I4B), pointer :: nvert => null() ! number of x,y vertices - real(DP), dimension(:,:), pointer, contiguous :: vertices => null() ! cell vertices stored as 2d array of x and y - real(DP), dimension(:,:), pointer, contiguous :: cellxy => null() ! cell center stored as 2d array of x and y - integer(I4B), dimension(:), pointer, contiguous :: iavert => null() ! cell vertex pointer ia array - integer(I4B), dimension(:), pointer, contiguous :: javert => null() ! cell vertex pointer ja array + integer(I4B), pointer :: nvert => null() ! number of x,y vertices + real(DP), dimension(:,:), pointer, contiguous :: vertices => null() ! cell vertices stored as 2d array of x and y + real(DP), dimension(:,:), pointer, contiguous :: cellxy => null() ! cell center stored as 2d array of x and y + integer(I4B), dimension(:), pointer, contiguous :: iavert => null() ! cell vertex pointer ia array + integer(I4B), dimension(:), pointer, contiguous:: javert => null() ! cell vertex pointer ja array contains procedure :: dis_df => disu_df procedure :: dis_da => disu_da diff --git a/src/Model/GroundWaterFlow/gwf3disv8.f90 b/src/Model/GroundWaterFlow/gwf3disv8.f90 index 2d3861620ae..8f097fd4cea 100644 --- a/src/Model/GroundWaterFlow/gwf3disv8.f90 +++ b/src/Model/GroundWaterFlow/gwf3disv8.f90 @@ -17,19 +17,19 @@ module GwfDisvModule public disv_cr, GwfDisvType type, extends(DisBaseType) :: GwfDisvType - integer(I4B), pointer :: nlay => null() ! number of layers - integer(I4B), pointer :: ncpl => null() ! number of cells per layer - integer(I4B), pointer :: nvert => null() ! number of x,y vertices - integer(I4B), dimension(:), pointer, contiguous :: nodereduced => null() ! (size:nodesuser)contains reduced nodenumber (size 0 if not reduced); -1 means vertical pass through, 0 is idomain = 0 - integer(I4B), dimension(:), pointer, contiguous :: nodeuser => null() ! (size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) - real(DP), dimension(:,:), pointer, contiguous :: vertices => null() ! cell vertices stored as 2d array of x and y - real(DP), dimension(:,:), pointer, contiguous :: cellxy => null() ! cell center stored as 2d array of x and y - integer(I4B), dimension(:), pointer, contiguous :: iavert => null() ! cell vertex pointer ia array - integer(I4B), dimension(:), pointer, contiguous :: javert => null() ! cell vertex pointer ja array - real(DP), dimension(:, :, :), pointer :: botm => null() ! top and bottom elevations for each cell (ncpl, 1, 0:nlay) - integer(I4B), dimension(:, :, :), pointer :: idomain => null() ! idomain (ncpl, 1, nlay) - type(DisvGeomType) :: cell1 ! cell object used to calculate geometric properties - type(DisvGeomType) :: cell2 ! cell object used to calculate geometric properties + integer(I4B), pointer :: nlay => null() ! number of layers + integer(I4B), pointer :: ncpl => null() ! number of cells per layer + integer(I4B), pointer :: nvert => null() ! number of x,y vertices + integer(I4B), dimension(:), pointer, contiguous :: nodereduced => null() ! (size:nodesuser)contains reduced nodenumber (size 0 if not reduced); -1 means vertical pass through, 0 is idomain = 0 + integer(I4B), dimension(:), pointer, contiguous :: nodeuser => null() ! (size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) + real(DP), dimension(:,:), pointer, contiguous :: vertices => null() ! cell vertices stored as 2d array of x and y + real(DP), dimension(:,:), pointer, contiguous :: cellxy => null() ! cell center stored as 2d array of x and y + integer(I4B), dimension(:), pointer, contiguous :: iavert => null() ! cell vertex pointer ia array + integer(I4B), dimension(:), pointer, contiguous :: javert => null() ! cell vertex pointer ja array + real(DP), dimension(:, :, :), pointer :: botm => null() ! top and bottom elevations for each cell (ncpl, 1, 0:nlay) + integer(I4B), dimension(:, :, :), pointer :: idomain => null() ! idomain (ncpl, 1, nlay) + type(DisvGeomType) :: cell1 ! cell object used to calculate geometric properties + type(DisvGeomType) :: cell2 ! cell object used to calculate geometric properties contains procedure :: dis_df => disv_df procedure :: dis_da => disv_da diff --git a/src/Model/GroundWaterFlow/gwf3evt8.f90 b/src/Model/GroundWaterFlow/gwf3evt8.f90 index e877f6edd0c..af3cdc3d021 100644 --- a/src/Model/GroundWaterFlow/gwf3evt8.f90 +++ b/src/Model/GroundWaterFlow/gwf3evt8.f90 @@ -20,13 +20,13 @@ module EvtModule ! type, extends(BndType) :: EvtType ! -- logicals - logical, private :: segsdefined = .true. - logical, private :: fixed_cell = .false. - logical, private :: read_as_arrays = .false. - logical, private :: surfratespecified = .false. + logical, private :: segsdefined = .true. + logical, private :: fixed_cell = .false. + logical, private :: read_as_arrays = .false. + logical, private:: surfratespecified = .false. ! -- integers - integer(I4B), pointer :: inievt => null() - integer(I4B), pointer, private :: nseg => null() + integer(I4B), pointer :: inievt => null() + integer(I4B), pointer, private :: nseg => null() ! -- arrays integer(I4B), dimension(:), pointer, contiguous :: nodesontop => null() contains diff --git a/src/Model/GroundWaterFlow/gwf3hfb8.f90 b/src/Model/GroundWaterFlow/gwf3hfb8.f90 index d7211d286c3..6acfa00479a 100644 --- a/src/Model/GroundWaterFlow/gwf3hfb8.f90 +++ b/src/Model/GroundWaterFlow/gwf3hfb8.f90 @@ -14,27 +14,27 @@ module GwfHfbModule public :: hfb_cr type, extends(NumericalPackageType) :: GwfHfbType - integer(I4B), pointer :: maxhfb => null() !max number of hfb's - integer(I4B), pointer :: nhfb => null() !number of hfb's - integer(I4B), dimension(:), pointer, contiguous :: noden => null() !first cell - integer(I4B), dimension(:), pointer, contiguous :: nodem => null() !second cell - integer(I4B), dimension(:), pointer, contiguous :: idxloc => null() !position in model ja - real(DP), dimension(:), pointer, contiguous :: hydchr => null() !hydraulic characteristic of the barrier - real(DP), dimension(:), pointer, contiguous :: csatsav => null() !value of condsat prior to hfb modification - real(DP), dimension(:), pointer, contiguous :: condsav => null() !saved conductance of combined npf and hfb - type(Xt3dType), pointer :: xt3d => null() !pointer to xt3d object - ! - integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound - integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !pointer to model icelltype - integer(I4B), dimension(:), pointer, contiguous :: ihc => null() !pointer to model ihc - integer(I4B), dimension(:), pointer, contiguous :: ia => null() !pointer to model ia - integer(I4B), dimension(:), pointer, contiguous :: ja => null() !pointer to model ja - integer(I4B), dimension(:), pointer, contiguous :: jas => null() !pointer to model jas - integer(I4B), dimension(:), pointer, contiguous :: isym => null() !pointer to model isym - real(DP), dimension(:), pointer, contiguous :: condsat => null() !pointer to model condsat - real(DP), dimension(:), pointer, contiguous :: top => null() !pointer to model top - real(DP), dimension(:), pointer, contiguous :: bot => null() !pointer to model bot - real(DP), dimension(:), pointer, contiguous :: hwva => null() !pointer to model hwva + integer(I4B), pointer :: maxhfb => null() !max number of hfb's + integer(I4B), pointer :: nhfb => null() !number of hfb's + integer(I4B), dimension(:), pointer, contiguous :: noden => null() !first cell + integer(I4B), dimension(:), pointer, contiguous :: nodem => null() !second cell + integer(I4B), dimension(:), pointer, contiguous :: idxloc => null() !position in model ja + real(DP), dimension(:), pointer, contiguous :: hydchr => null() !hydraulic characteristic of the barrier + real(DP), dimension(:), pointer, contiguous :: csatsav => null() !value of condsat prior to hfb modification + real(DP), dimension(:), pointer, contiguous :: condsav => null() !saved conductance of combined npf and hfb + type(Xt3dType), pointer :: xt3d => null() !pointer to xt3d object + ! + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound + integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !pointer to model icelltype + integer(I4B), dimension(:), pointer, contiguous :: ihc => null() !pointer to model ihc + integer(I4B), dimension(:), pointer, contiguous :: ia => null() !pointer to model ia + integer(I4B), dimension(:), pointer, contiguous :: ja => null() !pointer to model ja + integer(I4B), dimension(:), pointer, contiguous :: jas => null() !pointer to model jas + integer(I4B), dimension(:), pointer, contiguous :: isym => null() !pointer to model isym + real(DP), dimension(:), pointer, contiguous :: condsat => null() !pointer to model condsat + real(DP), dimension(:), pointer, contiguous :: top => null() !pointer to model top + real(DP), dimension(:), pointer, contiguous :: bot => null() !pointer to model bot + real(DP), dimension(:), pointer, contiguous :: hwva => null() !pointer to model hwva contains procedure :: hfb_ar procedure :: hfb_rp diff --git a/src/Model/GroundWaterFlow/gwf3ic8.f90 b/src/Model/GroundWaterFlow/gwf3ic8.f90 index 268b44c154b..6f22c5b4169 100644 --- a/src/Model/GroundWaterFlow/gwf3ic8.f90 +++ b/src/Model/GroundWaterFlow/gwf3ic8.f90 @@ -11,7 +11,7 @@ module GwfIcModule public :: ic_cr type, extends(NumericalPackageType) :: GwfIcType - real(DP), dimension(:), pointer, contiguous :: strt => null() ! starting head + real(DP), dimension(:), pointer, contiguous :: strt => null() ! starting head contains procedure :: ic_ar procedure :: ic_da diff --git a/src/Model/GroundWaterFlow/gwf3lak8.f90 b/src/Model/GroundWaterFlow/gwf3lak8.f90 index c7fbd9ef8c4..0c9a9ccbc70 100644 --- a/src/Model/GroundWaterFlow/gwf3lak8.f90 +++ b/src/Model/GroundWaterFlow/gwf3lak8.f90 @@ -77,17 +77,20 @@ module LakModule real(DP), dimension(:), pointer, contiguous :: laketop => null() real(DP), dimension(:), pointer, contiguous :: lakebot => null() real(DP), dimension(:), pointer, contiguous :: sareamax => null() - character(len=LENBOUNDNAME), dimension(:), pointer, contiguous :: lakename => null() + character(len=LENBOUNDNAME), dimension(:), pointer, & + contiguous :: lakename => null() character (len=8), dimension(:), pointer, contiguous :: status => null() real(DP), dimension(:), pointer, contiguous :: avail => null() real(DP), dimension(:), pointer, contiguous :: lkgwsink => null() ! -- time series aware data type (MemoryTSType), dimension(:), pointer, contiguous :: stage => null() type (MemoryTSType), dimension(:), pointer, contiguous :: rainfall => null() - type (MemoryTSType), dimension(:), pointer, contiguous :: evaporation => null() + type (MemoryTSType), dimension(:), pointer, & + contiguous :: evaporation => null() type (MemoryTSType), dimension(:), pointer, contiguous :: runoff => null() type (MemoryTSType), dimension(:), pointer, contiguous :: inflow => null() - type (MemoryTSType), dimension(:), pointer, contiguous :: withdrawal => null() + type (MemoryTSType), dimension(:), pointer, & + contiguous :: withdrawal => null() type (MemoryTSType), dimension(:), pointer, contiguous :: lauxvar => null() ! ! -- table data @@ -145,7 +148,8 @@ module LakModule integer(I4B), dimension(:), pointer, contiguous :: lakeout => null() integer(I4B), dimension(:), pointer, contiguous :: iouttype => null() type (MemoryTSType), dimension(:), pointer, contiguous :: outrate => null() - type (MemoryTSType), dimension(:), pointer, contiguous :: outinvert => null() + type (MemoryTSType), dimension(:), pointer, & + contiguous :: outinvert => null() type (MemoryTSType), dimension(:), pointer, contiguous :: outwidth => null() type (MemoryTSType), dimension(:), pointer, contiguous :: outrough => null() type (MemoryTSType), dimension(:), pointer, contiguous :: outslope => null() @@ -167,9 +171,9 @@ module LakModule integer(I4B), pointer :: gwfik33 => NULL() ! ! -- package x, xold, and ibound - integer(I4B), dimension(:), pointer, contiguous :: iboundpak => null() !package ibound - real(DP), dimension(:), pointer, contiguous :: xnewpak => null() !package x vector - real(DP), dimension(:), pointer, contiguous :: xoldpak => null() !package xold vector + integer(I4B), dimension(:), pointer, contiguous :: iboundpak => null() !package ibound + real(DP), dimension(:), pointer, contiguous :: xnewpak => null() !package x vector + real(DP), dimension(:), pointer, contiguous :: xoldpak => null() !package xold vector ! ! -- type bound procedures contains diff --git a/src/Model/GroundWaterFlow/gwf3maw8.f90 b/src/Model/GroundWaterFlow/gwf3maw8.f90 index 383a55ab78f..ed27b78439a 100644 --- a/src/Model/GroundWaterFlow/gwf3maw8.f90 +++ b/src/Model/GroundWaterFlow/gwf3maw8.f90 @@ -78,10 +78,14 @@ module mawmodule public :: maw_create ! type, extends(BndType) :: MawType + ! ! -- scalars ! -- characters + ! character(len=16), dimension(:), pointer, contiguous :: cmawbudget => NULL() - character(len=LENAUXNAME), dimension(:), pointer, contiguous :: cauxcbc => NULL() + character(len=LENAUXNAME), dimension(:), pointer, & + contiguous :: cauxcbc => NULL() + ! ! -- integers integer(I4B), pointer :: iprhed => null() integer(I4B), pointer :: iheadout => null() @@ -95,33 +99,41 @@ module mawmodule integer(I4B), pointer :: ishutoffcnt => NULL() integer(I4B), pointer :: ieffradopt => NULL() real(DP), pointer :: satomega => null() + ! ! -- for budgets integer(I4B), pointer :: bditems => NULL() + ! ! -- for underrelaxation of estimated well q if using shutoff real(DP), pointer :: theta => NULL() real(DP), pointer :: kappa => NULL() + ! ! -- derived types type(BudgetType), pointer :: budget => NULL() type(MawWellType), dimension(:), pointer, contiguous :: mawwells => NULL() + ! ! -- pointer to gwf iss and gwf hk integer(I4B), pointer :: gwfiss => NULL() real(DP), dimension(:), pointer, contiguous :: gwfk11 => NULL() real(DP), dimension(:), pointer, contiguous :: gwfk22 => NULL() integer(I4B), pointer :: gwfik22 => NULL() real(DP), dimension(:), pointer, contiguous :: gwfsat => NULL() + ! ! -- arrays for handling the rows added to the solution matrix - integer(I4B), dimension(:), pointer, contiguous :: idxlocnode => null() !map position in global rhs and x array of pack entry - integer(I4B), dimension(:), pointer, contiguous :: idxdglo => null() !map position in global array of package diagonal row entries - integer(I4B), dimension(:), pointer, contiguous :: idxoffdglo => null() !map position in global array of package off diagonal row entries - integer(I4B), dimension(:), pointer, contiguous :: idxsymdglo => null() !map position in global array of package diagonal entries to model rows - integer(I4B), dimension(:), pointer, contiguous :: idxsymoffdglo => null() !map position in global array of package off diagonal entries to model rows - integer(I4B), dimension(:), pointer, contiguous :: iboundpak => null() !package ibound - real(DP), dimension(:), pointer, contiguous :: xnewpak => null() !package x vector - real(DP), dimension(:), pointer, contiguous :: xoldpak => null() !package xold vector - real(DP), dimension(:), pointer, contiguous :: cterm => null() !package c vector + integer(I4B), dimension(:), pointer, contiguous :: idxlocnode => null() !map position in global rhs and x array of pack entry + integer(I4B), dimension(:), pointer, contiguous :: idxdglo => null() !map position in global array of package diagonal row entries + integer(I4B), dimension(:), pointer, contiguous :: idxoffdglo => null() !map position in global array of package off diagonal row entries + integer(I4B), dimension(:), pointer, contiguous :: idxsymdglo => null() !map position in global array of package diagonal entries to model rows + integer(I4B), dimension(:), pointer, contiguous :: idxsymoffdglo => null() !map position in global array of package off diagonal entries to model rows + integer(I4B), dimension(:), pointer, contiguous :: iboundpak => null() !package ibound + real(DP), dimension(:), pointer, contiguous :: xnewpak => null() !package x vector + real(DP), dimension(:), pointer, contiguous :: xoldpak => null() !package xold vector + real(DP), dimension(:), pointer, contiguous :: cterm => null() !package c vector + ! ! -- vector data (start of flattening for future removal of MawWellType) - character (len=LENBOUNDNAME), dimension(:), pointer, contiguous :: cmawname => null() + character (len=LENBOUNDNAME), dimension(:), pointer, & + contiguous :: cmawname => null() integer(I4B), dimension(:), pointer, contiguous :: idxmawconn => null() + ! ! -- imap vector integer(I4B), dimension(:), pointer, contiguous :: imap => null() ! diff --git a/src/Model/GroundWaterFlow/gwf3mvr8.f90 b/src/Model/GroundWaterFlow/gwf3mvr8.f90 index 89a8f60c0a0..aa0d4f4381c 100644 --- a/src/Model/GroundWaterFlow/gwf3mvr8.f90 +++ b/src/Model/GroundWaterFlow/gwf3mvr8.f90 @@ -106,21 +106,21 @@ module GwfMvrModule public :: GwfMvrType, mvr_cr type, extends(NumericalPackageType) :: GwfMvrType - integer(I4B), pointer :: ibudgetout => null() !binary budget output file - integer(I4B), pointer :: maxmvr => null() !max number of movers to be specified - integer(I4B), pointer :: maxpackages => null() !max number of packages to be specified - integer(I4B), pointer :: maxcomb => null() !max number of combination of packages - integer(I4B), pointer :: nmvr => null() !number of movers for current stress period - integer(I4B), pointer :: iexgmvr => null() !flag to indicate mover is for an exchange (not for a single model) - integer(I4B), pointer :: imodelnames => null() !flag to indicate package input file has model names in it - real(DP), pointer :: omega => null() !temporal weighting factor (not presently used) - integer(I4B), dimension(:), pointer, contiguous :: ientries => null() !number of entries for each combination + integer(I4B), pointer :: ibudgetout => null() !binary budget output file + integer(I4B), pointer :: maxmvr => null() !max number of movers to be specified + integer(I4B), pointer :: maxpackages => null() !max number of packages to be specified + integer(I4B), pointer :: maxcomb => null() !max number of combination of packages + integer(I4B), pointer :: nmvr => null() !number of movers for current stress period + integer(I4B), pointer :: iexgmvr => null() !flag to indicate mover is for an exchange (not for a single model) + integer(I4B), pointer :: imodelnames => null() !flag to indicate package input file has model names in it + real(DP), pointer :: omega => null() !temporal weighting factor (not presently used) + integer(I4B), dimension(:), pointer, contiguous :: ientries => null() !number of entries for each combination character(len=LENORIGIN+1), & - dimension(:), pointer, contiguous :: pakorigins !array of model//package names + dimension(:), pointer, contiguous :: pakorigins !array of model//package names character(len=LENPACKAGENAME), & - dimension(:), pointer, contiguous :: paknames !array of package names - type(MvrType), dimension(:), pointer, contiguous :: mvr => null() !array of movers - type(BudgetType), pointer :: budget => null() !mover budget object + dimension(:), pointer, contiguous :: paknames !array of package names + type(MvrType), dimension(:), pointer, contiguous :: mvr => null() !array of movers + type(BudgetType), pointer :: budget => null() !mover budget object contains procedure :: mvr_ar procedure :: mvr_rp diff --git a/src/Model/GroundWaterFlow/gwf3npf8.f90 b/src/Model/GroundWaterFlow/gwf3npf8.f90 index e1346727f64..b26f9ed57cc 100644 --- a/src/Model/GroundWaterFlow/gwf3npf8.f90 +++ b/src/Model/GroundWaterFlow/gwf3npf8.f90 @@ -25,55 +25,55 @@ module GwfNpfModule type, extends(NumericalPackageType) :: GwfNpfType - type(GwfIcType), pointer :: ic => null() ! initial conditions object - type(Xt3dType), pointer :: xt3d => null() ! xt3d pointer - integer(I4B), dimension(:), pointer, contiguous :: ibound => null() ! pointer to model ibound - real(DP), dimension(:), pointer, contiguous :: hnew => null() ! pointer to model xnew - integer(I4B), pointer :: ixt3d => null() ! xt3d flag (0 is off, 1 is lhs, 2 is rhs) - integer(I4B), pointer :: iperched => null() ! vertical flow corrections if 1 - integer(I4B), pointer :: ivarcv => null() ! CV is function of water table - integer(I4B), pointer :: idewatcv => null() ! CV may be a discontinuous function of water table - integer(I4B), pointer :: ithickstrt => null() ! thickstrt option flag - integer(I4B), pointer :: igwfnewtonur => null() ! newton head dampening using node bottom option flag - integer(I4B), pointer :: iusgnrhc => null() ! MODFLOW-USG saturation calculation option flag - integer(I4B), pointer :: inwtupw => null() ! MODFLOW-NWT upstream weighting option flag - integer(I4B), pointer :: icalcspdis => null() ! Calculate specific discharge at cell centers - integer(I4B), pointer :: isavspdis => null() ! Save specific discharge at cell centers - real(DP), pointer :: hnoflo => null() ! default is 1.e30 - real(DP), pointer :: satomega => null() ! newton-raphson saturation omega - integer(I4B),pointer :: irewet => null() ! rewetting (0:off, 1:on) - integer(I4B),pointer :: iwetit => null() ! wetting interval (default is 1) - integer(I4B),pointer :: ihdwet => null() ! (0 or not 0) - integer(I4B), pointer :: icellavg => null() ! harmonic(0), logarithmic(1), or arithmetic thick-log K (2) - real(DP), pointer :: wetfct => null() ! wetting factor - real(DP), pointer :: hdry => null() ! default is -1.d30 - integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() ! confined (0) or convertible (1) + type(GwfIcType), pointer :: ic => null() ! initial conditions object + type(Xt3dType), pointer :: xt3d => null() ! xt3d pointer + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() ! pointer to model ibound + real(DP), dimension(:), pointer, contiguous :: hnew => null() ! pointer to model xnew + integer(I4B), pointer :: ixt3d => null() ! xt3d flag (0 is off, 1 is lhs, 2 is rhs) + integer(I4B), pointer :: iperched => null() ! vertical flow corrections if 1 + integer(I4B), pointer :: ivarcv => null() ! CV is function of water table + integer(I4B), pointer :: idewatcv => null() ! CV may be a discontinuous function of water table + integer(I4B), pointer :: ithickstrt => null() ! thickstrt option flag + integer(I4B), pointer :: igwfnewtonur => null() ! newton head dampening using node bottom option flag + integer(I4B), pointer :: iusgnrhc => null() ! MODFLOW-USG saturation calculation option flag + integer(I4B), pointer :: inwtupw => null() ! MODFLOW-NWT upstream weighting option flag + integer(I4B), pointer :: icalcspdis => null() ! Calculate specific discharge at cell centers + integer(I4B), pointer :: isavspdis => null() ! Save specific discharge at cell centers + real(DP), pointer :: hnoflo => null() ! default is 1.e30 + real(DP), pointer :: satomega => null() ! newton-raphson saturation omega + integer(I4B),pointer :: irewet => null() ! rewetting (0:off, 1:on) + integer(I4B),pointer :: iwetit => null() ! wetting interval (default is 1) + integer(I4B),pointer :: ihdwet => null() ! (0 or not 0) + integer(I4B), pointer :: icellavg => null() ! harmonic(0), logarithmic(1), or arithmetic thick-log K (2) + real(DP), pointer :: wetfct => null() ! wetting factor + real(DP), pointer :: hdry => null() ! default is -1.d30 + integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() ! confined (0) or convertible (1) ! ! K properties - real(DP), dimension(:), pointer, contiguous :: k11 => null() ! hydraulic conductivity; if anisotropic, then this is Kx prior to rotation - real(DP), dimension(:), pointer, contiguous :: k22 => null() ! hydraulic conductivity; if specified then this is Ky prior to rotation - real(DP), dimension(:), pointer, contiguous :: k33 => null() ! hydraulic conductivity; if specified then this is Kz prior to rotation - integer(I4B), pointer :: ik22 => null() ! flag that k22 is specified - integer(I4B), pointer :: ik33 => null() ! flag that k33 is specified - integer(I4B), pointer :: iangle1 => null() ! flag to indicate angle1 was read - integer(I4B), pointer :: iangle2 => null() ! flag to indicate angle2 was read - integer(I4B), pointer :: iangle3 => null() ! flag to indicate angle3 was read - real(DP), dimension(:), pointer, contiguous :: angle1 => null() ! k ellipse rotation in xy plane around z axis (yaw) - real(DP), dimension(:), pointer, contiguous :: angle2 => null() ! k ellipse rotation up from xy plane around y axis (pitch) - real(DP), dimension(:), pointer, contiguous :: angle3 => null() ! k tensor rotation around x axis (roll) - ! - real(DP), dimension(:), pointer, contiguous :: wetdry => null() ! wetdry array - real(DP), dimension(:), pointer, contiguous :: sat => null() ! saturation (0. to 1.) for each cell - real(DP), dimension(:), pointer, contiguous :: condsat => null() ! saturated conductance (symmetric array) - real(DP), pointer :: satmin => null() ! minimum saturated thickness - integer(I4B), dimension(:), pointer, contiguous :: ibotnode => null() ! bottom node used if igwfnewtonur /= 0 - ! - real(DP), dimension(:, :), pointer, contiguous :: spdis => null() ! specific discharge : qx, qy, qz (nodes, 3) - integer(I4B), pointer :: nedges => null() ! number of cell edges - integer(I4B), pointer :: lastedge => null() ! last edge number - integer(I4B), dimension(:), pointer, contiguous :: nodedge => null() ! array of node numbers that have edges - integer(I4B), dimension(:), pointer, contiguous :: ihcedge => null() ! edge type (horizontal or vertical) - real(DP), dimension(:, :), pointer, contiguous :: propsedge => null() ! edge properties (Q, area, nx, ny, distance) + real(DP), dimension(:), pointer, contiguous :: k11 => null() ! hydraulic conductivity; if anisotropic, then this is Kx prior to rotation + real(DP), dimension(:), pointer, contiguous :: k22 => null() ! hydraulic conductivity; if specified then this is Ky prior to rotation + real(DP), dimension(:), pointer, contiguous :: k33 => null() ! hydraulic conductivity; if specified then this is Kz prior to rotation + integer(I4B), pointer :: ik22 => null() ! flag that k22 is specified + integer(I4B), pointer :: ik33 => null() ! flag that k33 is specified + integer(I4B), pointer :: iangle1 => null() ! flag to indicate angle1 was read + integer(I4B), pointer :: iangle2 => null() ! flag to indicate angle2 was read + integer(I4B), pointer :: iangle3 => null() ! flag to indicate angle3 was read + real(DP), dimension(:), pointer, contiguous :: angle1 => null() ! k ellipse rotation in xy plane around z axis (yaw) + real(DP), dimension(:), pointer, contiguous :: angle2 => null() ! k ellipse rotation up from xy plane around y axis (pitch) + real(DP), dimension(:), pointer, contiguous :: angle3 => null() ! k tensor rotation around x axis (roll) + ! + real(DP), dimension(:), pointer, contiguous :: wetdry => null() ! wetdry array + real(DP), dimension(:), pointer, contiguous :: sat => null() ! saturation (0. to 1.) for each cell + real(DP), dimension(:), pointer, contiguous :: condsat => null() ! saturated conductance (symmetric array) + real(DP), pointer :: satmin => null() ! minimum saturated thickness + integer(I4B), dimension(:), pointer, contiguous :: ibotnode => null() ! bottom node used if igwfnewtonur /= 0 + ! + real(DP), dimension(:, :), pointer, contiguous :: spdis => null() ! specific discharge : qx, qy, qz (nodes, 3) + integer(I4B), pointer :: nedges => null() ! number of cell edges + integer(I4B), pointer :: lastedge => null() ! last edge number + integer(I4B), dimension(:), pointer, contiguous :: nodedge => null() ! array of node numbers that have edges + integer(I4B), dimension(:), pointer, contiguous :: ihcedge => null() ! edge type (horizontal or vertical) + real(DP), dimension(:, :), pointer, contiguous :: propsedge => null() ! edge properties (Q, area, nx, ny, distance) ! contains procedure :: npf_df diff --git a/src/Model/GroundWaterFlow/gwf3obs8.f90 b/src/Model/GroundWaterFlow/gwf3obs8.f90 index 769794c39df..8cca9189610 100644 --- a/src/Model/GroundWaterFlow/gwf3obs8.f90 +++ b/src/Model/GroundWaterFlow/gwf3obs8.f90 @@ -15,9 +15,9 @@ module GwfObsModule type, extends(ObsType) :: GwfObsType ! -- Private members - type(GwfIcType), pointer, private :: ic => null() ! initial conditions - real(DP), dimension(:), pointer, contiguous, private :: x => null() ! head - real(DP), dimension(:), pointer, contiguous, private :: flowja => null() ! intercell flows + type(GwfIcType), pointer, private :: ic => null() ! initial conditions + real(DP), dimension(:), pointer, contiguous, private :: x => null() ! head + real(DP), dimension(:), pointer, contiguous, private :: flowja => null() ! intercell flows contains ! -- Public procedures procedure, public :: gwf_obs_ar diff --git a/src/Model/GroundWaterFlow/gwf3rch8.f90 b/src/Model/GroundWaterFlow/gwf3rch8.f90 index d8afae773b4..1cc834577b9 100644 --- a/src/Model/GroundWaterFlow/gwf3rch8.f90 +++ b/src/Model/GroundWaterFlow/gwf3rch8.f90 @@ -19,10 +19,10 @@ module RchModule character(len=LENPACKAGENAME) :: text = ' RCH' ! type, extends(BndType) :: RchType - integer(I4B), pointer :: inirch => NULL() - integer(I4B), dimension(:), pointer, contiguous :: nodesontop => NULL() ! User provided cell numbers; nodelist is cells where recharge is applied) - logical, private :: fixed_cell = .false. - logical, private :: read_as_arrays = .false. + integer(I4B), pointer :: inirch => NULL() + integer(I4B), dimension(:), pointer, contiguous :: nodesontop => NULL() ! User provided cell numbers; nodelist is cells where recharge is applied) + logical, private :: fixed_cell = .false. + logical, private :: read_as_arrays = .false. contains procedure :: rch_allocate_scalars procedure :: bnd_options => rch_options diff --git a/src/Model/GroundWaterFlow/gwf3sfr8.f90 b/src/Model/GroundWaterFlow/gwf3sfr8.f90 index 9aeeef3aaee..4f94fccc3eb 100644 --- a/src/Model/GroundWaterFlow/gwf3sfr8.f90 +++ b/src/Model/GroundWaterFlow/gwf3sfr8.f90 @@ -123,7 +123,8 @@ module SfrModule type(BudgetType), pointer :: budget => NULL() type(SfrDataType), dimension(:), pointer, contiguous :: reaches => NULL() type(sparsematrix), pointer :: sparse => null() - type(RectangularChGeometryType), dimension(:), pointer, contiguous :: geo => null() + type(RectangularChGeometryType), dimension(:), pointer, & + contiguous :: geo => null() ! -- type bound procedures contains procedure :: sfr_allocate_scalars diff --git a/src/Model/GroundWaterFlow/gwf3sto8.f90 b/src/Model/GroundWaterFlow/gwf3sto8.f90 index b0e47e7113b..974c9e4b909 100644 --- a/src/Model/GroundWaterFlow/gwf3sto8.f90 +++ b/src/Model/GroundWaterFlow/gwf3sto8.f90 @@ -16,17 +16,17 @@ module GwfStoModule [' STO-SS', ' STO-SY'] type, extends(NumericalPackageType) :: GwfStoType - integer(I4B), pointer :: isfac => null() !indicates if ss is read as storativity - integer(I4B), pointer :: isseg => null() !indicates if ss is 0 below the top of a layer - integer(I4B), pointer :: iss => null() !steady state flag - integer(I4B), pointer :: iusesy => null() !flag set if any cell is convertible (0, 1) - integer(I4B), dimension(:), pointer, contiguous :: iconvert => null() !confined (0) or convertible (1) - real(DP),dimension(:), pointer, contiguous :: sc1 => null() !primary storage capacity (when cell is fully saturated) - real(DP),dimension(:), pointer, contiguous :: sc2 => null() !secondary storage capacity (when cell is partially saturated) - real(DP), dimension(:), pointer, contiguous :: strgss => null() !vector of specific storage rates - real(DP), dimension(:), pointer, contiguous :: strgsy => null() !vector of specific yield rates - integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound - real(DP), pointer :: satomega => null() !newton-raphson saturation omega + integer(I4B), pointer :: isfac => null() !indicates if ss is read as storativity + integer(I4B), pointer :: isseg => null() !indicates if ss is 0 below the top of a layer + integer(I4B), pointer :: iss => null() !steady state flag + integer(I4B), pointer :: iusesy => null() !flag set if any cell is convertible (0, 1) + integer(I4B), dimension(:), pointer, contiguous :: iconvert => null() !confined (0) or convertible (1) + real(DP),dimension(:), pointer, contiguous :: sc1 => null() !primary storage capacity (when cell is fully saturated) + real(DP),dimension(:), pointer, contiguous :: sc2 => null() !secondary storage capacity (when cell is partially saturated) + real(DP), dimension(:), pointer, contiguous :: strgss => null() !vector of specific storage rates + real(DP), dimension(:), pointer, contiguous :: strgsy => null() !vector of specific yield rates + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound + real(DP), pointer :: satomega => null() !newton-raphson saturation omega contains procedure :: sto_ar procedure :: sto_rp diff --git a/src/Model/GroundWaterFlow/gwf3uzf8.f90 b/src/Model/GroundWaterFlow/gwf3uzf8.f90 index 5217fbfc9f5..3ec69ab4360 100644 --- a/src/Model/GroundWaterFlow/gwf3uzf8.f90 +++ b/src/Model/GroundWaterFlow/gwf3uzf8.f90 @@ -38,15 +38,17 @@ module UzfModule integer(I4B), pointer :: iwcontout => null() integer(I4B), pointer :: ibudgetout => null() ! - type(BudgetType), pointer :: budget => null() !budget object - integer(I4B), pointer :: bditems => null() !number of budget items - integer(I4B), pointer :: nbdtxt => null() !number of budget text items - character(len=LENBUDTXT), dimension(:), pointer, contiguous :: bdtxt => null() !budget items written to cbc file - type(UzfKinematicType), pointer :: uzfobj => null() !uzf kinematic object - type(UzfKinematicType), pointer :: uzfobjwork => null() !uzf kinematic work object - type(UzfKinematicType), pointer :: uzfobjbelow => null() !uzf kinematic object of underlying cell - type(UzfKinematicType), dimension(:), pointer, contiguous :: elements => null() !array of all the kinematic uzf objects - character(len=72), pointer :: nameuzf => null() !cdl--(not sure. Delete?) + type(BudgetType), pointer :: budget => null() !budget object + integer(I4B), pointer :: bditems => null() !number of budget items + integer(I4B), pointer :: nbdtxt => null() !number of budget text items + character(len=LENBUDTXT), dimension(:), pointer, & + contiguous :: bdtxt => null() !budget items written to cbc file + type(UzfKinematicType), pointer :: uzfobj => null() !uzf kinematic object + type(UzfKinematicType), pointer :: uzfobjwork => null() !uzf kinematic work object + type(UzfKinematicType), pointer :: uzfobjbelow => null() !uzf kinematic object of underlying cell + type(UzfKinematicType), dimension(:), pointer, & + contiguous :: elements => null() !array of all the kinematic uzf objects + character(len=72), pointer :: nameuzf => null() !cdl--(not sure. Delete?) ! ! -- pointer to gwf variables integer(I4B), pointer :: gwfiss => null() diff --git a/src/Model/ModelUtilities/BndUzfKinematic.f90 b/src/Model/ModelUtilities/BndUzfKinematic.f90 index bb6d3c9a867..919e702a08f 100644 --- a/src/Model/ModelUtilities/BndUzfKinematic.f90 +++ b/src/Model/ModelUtilities/BndUzfKinematic.f90 @@ -12,50 +12,50 @@ module UzfKinematicModule public :: UzfKinematicType type :: UzfKinematicType - real(DP), pointer :: thtr => null() - real(DP), pointer :: thts => null() - real(DP), pointer :: thti => null() - real(DP), pointer :: eps => null() - real(DP), pointer :: extwc => null() - real(DP), pointer :: ha => null() - real(DP), pointer :: hroot => null() - real(DP), pointer :: rootact => null() - real(DP), pointer :: etact => null() - real(DP), dimension(:), pointer, contiguous :: uzspst => null() - real(DP), dimension(:), pointer, contiguous :: uzthst => null() - real(DP), dimension(:), pointer, contiguous :: uzflst => null() - real(DP), dimension(:), pointer, contiguous :: uzdpst => null() - integer(I4B), pointer :: nwavst => null() - real(DP), pointer :: uzolsflx => null() - real(DP), pointer :: uzstor => null() - real(DP), pointer :: delstor => null() - real(DP), pointer :: totflux => null() - real(DP), pointer :: vflow => null() - integer(I4B), pointer :: nwav, ntrail => null() - real(DP), pointer :: sinf => null() - real(DP), pointer :: finf => null() - real(DP), pointer :: pet => null() - real(DP), pointer :: petmax => null() - real(DP), pointer :: extdp => null() - real(DP), pointer :: extdpuz => null() - real(DP), pointer :: finf_rej => null() - real(DP), pointer :: gwet => null() - real(DP), pointer :: uzfarea => null() - real(DP), pointer :: cellarea => null() - real(DP), pointer :: celtop => null() - real(DP), pointer :: celbot => null() - real(DP), pointer :: landtop => null() - real(DP), pointer :: cvlm1 => null() - real(DP), pointer :: watab => null() - real(DP), pointer :: watabold => null() - real(DP), pointer :: vks => null() - real(DP), pointer :: surfdep => null() - real(DP), pointer :: surflux => null() - real(DP), pointer :: surfluxbelow => null() - real(DP), pointer :: surfseep => null() - real(DP), pointer :: gwpet => null() - integer(I4B), pointer :: landflag => null() - integer(I4B), pointer :: ivertcon => null() + real(DP), pointer :: thtr => null() + real(DP), pointer :: thts => null() + real(DP), pointer :: thti => null() + real(DP), pointer :: eps => null() + real(DP), pointer :: extwc => null() + real(DP), pointer :: ha => null() + real(DP), pointer :: hroot => null() + real(DP), pointer :: rootact => null() + real(DP), pointer :: etact => null() + real(DP), dimension(:), pointer, contiguous :: uzspst => null() + real(DP), dimension(:), pointer, contiguous :: uzthst => null() + real(DP), dimension(:), pointer, contiguous :: uzflst => null() + real(DP), dimension(:), pointer, contiguous :: uzdpst => null() + integer(I4B), pointer :: nwavst => null() + real(DP), pointer :: uzolsflx => null() + real(DP), pointer :: uzstor => null() + real(DP), pointer :: delstor => null() + real(DP), pointer :: totflux => null() + real(DP), pointer :: vflow => null() + integer(I4B), pointer :: nwav, ntrail => null() + real(DP), pointer :: sinf => null() + real(DP), pointer :: finf => null() + real(DP), pointer :: pet => null() + real(DP), pointer :: petmax => null() + real(DP), pointer :: extdp => null() + real(DP), pointer :: extdpuz => null() + real(DP), pointer :: finf_rej => null() + real(DP), pointer :: gwet => null() + real(DP), pointer :: uzfarea => null() + real(DP), pointer :: cellarea => null() + real(DP), pointer :: celtop => null() + real(DP), pointer :: celbot => null() + real(DP), pointer :: landtop => null() + real(DP), pointer :: cvlm1 => null() + real(DP), pointer :: watab => null() + real(DP), pointer :: watabold => null() + real(DP), pointer :: vks => null() + real(DP), pointer :: surfdep => null() + real(DP), pointer :: surflux => null() + real(DP), pointer :: surfluxbelow => null() + real(DP), pointer :: surfseep => null() + real(DP), pointer :: gwpet => null() + integer(I4B), pointer :: landflag => null() + integer(I4B), pointer :: ivertcon => null() contains procedure :: init procedure :: setdata diff --git a/src/Model/ModelUtilities/BoundaryPackage.f90 b/src/Model/ModelUtilities/BoundaryPackage.f90 index 48a80e577cf..79a384eb4bb 100644 --- a/src/Model/ModelUtilities/BoundaryPackage.f90 +++ b/src/Model/ModelUtilities/BoundaryPackage.f90 @@ -29,51 +29,53 @@ module BndModule type, extends(NumericalPackageType) :: BndType ! -- characters - character(len=500) :: listlabel = '' !title of table written for RP - character(len=LENPACKAGENAME) :: text = '' - character(len=LENAUXNAME), allocatable, dimension(:):: auxname !name for each auxiliary variable - character(len=LENBOUNDNAME), dimension(:), pointer, contiguous :: boundname => null() !vector of boundnames + character(len=500) :: listlabel = '' !title of table written for RP + character(len=LENPACKAGENAME) :: text = '' + character(len=LENAUXNAME), allocatable, dimension(:) :: auxname !name for each auxiliary variable + character(len=LENBOUNDNAME), dimension(:), pointer, & + contiguous :: boundname => null() !vector of boundnames + ! ! -- scalars - integer(I4B), pointer :: ibcnum => null() !consecutive package number for this boundary condition - integer(I4B), pointer :: maxbound => null() !max number of boundaries - integer(I4B), pointer :: nbound => null() !number of boundaries for current stress period - integer(I4B), pointer :: ncolbnd => null() !number of columns of the bound array - integer(I4B), pointer :: iscloc => null() !bound column to scale with SFAC - integer(I4B), pointer :: naux => null() !number of auxiliary variables - integer(I4B), pointer :: inamedbound => null() !flag to read boundnames - integer(I4B), pointer :: iauxmultcol => null() !column to use as multiplier for column iscloc - integer(I4B), pointer :: npakeq => null() !number of equations in this package (normally 0 unless package adds rows to matrix) - integer(I4B), pointer :: ioffset => null() !offset of this package in the model + integer(I4B), pointer :: ibcnum => null() !consecutive package number for this boundary condition + integer(I4B), pointer :: maxbound => null() !max number of boundaries + integer(I4B), pointer :: nbound => null() !number of boundaries for current stress period + integer(I4B), pointer :: ncolbnd => null() !number of columns of the bound array + integer(I4B), pointer :: iscloc => null() !bound column to scale with SFAC + integer(I4B), pointer :: naux => null() !number of auxiliary variables + integer(I4B), pointer :: inamedbound => null() !flag to read boundnames + integer(I4B), pointer :: iauxmultcol => null() !column to use as multiplier for column iscloc + integer(I4B), pointer :: npakeq => null() !number of equations in this package (normally 0 unless package adds rows to matrix) + integer(I4B), pointer :: ioffset => null() !offset of this package in the model ! -- arrays - integer(I4B), dimension(:), pointer, contiguous :: nodelist => null() !vector of reduced node numbers - real(DP), dimension(:,:), pointer, contiguous :: bound => null() !array of package specific boundary numbers - real(DP), dimension(:), pointer, contiguous :: hcof => null() !diagonal contribution - real(DP), dimension(:), pointer, contiguous :: rhs => null() !right-hand side contribution - real(DP), dimension(:,:), pointer, contiguous :: auxvar => null() !auxiliary variable array - real(DP), dimension(:), pointer, contiguous :: simvals => null() !simulated values - real(DP), dimension(:), pointer, contiguous :: simtomvr => null() !simulated values + integer(I4B), dimension(:), pointer, contiguous :: nodelist => null() !vector of reduced node numbers + real(DP), dimension(:,:), pointer, contiguous :: bound => null() !array of package specific boundary numbers + real(DP), dimension(:), pointer, contiguous :: hcof => null() !diagonal contribution + real(DP), dimension(:), pointer, contiguous :: rhs => null() !right-hand side contribution + real(DP), dimension(:,:), pointer, contiguous :: auxvar => null() !auxiliary variable array + real(DP), dimension(:), pointer, contiguous :: simvals => null() !simulated values + real(DP), dimension(:), pointer, contiguous :: simtomvr => null() !simulated values ! ! -- water mover flag and object - integer(I4B), pointer :: imover => null() - type(PackageMoverType), pointer :: pakmvrobj => null() + integer(I4B), pointer :: imover => null() + type(PackageMoverType), pointer :: pakmvrobj => null() ! ! -- timeseries - type(TimeSeriesManagerType), pointer :: TsManager => null()! time series manager - type(TimeArraySeriesManagerType), pointer :: TasManager => null()! time array series manager - integer(I4B) :: indxconvertflux = 0 ! indxconvertflux is column of bound to multiply by area to convert flux to rate + type(TimeSeriesManagerType), pointer :: TsManager => null() ! time series manager + type(TimeArraySeriesManagerType), pointer :: TasManager => null() ! time array series manager + integer(I4B) :: indxconvertflux = 0 ! indxconvertflux is column of bound to multiply by area to convert flux to rate logical :: AllowTimeArraySeries = .false. ! ! -- pointers for observations - integer(I4B), pointer :: inobspkg => null()! unit number for obs package - type(ObsType), pointer :: obs => null()! observation package + integer(I4B), pointer :: inobspkg => null() ! unit number for obs package + type(ObsType), pointer :: obs => null() ! observation package ! ! -- pointers to model/solution variables - integer(I4B), pointer :: neq !number of equations for model - integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !ibound array - real(DP), dimension(:), pointer, contiguous :: xnew => null() !dependent variable (head) for this time step - real(DP), dimension(:), pointer, contiguous :: xold => null() !dependent variable for last time step - real(DP), dimension(:), pointer, contiguous :: flowja => null() !intercell flows - integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !pointer to icelltype array in NPF + integer(I4B), pointer :: neq !number of equations for model + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !ibound array + real(DP), dimension(:), pointer, contiguous :: xnew => null() !dependent variable (head) for this time step + real(DP), dimension(:), pointer, contiguous :: xold => null() !dependent variable for last time step + real(DP), dimension(:), pointer, contiguous :: flowja => null() !intercell flows + integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !pointer to icelltype array in NPF contains procedure :: bnd_df diff --git a/src/Solution/NumericalSolution.f90 b/src/Solution/NumericalSolution.f90 index ff1718e1248..4a97fe35159 100644 --- a/src/Solution/NumericalSolution.f90 +++ b/src/Solution/NumericalSolution.f90 @@ -46,7 +46,7 @@ module NumericalSolutionModule real(DP), dimension(:), pointer, contiguous :: xtemp => NULL() type(BlockParserType) :: parser ! - !sparse matrix data + ! -- sparse matrix data real(DP), pointer :: theta => NULL() real(DP), pointer :: akappa => NULL() real(DP), pointer :: gamma => NULL() @@ -70,14 +70,15 @@ module NumericalSolutionModule integer(I4B), pointer :: numtrack => NULL() integer(I4B), pointer :: iprims => NULL() integer(I4B), pointer :: ibflag => NULL() - integer(I4B), dimension(:,:), pointer, contiguous :: lrch => NULL() - real(DP), dimension(:), pointer, contiguous :: hncg => NULL() - real(DP), dimension(:), pointer, contiguous :: dxold => NULL() - real(DP), dimension(:), pointer, contiguous :: deold => NULL() - real(DP), dimension(:), pointer, contiguous :: wsave => NULL() - real(DP), dimension(:), pointer, contiguous :: hchold => NULL() - ! summary - character(len=31), dimension(:), pointer, contiguous :: caccel => NULL() + integer(I4B), dimension(:,:), pointer, contiguous :: lrch => NULL() + real(DP), dimension(:), pointer, contiguous :: hncg => NULL() + real(DP), dimension(:), pointer, contiguous :: dxold => NULL() + real(DP), dimension(:), pointer, contiguous :: deold => NULL() + real(DP), dimension(:), pointer, contiguous :: wsave => NULL() + real(DP), dimension(:), pointer, contiguous :: hchold => NULL() + ! + ! -- convergence summary information + character(len=31), dimension(:), pointer, contiguous :: caccel => NULL() integer(I4B), pointer :: icsvout => NULL() integer(I4B), pointer :: nitermax => NULL() integer(I4B), pointer :: nitercnt => NULL() @@ -92,7 +93,8 @@ module NumericalSolutionModule real(DP), dimension(:), pointer, contiguous :: drmax => NULL() real(DP), pointer, dimension(:,:), contiguous :: convdvmax => NULL() real(DP), pointer, dimension(:,:), contiguous :: convdrmax => NULL() - ! ptc + ! + ! -- pseudo-transient continuation integer(I4B), pointer :: iallowptc => NULL() integer(I4B), pointer :: iptcopt => NULL() integer(I4B), pointer :: iptcout => NULL() @@ -104,10 +106,10 @@ module NumericalSolutionModule real(DP), pointer :: ptcthresh => NULL() real(DP), pointer :: ptcrat => NULL() ! - ! linear accelerator storage + ! -- linear accelerator storage type(IMSLINEAR_DATA), POINTER :: imslinear => NULL() ! - ! sparse object + ! -- sparse object type(sparsematrix) :: sparse contains diff --git a/src/Solution/SparseMatrixSolver/ims8linear.f90 b/src/Solution/SparseMatrixSolver/ims8linear.f90 index a5bfaea9098..4a8f295aa97 100644 --- a/src/Solution/SparseMatrixSolver/ims8linear.f90 +++ b/src/Solution/SparseMatrixSolver/ims8linear.f90 @@ -4,7 +4,7 @@ MODULE IMSLinearModule use ConstantsModule, only: LINELENGTH, LENSOLUTIONNAME, & IZERO, DZERO, DPREC, DSAME, & DEM8, DEM6, DEM5, DEM4, DEM3, DEM2, DEM1, & - DONE, DTWO + DHALF, DONE, DTWO use IMSReorderingModule, only: ims_genrcm, ims_odrv, ims_dperm, ims_vperm use BlockParserModule, only: BlockParserType @@ -47,38 +47,38 @@ MODULE IMSLinearModule real(DP), dimension(:), pointer, contiguous :: RHS => NULL() real(DP), dimension(:), pointer, contiguous :: X => NULL() ! VECTORS - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::DSCALE => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::DSCALE2 => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::IAPC => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::JAPC => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::APC => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::LORDER => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::IORDER => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::IARO => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::JARO => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::ARO => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: DSCALE => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: DSCALE2 => NULL() + integer(I4B), POINTER,DIMENSION(:),CONTIGUOUS :: IAPC => NULL() + integer(I4B), POINTER,DIMENSION(:),CONTIGUOUS :: JAPC => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: APC => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: LORDER => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: IORDER => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: IARO => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: JARO => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: ARO => NULL() ! WORKING ARRAYS - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::IW => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::W => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::ID => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::D => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::P => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::Q => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::Z => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: IW => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: W => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: ID => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: D => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: P => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: Q => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: Z => NULL() ! BICGSTAB WORKING ARRAYS - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::T => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::V => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::DHAT => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::PHAT => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::QHAT => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: T => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: V => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: DHAT => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: PHAT => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: QHAT => NULL() ! POINTERS FOR USE WITH BOTH ORIGINAL AND RCM ORDERINGS - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::IA0 => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::JA0 => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::A0 => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: IA0 => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: JA0 => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: A0 => NULL() ! ILUT WORKING ARRAYS - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::JLU => NULL() - integer(I4B),POINTER,DIMENSION(:),CONTIGUOUS::JW => NULL() - real(DP),POINTER,DIMENSION(:),CONTIGUOUS::WLU => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: JLU => NULL() + integer(I4B), POINTER, DIMENSION(:), CONTIGUOUS :: JW => NULL() + real(DP), POINTER, DIMENSION(:), CONTIGUOUS :: WLU => NULL() ! PROCEDURES (METHODS) CONTAINS @@ -197,7 +197,7 @@ SUBROUTINE IMSLINEAR_AR(THIS, NAME, IN, IOUT, IPRIMS, MXITER, IFDPARAM, & ! !-------SET LREADDATA IF (PRESENT(LFINDBLOCK)) THEN - IF (LFINDBLOCK .LT. 1) THEN + IF (LFINDBLOCK < 1) THEN lreaddata = .FALSE. ELSE lreaddata = .TRUE. @@ -372,7 +372,7 @@ SUBROUTINE IMSLINEAR_AR(THIS, NAME, IN, IOUT, IPRIMS, MXITER, IFDPARAM, & end do write(iout,'(1x,a)') 'END OF LINEAR DATA' else - if (IFDPARAM.EQ.0) THEN + if (IFDPARAM == 0) THEN write(errmsg,'(1x,a)') 'NO LINEAR BLOCK DETECTED.' call store_error(errmsg) end if @@ -391,13 +391,13 @@ SUBROUTINE IMSLINEAR_AR(THIS, NAME, IN, IOUT, IPRIMS, MXITER, IFDPARAM, & END IF ! !-------ERROR CHECKING FOR OPTIONS - IF (THIS%ISCL.LT.0 ) THIS%ISCL = 0 - IF (THIS%ISCL.GT.2 ) THEN + IF (THIS%ISCL < 0 ) THIS%ISCL = 0 + IF (THIS%ISCL > 2 ) THEN WRITE( errmsg,'(A)' ) 'IMSLINEAR7AR: ISCL MUST BE .LE. 2' call store_error(errmsg) END IF - IF (THIS%IORD.LT.0 ) THIS%IORD = 0 - IF (THIS%IORD.GT.2) THEN + IF (THIS%IORD < 0 ) THIS%IORD = 0 + IF (THIS%IORD > 2) THEN WRITE( errmsg,'(A)' ) 'IMSLINEAR7AR: IORD MUST BE .LE. 2' call store_error(errmsg) END IF @@ -405,17 +405,17 @@ SUBROUTINE IMSLINEAR_AR(THIS, NAME, IN, IOUT, IPRIMS, MXITER, IFDPARAM, & WRITE( errmsg,'(A)' ) 'IMSLINEAR7AR: NORTH MUST .GE. 0' call store_error(errmsg) END IF - IF (THIS%RCLOSE.EQ.DZERO) THEN + IF (THIS%RCLOSE == DZERO) THEN IF (THIS%ICNVGOPT /= 3) THEN WRITE( errmsg,'(A)' ) 'IMSLINEAR7AR: RCLOSE MUST .NE. 0.0' call store_error(errmsg) END IF END IF - IF (THIS%RELAX.LT.DZERO) THEN + IF (THIS%RELAX < DZERO) THEN WRITE( errmsg,'(A)' ) 'IMSLINEAR7AR: RELAX MUST BE .GE. 0.0' call store_error(errmsg) END IF - IF (THIS%RELAX.GT.DONE) THEN + IF (THIS%RELAX > DONE) THEN WRITE( errmsg,'(A)' ) 'IMSLINEAR7AR: RELAX MUST BE .LE. 1.0' call store_error(errmsg) END IF @@ -456,7 +456,7 @@ SUBROUTINE IMSLINEAR_AR(THIS, NAME, IN, IOUT, IPRIMS, MXITER, IFDPARAM, & THIS%NIAPC = THIS%NEQ THIS%NJAPC = THIS%NJA ! -- ILUT AND MILUT - IF (THIS%IPC.EQ.3 .OR. THIS%IPC.EQ.4) THEN + IF (THIS%IPC == 3 .OR. THIS%IPC == 4) THEN THIS%NIAPC = THIS%NEQ IF (THIS%LEVEL > 0) THEN iwk = THIS%NEQ * (THIS%LEVEL * 2 + 1) @@ -490,7 +490,7 @@ SUBROUTINE IMSLINEAR_AR(THIS, NAME, IN, IOUT, IPRIMS, MXITER, IFDPARAM, & CALL mem_allocate(THIS%JW, ijw, 'JW', TRIM(THIS%ORIGIN)) CALL mem_allocate(THIS%WLU, iwlu, 'WLU', TRIM(THIS%ORIGIN)) !-------GENERATE IAPC AND JAPC FOR ILU0 AND MILU0 - IF (THIS%IPC.EQ.1 .OR. THIS%IPC.EQ.2) THEN + IF (THIS%IPC == 1 .OR. THIS%IPC == 2) THEN CALL IMSLINEARSUB_PCCRS(THIS%NEQ,THIS%NJA,THIS%IA,THIS%JA, & THIS%IAPC,THIS%JAPC) END IF @@ -514,7 +514,7 @@ SUBROUTINE IMSLINEAR_AR(THIS, NAME, IN, IOUT, IPRIMS, MXITER, IFDPARAM, & CALL mem_allocate(THIS%Z, THIS%NEQ, 'Z', TRIM(THIS%ORIGIN)) !-------ALLOCATE MEMORY FOR BCGS WORKING ARRAYS THIS%NIABCGS = 1 - IF (THIS%ILINMETH.EQ.2) THEN + IF (THIS%ILINMETH == 2) THEN THIS%NIABCGS = THIS%NEQ END IF CALL mem_allocate(THIS%T, THIS%NIABCGS, 'T', TRIM(THIS%ORIGIN)) @@ -813,13 +813,13 @@ SUBROUTINE IMSLINEAR_AP(THIS,ICNVG,KSTP,KITER,IN_ITER, & ! + + + CODE + + + ! !-------SET EPFACT BASED ON MFUSG TIMESTEP - IF (THIS%ICNVGOPT.EQ.2) THEN - IF (KSTP.EQ.1) THEN + IF (THIS%ICNVGOPT == 2) THEN + IF (KSTP == 1) THEN THIS%EPFACT = 0.01 ELSE THIS%EPFACT = 0.10 END IF - ELSE IF (THIS%ICNVGOPT.EQ.4) THEN + ELSE IF (THIS%ICNVGOPT == 4) THEN THIS%EPFACT = DEM4 ELSE THIS%EPFACT = DONE @@ -855,7 +855,7 @@ SUBROUTINE IMSLINEAR_AP(THIS,ICNVG,KSTP,KITER,IN_ITER, & THIS%LEVEL, THIS%DROPTOL, THIS%NJLU, THIS%NJW, & THIS%NWLU, THIS%JLU, THIS%JW, THIS%WLU) !-------INITIALIZE SOLUTION VARIABLE AND ARRAYS - IF (KITER.EQ.1 ) THIS%NITERC = 0 + IF (KITER == 1 ) THIS%NITERC = 0 irc = 1 ICNVG = 0 DO n = 1, THIS%NEQ @@ -872,18 +872,18 @@ SUBROUTINE IMSLINEAR_AP(THIS,ICNVG,KSTP,KITER,IN_ITER, & DO n = 1, THIS%NEQ tv = THIS%D(n) THIS%D(n) = THIS%RHS(n) - tv - IF (ABS( THIS%D(n) ).GT.rmax ) rmax = ABS( THIS%D(n) ) + IF (ABS( THIS%D(n) ) > rmax ) rmax = ABS( THIS%D(n) ) THIS%L2NORM0 = THIS%L2NORM0 + THIS%D(n) * THIS%D(n) END DO THIS%L2NORM0 = SQRT(THIS%L2NORM0) !-------CHECK FOR EXACT SOLUTION itmax = THIS%ITER1 - IF (rmax.EQ.DZERO) THEN + IF (rmax == DZERO) THEN itmax = 0 ICNVG = 1 END IF !-------SOLUTION BY THE CONJUGATE GRADIENT METHOD - IF (THIS%ILINMETH.EQ.1) THEN + IF (THIS%ILINMETH == 1) THEN CALL IMSLINEARSUB_CG(ICNVG, itmax, innerit, & THIS%NEQ, THIS%NJA, THIS%NIAPC, THIS%NJAPC, & THIS%IPC, THIS%NITERC, THIS%ICNVGOPT, THIS%NORTH, & @@ -896,7 +896,7 @@ SUBROUTINE IMSLINEAR_AP(THIS,ICNVG,KSTP,KITER,IN_ITER, & CACCEL, ITINNER, CONVLOCDV, CONVLOCDR, & DVMAX, DRMAX, CONVDVMAX, CONVDRMAX) !-------SOLUTION BY THE BICONJUGATE GRADIENT STABILIZED METHOD - ELSE IF (THIS%ILINMETH.EQ.2) THEN + ELSE IF (THIS%ILINMETH == 2) THEN CALL IMSLINEARSUB_BCGS(ICNVG, itmax, innerit, & THIS%NEQ, THIS%NJA, THIS%NIAPC, THIS%NJAPC, & THIS%IPC, THIS%NITERC, THIS%ICNVGOPT, THIS%NORTH,& @@ -1000,7 +1000,7 @@ SUBROUTINE IMSLINEARSUB_CALC_ORDER(IOUT, IPRIMS, IORD, NEQ, NJA, IA, JA, & ! ! WRITE SUMMARY OF REORDERING INFORMATION ! TO LIST FILE - IF (IPRIMS.EQ.2) THEN + IF (IPRIMS == 2) THEN DO i = 1, NEQ, 6 WRITE (IOUT,2030) 'ORIGINAL NODE :', & & (j,j=i,MIN(i+5,NEQ)) @@ -1050,7 +1050,7 @@ SUBROUTINE IMSLINEARSUB_SCALE(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, & ! + + + CODE + + + ! !---------SCALE SCALE AMAT, X, AND B - IF (IOPT.EQ.0) THEN + IF (IOPT == 0) THEN !-----------SYMMETRIC SCALING SELECT CASE ( ISCL ) CASE ( 1 ) @@ -1083,7 +1083,7 @@ SUBROUTINE IMSLINEARSUB_SCALE(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, & c1 = c1 + AMAT(i) * AMAT(i) END DO c1 = SQRT( c1 ) - IF (c1.EQ.DZERO) THEN + IF (c1 == DZERO) THEN c1 = DONE ELSE c1 = DONE / c1 @@ -1110,7 +1110,7 @@ SUBROUTINE IMSLINEARSUB_SCALE(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, & END DO DO n = 1, NEQ c2 = DSCALE2(n) - IF (c2.EQ.DZERO) THEN + IF (c2 == DZERO) THEN c2 = DONE ELSE c2 = DONE / SQRT( c2 ) @@ -1230,14 +1230,14 @@ SUBROUTINE IMSLINEARSUB_PCU(IOUT, NJA, NEQ, NIAPC, NJAPC, IPC, RELAX, & CASE DEFAULT izero = 0 END SELECT - IF (izero.LT.1) THEN + IF (izero < 1) THEN EXIT PCSCALE END IF delta = 1.5D0 * delta + 0.001 izero = 0 - IF (delta.GT.0.5D0) THEN + IF (delta > DHALF) THEN WRITE(IOUT,2000) - delta = 0.5D0 + delta = DHALF izero = 2 END IF END DO PCSCALE @@ -1267,13 +1267,13 @@ SUBROUTINE IMSLINEARSUB_PCJ(NJA, NEQ, AMAT, APC, IA, JA) ic1 = IA(n+1) - 1 id = IA(n) DO i = ic0, ic1 - IF (JA(i).EQ.n) THEN + IF (JA(i) == n) THEN id = i EXIT END IF END DO tv = AMAT(id) - IF (ABS( tv ).GT.DZERO ) tv = DONE / tv + IF (ABS( tv ) > DZERO ) tv = DONE / tv APC(n) = tv END DO !---------RETURN @@ -1377,7 +1377,7 @@ SUBROUTINE IMSLINEARSUB_PCILU0(NJA, NEQ, AMAT, IA, JA, & IF (sd1.NE.d) THEN ! USE SMALL VALUE IF DIAGONAL SCALING IS NOT EFFECTIVE FOR ! PIVOTS THAT CHANGE THE SIGN OF THE DIAGONAL - IF (IZERO.GT.1) THEN + IF (IZERO > 1) THEN tl = SIGN(DEM6,d) ! DIAGONAL SCALING CONTINUES TO BE EFFECTIVE ELSE @@ -1385,10 +1385,10 @@ SUBROUTINE IMSLINEARSUB_PCILU0(NJA, NEQ, AMAT, IA, JA, & EXIT MAIN END IF END IF - IF (ABS(tl).EQ.DZERO) THEN + IF (ABS(tl) == DZERO) THEN ! USE SMALL VALUE IF DIAGONAL SCALING IS NOT EFFECTIVE FOR ! ZERO PIVOTS - IF (IZERO.GT.1) THEN + IF (IZERO > 1) THEN tl = SIGN(DEM6,d) ! DIAGONAL SCALING CONTINUES TO BE EFFECTIVE FOR ELIMINATING ELSE @@ -1558,7 +1558,7 @@ SUBROUTINE IMSLINEARSUB_CG(ICNVG, ITMAX, INNERIT, & END SELECT rho = IMSLINEARSUB_DP(NEQ, D, Z) !-----------COMPUTE DIRECTIONAL VECTORS - IF (IITER.EQ.1) THEN + IF (IITER == 1) THEN DO n = 1, NEQ P(n) = Z(n) END DO @@ -1608,7 +1608,7 @@ SUBROUTINE IMSLINEARSUB_CG(ICNVG, ITMAX, INNERIT, & tv = D(n) tv = tv - alpha * Q(n) D(n) = tv - IF (ABS(tv).GT.ABS(rmax)) THEN + IF (ABS(tv) > ABS(rmax)) THEN rmax = tv rloc = n END IF @@ -1633,7 +1633,7 @@ SUBROUTINE IMSLINEARSUB_CG(ICNVG, ITMAX, INNERIT, & END DO END IF !-----------TEST FOR SOLVER CONVERGENCE - IF (ICNVGOPT.EQ.2 .OR. ICNVGOPT.EQ.3 .OR. ICNVGOPT.EQ.4) THEN + IF (ICNVGOPT == 2 .OR. ICNVGOPT == 3 .OR. ICNVGOPT == 4) THEN rcnvg = l2norm ELSE rcnvg = rmax @@ -1643,7 +1643,7 @@ SUBROUTINE IMSLINEARSUB_CG(ICNVG, ITMAX, INNERIT, & L2NORM0, EPFACT, HCLOSE, RCLOSE) ! ! CHECK FOR EXACT SOLUTION - IF (rcnvg.EQ.DZERO) ICNVG = 1 + IF (rcnvg == DZERO) ICNVG = 1 IF (ICNVG.NE.0) EXIT INNER !-----------CHECK THAT CURRENT AND PREVIOUS rho ARE DIFFERENT isame = IMSLINEARSUB_SAME(rho, rho0) @@ -1662,7 +1662,7 @@ SUBROUTINE IMSLINEARSUB_CG(ICNVG, ITMAX, INNERIT, & rho0 = rho END DO INNER !---------RESET ICNVG - IF (ICNVG.LT.0) ICNVG = 0 + IF (ICNVG < 0) ICNVG = 0 !---------RETURN RETURN END SUBROUTINE IMSLINEARSUB_CG @@ -1775,7 +1775,7 @@ SUBROUTINE IMSLINEARSUB_BCGS(ICNVG, ITMAX, INNERIT, & !----------CALCULATE rho rho = IMSLINEARSUB_DP(NEQ, DHAT, D) !-----------COMPUTE DIRECTIONAL VECTORS - IF (IITER.EQ.1) THEN + IF (IITER == 1) THEN DO n = 1, NEQ P(n) = D(n) END DO @@ -1811,7 +1811,7 @@ SUBROUTINE IMSLINEARSUB_BCGS(ICNVG, ITMAX, INNERIT, & ! DO n = 1, NEQ ! tv = Q(n) ! IF (ISCL.NE.0 ) tv = tv / DSCALE(n) -! IF (ABS(tv).GT.ABS(rmax) ) rmax = tv +! IF (ABS(tv) > ABS(rmax) ) rmax = tv ! END DO ! IF (ABS(rmax).LE.DPREC) THEN ! deltax = DZERO @@ -1821,7 +1821,7 @@ SUBROUTINE IMSLINEARSUB_BCGS(ICNVG, ITMAX, INNERIT, & ! tv = tv * DSCALE(n) ! END IF ! X(n) = X(n) + tv -! IF (ABS(tv).GT.ABS(deltax) ) deltax = tv +! IF (ABS(tv) > ABS(deltax) ) deltax = tv ! END DO ! CALL IMSLINEARSUB_TESTCNVG(ICNVGOPT, ICNVG, INNERIT, & ! deltax, rmax, & @@ -1868,7 +1868,7 @@ SUBROUTINE IMSLINEARSUB_BCGS(ICNVG, ITMAX, INNERIT, & IF (ISCL.NE.0) THEN tv = tv * DSCALE(n) END IF - IF (ABS(tv).GT.ABS(deltax)) THEN + IF (ABS(tv) > ABS(deltax)) THEN deltax = tv xloc = n END IF @@ -1882,7 +1882,7 @@ SUBROUTINE IMSLINEARSUB_BCGS(ICNVG, ITMAX, INNERIT, & IF (ISCL.NE.0) THEN tv = tv / DSCALE(n) END IF - IF (ABS(tv).GT.ABS(rmax)) THEN + IF (ABS(tv) > ABS(rmax)) THEN rmax = tv rloc = n END IF @@ -1908,7 +1908,7 @@ SUBROUTINE IMSLINEARSUB_BCGS(ICNVG, ITMAX, INNERIT, & END DO END IF !-----------TEST FOR SOLVER CONVERGENCE - IF (ICNVGOPT.EQ.2 .OR. ICNVGOPT.EQ.3 .OR. ICNVGOPT.EQ.4) THEN + IF (ICNVGOPT == 2 .OR. ICNVGOPT == 3 .OR. ICNVGOPT == 4) THEN rcnvg = l2norm ELSE rcnvg = rmax @@ -1917,7 +1917,7 @@ SUBROUTINE IMSLINEARSUB_BCGS(ICNVG, ITMAX, INNERIT, & deltax, rcnvg, & L2NORM0, EPFACT, HCLOSE, RCLOSE) ! CHECK FOR EXACT SOLUTION - IF (rcnvg.EQ.DZERO) ICNVG = 1 + IF (rcnvg == DZERO) ICNVG = 1 IF (ICNVG.NE.0) EXIT INNER !-----------CHECK THAT CURRENT AND PREVIOUS rho, alpha, AND omega ARE ! DIFFERENT @@ -1951,7 +1951,7 @@ SUBROUTINE IMSLINEARSUB_BCGS(ICNVG, ITMAX, INNERIT, & omega0 = omega END DO INNER !---------RESET ICNVG - IF (ICNVG.LT.0) ICNVG = 0 + IF (ICNVG < 0) ICNVG = 0 !---------RETURN RETURN END SUBROUTINE IMSLINEARSUB_BCGS @@ -1974,31 +1974,31 @@ SUBROUTINE IMSLINEARSUB_TESTCNVG(Icnvgopt, Icnvg, Iiter, & ! + + + LOCAL DEFINITIONS + + + ! + + + FUNCTIONS + + + ! + + + CODE + + + - IF (Icnvgopt.EQ.0) THEN - IF (ABS(Hmax).LE.Hclose .AND. ABS(Rmax).LE.Rclose) THEN + IF (Icnvgopt == 0) THEN + IF (ABS(Hmax) <= Hclose .AND. ABS(Rmax) <= Rclose) THEN Icnvg = 1 END IF - ELSE IF (Icnvgopt.EQ.1) THEN - IF (ABS(Hmax).LE.Hclose .AND. ABS(Rmax).LE.Rclose .AND. & - iiter.EQ.1) THEN + ELSE IF (Icnvgopt == 1) THEN + IF (ABS(Hmax) <= Hclose .AND. ABS(Rmax) <= Rclose .AND. & + iiter == 1) THEN Icnvg = 1 END IF - ELSE IF (Icnvgopt.EQ.2) THEN - IF (ABS(Hmax).LE.Hclose .OR. Rmax.LE.Rclose) THEN + ELSE IF (Icnvgopt == 2) THEN + IF (ABS(Hmax) <= Hclose .OR. Rmax <= Rclose) THEN Icnvg = 1 - ELSE IF (Rmax.LE.Rmax0*Epfact) THEN + ELSE IF (Rmax <= Rmax0*Epfact) THEN Icnvg = -1 END IF - ELSE IF (Icnvgopt.EQ.3) THEN - IF (ABS(Hmax).LE.Hclose) THEN + ELSE IF (Icnvgopt == 3) THEN + IF (ABS(Hmax) <= Hclose) THEN Icnvg = 1 - ELSE IF (Rmax.LE.Rmax0*Rclose) THEN + ELSE IF (Rmax <= Rmax0*Rclose) THEN Icnvg = -1 END IF - ELSE IF (Icnvgopt.EQ.4) THEN - IF (ABS(Hmax).LE.Hclose .AND. Rmax.LE.Rclose) THEN + ELSE IF (Icnvgopt == 4) THEN + IF (ABS(Hmax) <= Hclose .AND. Rmax <= Rclose) THEN Icnvg = 1 - ELSE IF (Rmax.LE.Rmax0*Epfact) THEN + ELSE IF (Rmax <= Rmax0*Epfact) THEN Icnvg = -1 END IF END IF @@ -2039,7 +2039,7 @@ SUBROUTINE IMSLINEARSUB_PCCRS(NEQ, NJA, IA, JA, & ic = 0 DO j = i0, i1 jcol = JA(j) - IF (jcol.EQ.n ) CYCLE + IF (jcol == n) CYCLE ic = ic + 1 iarr(ic) = jcol END DO @@ -2060,7 +2060,7 @@ SUBROUTINE IMSLINEARSUB_PCCRS(NEQ, NJA, IA, JA, & JAPC(n) = IAPC(n+1) DO j = i0, i1 jcol = JAPC(j) - IF (jcol.GT.n) THEN + IF (jcol > n) THEN JAPC(n) = j EXIT END IF @@ -2082,7 +2082,7 @@ SUBROUTINE IMSLINEARSUB_ISORT(NVAL, IARRAY) ! + + + CODE + + + DO i = 1, NVAL-1 DO j = i+1, NVAL - if(IARRAY(i).GT.IARRAY(j)) then + if(IARRAY(i) > IARRAY(j)) then itemp = IARRAY(j) IARRAY(j) = IARRAY(i) IARRAY(i) = itemp diff --git a/src/Utilities/Observation/Observe.f90 b/src/Utilities/Observation/Observe.f90 index e501dd87834..90d34ff6eea 100644 --- a/src/Utilities/Observation/Observe.f90 +++ b/src/Utilities/Observation/Observe.f90 @@ -29,31 +29,38 @@ module ObserveModule type :: ObserveType ! -- Public members + ! ! -- For all observations - integer(I4B), public :: NodeNumber = 0 - integer(I4B), public :: UnitNumber = 0 - character(len=LENOBSNAME), public :: Name = '' - character(len=LENOBSTYPE), public :: ObsTypeId = '' - character(len=200), public :: IDstring = '' - character(len=LENBOUNDNAME), public :: FeatureName = '' - character(len=LENBOUNDNAME), public :: FeatureName2 = '' + integer(I4B), public :: NodeNumber = 0 + integer(I4B), public :: UnitNumber = 0 + character(len=LENOBSNAME), public :: Name = '' + character(len=LENOBSTYPE), public :: ObsTypeId = '' + character(len=200), public :: IDstring = '' + character(len=LENBOUNDNAME), public :: FeatureName = '' + character(len=LENBOUNDNAME), public :: FeatureName2 = '' + ! ! -- members specific to NPF intercell-flow observations - integer(I4B), public :: NodeNumber2 = 0 - integer(I4B), public :: JaIndex = -2 + integer(I4B), public :: NodeNumber2 = 0 + integer(I4B), public :: JaIndex = -2 + ! ! -- members that can be used as needed by packages or models - integer(I4B), public :: intPak1 = 0 - real(DP), public :: Obsdepth = DZERO - real(DP), public :: dblPak1 = DZERO + integer(I4B), public :: intPak1 = 0 + real(DP), public :: Obsdepth = DZERO + real(DP), public :: dblPak1 = DZERO + ! ! -- indxbnds is intended to hold indices of position(s) in bound ! array of boundaries included in the observation. integer(I4B), allocatable, dimension(:), public :: indxbnds - ! Set FormattedOutput false if output unit is opened for unformatted i/o - logical, public :: FormattedOutput = .true. - logical, public :: BndFound = .false. - real(DP), public :: CurrentTimeStepEndValue = DZERO - real(DP), public :: CurrentTimeStepEndTime = DZERO + ! + ! -- Set FormattedOutput false if output unit is opened for unformatted i/o + logical, public :: FormattedOutput = .true. + logical, public :: BndFound = .false. + real(DP), public :: CurrentTimeStepEndValue = DZERO + real(DP), public :: CurrentTimeStepEndTime = DZERO + ! ! -- Members specific to continuous observations - integer(I4B), public :: indxObsOutput = -1 + integer(I4B), public :: indxObsOutput = -1 + ! ! -- Private members type(ObsDataType), pointer, private :: obsDatum => null() contains @@ -64,8 +71,8 @@ module ObserveModule type :: ObsDataType ! -- Public members - character(len=LENOBSTYPE), public :: ObsTypeID = '' - logical, public :: Cumulative = .false. + character(len=LENOBSTYPE), public :: ObsTypeID = '' + logical, public :: Cumulative = .false. procedure(ProcessIdSub), nopass, pointer, public :: ProcessIdPtr => null() end type ObsDataType diff --git a/src/Utilities/TimeSeries/TimeArraySeries.f90 b/src/Utilities/TimeSeries/TimeArraySeries.f90 index ac45a864841..86ba6da3fc4 100644 --- a/src/Utilities/TimeSeries/TimeArraySeries.f90 +++ b/src/Utilities/TimeSeries/TimeArraySeries.f90 @@ -27,15 +27,15 @@ module TimeArraySeriesModule ! -- Public members character(len=LENTIMESERIESNAME), public :: Name = '' ! -- Private members - integer(I4B), private :: inunit = 0 - integer(I4B), private :: iout = 0 - integer(I4B), private :: iMethod = UNDEFINED - real(DP), private :: sfac = DONE - character(len=LINELENGTH), private :: dataFile = '' - logical, private :: autoDeallocate = .true. - type(ListType), pointer, private :: list => null() + integer(I4B), private :: inunit = 0 + integer(I4B), private :: iout = 0 + integer(I4B), private :: iMethod = UNDEFINED + real(DP), private :: sfac = DONE + character(len=LINELENGTH), private :: dataFile = '' + logical, private :: autoDeallocate = .true. + type(ListType), pointer, private :: list => null() class(DisBaseType), pointer, private :: dis => null() - type(BlockParserType), private :: parser + type(BlockParserType), private :: parser contains ! -- Public procedures procedure, public :: tas_init diff --git a/src/Utilities/TimeSeries/TimeArraySeriesLink.f90 b/src/Utilities/TimeSeries/TimeArraySeriesLink.f90 index 65970c6ffa0..add7e0852bf 100644 --- a/src/Utilities/TimeSeries/TimeArraySeriesLink.f90 +++ b/src/Utilities/TimeSeries/TimeArraySeriesLink.f90 @@ -15,18 +15,18 @@ module TimeArraySeriesLinkModule type :: TimeArraySeriesLinkType ! -- Public members - character(len=LENPACKAGENAME), public :: PackageName = '' - character(len=LENTIMESERIESTEXT), public :: Text = '' - integer(I4B), public :: Iprpak = 1 - logical, public :: UseDefaultProc = .true. - logical, public :: ConvertFlux = .false. + character(len=LENPACKAGENAME), public :: PackageName = '' + character(len=LENTIMESERIESTEXT), public :: Text = '' + integer(I4B), public :: Iprpak = 1 + logical, public :: UseDefaultProc = .true. + logical, public :: ConvertFlux = .false. integer(I4B), dimension(:), pointer, contiguous, public :: nodelist => null() ! BndArray can point to an array in either the bound or auxval ! array of BndType, or any other double precision variable or array ! element that contains a value that could be controlled by a time series. - real(DP), dimension(:), pointer, public :: BndArray => null() - real(DP), dimension(:), pointer, public :: RMultArray => null() - type(TimeArraySeriesType), pointer, public :: TimeArraySeries => null() + real(DP), dimension(:), pointer, public :: BndArray => null() + real(DP), dimension(:), pointer, public :: RMultArray => null() + type(TimeArraySeriesType), pointer, public :: TimeArraySeries => null() contains procedure, public :: da => tasl_da end type TimeArraySeriesLinkType diff --git a/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 b/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 index ddbe07c3504..dbff29899ec 100644 --- a/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 +++ b/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 @@ -23,12 +23,12 @@ module TimeArraySeriesManagerModule type TimeArraySeriesManagerType ! -- Public members - integer(I4B), public :: iout = 0 ! output unit num - class(DisBaseType), pointer, public :: dis => null() ! pointer to dis + integer(I4B), public :: iout = 0 ! output unit num + class(DisBaseType), pointer, public :: dis => null() ! pointer to dis ! -- Private members - type(ListType), pointer, private :: boundTasLinks => null() ! list of TAS links - character(len=LINELENGTH), allocatable, dimension(:) :: tasfiles ! list of TA file names - type(TimeArraySeriesType), dimension(:), pointer, contiguous :: taslist ! array of TA pointers + type(ListType), pointer, private :: boundTasLinks => null() ! list of TAS links + character(len=LINELENGTH), allocatable, dimension(:) :: tasfiles ! list of TA file names + type(TimeArraySeriesType), dimension(:), pointer, contiguous :: taslist ! array of TA pointers character(len=LENTIMESERIESNAME), allocatable, dimension(:) :: tasnames ! array of TA names contains ! -- Public procedures diff --git a/src/Utilities/TimeSeries/TimeSeries.f90 b/src/Utilities/TimeSeries/TimeSeries.f90 index ded69b203cf..d81f6ccd1ca 100644 --- a/src/Utilities/TimeSeries/TimeSeries.f90 +++ b/src/Utilities/TimeSeries/TimeSeries.f90 @@ -59,12 +59,12 @@ module TimeSeriesModule type TimeSeriesFileType ! -- Private members - integer(I4B), public :: inunit = 0 - integer(I4B), public :: iout = 0 - integer(I4B), public :: nTimeSeries = 0 - character(len=LINELENGTH), public :: datafile = '' + integer(I4B), public :: inunit = 0 + integer(I4B), public :: iout = 0 + integer(I4B), public :: nTimeSeries = 0 + character(len=LINELENGTH), public :: datafile = '' type(TimeSeriesType), dimension(:), pointer, contiguous, public :: timeSeries => null() - type(BlockParserType), pointer, public :: parser + type(BlockParserType), pointer, public :: parser contains ! -- Public procedures procedure, public :: Count diff --git a/src/Utilities/version.f90 b/src/Utilities/version.f90 index ddbd5e50925..b08068feffe 100644 --- a/src/Utilities/version.f90 +++ b/src/Utilities/version.f90 @@ -3,7 +3,7 @@ module VersionModule public ! -- modflow 6 version integer(I4B), parameter :: IDEVELOPMODE = 1 - character(len=40), parameter :: VERSION = '6.0.3.6 08/28/2018' + character(len=40), parameter :: VERSION = '6.0.3.7 08/28/2018' character(len=10), parameter :: MFVNAM = ' 6' character(len=*), parameter :: MFTITLE = & 'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL' diff --git a/version.txt b/version.txt index 681459b38fc..43bc0b2d3f6 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ # MODFLOW 6 version file automatically created using...pre-commit.py -# created on...August 28, 2018 17:19:34 +# created on...August 28, 2018 18:34:48 # add some comments on how this version file # should be manually updated and used @@ -7,6 +7,6 @@ major = 6 minor = 0 micro = 3 -build = 6 -commit = 107 +build = 7 +commit = 108 From 2b473cc77462e6d120b04c85c10e66b0350cc66e Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Wed, 29 Aug 2018 11:15:27 -0400 Subject: [PATCH 004/170] Fixed compile issue with mf5to6...added contiguous to vectors/arrays allocated using the memory manager. Also fixed issue with SEGFAULT in mf5to6 that was related to a pointer in ChdPackageWriter that was not pointed to null (=> null()) in definition. --- README.md | 4 +- code.json | 18 +-- doc/version.tex | 4 +- src/Utilities/version.f90 | 2 +- utils/mf5to6/src/ChdPackageWriter.f90 | 14 +-- utils/mf5to6/src/ChdType.f90 | 2 +- utils/mf5to6/src/Preproc/Discretization3D.f90 | 14 +-- .../src/Preproc/DiscretizationBasePHMF.f90 | 30 ++--- utils/mf5to6/src/Preproc/Global.f90 | 116 ++++++++++-------- utils/mf5to6/src/Preproc/SimVariables.f90 | 2 +- utils/mf5to6/src/StoWriter.f90 | 6 +- utils/mf5to6/src/TdisWriter.f90 | 2 +- utils/mf5to6/src/mf5to6.f90 | 2 +- version.txt | 6 +- 14 files changed, 117 insertions(+), 105 deletions(-) mode change 100755 => 100644 utils/mf5to6/src/ChdPackageWriter.f90 diff --git a/README.md b/README.md index 4d63360911e..20f6526e3f8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Automated Testing Status on Travis-CI -### Version 6.0.3 develop — build 7 +### Version 6.0.3 develop — build 8 [![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6) ## Introduction @@ -31,7 +31,7 @@ MODFLOW 6 is the latest core version of MODFLOW. It synthesizes many of the capa #### ***Software/Code citation for MODFLOW 6:*** -[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2018, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 28 August 2018, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV) +[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2018, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 29 August 2018, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV) ## Instructions for building definition files for new packages diff --git a/code.json b/code.json index 98b4c83f76c..4a8644867aa 100755 --- a/code.json +++ b/code.json @@ -1,26 +1,26 @@ [ { "status": "Release Candidate", - "languages": [ - "Fortran2008" - ], + "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", "repositoryURL": "https://code.usgs.gov/usgs/modflow/modflow6.git", "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md", "tags": [ "MODFLOW", "groundwater model" ], - "vcs": "git", - "name": "modflow6", - "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", + "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", "contact": { "name": "Christian D. Langevin", "email": "langevin@usgs.gov" }, + "languages": [ + "Fortran2008" + ], + "vcs": "git", "laborHours": -1, - "version": "6.0.3.7", + "version": "6.0.3.8", "date": { - "metadataLastUpdated": "2018-08-28" + "metadataLastUpdated": "2018-08-29" }, "organization": "U.S. Geological Survey", "permissions": { @@ -33,6 +33,6 @@ "usageType": "openSource" }, "homepageURL": "https://code.usgs.gov/usgs/modflow/modflow6/", - "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions." + "name": "modflow6" } ] \ No newline at end of file diff --git a/doc/version.tex b/doc/version.tex index a66400082bc..209db8e5f3f 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,3 +1,3 @@ -\newcommand{\modflowversion}{mf6.0.3.7} -\newcommand{\modflowdate}{August 28, 2018} +\newcommand{\modflowversion}{mf6.0.3.8} +\newcommand{\modflowdate}{August 29, 2018} \newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate} diff --git a/src/Utilities/version.f90 b/src/Utilities/version.f90 index b08068feffe..d4fcec94884 100644 --- a/src/Utilities/version.f90 +++ b/src/Utilities/version.f90 @@ -3,7 +3,7 @@ module VersionModule public ! -- modflow 6 version integer(I4B), parameter :: IDEVELOPMODE = 1 - character(len=40), parameter :: VERSION = '6.0.3.7 08/28/2018' + character(len=40), parameter :: VERSION = '6.0.3.8 08/29/2018' character(len=10), parameter :: MFVNAM = ' 6' character(len=*), parameter :: MFTITLE = & 'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL' diff --git a/utils/mf5to6/src/ChdPackageWriter.f90 b/utils/mf5to6/src/ChdPackageWriter.f90 old mode 100755 new mode 100644 index a64dab0c33a..5b5d7558f0f --- a/utils/mf5to6/src/ChdPackageWriter.f90 +++ b/utils/mf5to6/src/ChdPackageWriter.f90 @@ -41,13 +41,13 @@ module ChdPackageWriterModule integer :: kpercurrent integer :: numtimeseries = 0 integer :: maxchds = 0 - integer, dimension(:,:,:), pointer :: ibnd - integer, dimension(:,:,:), pointer :: ichdvar - double precision, dimension(:,:,:), pointer :: chdshead - double precision, dimension(:,:,:), pointer :: chdehead - type(ListType), pointer :: IbChdList => null() ! CHDs from IBOUND - type(ListType), pointer :: TvChdList => null() ! Time-variable CHDs from CHD package - type(ListType), pointer :: CnstChdList => null() ! Constant CHDs from CHD package + integer, dimension(:,:,:), pointer :: ibnd => null() + integer, dimension(:,:,:), pointer :: ichdvar => null() + double precision, dimension(:,:,:), pointer :: chdshead => null() + double precision, dimension(:,:,:), pointer :: chdehead => null() + type(ListType), pointer :: IbChdList => null() ! CHDs from IBOUND + type(ListType), pointer :: TvChdList => null() ! Time-variable CHDs from CHD package + type(ListType), pointer :: CnstChdList => null() ! Constant CHDs from CHD package type(TimeSeriesFileType), pointer :: ChdTsGroup => null() !type(ChdObsWriterType), pointer :: ChdObsWriter => null() contains diff --git a/utils/mf5to6/src/ChdType.f90 b/utils/mf5to6/src/ChdType.f90 index b5ebcb28844..fdcb015c1cb 100644 --- a/utils/mf5to6/src/ChdType.f90 +++ b/utils/mf5to6/src/ChdType.f90 @@ -22,7 +22,7 @@ module ChdModule character(len=MAXCHARLEN) :: tsfilename = '' character(len=LENTIMESERIESNAME) :: AlternateTsName = '' character(len=LENTIMESERIESNAME) :: OriginalTsName = '' - type(TimeSeriesType), pointer :: timeSeries + type(TimeSeriesType), pointer :: timeSeries => null() contains procedure :: CopyTo end type ChdType diff --git a/utils/mf5to6/src/Preproc/Discretization3D.f90 b/utils/mf5to6/src/Preproc/Discretization3D.f90 index 1b5a7aab0a0..0ced3976332 100644 --- a/utils/mf5to6/src/Preproc/Discretization3D.f90 +++ b/utils/mf5to6/src/Preproc/Discretization3D.f90 @@ -13,14 +13,14 @@ module DnmDis3dModule public dis3d_cr, Dis3dType, CastAsDis3dType type, extends(DisBaseType) :: Dis3dType - integer, pointer :: nlay !number of layers - integer, pointer :: nrow !number of rows - integer, pointer :: ncol !number of columns - integer, dimension(:), pointer :: nodereduced !(size:nodesuser) given user nodenumber provide the reduced nodenumber (size 0 if not reduced) - integer, dimension(:), pointer :: nodeuser !(size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) + integer, pointer :: nlay => null() !number of layers + integer, pointer :: nrow => null() !number of rows + integer, pointer :: ncol => null() !number of columns + integer, dimension(:), pointer, contiguous :: nodereduced => null() !(size:nodesuser) given user nodenumber provide the reduced nodenumber (size 0 if not reduced) + integer, dimension(:), pointer, contiguous :: nodeuser => null() !(size:nodes) given a reduced nodenumber, provide the user nodenumber (size 0 if not reduced) ! for PreHeadsMF - double precision :: gridXmax = DZERO - double precision :: gridYmin = DZERO + double precision :: gridXmax = DZERO + double precision :: gridYmin = DZERO double precision, dimension(:), allocatable :: delr double precision, dimension(:), allocatable :: delc integer, dimension(:,:,:), allocatable :: idomain diff --git a/utils/mf5to6/src/Preproc/DiscretizationBasePHMF.f90 b/utils/mf5to6/src/Preproc/DiscretizationBasePHMF.f90 index dd410560e76..2cf7223bf07 100644 --- a/utils/mf5to6/src/Preproc/DiscretizationBasePHMF.f90 +++ b/utils/mf5to6/src/Preproc/DiscretizationBasePHMF.f90 @@ -11,21 +11,21 @@ module DnmDisBaseModule public :: dis_cr type :: DisBaseType - character(len=LENORIGIN), pointer :: origin => null() !origin name for mem allocation - character(len=LENMODELNAME), pointer :: name_model => null() !name of the model - integer, pointer :: inunit => null() !unit number for input file - integer, pointer :: iout => null() !unit number for output file - integer, pointer :: nodes => null() !number of nodes in solution - integer, pointer :: nodesuser => null() !number of user nodes (same as nodes for unstructured model) - integer, pointer :: ndim => null() !number of spatial model dimensions (1 for unstructured) - integer, pointer, dimension(:) :: mshape => null() !shape of the model; (nodes) for DisBaseType - integer, pointer :: nja => null() !number of connections plus number of nodes - integer, pointer :: njas => null() !(nja-nodes)/2 - integer, pointer :: lenuni => null() !length unit - integer, pointer :: idsymrd => null() !indicates how symmetric arrays are read - double precision, dimension(:), pointer :: top => null() !(size:nodes) cell top elevation - double precision, dimension(:), pointer :: bot => null() !(size:nodes) cell bottom elevation - double precision, dimension(:), pointer :: area => null() !(size:nodes) cell area, in plan view + character(len=LENORIGIN), pointer :: origin => null() !origin name for mem allocation + character(len=LENMODELNAME), pointer :: name_model => null() !name of the model + integer, pointer :: inunit => null() !unit number for input file + integer, pointer :: iout => null() !unit number for output file + integer, pointer :: nodes => null() !number of nodes in solution + integer, pointer :: nodesuser => null() !number of user nodes (same as nodes for unstructured model) + integer, pointer :: ndim => null() !number of spatial model dimensions (1 for unstructured) + integer, pointer, dimension(:), contiguous :: mshape => null() !shape of the model; (nodes) for DisBaseType + integer, pointer :: nja => null() !number of connections plus number of nodes + integer, pointer :: njas => null() !(nja-nodes)/2 + integer, pointer :: lenuni => null() !length unit + integer, pointer :: idsymrd => null() !indicates how symmetric arrays are read + double precision, dimension(:), pointer, contiguous :: top => null() !(size:nodes) cell top elevation + double precision, dimension(:), pointer, contiguous :: bot => null() !(size:nodes) cell bottom elevation + double precision, dimension(:), pointer, contiguous :: area => null() !(size:nodes) cell area, in plan view ! for PreHeadsMF ! For structured DIS, origin is outside corner of cell at row 1, column 1. double precision :: Xorigin = DZERO ! X coordinate of grid origin diff --git a/utils/mf5to6/src/Preproc/Global.f90 b/utils/mf5to6/src/Preproc/Global.f90 index 56bbc4aca53..ee5aa0f6a12 100644 --- a/utils/mf5to6/src/Preproc/Global.f90 +++ b/utils/mf5to6/src/Preproc/Global.f90 @@ -8,62 +8,74 @@ MODULE GLOBAL double precision, save, pointer :: constantdelc character(len=MAXCHARLEN), save, pointer :: cbcfilename ! arrays - INTEGER, SAVE, DIMENSION(:), POINTER :: IUNIT(:) - DOUBLE PRECISION, SAVE, DIMENSION(:,:,:), POINTER :: HNEW - INTEGER, SAVE, DIMENSION(:), POINTER :: LBOTM - INTEGER, SAVE, DIMENSION(:), POINTER :: LAYCBD - INTEGER, SAVE, DIMENSION(:), POINTER :: LAYHDT - INTEGER, SAVE, DIMENSION(:), POINTER :: LAYHDS - double precision, SAVE, DIMENSION(:), POINTER :: PERLEN - INTEGER, SAVE, DIMENSION(:), POINTER :: NSTP - double precision, SAVE, DIMENSION(:), POINTER :: TSMULT - INTEGER, SAVE, DIMENSION(:), POINTER :: ISSFLG - double precision, SAVE, DIMENSION(:), POINTER :: DELR - double precision, SAVE, DIMENSION(:), POINTER :: DELC - double precision, SAVE, DIMENSION(:,:,:), POINTER :: BOTM - double precision, SAVE, DIMENSION(:,:,:), POINTER :: HOLD - INTEGER, SAVE, DIMENSION(:,:,:), POINTER :: IBOUND - double precision, SAVE, DIMENSION(:,:,:), POINTER :: CR - double precision, SAVE, DIMENSION(:,:,:), POINTER :: CC - double precision, SAVE, DIMENSION(:,:,:), POINTER :: CV - double precision, SAVE, DIMENSION(:,:,:), POINTER :: HCOF - double precision, SAVE, DIMENSION(:,:,:), POINTER :: RHS - double precision, SAVE, DIMENSION(:,:,:), POINTER :: BUFF - double precision, SAVE, DIMENSION(:,:,:), POINTER :: STRT - double precision, SAVE, DIMENSION(:,:,:), POINTER :: DDREF + INTEGER, SAVE, DIMENSION(:), POINTER :: IUNIT(:) => null() + DOUBLE PRECISION, SAVE, DIMENSION(:,:,:), POINTER :: HNEW => null() + INTEGER, SAVE, DIMENSION(:), POINTER :: LBOTM => null() + INTEGER, SAVE, DIMENSION(:), POINTER :: LAYCBD => null() + INTEGER, SAVE, DIMENSION(:), POINTER :: LAYHDT => null() + INTEGER, SAVE, DIMENSION(:), POINTER :: LAYHDS => null() + double precision, SAVE, DIMENSION(:), POINTER :: PERLEN => null() + INTEGER, SAVE, DIMENSION(:), POINTER :: NSTP => null() + double precision, SAVE, DIMENSION(:), POINTER :: TSMULT => null() + INTEGER, SAVE, DIMENSION(:), POINTER :: ISSFLG => null() + double precision, SAVE, DIMENSION(:), POINTER :: DELR => null() + double precision, SAVE, DIMENSION(:), POINTER :: DELC => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: BOTM => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: HOLD => null() + INTEGER, SAVE, DIMENSION(:,:,:), POINTER :: IBOUND => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: CR => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: CC => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: CV => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: HCOF => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: RHS => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: BUFF => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: STRT => null() + double precision, SAVE, DIMENSION(:,:,:), POINTER :: DDREF => null() TYPE GLOBALTYPE ! scalars - INTEGER, POINTER :: NCOL,NROW,NLAY,NPER,NBOTM,NCNFBD - INTEGER, POINTER :: ITMUNI,LENUNI,IXSEC,ITRSS,INBAS - INTEGER, POINTER :: IFREFM,NODES,IOUT,MXITER - double precision, pointer :: constantdelr - double precision, pointer :: constantdelc - character(len=MAXCHARLEN), pointer :: cbcfilename + INTEGER, POINTER :: NCOL => null() + INTEGER, POINTER :: NROW => null() + INTEGER, POINTER :: NLAY => null() + INTEGER, POINTER :: NPER => null() + INTEGER, POINTER :: NBOTM => null() + INTEGER, POINTER :: NCNFBD => null() + INTEGER, POINTER :: ITMUNI => null() + INTEGER, POINTER :: LENUNI => null() + INTEGER, POINTER :: IXSEC => null() + INTEGER, POINTER :: ITRSS => null() + INTEGER, POINTER :: INBAS => null() + INTEGER, POINTER :: IFREFM => null() + INTEGER, POINTER :: NODES => null() + INTEGER, POINTER :: IOUT => null() + INTEGER, POINTER :: MXITER => null() + double precision, pointer :: constantdelr => null() + double precision, pointer :: constantdelc => null() + character(len=MAXCHARLEN), pointer :: cbcfilename => null() ! arrays - INTEGER, DIMENSION(:), POINTER ::IUNIT - DOUBLE PRECISION, DIMENSION(:,:,:), POINTER ::HNEW - INTEGER, DIMENSION(:), POINTER ::LBOTM - INTEGER, DIMENSION(:), POINTER ::LAYCBD - INTEGER, DIMENSION(:), POINTER ::LAYHDT - INTEGER, DIMENSION(:), POINTER ::LAYHDS - double precision, DIMENSION(:), POINTER ::PERLEN - INTEGER, DIMENSION(:), POINTER ::NSTP - double precision, DIMENSION(:), POINTER ::TSMULT - INTEGER, DIMENSION(:), POINTER ::ISSFLG - double precision, DIMENSION(:), POINTER ::DELR - double precision, DIMENSION(:), POINTER ::DELC - double precision, DIMENSION(:,:,:), POINTER ::BOTM - double precision, DIMENSION(:,:,:), POINTER ::HOLD - INTEGER, DIMENSION(:,:,:), POINTER ::IBOUND - double precision, DIMENSION(:,:,:), POINTER ::CR - double precision, DIMENSION(:,:,:), POINTER ::CC - double precision, DIMENSION(:,:,:), POINTER ::CV - double precision, DIMENSION(:,:,:), POINTER ::HCOF - double precision, DIMENSION(:,:,:), POINTER ::RHS - double precision, DIMENSION(:,:,:), POINTER ::BUFF - double precision, DIMENSION(:,:,:), POINTER ::STRT - double precision, DIMENSION(:,:,:), POINTER ::DDREF + INTEGER, DIMENSION(:), POINTER ::IUNIT => null() + DOUBLE PRECISION, DIMENSION(:,:,:), POINTER ::HNEW => null() + INTEGER, DIMENSION(:), POINTER ::LBOTM => null() + INTEGER, DIMENSION(:), POINTER ::LAYCBD => null() + INTEGER, DIMENSION(:), POINTER ::LAYHDT => null() + INTEGER, DIMENSION(:), POINTER ::LAYHDS => null() + double precision, DIMENSION(:), POINTER ::PERLEN => null() + INTEGER, DIMENSION(:), POINTER ::NSTP => null() + double precision, DIMENSION(:), POINTER ::TSMULT => null() + INTEGER, DIMENSION(:), POINTER ::ISSFLG => null() + double precision, DIMENSION(:), POINTER ::DELR => null() + double precision, DIMENSION(:), POINTER ::DELC => null() + double precision, DIMENSION(:,:,:), POINTER ::BOTM => null() + double precision, DIMENSION(:,:,:), POINTER ::HOLD => null() + INTEGER, DIMENSION(:,:,:), POINTER ::IBOUND => null() + double precision, DIMENSION(:,:,:), POINTER ::CR => null() + double precision, DIMENSION(:,:,:), POINTER ::CC => null() + double precision, DIMENSION(:,:,:), POINTER ::CV => null() + double precision, DIMENSION(:,:,:), POINTER ::HCOF => null() + double precision, DIMENSION(:,:,:), POINTER ::RHS => null() + double precision, DIMENSION(:,:,:), POINTER ::BUFF => null() + double precision, DIMENSION(:,:,:), POINTER ::STRT => null() + double precision, DIMENSION(:,:,:), POINTER ::DDREF => null() END TYPE GLOBALTYPE TYPE(GLOBALTYPE),SAVE ::GLOBALDAT(10) diff --git a/utils/mf5to6/src/Preproc/SimVariables.f90 b/utils/mf5to6/src/Preproc/SimVariables.f90 index b6764cf3126..89e10a3eb7c 100644 --- a/utils/mf5to6/src/Preproc/SimVariables.f90 +++ b/utils/mf5to6/src/Preproc/SimVariables.f90 @@ -7,7 +7,7 @@ module SimVariablesModule private public :: ModelPacks, SimMovers, iout - type(ListType), pointer :: SimMovers + type(ListType), pointer :: SimMovers => null() type(ListType) :: ModelPacks end module SimVariablesModule diff --git a/utils/mf5to6/src/StoWriter.f90 b/utils/mf5to6/src/StoWriter.f90 index 09c83afcda9..bad97ffef2d 100644 --- a/utils/mf5to6/src/StoWriter.f90 +++ b/utils/mf5to6/src/StoWriter.f90 @@ -16,9 +16,9 @@ module StoWriterModule integer, pointer :: Nlaynew => null() integer, dimension(:), pointer :: Layptr => null() integer, pointer, dimension(:) :: Iconvert ! confined (0) or convertible (1), upstream (4)? - double precision, pointer, dimension(:,:,:) :: Ss ! specific storage (or storage coefficient) - double precision, pointer, dimension(:,:,:) :: Sy ! specific yield - logical, pointer, dimension(:) :: Transient + double precision, pointer, dimension(:,:,:) :: Ss => null() ! specific storage (or storage coefficient) + double precision, pointer, dimension(:,:,:) :: Sy => null() ! specific yield + logical, pointer, dimension(:) :: Transient => null() logical :: Newton contains procedure :: AllocateArrays diff --git a/utils/mf5to6/src/TdisWriter.f90 b/utils/mf5to6/src/TdisWriter.f90 index b42e2b36a7b..bffde367457 100644 --- a/utils/mf5to6/src/TdisWriter.f90 +++ b/utils/mf5to6/src/TdisWriter.f90 @@ -13,7 +13,7 @@ module TdisWriterModule type, extends(FileWriterType) :: TdisWriterType character(len=10), private :: TimeUnit = 'UNDEFINED' integer, private :: Nper = -1 - type(StressPeriodType), dimension(:), pointer :: StressPeriods + type(StressPeriodType), dimension(:), pointer :: StressPeriods => null() contains procedure, public :: InitializeFile => initialize_tdis procedure, public :: Alloc diff --git a/utils/mf5to6/src/mf5to6.f90 b/utils/mf5to6/src/mf5to6.f90 index 02773300473..0c01a5991fa 100644 --- a/utils/mf5to6/src/mf5to6.f90 +++ b/utils/mf5to6/src/mf5to6.f90 @@ -31,7 +31,7 @@ program mf5to6 type(ExchangeType), pointer :: exchange => null() type(SimFileWriterType) :: SimFileWriter type(SfrPackageWriterType), pointer :: SfrWriter => null() - class(*), pointer :: obj + class(*), pointer :: obj => null() character(len=MAXCHARLEN) :: fname, namfil, basnam, basnamtemp, msg logical :: WriteDisFile ! formats diff --git a/version.txt b/version.txt index 43bc0b2d3f6..2bef7bf68b8 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ # MODFLOW 6 version file automatically created using...pre-commit.py -# created on...August 28, 2018 18:34:48 +# created on...August 29, 2018 11:15:27 # add some comments on how this version file # should be manually updated and used @@ -7,6 +7,6 @@ major = 6 minor = 0 micro = 3 -build = 7 -commit = 108 +build = 8 +commit = 109 From 38f24a8054a2c75cf337040b2b8eb73b31560380 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Wed, 29 Aug 2018 14:56:02 -0400 Subject: [PATCH 005/170] Proposed fix for denormal results occurring with gfortran-8 and test016_Keating_disu_250. --- README.md | 2 +- code.json | 18 ++++++++-------- doc/version.tex | 2 +- src/Solution/NumericalSolution.f90 | 33 +++++++++++++++++++----------- src/Utilities/version.f90 | 2 +- version.txt | 6 +++--- 6 files changed, 36 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 20f6526e3f8..c83a2a792d6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Automated Testing Status on Travis-CI -### Version 6.0.3 develop — build 8 +### Version 6.0.3 develop — build 9 [![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6) ## Introduction diff --git a/code.json b/code.json index 4a8644867aa..40a4768c9f8 100755 --- a/code.json +++ b/code.json @@ -1,24 +1,24 @@ [ { "status": "Release Candidate", - "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", + "languages": [ + "Fortran2008" + ], "repositoryURL": "https://code.usgs.gov/usgs/modflow/modflow6.git", - "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md", + "laborHours": -1, + "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", "tags": [ "MODFLOW", "groundwater model" ], - "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", + "name": "modflow6", + "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", "contact": { "name": "Christian D. Langevin", "email": "langevin@usgs.gov" }, - "languages": [ - "Fortran2008" - ], "vcs": "git", - "laborHours": -1, - "version": "6.0.3.8", + "version": "6.0.3.9", "date": { "metadataLastUpdated": "2018-08-29" }, @@ -33,6 +33,6 @@ "usageType": "openSource" }, "homepageURL": "https://code.usgs.gov/usgs/modflow/modflow6/", - "name": "modflow6" + "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md" } ] \ No newline at end of file diff --git a/doc/version.tex b/doc/version.tex index 209db8e5f3f..da76da8c838 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,3 +1,3 @@ -\newcommand{\modflowversion}{mf6.0.3.8} +\newcommand{\modflowversion}{mf6.0.3.9} \newcommand{\modflowdate}{August 29, 2018} \newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate} diff --git a/src/Solution/NumericalSolution.f90 b/src/Solution/NumericalSolution.f90 index 4a97fe35159..f10d6aa0fef 100644 --- a/src/Solution/NumericalSolution.f90 +++ b/src/Solution/NumericalSolution.f90 @@ -4,7 +4,7 @@ module NumericalSolutionModule use KindModule, only: DP, I4B use TimerModule, only: code_timer use ConstantsModule, only: LINELENGTH, LENSOLUTIONNAME, & - DZERO, DEM20, DEM15, DEM6, DEM4, & + DPREC, DZERO, DEM20, DEM15, DEM6, DEM4, & DEM3, DEM2, DEM1, DHALF, & DONE, DTHREE, DEP6, DEP20 use VersionModule, only: IDEVELOPMODE @@ -2304,11 +2304,20 @@ subroutine sln_maxval(this, neq, v, vnorm) ! -- local integer(I4B) :: n real(DP) :: d + real(DP) :: denom + real(DP) :: dnorm ! ------------------------------------------------------------------------------ - vnorm = DZERO - do n = 1, neq + vnorm = v(1) + do n = 2, neq d = v(n) - if (abs(d) > vnorm) then + denom = abs(vnorm) + if (denom == DZERO) then + denom = DPREC + end if + ! + ! -- calculate normalized value + dnorm = abs(d) / denom + if (dnorm > DONE) then vnorm = d end if end do @@ -2386,29 +2395,29 @@ subroutine sln_underrelax(this, kiter, bigch, neq, active, x, xtemp) else if (this%nonmeth == 2) then if (kiter == 1) then relax = done - this%relaxold = done + this%relaxold = DONE this%bigch = bigch this%bigchold = bigch else ! -- compute relaxation factor es = this%bigch / (this%bigchold * this%relaxold) aes = abs(es) - if (es.lt.-done) then + if (es < -DONE) then relax = dhalf / aes else - relax = (dthree + es) / (dthree + aes) + relax = (DTHREE + es) / (DTHREE + aes) end if end if this%relaxold = relax ! ! -- modify cooley to use exponential average of past changes - this%bigchold = (done - this%gamma) * this%bigch + this%gamma * & + this%bigchold = (DONE - this%gamma) * this%bigch + this%gamma * & this%bigchold ! -- this method does it right after newton - need to do it after ! underrelaxation and backtracking. ! ! -- compute new head after under-relaxation - if (relax.lt.done) then + if (relax < DONE) then do n = 1, neq if (active(n) < 1) cycle delx = x(n) - xtemp(n) @@ -2426,7 +2435,7 @@ subroutine sln_underrelax(this, kiter, bigch, neq, active, x, xtemp) ! -- compute step-size (delta x) and initialize d-b-d parameters delx = x(n) - xtemp(n) - if ( kiter.eq.1 ) then + if ( kiter == 1 ) then this%wsave(n) = DONE this%hchold(n) = DEM20 this%deold(n) = DZERO @@ -2442,7 +2451,7 @@ subroutine sln_underrelax(this, kiter, bigch, neq, active, x, xtemp) else ww = this%wsave(n) + this%akappa end if - if ( ww.gt.done ) ww = done + if ( ww > DONE ) ww = DONE this%wsave(n) = ww ! -- compute exponential average of past changes in hchold @@ -2461,7 +2470,7 @@ subroutine sln_underrelax(this, kiter, bigch, neq, active, x, xtemp) ! ! -- compute accepted step-size and new head amom = DZERO - if (kiter.gt.4) amom = this%amomentum + if (kiter > 4) amom = this%amomentum delx = delx * ww + amom * this%hchold(n) x(n) = xtemp(n) + delx end do diff --git a/src/Utilities/version.f90 b/src/Utilities/version.f90 index d4fcec94884..1731667551f 100644 --- a/src/Utilities/version.f90 +++ b/src/Utilities/version.f90 @@ -3,7 +3,7 @@ module VersionModule public ! -- modflow 6 version integer(I4B), parameter :: IDEVELOPMODE = 1 - character(len=40), parameter :: VERSION = '6.0.3.8 08/29/2018' + character(len=40), parameter :: VERSION = '6.0.3.9 08/29/2018' character(len=10), parameter :: MFVNAM = ' 6' character(len=*), parameter :: MFTITLE = & 'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL' diff --git a/version.txt b/version.txt index 2bef7bf68b8..e3897fef2bd 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ # MODFLOW 6 version file automatically created using...pre-commit.py -# created on...August 29, 2018 11:15:27 +# created on...August 29, 2018 14:56:02 # add some comments on how this version file # should be manually updated and used @@ -7,6 +7,6 @@ major = 6 minor = 0 micro = 3 -build = 8 -commit = 109 +build = 9 +commit = 110 From 76ae1b42a82603a3598c1c16e12e51034124734d Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Wed, 29 Aug 2018 15:10:17 -0400 Subject: [PATCH 006/170] Proposed fix for denormal results occurring with gfortran-8 and test016_Keating_disu_250. (2) --- README.md | 2 +- code.json | 18 +++++++++--------- doc/version.tex | 2 +- src/Solution/NumericalSolution.f90 | 4 +++- src/Utilities/version.f90 | 2 +- version.txt | 6 +++--- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c83a2a792d6..ecac302ff73 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Automated Testing Status on Travis-CI -### Version 6.0.3 develop — build 9 +### Version 6.0.3 develop — build 10 [![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6) ## Introduction diff --git a/code.json b/code.json index 40a4768c9f8..2ee2eb56fec 100755 --- a/code.json +++ b/code.json @@ -1,24 +1,24 @@ [ { "status": "Release Candidate", - "languages": [ - "Fortran2008" - ], + "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", "repositoryURL": "https://code.usgs.gov/usgs/modflow/modflow6.git", - "laborHours": -1, + "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md", "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", "tags": [ "MODFLOW", "groundwater model" ], - "name": "modflow6", - "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", + "vcs": "git", + "languages": [ + "Fortran2008" + ], "contact": { "name": "Christian D. Langevin", "email": "langevin@usgs.gov" }, - "vcs": "git", - "version": "6.0.3.9", + "laborHours": -1, + "version": "6.0.3.10", "date": { "metadataLastUpdated": "2018-08-29" }, @@ -33,6 +33,6 @@ "usageType": "openSource" }, "homepageURL": "https://code.usgs.gov/usgs/modflow/modflow6/", - "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md" + "name": "modflow6" } ] \ No newline at end of file diff --git a/doc/version.tex b/doc/version.tex index da76da8c838..299713e2572 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,3 +1,3 @@ -\newcommand{\modflowversion}{mf6.0.3.9} +\newcommand{\modflowversion}{mf6.0.3.10} \newcommand{\modflowdate}{August 29, 2018} \newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate} diff --git a/src/Solution/NumericalSolution.f90 b/src/Solution/NumericalSolution.f90 index f10d6aa0fef..41e702145bf 100644 --- a/src/Solution/NumericalSolution.f90 +++ b/src/Solution/NumericalSolution.f90 @@ -351,9 +351,11 @@ subroutine allocate_arrays(this) call mem_allocate(this%convdvmax, this%convnmod, 0, 'CONVDVMAX', this%name) call mem_allocate(this%convdrmax, this%convnmod, 0, 'CONVDRMAX', this%name) ! - ! -- initialize + ! -- initialize allocated arrays do i = 1, this%neq this%x(i) = DZERO + this%xtemp(i) = DZERO + this%dxold(i) = DZERO this%active(i) = 1 !default is active enddo ! diff --git a/src/Utilities/version.f90 b/src/Utilities/version.f90 index 1731667551f..e9ef8ed1f82 100644 --- a/src/Utilities/version.f90 +++ b/src/Utilities/version.f90 @@ -3,7 +3,7 @@ module VersionModule public ! -- modflow 6 version integer(I4B), parameter :: IDEVELOPMODE = 1 - character(len=40), parameter :: VERSION = '6.0.3.9 08/29/2018' + character(len=40), parameter :: VERSION = '6.0.3.10 08/29/2018' character(len=10), parameter :: MFVNAM = ' 6' character(len=*), parameter :: MFTITLE = & 'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL' diff --git a/version.txt b/version.txt index e3897fef2bd..2d2cc752bfe 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ # MODFLOW 6 version file automatically created using...pre-commit.py -# created on...August 29, 2018 14:56:02 +# created on...August 29, 2018 15:10:18 # add some comments on how this version file # should be manually updated and used @@ -7,6 +7,6 @@ major = 6 minor = 0 micro = 3 -build = 9 -commit = 110 +build = 10 +commit = 111 From 8ec3f2e8fa873122bd61841760f49b794f874089 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Wed, 29 Aug 2018 17:37:44 -0400 Subject: [PATCH 007/170] Additional cleanup of variable definitions. Modified .travis.yml to require successful testing of gfortran-7 and gfortran-8 environments. --- .travis.yml | 8 +- README.md | 2 +- code.json | 16 ++-- doc/version.tex | 2 +- src/Exchange/GhostNode.f90 | 36 ++++----- src/Exchange/GwfGwfExchange.f90 | 45 +++++------ src/Exchange/NumericalExchange.f90 | 36 ++++----- src/Model/BaseModel.f90 | 20 ++--- src/Model/ModelUtilities/Connections.f90 | 36 ++++----- .../ModelUtilities/DiscretizationBase.f90 | 62 +++++++-------- src/Model/ModelUtilities/DisvGeom.f90 | 6 +- src/Model/ModelUtilities/Mover.f90 | 30 +++---- src/Model/ModelUtilities/PackageMover.f90 | 6 +- src/Model/ModelUtilities/Xt3dInterface.f90 | 78 +++++++++---------- src/Model/NumericalModel.f90 | 32 ++++---- src/Model/NumericalPackage.f90 | 30 +++---- src/Solution/SolutionGroup.f90 | 8 +- src/Timing/tdis.f90 | 38 ++++----- src/Utilities/Budget.f90 | 24 +++--- src/Utilities/HashTable.f90 | 4 +- src/Utilities/Iunit.f90 | 4 +- src/Utilities/List.f90 | 8 +- src/Utilities/ListReader.f90 | 53 ++++++------- src/Utilities/Observation/Obs3.f90 | 36 ++++----- src/Utilities/Observation/ObsContainer.f90 | 2 +- src/Utilities/Observation/ObsOutput.f90 | 8 +- src/Utilities/SimVariables.f90 | 12 +-- src/Utilities/Sparse.f90 | 12 +-- src/Utilities/TimeSeries/TimeArray.f90 | 2 +- src/Utilities/TimeSeries/TimeArraySeries.f90 | 16 ++-- .../TimeSeries/TimeArraySeriesManager.f90 | 12 +-- src/Utilities/TimeSeries/TimeSeries.f90 | 10 +-- .../TimeSeries/TimeSeriesFileList.f90 | 2 +- src/Utilities/TimeSeries/TimeSeriesLink.f90 | 24 +++--- .../TimeSeries/TimeSeriesManager.f90 | 17 ++-- src/Utilities/kind.f90 | 6 +- src/Utilities/version.f90 | 2 +- src/mf6.f90 | 8 +- version.txt | 6 +- 39 files changed, 382 insertions(+), 377 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13af12808d4..78d89db129e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -112,9 +112,11 @@ matrix: - latex-xcolor - unzip - allow_failures: - - env: CVER=gfortran7 - - env: CVER=gfortran8 + # allowed failures - uncomment lines below to allow failure + # of specific gfortran compilers + #allow_failures: + # - env: CVER=gfortran7 + # - env: CVER=gfortran8 diff --git a/README.md b/README.md index ecac302ff73..6d0d3133b15 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Automated Testing Status on Travis-CI -### Version 6.0.3 develop — build 10 +### Version 6.0.3 develop — build 11 [![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6) ## Introduction diff --git a/code.json b/code.json index 2ee2eb56fec..7a421e04403 100755 --- a/code.json +++ b/code.json @@ -1,24 +1,24 @@ [ { "status": "Release Candidate", - "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", + "languages": [ + "Fortran2008" + ], "repositoryURL": "https://code.usgs.gov/usgs/modflow/modflow6.git", "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md", - "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", + "name": "modflow6", "tags": [ "MODFLOW", "groundwater model" ], - "vcs": "git", - "languages": [ - "Fortran2008" - ], "contact": { "name": "Christian D. Langevin", "email": "langevin@usgs.gov" }, + "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", + "vcs": "git", "laborHours": -1, - "version": "6.0.3.10", + "version": "6.0.3.11", "date": { "metadataLastUpdated": "2018-08-29" }, @@ -33,6 +33,6 @@ "usageType": "openSource" }, "homepageURL": "https://code.usgs.gov/usgs/modflow/modflow6/", - "name": "modflow6" + "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions." } ] \ No newline at end of file diff --git a/doc/version.tex b/doc/version.tex index 299713e2572..1faa392693c 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,3 +1,3 @@ -\newcommand{\modflowversion}{mf6.0.3.10} +\newcommand{\modflowversion}{mf6.0.3.11} \newcommand{\modflowdate}{August 29, 2018} \newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate} diff --git a/src/Exchange/GhostNode.f90 b/src/Exchange/GhostNode.f90 index 1a7b5b5cf8e..19132281334 100644 --- a/src/Exchange/GhostNode.f90 +++ b/src/Exchange/GhostNode.f90 @@ -13,24 +13,24 @@ module GhostNodeModule public :: gnc_cr type, extends(NumericalPackageType) :: GhostNodeType - logical, pointer :: smgnc => null() ! single model gnc - logical, pointer :: implicit => null() ! lhs or rhs - logical, pointer :: i2kn => null() ! not used - integer(I4B), pointer :: nexg => null() ! number of gncs - integer(I4B), pointer :: numjs => null() ! number of connecting nodes - class(NumericalModelType), pointer :: m1 => null() ! pointer to model 1 - class(NumericalModelType), pointer :: m2 => null() ! pointer to model 2 - integer(I4B), dimension(:), pointer, contiguous :: nodem1 => null() ! array of nodes in model 1 - integer(I4B), dimension(:), pointer, contiguous :: nodem2 => null() ! array of nodes in model 2 - integer(I4B), dimension(:, :), pointer, contiguous :: nodesj => null() ! array of interpolation nodes - real(DP), dimension(:), pointer, contiguous :: cond => null() ! array of conductance - integer(I4B), dimension(:), pointer, contiguous :: idxglo => null() ! connection position in amat - integer(I4B), dimension(:), pointer, contiguous :: idxsymglo => null() ! symmetric position in amat - real(DP), dimension(:, :), pointer, contiguous :: alphasj => null() ! interpolation factors - integer(I4B), dimension(:), pointer, contiguous :: idiagn => null() ! amat diagonal position of n - integer(I4B), dimension(:), pointer, contiguous :: idiagm => null() ! amat diagonal position of m - integer(I4B), dimension(:,:), pointer, contiguous :: jposinrown => null() ! amat j position in row n - integer(I4B), dimension(:,:), pointer, contiguous :: jposinrowm => null() ! amat j position in row m + logical, pointer :: smgnc => null() ! single model gnc + logical, pointer :: implicit => null() ! lhs or rhs + logical, pointer :: i2kn => null() ! not used + integer(I4B), pointer :: nexg => null() ! number of gncs + integer(I4B), pointer :: numjs => null() ! number of connecting nodes + class(NumericalModelType), pointer :: m1 => null() ! pointer to model 1 + class(NumericalModelType), pointer :: m2 => null() ! pointer to model 2 + integer(I4B), dimension(:), pointer, contiguous :: nodem1 => null() ! array of nodes in model 1 + integer(I4B), dimension(:), pointer, contiguous :: nodem2 => null() ! array of nodes in model 2 + integer(I4B), dimension(:, :), pointer, contiguous :: nodesj => null() ! array of interpolation nodes + real(DP), dimension(:), pointer, contiguous :: cond => null() ! array of conductance + integer(I4B), dimension(:), pointer, contiguous :: idxglo => null() ! connection position in amat + integer(I4B), dimension(:), pointer, contiguous :: idxsymglo => null() ! symmetric position in amat + real(DP), dimension(:, :), pointer, contiguous :: alphasj => null() ! interpolation factors + integer(I4B), dimension(:), pointer, contiguous :: idiagn => null() ! amat diagonal position of n + integer(I4B), dimension(:), pointer, contiguous :: idiagm => null() ! amat diagonal position of m + integer(I4B), dimension(:,:), pointer, contiguous :: jposinrown => null() ! amat j position in row n + integer(I4B), dimension(:,:), pointer, contiguous :: jposinrowm => null() ! amat j position in row m contains procedure :: gnc_df procedure :: gnc_ac diff --git a/src/Exchange/GwfGwfExchange.f90 b/src/Exchange/GwfGwfExchange.f90 index 835f2c2a524..81cabadc178 100644 --- a/src/Exchange/GwfGwfExchange.f90 +++ b/src/Exchange/GwfGwfExchange.f90 @@ -23,28 +23,29 @@ module GwfGwfExchangeModule public :: gwfexchange_create type, extends(NumericalExchangeType) :: GwfExchangeType - type(GwfModelType), pointer :: gwfmodel1 => null() ! pointer to GWF Model 1 - type(GwfModelType), pointer :: gwfmodel2 => null() ! pointer to GWF Model 2 - integer(I4B), pointer :: inewton => null() ! newton flag (1 newton is on) - integer(I4B), pointer :: icellavg => null() ! cell averaging - integer(I4B), pointer :: ivarcv => null() ! variable cv - integer(I4B), pointer :: idewatcv => null() ! dewatered cv - integer(I4B), pointer :: ianglex => null() ! flag indicating anglex was read, if read, ianglex is index in auxvar - integer(I4B), pointer :: icdist => null() ! flag indicating cdist was read, if read, icdist is index in auxvar - integer(I4B), pointer :: inamedbound => null() ! flag to read boundnames - real(DP), pointer :: satomega => null() ! saturation smoothing - integer(I4B), dimension(:), pointer, contiguous :: ihc => null() ! horizontal connection indicator array - real(DP), dimension(:), pointer, contiguous :: condsat => null() ! saturated conductance - real(DP), dimension(:), pointer, contiguous :: cl1 => null() ! connection length 1 - real(DP), dimension(:), pointer, contiguous :: cl2 => null() ! connection length 2 - real(DP), dimension(:), pointer, contiguous :: hwva => null() ! horizontal widths, vertical flow areas - integer(I4B), pointer :: ingnc => null() ! unit number for gnc (0 if off) - type(GhostNodeType), pointer :: gnc => null() ! gnc object - integer(I4B), pointer :: inmvr => null() ! unit number for mover (0 if off) - type(GwfMvrType), pointer :: mvr => null() ! water mover object - integer(I4B), pointer :: inobs => null() ! unit number for GWF-GWF observations - type(ObsType), pointer :: obs => null() ! observation object - character(len=LENBOUNDNAME), dimension(:), pointer, contiguous :: boundname => null() ! boundnames + type(GwfModelType), pointer :: gwfmodel1 => null() ! pointer to GWF Model 1 + type(GwfModelType), pointer :: gwfmodel2 => null() ! pointer to GWF Model 2 + integer(I4B), pointer :: inewton => null() ! newton flag (1 newton is on) + integer(I4B), pointer :: icellavg => null() ! cell averaging + integer(I4B), pointer :: ivarcv => null() ! variable cv + integer(I4B), pointer :: idewatcv => null() ! dewatered cv + integer(I4B), pointer :: ianglex => null() ! flag indicating anglex was read, if read, ianglex is index in auxvar + integer(I4B), pointer :: icdist => null() ! flag indicating cdist was read, if read, icdist is index in auxvar + integer(I4B), pointer :: inamedbound => null() ! flag to read boundnames + real(DP), pointer :: satomega => null() ! saturation smoothing + integer(I4B), dimension(:), pointer, contiguous :: ihc => null() ! horizontal connection indicator array + real(DP), dimension(:), pointer, contiguous :: condsat => null() ! saturated conductance + real(DP), dimension(:), pointer, contiguous :: cl1 => null() ! connection length 1 + real(DP), dimension(:), pointer, contiguous :: cl2 => null() ! connection length 2 + real(DP), dimension(:), pointer, contiguous :: hwva => null() ! horizontal widths, vertical flow areas + integer(I4B), pointer :: ingnc => null() ! unit number for gnc (0 if off) + type(GhostNodeType), pointer :: gnc => null() ! gnc object + integer(I4B), pointer :: inmvr => null() ! unit number for mover (0 if off) + type(GwfMvrType), pointer :: mvr => null() ! water mover object + integer(I4B), pointer :: inobs => null() ! unit number for GWF-GWF observations + type(ObsType), pointer :: obs => null() ! observation object + character(len=LENBOUNDNAME), dimension(:), & + pointer, contiguous :: boundname => null() ! boundnames contains procedure :: exg_df => gwf_gwf_df procedure :: exg_ac => gwf_gwf_ac diff --git a/src/Exchange/NumericalExchange.f90 b/src/Exchange/NumericalExchange.f90 index a0f811eb654..50fdd256c19 100644 --- a/src/Exchange/NumericalExchange.f90 +++ b/src/Exchange/NumericalExchange.f90 @@ -15,24 +15,24 @@ module NumericalExchangeModule AddNumericalExchangeToList, GetNumericalExchangeFromList type, extends(BaseExchangeType) :: NumericalExchangeType - character(len=LINELENGTH), pointer :: filename !name of the input file - character(len=7), pointer :: typename !name of the type (e.g., 'NM-NM') - logical, pointer :: implicit !logical flag to indicate implicit or explict exchange - integer(I4B), pointer :: iprpak !print input flag - integer(I4B), pointer :: iprflow !print flag for cell by cell flows - integer(I4B), pointer :: ipakcb !save flag for cell by cell flows - integer(I4B), pointer :: nexg !number of exchanges - integer(I4B), dimension(:), pointer, contiguous :: nodem1 !node numbers in model 1 - integer(I4B), dimension(:), pointer, contiguous :: nodem2 !node numbers in model 2 - real(DP), dimension(:), pointer, contiguous :: cond !conductance - integer(I4B), dimension(:), pointer, contiguous :: idxglo !pointer to solution amat for each connection - integer(I4B), dimension(:), pointer, contiguous :: idxsymglo !pointer to symmetric amat position for each connection - class(NumericalModelType), pointer :: m1 !pointer to model 1 - class(NumericalModelType), pointer :: m2 !pointer to model 2 - integer(I4B), pointer :: naux !number of auxiliary variables - character(len=16), allocatable, dimension(:) :: auxname !array of auxiliary variable names - real(DP), dimension(:, :), pointer, contiguous :: auxvar !array of auxiliary variable values - type(BlockParserType) :: parser !block parser + character(len=LINELENGTH), pointer :: filename => null() !name of the input file + character(len=7), pointer :: typename => null() !name of the type (e.g., 'NM-NM') + logical, pointer :: implicit => null() !logical flag to indicate implicit or explict exchange + integer(I4B), pointer :: iprpak => null() !print input flag + integer(I4B), pointer :: iprflow => null() !print flag for cell by cell flows + integer(I4B), pointer :: ipakcb => null() !save flag for cell by cell flows + integer(I4B), pointer :: nexg => null() !number of exchanges + integer(I4B), dimension(:), pointer, contiguous :: nodem1 => null() !node numbers in model 1 + integer(I4B), dimension(:), pointer, contiguous :: nodem2 => null() !node numbers in model 2 + real(DP), dimension(:), pointer, contiguous :: cond => null() !conductance + integer(I4B), dimension(:), pointer, contiguous :: idxglo => null() !pointer to solution amat for each connection + integer(I4B), dimension(:), pointer, contiguous :: idxsymglo => null() !pointer to symmetric amat position for each connection + class(NumericalModelType), pointer :: m1 => null() !pointer to model 1 + class(NumericalModelType), pointer :: m2 => null() !pointer to model 2 + integer(I4B), pointer :: naux => null() !number of auxiliary variables + character(len=16), allocatable, dimension(:) :: auxname !array of auxiliary variable names + real(DP), dimension(:, :), pointer, contiguous :: auxvar => null() !array of auxiliary variable values + type(BlockParserType) :: parser !block parser contains procedure :: exg_df procedure :: exg_ac diff --git a/src/Model/BaseModel.f90 b/src/Model/BaseModel.f90 index 780b58ba2f4..42ac1b4745b 100644 --- a/src/Model/BaseModel.f90 +++ b/src/Model/BaseModel.f90 @@ -12,16 +12,16 @@ module BaseModelModule GetBaseModelFromList type :: BaseModelType - character(len=LENMODELNAME), pointer :: name => null() ! name of the model - character(len=3), pointer :: macronym => null() ! 3 letter model acronym (GWF, GWT, ...) - integer(I4B), pointer :: idsoln => null() ! id of the solution model is in - integer(I4B), pointer :: id => null() ! model id - integer(I4B), pointer :: iout => null() ! output unit number - integer(I4B), pointer :: inewton => null() ! newton-raphson flag - integer(I4B), pointer :: iprpak => null() ! integer flag to echo input - integer(I4B), pointer :: iprflow => null() ! flag to print simulated flows - integer(I4B), pointer :: ipakcb => null() ! save_flows flag - logical, pointer :: single_model_run => null() ! indicate if it is a single model run + character(len=LENMODELNAME), pointer :: name => null() ! name of the model + character(len=3), pointer :: macronym => null() ! 3 letter model acronym (GWF, GWT, ...) + integer(I4B), pointer :: idsoln => null() ! id of the solution model is in + integer(I4B), pointer :: id => null() ! model id + integer(I4B), pointer :: iout => null() ! output unit number + integer(I4B), pointer :: inewton => null() ! newton-raphson flag + integer(I4B), pointer :: iprpak => null() ! integer flag to echo input + integer(I4B), pointer :: iprflow => null() ! flag to print simulated flows + integer(I4B), pointer :: ipakcb => null() ! save_flows flag + logical, pointer :: single_model_run => null() ! indicate if it is a single model run contains procedure :: model_df procedure :: model_ar diff --git a/src/Model/ModelUtilities/Connections.f90 b/src/Model/ModelUtilities/Connections.f90 index ddd71c34fca..47e3c3749bf 100644 --- a/src/Model/ModelUtilities/Connections.f90 +++ b/src/Model/ModelUtilities/Connections.f90 @@ -10,24 +10,24 @@ module ConnectionsModule public :: ConnectionsType type ConnectionsType - character(len=LENMODELNAME), pointer :: name_model => null() !name of the model - character(len=LENORIGIN), pointer :: cid => null() !character id of this object - integer(I4B), pointer :: nodes => null() !number of nodes - integer(I4B), pointer :: nja => null() !number of connections - integer(I4B), pointer :: njas => null() !number of symmetric connections - integer(I4B), pointer :: ianglex => null() !indicates whether or not anglex was read - integer(I4B), dimension(:), pointer, contiguous :: ia => null() !(size:nodes+1) csr index array - integer(I4B), dimension(:), pointer, contiguous :: ja => null() !(size:nja) csr pointer array - real(DP), dimension(:), pointer, contiguous :: cl1 => null() !(size:njas) connection length between node n and shared face with node m - real(DP), dimension(:), pointer, contiguous :: cl2 => null() !(size:njas) connection length between node m and shared face with node n - real(DP), dimension(:), pointer, contiguous :: hwva => null() !(size:njas) horizontal perpendicular width (ihc>0) or vertical flow area (ihc=0) - real(DP), dimension(:), pointer, contiguous :: anglex => null() !(size:njas) connection angle of face normal with x axis (read in degrees, stored as radians) - integer(I4B), dimension(:), pointer, contiguous :: isym => null() !(size:nja) returns csr index of symmetric counterpart - integer(I4B), dimension(:), pointer, contiguous :: jas => null() !(size:nja) map any connection to upper triangle (for pulling out of symmetric array) - integer(I4B), dimension(:), pointer, contiguous :: ihc => null() !(size:njas) horizontal connection (0:vertical, 1:mean thickness, 2:staggered) - integer(I4B), dimension(:), pointer, contiguous :: iausr => null() !(size:nodesusr+1) - integer(I4B), dimension(:), pointer, contiguous :: jausr => null() !(size:nja) - type(BlockParserType) :: parser !block parser + character(len=LENMODELNAME), pointer :: name_model => null() !name of the model + character(len=LENORIGIN), pointer :: cid => null() !character id of this object + integer(I4B), pointer :: nodes => null() !number of nodes + integer(I4B), pointer :: nja => null() !number of connections + integer(I4B), pointer :: njas => null() !number of symmetric connections + integer(I4B), pointer :: ianglex => null() !indicates whether or not anglex was read + integer(I4B), dimension(:), pointer, contiguous :: ia => null() !(size:nodes+1) csr index array + integer(I4B), dimension(:), pointer, contiguous :: ja => null() !(size:nja) csr pointer array + real(DP), dimension(:), pointer, contiguous :: cl1 => null() !(size:njas) connection length between node n and shared face with node m + real(DP), dimension(:), pointer, contiguous :: cl2 => null() !(size:njas) connection length between node m and shared face with node n + real(DP), dimension(:), pointer, contiguous :: hwva => null() !(size:njas) horizontal perpendicular width (ihc>0) or vertical flow area (ihc=0) + real(DP), dimension(:), pointer, contiguous :: anglex => null() !(size:njas) connection angle of face normal with x axis (read in degrees, stored as radians) + integer(I4B), dimension(:), pointer, contiguous :: isym => null() !(size:nja) returns csr index of symmetric counterpart + integer(I4B), dimension(:), pointer, contiguous :: jas => null() !(size:nja) map any connection to upper triangle (for pulling out of symmetric array) + integer(I4B), dimension(:), pointer, contiguous :: ihc => null() !(size:njas) horizontal connection (0:vertical, 1:mean thickness, 2:staggered) + integer(I4B), dimension(:), pointer, contiguous :: iausr => null() !(size:nodesusr+1) + integer(I4B), dimension(:), pointer, contiguous :: jausr => null() !(size:nja) + type(BlockParserType) :: parser !block parser contains procedure :: con_da procedure :: allocate_scalars diff --git a/src/Model/ModelUtilities/DiscretizationBase.f90 b/src/Model/ModelUtilities/DiscretizationBase.f90 index e881d7c5419..857b0956743 100644 --- a/src/Model/ModelUtilities/DiscretizationBase.f90 +++ b/src/Model/ModelUtilities/DiscretizationBase.f90 @@ -18,29 +18,29 @@ module BaseDisModule public :: DisBaseType type :: DisBaseType - character(len=LENORIGIN), pointer :: origin => null() !origin name for mem allocation - character(len=LENMODELNAME), pointer :: name_model => null() !name of the model - integer(I4B), pointer :: inunit => null() !unit number for input file - integer(I4B), pointer :: iout => null() !unit number for output file - integer(I4B), pointer :: nodes => null() !number of nodes in solution - integer(I4B), pointer :: nodesuser => null() !number of user nodes (same as nodes for disu grid) - integer(I4B), pointer :: nja => null() !number of connections plus number of nodes - integer(I4B), pointer :: njas => null() !(nja-nodes)/2 - integer(I4B), pointer :: lenuni => null() !length unit - integer(I4B), pointer :: ndim => null() !number of spatial model dimensions (1 for disu grid) - integer(I4B), pointer :: icondir => null() !flag indicating if grid has enough info to calculate connection vectors - logical, pointer :: writegrb => null() !write binary grid file - real(DP), pointer :: yorigin => null() ! y-position of the lower-left grid corner (default is 0.) - real(DP), pointer :: xorigin => null() ! x-position of the lower-left grid corner (default is 0.) - real(DP), pointer :: angrot => null() ! counter-clockwise rotation angle of the lower-left corner (default is 0.0) - integer(I4B), dimension(:), pointer, contiguous :: mshape => null() !shape of the model; (nodes) for DisBaseType - real(DP), dimension(:), pointer, contiguous :: top => null() !(size:nodes) cell top elevation - real(DP), dimension(:), pointer, contiguous :: bot => null() !(size:nodes) cell bottom elevation - real(DP), dimension(:), pointer, contiguous :: area => null() !(size:nodes) cell area, in plan view - type(ConnectionsType), pointer :: con => null() !connections object - type(BlockParserType) :: parser !object to read blocks - real(DP), dimension(:), pointer, contiguous :: dbuff => null() - integer(I4B), dimension(:), pointer, contiguous :: ibuff => null() + character(len=LENORIGIN), pointer :: origin => null() !origin name for mem allocation + character(len=LENMODELNAME), pointer :: name_model => null() !name of the model + integer(I4B), pointer :: inunit => null() !unit number for input file + integer(I4B), pointer :: iout => null() !unit number for output file + integer(I4B), pointer :: nodes => null() !number of nodes in solution + integer(I4B), pointer :: nodesuser => null() !number of user nodes (same as nodes for disu grid) + integer(I4B), pointer :: nja => null() !number of connections plus number of nodes + integer(I4B), pointer :: njas => null() !(nja-nodes)/2 + integer(I4B), pointer :: lenuni => null() !length unit + integer(I4B), pointer :: ndim => null() !number of spatial model dimensions (1 for disu grid) + integer(I4B), pointer :: icondir => null() !flag indicating if grid has enough info to calculate connection vectors + logical, pointer :: writegrb => null() !write binary grid file + real(DP), pointer :: yorigin => null() ! y-position of the lower-left grid corner (default is 0.) + real(DP), pointer :: xorigin => null() ! x-position of the lower-left grid corner (default is 0.) + real(DP), pointer :: angrot => null() ! counter-clockwise rotation angle of the lower-left corner (default is 0.0) + integer(I4B), dimension(:), pointer, contiguous :: mshape => null() !shape of the model; (nodes) for DisBaseType + real(DP), dimension(:), pointer, contiguous :: top => null() !(size:nodes) cell top elevation + real(DP), dimension(:), pointer, contiguous :: bot => null() !(size:nodes) cell bottom elevation + real(DP), dimension(:), pointer, contiguous :: area => null() !(size:nodes) cell area, in plan view + type(ConnectionsType), pointer :: con => null() !connections object + type(BlockParserType) :: parser !object to read blocks + real(DP), dimension(:), pointer, contiguous :: dbuff => null() + integer(I4B), dimension(:), pointer, contiguous :: ibuff => null() contains procedure :: dis_df procedure :: dis_ac @@ -873,15 +873,15 @@ subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, & ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ ! -- dummy - class(DisBaseType), intent(inout) :: this - character(len=*), intent(inout) :: line - integer(I4B), intent(inout) :: lloc - integer(I4B), intent(inout) :: istart - integer(I4B), intent(inout) :: istop - integer(I4B), intent(in) :: in - integer(I4B), intent(in) :: iout + class(DisBaseType), intent(inout) :: this + character(len=*), intent(inout) :: line + integer(I4B), intent(inout) :: lloc + integer(I4B), intent(inout) :: istart + integer(I4B), intent(inout) :: istop + integer(I4B), intent(in) :: in + integer(I4B), intent(in) :: iout real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray - character(len=*), intent(in) :: aname + character(len=*), intent(in) :: aname ! -- local integer(I4B) :: ival character(len=LINELENGTH) :: ermsg diff --git a/src/Model/ModelUtilities/DisvGeom.f90 b/src/Model/ModelUtilities/DisvGeom.f90 index 28390a94244..2d8d4c2b2ca 100644 --- a/src/Model/ModelUtilities/DisvGeom.f90 +++ b/src/Model/ModelUtilities/DisvGeom.f90 @@ -15,7 +15,7 @@ module DisvGeom integer(I4B) :: nlay integer(I4B) :: ncpl logical :: reduced - integer(I4B) :: nodes ! number of reduced nodes; nodes = nlay *ncpl when grid is NOT reduced + integer(I4B) :: nodes ! number of reduced nodes; nodes = nlay *ncpl when grid is NOT reduced real(DP) :: top real(DP) :: bot real(DP), pointer, dimension(:) :: top_grid => null() @@ -24,8 +24,8 @@ module DisvGeom integer(I4B), pointer, dimension(:) :: javert => null() real(DP), pointer, dimension(:, :) :: vertex_grid => null() real(DP), pointer, dimension(:, :) :: cellxy_grid => null() - integer(I4B), pointer, dimension(:, :) :: nodereduced => null() ! nodered = nodereduced(nodeusr) - integer(I4B), pointer, dimension(:) :: nodeuser => null() ! nodeusr = nodesuser(nodered) + integer(I4B), pointer, dimension(:, :) :: nodereduced => null() ! nodered = nodereduced(nodeusr) + integer(I4B), pointer, dimension(:) :: nodeuser => null() ! nodeusr = nodesuser(nodered) contains procedure :: init generic :: set => set_kj, set_nodered diff --git a/src/Model/ModelUtilities/Mover.f90 b/src/Model/ModelUtilities/Mover.f90 index 08101c313fa..f587fd5174d 100644 --- a/src/Model/ModelUtilities/Mover.f90 +++ b/src/Model/ModelUtilities/Mover.f90 @@ -12,21 +12,21 @@ module MvrModule [character(len=12) :: 'FACTOR', 'EXCESS', 'THRESHOLD', 'UPTO'] type MvrType - character(len=LENMODELNAME+LENPACKAGENAME+1) :: pname1 = '' !provider package name - character(len=LENMODELNAME+LENPACKAGENAME+1) :: pname2 = '' !receiver package name - integer(I4B) :: irch1 = 0 !provider reach number - integer(I4B) :: irch2 = 0 !receiver reach number - character(len=20) :: mvrtype = '' !FACTOR, THRESHOLD, UPTO, EXCESS - real(DP) :: value = DZERO !factor or rate depending on mvrtype - real(DP) :: qpold = DZERO !provider rate from last time step - real(DP) :: qpnew = DZERO !new provider rate - real(DP) :: qpactual = DZERO !rate provided to the receiver - real(DP) :: qanew = DZERO !rate available at time of providing - real(DP) :: qaold = DZERO !rate available fromtime step - real(DP), pointer :: qtformvr_ptr => null() !pointer to total available flow (qtformvr) - real(DP), pointer :: qformvr_ptr => null() !pointer to available flow after being consumed (qformvr) - real(DP), pointer :: qtomvr_ptr => null() !pointer to provider flow rate (qtomvr) - real(DP), pointer :: qfrommvr_ptr => null() !pointer to receiver flow rate (qfrommvr) + character(len=LENMODELNAME+LENPACKAGENAME+1) :: pname1 = '' !provider package name + character(len=LENMODELNAME+LENPACKAGENAME+1) :: pname2 = '' !receiver package name + integer(I4B) :: irch1 = 0 !provider reach number + integer(I4B) :: irch2 = 0 !receiver reach number + character(len=20) :: mvrtype = '' !FACTOR, THRESHOLD, UPTO, EXCESS + real(DP) :: value = DZERO !factor or rate depending on mvrtype + real(DP) :: qpold = DZERO !provider rate from last time step + real(DP) :: qpnew = DZERO !new provider rate + real(DP) :: qpactual = DZERO !rate provided to the receiver + real(DP) :: qanew = DZERO !rate available at time of providing + real(DP) :: qaold = DZERO !rate available fromtime step + real(DP), pointer :: qtformvr_ptr => null() !pointer to total available flow (qtformvr) + real(DP), pointer :: qformvr_ptr => null() !pointer to available flow after being consumed (qformvr) + real(DP), pointer :: qtomvr_ptr => null() !pointer to provider flow rate (qtomvr) + real(DP), pointer :: qfrommvr_ptr => null() !pointer to receiver flow rate (qfrommvr) contains procedure :: set procedure :: set_qpold diff --git a/src/Model/ModelUtilities/PackageMover.f90 b/src/Model/ModelUtilities/PackageMover.f90 index fdc21f63ff0..19d86b24499 100644 --- a/src/Model/ModelUtilities/PackageMover.f90 +++ b/src/Model/ModelUtilities/PackageMover.f90 @@ -11,9 +11,9 @@ module PackageMoverModule type PackageMoverType - character(len=LENORIGIN) :: origin - integer, pointer :: nproviders - integer, pointer :: nreceivers + character(len=LENORIGIN) :: origin + integer, pointer :: nproviders + integer, pointer :: nreceivers real(DP), dimension(:), pointer, contiguous :: qtformvr => null() real(DP), dimension(:), pointer, contiguous :: qformvr => null() real(DP), dimension(:), pointer, contiguous :: qtomvr => null() diff --git a/src/Model/ModelUtilities/Xt3dInterface.f90 b/src/Model/ModelUtilities/Xt3dInterface.f90 index c94a2eba5cb..053239ff7f9 100644 --- a/src/Model/ModelUtilities/Xt3dInterface.f90 +++ b/src/Model/ModelUtilities/Xt3dInterface.f90 @@ -10,46 +10,46 @@ module Xt3dModule public :: xt3d_cr type Xt3dType - integer(I4B), pointer :: inunit => null() - integer(I4B), pointer :: iout => null() - character(len=LENORIGIN), pointer :: origin => null() !origin name of this package (e.g. 'GWF_1 NPF') - integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound - integer(I4B),dimension(:), pointer, contiguous :: iax => null() !ia array for extended neighbors used by xt3d - integer(I4B),dimension(:), pointer, contiguous :: jax => null() !ja array for extended neighbors used by xt3d - integer(I4B),dimension(:), pointer, contiguous :: idxglox => null() !mapping array for extended neighbors used by xt3d - integer(I4B), pointer :: numextnbrs => null() !dimension of jax array - integer(I4B), pointer :: ixt3d => null() !xt3d flag (0 is off, 1 is lhs, 2 is rhs) - logical, pointer :: nozee => null() !nozee flag - real(DP), pointer :: vcthresh => null() !attenuation function threshold - real(DP), dimension(:,:), pointer, contiguous :: rmatck => null() !rotation matrix for the conductivity tensor - real(DP), dimension(:,:), pointer, contiguous :: vecc => null() !connection vectors - real(DP), dimension(:,:), pointer, contiguous :: vecn => null() !interface normals - real(DP), dimension(:), pointer, contiguous :: conlen => null() !direct connection lengths - real(DP), dimension(:), pointer, contiguous :: qsat => null() !saturated flow saved for Newton - real(DP), dimension(:), pointer, contiguous :: qrhs => null() !rhs part of flow saved for Newton - integer(I4B), pointer :: nbrmax => null() !maximum number of neighbors for any cell - real(DP), dimension(:), pointer, contiguous :: amatpc => null() !saved contributions to amat from permanently confined connections, direct neighbors - real(DP), dimension(:), pointer, contiguous :: amatpcx => null() !saved contributions to amat from permanently confined connections, extended neighbors - integer(I4B), dimension(:), pointer, contiguous :: iallpc => null() !indicates for each node whether all connections processed by xt3d are permanently confined (0 no, 1 yes) - logical, pointer :: lamatsaved => null() !indicates whether amat has been saved for permanently confined connections - class(DisBaseType), pointer :: dis => null() !discretization object + integer(I4B), pointer :: inunit => null() + integer(I4B), pointer :: iout => null() + character(len=LENORIGIN), pointer :: origin => null() !origin name of this package (e.g. 'GWF_1 NPF') + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !pointer to model ibound + integer(I4B),dimension(:), pointer, contiguous :: iax => null() !ia array for extended neighbors used by xt3d + integer(I4B),dimension(:), pointer, contiguous :: jax => null() !ja array for extended neighbors used by xt3d + integer(I4B),dimension(:), pointer, contiguous :: idxglox => null() !mapping array for extended neighbors used by xt3d + integer(I4B), pointer :: numextnbrs => null() !dimension of jax array + integer(I4B), pointer :: ixt3d => null() !xt3d flag (0 is off, 1 is lhs, 2 is rhs) + logical, pointer :: nozee => null() !nozee flag + real(DP), pointer :: vcthresh => null() !attenuation function threshold + real(DP), dimension(:,:), pointer, contiguous :: rmatck => null() !rotation matrix for the conductivity tensor + real(DP), dimension(:,:), pointer, contiguous :: vecc => null() !connection vectors + real(DP), dimension(:,:), pointer, contiguous :: vecn => null() !interface normals + real(DP), dimension(:), pointer, contiguous :: conlen => null() !direct connection lengths + real(DP), dimension(:), pointer, contiguous :: qsat => null() !saturated flow saved for Newton + real(DP), dimension(:), pointer, contiguous :: qrhs => null() !rhs part of flow saved for Newton + integer(I4B), pointer :: nbrmax => null() !maximum number of neighbors for any cell + real(DP), dimension(:), pointer, contiguous :: amatpc => null() !saved contributions to amat from permanently confined connections, direct neighbors + real(DP), dimension(:), pointer, contiguous :: amatpcx => null() !saved contributions to amat from permanently confined connections, extended neighbors + integer(I4B), dimension(:), pointer, contiguous :: iallpc => null() !indicates for each node whether all connections processed by xt3d are permanently confined (0 no, 1 yes) + logical, pointer :: lamatsaved => null() !indicates whether amat has been saved for permanently confined connections + class(DisBaseType), pointer :: dis => null() !discretization object ! pointers to npf variables - real(DP), dimension(:), pointer, contiguous :: k11 => null() !horizontal hydraulic conductivity - real(DP), dimension(:),pointer, contiguous :: k22 => null() !minor axis of horizontal hydraulic conductivity ellipse - real(DP), dimension(:), pointer, contiguous :: k33 => null() !vertical hydraulic conductivity - integer(I4B), pointer :: ik22 => null() !flag indicates K22 was read - integer(I4B), pointer :: ik33 => null() !flag indicates K33 was read - real(DP), dimension(:), pointer, contiguous :: sat => null() !saturation (0. to 1.) for each cell - integer(I4B), pointer :: inewton => null() !Newton flag - real(DP), pointer :: min_satthk => null() !min saturated thickness - integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !cell type (confined or unconfined) - integer(I4B), pointer :: iangle1 => null() !flag to indicate angle1 was read - integer(I4B), pointer :: iangle2 => null() !flag to indicate angle2 was read - integer(I4B), pointer :: iangle3 => null() !flag to indicate angle3 was read - real(DP), dimension(:), pointer, contiguous :: angle1 => null() !k ellipse rotation in xy plane around z axis (yaw) - real(DP), dimension(:), pointer, contiguous :: angle2 => null() !k ellipse rotation up from xy plane around y axis (pitch) - real(DP), dimension(:), pointer, contiguous :: angle3 => null() !k tensor rotation around x axis (roll) - logical, pointer :: ldispersion => null() !flag to indicate dispersion + real(DP), dimension(:), pointer, contiguous :: k11 => null() !horizontal hydraulic conductivity + real(DP), dimension(:),pointer, contiguous :: k22 => null() !minor axis of horizontal hydraulic conductivity ellipse + real(DP), dimension(:), pointer, contiguous :: k33 => null() !vertical hydraulic conductivity + integer(I4B), pointer :: ik22 => null() !flag indicates K22 was read + integer(I4B), pointer :: ik33 => null() !flag indicates K33 was read + real(DP), dimension(:), pointer, contiguous :: sat => null() !saturation (0. to 1.) for each cell + integer(I4B), pointer :: inewton => null() !Newton flag + real(DP), pointer :: min_satthk => null() !min saturated thickness + integer(I4B), dimension(:), pointer, contiguous :: icelltype => null() !cell type (confined or unconfined) + integer(I4B), pointer :: iangle1 => null() !flag to indicate angle1 was read + integer(I4B), pointer :: iangle2 => null() !flag to indicate angle2 was read + integer(I4B), pointer :: iangle3 => null() !flag to indicate angle3 was read + real(DP), dimension(:), pointer, contiguous :: angle1 => null() !k ellipse rotation in xy plane around z axis (yaw) + real(DP), dimension(:), pointer, contiguous :: angle2 => null() !k ellipse rotation up from xy plane around y axis (pitch) + real(DP), dimension(:), pointer, contiguous :: angle3 => null() !k tensor rotation around x axis (roll) + logical, pointer :: ldispersion => null() !flag to indicate dispersion contains procedure :: xt3d_ac procedure :: xt3d_mc diff --git a/src/Model/NumericalModel.f90 b/src/Model/NumericalModel.f90 index 16b50d1dfa3..1634362f827 100644 --- a/src/Model/NumericalModel.f90 +++ b/src/Model/NumericalModel.f90 @@ -14,24 +14,24 @@ module NumericalModelModule GetNumericalModelFromList type, extends(BaseModelType) :: NumericalModelType - character(len=LINELENGTH), pointer :: filename => null() !input file name - integer(I4B), pointer :: neq => null() !number of equations - integer(I4B), pointer :: nja => null() !number of connections - integer(I4B), pointer :: moffset => null() !offset of this model in the solution - integer(I4B), pointer :: icnvg => null() !convergence flag - integer(I4B), dimension(:), pointer, contiguous :: ia => null() !csr row pointer - integer(I4B), dimension(:), pointer, contiguous :: ja => null() !csr columns - real(DP), dimension(:), pointer, contiguous :: x => null() !dependent variable (head, conc, etc) - real(DP), dimension(:), pointer, contiguous :: rhs => null() !right-hand side vector - real(DP), dimension(:), pointer, contiguous :: cond => null() !conductance matrix - integer(I4B), dimension(:), pointer, contiguous :: idxglo => null() !pointer to position in solution matrix - real(DP), dimension(:), pointer, contiguous :: xold => null() !dependent variable for previous timestep - real(DP), dimension(:), pointer, contiguous :: flowja => null() !intercell flows - integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !ibound array + character(len=LINELENGTH), pointer :: filename => null() !input file name + integer(I4B), pointer :: neq => null() !number of equations + integer(I4B), pointer :: nja => null() !number of connections + integer(I4B), pointer :: moffset => null() !offset of this model in the solution + integer(I4B), pointer :: icnvg => null() !convergence flag + integer(I4B), dimension(:), pointer, contiguous :: ia => null() !csr row pointer + integer(I4B), dimension(:), pointer, contiguous :: ja => null() !csr columns + real(DP), dimension(:), pointer, contiguous :: x => null() !dependent variable (head, conc, etc) + real(DP), dimension(:), pointer, contiguous :: rhs => null() !right-hand side vector + real(DP), dimension(:), pointer, contiguous :: cond => null() !conductance matrix + integer(I4B), dimension(:), pointer, contiguous :: idxglo => null() !pointer to position in solution matrix + real(DP), dimension(:), pointer, contiguous :: xold => null() !dependent variable for previous timestep + real(DP), dimension(:), pointer, contiguous :: flowja => null() !intercell flows + integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !ibound array ! ! -- Derived types - type(ListType), pointer :: bndlist => null() !array of boundary packages for this model - class(DisBaseType), pointer :: dis => null() !discretization object + type(ListType), pointer :: bndlist => null() !array of boundary packages for this model + class(DisBaseType), pointer :: dis => null() !discretization object contains ! diff --git a/src/Model/NumericalPackage.f90 b/src/Model/NumericalPackage.f90 index a93605b136e..d138fe7ffc2 100644 --- a/src/Model/NumericalPackage.f90 +++ b/src/Model/NumericalPackage.f90 @@ -14,25 +14,25 @@ module NumericalPackageModule type :: NumericalPackageType ! -- strings - character(len=LENPACKAGENAME) :: name = '' !name of the package - character(len=LENMODELNAME) :: name_model = '' !name of model to which package belongs - character(len=LENORIGIN) :: origin = '' !name of model // name of package - character(len=LENFTYPE) :: filtyp = '' !file type (CHD, DRN, RIV, etc.) + character(len=LENPACKAGENAME) :: name = '' !name of the package + character(len=LENMODELNAME) :: name_model = '' !name of model to which package belongs + character(len=LENORIGIN) :: origin = '' !name of model // name of package + character(len=LENFTYPE) :: filtyp = '' !file type (CHD, DRN, RIV, etc.) ! ! -- integers - integer(I4B), pointer :: id => null() !consecutive package number in model - integer(I4B), pointer :: inunit => null() !unit number for input file - integer(I4B), pointer :: iout => null() !unit number for writing package output - integer(I4B), pointer :: inewton => null() !newton flag - integer(I4B), pointer :: iasym => null() !package causes matrix asymmetry - integer(I4B), pointer :: iprpak => null() !integer flag to echo input - integer(I4B), pointer :: iprflow => null() !flag to print simulated flows - integer(I4B), pointer :: ipakcb => null() !output flows (-1, 0, 1) - save_flows - integer(I4B), pointer :: ionper => null() !stress period for next data - integer(I4B), pointer :: lastonper => null() !last value of ionper (for checking) + integer(I4B), pointer :: id => null() !consecutive package number in model + integer(I4B), pointer :: inunit => null() !unit number for input file + integer(I4B), pointer :: iout => null() !unit number for writing package output + integer(I4B), pointer :: inewton => null() !newton flag + integer(I4B), pointer :: iasym => null() !package causes matrix asymmetry + integer(I4B), pointer :: iprpak => null() !integer flag to echo input + integer(I4B), pointer :: iprflow => null() !flag to print simulated flows + integer(I4B), pointer :: ipakcb => null() !output flows (-1, 0, 1) - save_flows + integer(I4B), pointer :: ionper => null() !stress period for next data + integer(I4B), pointer :: lastonper => null() !last value of ionper (for checking) ! ! -- derived types - type(BlockParserType) :: parser !parser object for reading blocks of information + type(BlockParserType) :: parser !parser object for reading blocks of information class(DisBaseType), pointer :: dis => null() contains diff --git a/src/Solution/SolutionGroup.f90 b/src/Solution/SolutionGroup.f90 index cd27289eddf..42fb9ee103d 100644 --- a/src/Solution/SolutionGroup.f90 +++ b/src/Solution/SolutionGroup.f90 @@ -12,10 +12,10 @@ module SolutionGroupModule private :: CastAsSolutionGroupClass type :: SolutionGroupType - integer(I4B), pointer :: id - integer(I4B), pointer :: mxiter - integer(I4B), pointer :: nsolutions - integer(I4B), dimension(:), allocatable :: idsolutions !array of solution ids in basesolutionlist + integer(I4B), pointer :: id + integer(I4B), pointer :: mxiter + integer(I4B), pointer :: nsolutions + integer(I4B), dimension(:), allocatable :: idsolutions !array of solution ids in basesolutionlist contains procedure :: sgp_ca procedure :: sgp_da diff --git a/src/Timing/tdis.f90 b/src/Timing/tdis.f90 index c525b41ec5e..fb7e913cc28 100644 --- a/src/Timing/tdis.f90 +++ b/src/Timing/tdis.f90 @@ -19,25 +19,25 @@ module TdisModule public :: tdis_ot public :: tdis_da ! - integer(I4B), public, pointer :: nper !number of stress period - integer(I4B), public, pointer :: itmuni !flag indicating time units - integer(I4B), public, pointer :: kper !current stress period number - integer(I4B), public, pointer :: kstp !current time step number - logical, public, pointer :: readnewdata !flag indicating time to read new data - logical, public, pointer :: endofperiod !flag indicating end of stress period - logical, public, pointer :: endofsimulation !flag indicating end of simulation - real(DP), public, pointer :: delt !length of the current time step - real(DP), public, pointer :: pertim !time relative to start of stress period - real(DP), public, pointer :: totim !time relative to start of simulation - real(DP), public, pointer :: totimc !simulation time at start of time step - real(DP), public, pointer :: deltsav !saved value for delt, used for subtiming - real(DP), public, pointer :: totimsav !saved value for totim, used for subtiming - real(DP), public, pointer :: pertimsav !saved value for pertim, used for subtiming - real(DP), public, pointer :: totalsimtime !time at end of simulation - real(DP), public, dimension(:), pointer, contiguous :: perlen !length of each stress period - integer(I4B), public, dimension(:), pointer, contiguous :: nstp !number of time steps in each stress period - real(DP), public, dimension(:), pointer, contiguous :: tsmult !time step multiplier for each stress period - character(len=LENDATETIME), pointer :: datetime0 !starting date and time for the simulation + integer(I4B), public, pointer :: nper !number of stress period + integer(I4B), public, pointer :: itmuni !flag indicating time units + integer(I4B), public, pointer :: kper !current stress period number + integer(I4B), public, pointer :: kstp !current time step number + logical, public, pointer :: readnewdata !flag indicating time to read new data + logical, public, pointer :: endofperiod !flag indicating end of stress period + logical, public, pointer :: endofsimulation !flag indicating end of simulation + real(DP), public, pointer :: delt !length of the current time step + real(DP), public, pointer :: pertim !time relative to start of stress period + real(DP), public, pointer :: totim !time relative to start of simulation + real(DP), public, pointer :: totimc !simulation time at start of time step + real(DP), public, pointer :: deltsav !saved value for delt, used for subtiming + real(DP), public, pointer :: totimsav !saved value for totim, used for subtiming + real(DP), public, pointer :: pertimsav !saved value for pertim, used for subtiming + real(DP), public, pointer :: totalsimtime !time at end of simulation + real(DP), public, dimension(:), pointer, contiguous :: perlen !length of each stress period + integer(I4B), public, dimension(:), pointer, contiguous :: nstp !number of time steps in each stress period + real(DP), public, dimension(:), pointer, contiguous :: tsmult !time step multiplier for each stress period + character(len=LENDATETIME), pointer :: datetime0 !starting date and time for the simulation ! type(BlockParserType), private :: parser diff --git a/src/Utilities/Budget.f90 b/src/Utilities/Budget.f90 index c2088becba4..5933254ba89 100644 --- a/src/Utilities/Budget.f90 +++ b/src/Utilities/Budget.f90 @@ -22,18 +22,18 @@ module BudgetModule public BudgetType, budget_cr type BudgetType - integer(I4B), pointer :: msum => null() - integer(I4B), pointer :: maxsize => null() - real(DP), pointer :: budperc => null() - logical, pointer :: written_once => null() - real(DP), dimension(:,:), pointer :: vbvl => null() - character(len=LENBUDTXT), dimension(:), pointer, contiguous :: vbnm => null() - character(len=20), pointer :: bdtype => null() - character(len=5), pointer :: bddim => null() - character(len=LENPACKAGENAME), dimension(:), pointer, contiguous :: rowlabel => null() - character(len=16), pointer :: labeltitle => null() - character(len=20), pointer :: bdzone => null() - logical, pointer :: labeled => null() + integer(I4B), pointer :: msum => null() + integer(I4B), pointer :: maxsize => null() + real(DP), pointer :: budperc => null() + logical, pointer :: written_once => null() + real(DP), dimension(:,:), pointer :: vbvl => null() + character(len=LENBUDTXT), dimension(:), pointer, contiguous :: vbnm => null() + character(len=20), pointer :: bdtype => null() + character(len=5), pointer :: bddim => null() + character(len=LENPACKAGENAME), dimension(:), pointer, contiguous :: rowlabel => null() + character(len=16), pointer :: labeltitle => null() + character(len=20), pointer :: bdzone => null() + logical, pointer :: labeled => null() contains procedure :: budget_df procedure :: budget_ot diff --git a/src/Utilities/HashTable.f90 b/src/Utilities/HashTable.f90 index a61078f56f6..c6cd252f052 100644 --- a/src/Utilities/HashTable.f90 +++ b/src/Utilities/HashTable.f90 @@ -12,8 +12,8 @@ module HashTableModule type HashTableNodeType ! -- Private members - integer(I4B), private :: indx - character(len=:), allocatable, private :: key + integer(I4B), private :: indx + character(len=:), allocatable, private :: key type(HashTableNodeType), pointer, private :: NextNode => null() contains ! -- Private procedures diff --git a/src/Utilities/Iunit.f90 b/src/Utilities/Iunit.f90 index 30846677638..eaf6088fc38 100644 --- a/src/Utilities/Iunit.f90 +++ b/src/Utilities/Iunit.f90 @@ -19,8 +19,8 @@ module IunitModule type :: IunitRowType integer(I4B) :: nval = 0 - integer(I4B), allocatable, dimension(:) :: iunit ! unit numbers for this row - integer(I4B), allocatable, dimension(:) :: ipos ! position in the input files character array + integer(I4B), allocatable, dimension(:) :: iunit ! unit numbers for this row + integer(I4B), allocatable, dimension(:) :: ipos ! position in the input files character array end type IunitRowType type :: IunitType diff --git a/src/Utilities/List.f90 b/src/Utilities/List.f90 index bcdf5d347fe..4af0c75ea70 100644 --- a/src/Utilities/List.f90 +++ b/src/Utilities/List.f90 @@ -6,13 +6,13 @@ module ListModule type :: ListType ! -- Public members - type(ListNodeType), pointer, public :: firstNode => null() - character(len=20), public :: name = ' ' + type(ListNodeType), pointer, public :: firstNode => null() + character(len=20), public :: name = ' ' ! -- Private members type(ListNodeType), pointer, private :: lastNode => null() type(ListNodeType), pointer, private :: currentNode => null() - integer(I4B), private :: currentNodeIndex = 0 - integer(I4B), private :: nodeCount = 0 + integer(I4B), private :: currentNodeIndex = 0 + integer(I4B), private :: nodeCount = 0 contains ! -- Public procedures procedure, public :: Add diff --git a/src/Utilities/ListReader.f90 b/src/Utilities/ListReader.f90 index ba2798f1b59..f11b0e46dc8 100644 --- a/src/Utilities/ListReader.f90 +++ b/src/Utilities/ListReader.f90 @@ -9,32 +9,33 @@ module ListReaderModule public ListReaderType type :: ListReaderType - integer(I4B) :: in ! unit number of file containing control record - integer(I4B) :: inlist ! unit number of file from which list will be read - integer(I4B) :: iout ! unit number to output messages - integer(I4B) :: inamedbound ! flag indicating boundary names are to be read - integer(I4B) :: ierr ! error flag - integer(I4B) :: nlist ! number of entries in list. -1 indicates number will be automatically determined - integer(I4B) :: ibinary ! flag indicating to read binary list - integer(I4B) :: istart ! string starting location - integer(I4B) :: istop ! string ending location - integer(I4B) :: lloc ! entry number in line - integer(I4B) :: iclose ! flag indicating whether or not to close file - integer(I4B) :: ndim ! number of dimensions in model - integer(I4B) :: ntxtrlist ! number of text entries found in rlist - integer(I4B) :: ntxtauxvar ! number of text entries found in auxvar - character(len=LINELENGTH) :: label ! label for printing list - character(len=LINELENGTH) :: line ! line string for reading file - integer(I4B), dimension(:), pointer, contiguous :: mshape ! pointer to model shape - integer(I4B), dimension(:), pointer, contiguous :: nodelist ! pointer to nodelist - real(DP), dimension(:, :), pointer, contiguous :: rlist ! pointer to rlist - real(DP), dimension(:, :), pointer, contiguous :: auxvar ! pointer to auxvar - character(len=16), dimension(:), pointer :: auxname ! pointer to aux names - character(len=LENBOUNDNAME), dimension(:), pointer, contiguous :: boundname ! pointer to boundname - integer(I4B), dimension(:), allocatable :: idxtxtrow ! row locations of text in rlist - integer(I4B), dimension(:), allocatable :: idxtxtcol ! col locations of text in rlist - integer(I4B), dimension(:), allocatable :: idxtxtauxrow ! row locations of text in auxvar - integer(I4B), dimension(:), allocatable :: idxtxtauxcol ! col locations of text in auxvar + integer(I4B) :: in ! unit number of file containing control record + integer(I4B) :: inlist ! unit number of file from which list will be read + integer(I4B) :: iout ! unit number to output messages + integer(I4B) :: inamedbound ! flag indicating boundary names are to be read + integer(I4B) :: ierr ! error flag + integer(I4B) :: nlist ! number of entries in list. -1 indicates number will be automatically determined + integer(I4B) :: ibinary ! flag indicating to read binary list + integer(I4B) :: istart ! string starting location + integer(I4B) :: istop ! string ending location + integer(I4B) :: lloc ! entry number in line + integer(I4B) :: iclose ! flag indicating whether or not to close file + integer(I4B) :: ndim ! number of dimensions in model + integer(I4B) :: ntxtrlist ! number of text entries found in rlist + integer(I4B) :: ntxtauxvar ! number of text entries found in auxvar + character(len=LINELENGTH) :: label ! label for printing list + character(len=LINELENGTH) :: line ! line string for reading file + integer(I4B), dimension(:), pointer, contiguous :: mshape => null() ! pointer to model shape + integer(I4B), dimension(:), pointer, contiguous :: nodelist => null() ! pointer to nodelist + real(DP), dimension(:, :), pointer, contiguous :: rlist => null() ! pointer to rlist + real(DP), dimension(:, :), pointer, contiguous :: auxvar => null() ! pointer to auxvar + character(len=16), dimension(:), pointer :: auxname => null() ! pointer to aux names + character(len=LENBOUNDNAME), dimension(:), pointer, & + contiguous :: boundname => null() ! pointer to boundname + integer(I4B), dimension(:), allocatable :: idxtxtrow ! row locations of text in rlist + integer(I4B), dimension(:), allocatable :: idxtxtcol ! col locations of text in rlist + integer(I4B), dimension(:), allocatable :: idxtxtauxrow ! row locations of text in auxvar + integer(I4B), dimension(:), allocatable :: idxtxtauxcol ! col locations of text in auxvar character(len=LENTIMESERIESNAME), dimension(:), allocatable :: txtrlist ! text found in rlist character(len=LENTIMESERIESNAME), dimension(:), allocatable :: txtauxvar ! text found in auxvar contains diff --git a/src/Utilities/Observation/Obs3.f90 b/src/Utilities/Observation/Obs3.f90 index 8b1cf8a9041..e74f2c786d3 100644 --- a/src/Utilities/Observation/Obs3.f90 +++ b/src/Utilities/Observation/Obs3.f90 @@ -156,27 +156,27 @@ module ObsModule type :: ObsType ! -- Public members - integer(I4B), public :: iout = 0 - integer(I4B), public :: npakobs = 0 - integer(I4B), pointer, public :: inUnitObs => null() - character(len=LINELENGTH), pointer, public :: inputFilename => null() - character(len=2*LENPACKAGENAME+4), public :: pkgName = '' - character(len=LENFTYPE), public :: filtyp = '' - logical, pointer, public :: active => null() + integer(I4B), public :: iout = 0 + integer(I4B), public :: npakobs = 0 + integer(I4B), pointer, public :: inUnitObs => null() + character(len=LINELENGTH), pointer, public :: inputFilename => null() + character(len=2*LENPACKAGENAME+4), public :: pkgName = '' + character(len=LENFTYPE), public :: filtyp = '' + logical, pointer, public :: active => null() type(ObsContainerType), dimension(:), pointer, public :: pakobs => null() - type(ObsDataType), dimension(:), pointer, public :: obsData => null() + type(ObsDataType), dimension(:), pointer, public :: obsData => null() ! -- Private members - integer(I4B), private :: iprecision = 2 ! 2=double; 1=single - integer(I4B), private :: idigits = 5 - character(len=LINELENGTH), private :: outputFilename = '' - character(len=20), private :: blockTypeFound = '' - character(len=20), private :: obsfmtcont = '' - logical, private :: echo = .false. - logical, private :: more - type(ListType), private :: obsList + integer(I4B), private :: iprecision = 2 ! 2=double; 1=single + integer(I4B), private :: idigits = 5 + character(len=LINELENGTH), private :: outputFilename = '' + character(len=20), private :: blockTypeFound = '' + character(len=20), private:: obsfmtcont = '' + logical, private :: echo = .false. + logical, private :: more + type(ListType), private :: obsList type(ObsOutputListType), pointer, private :: obsOutputList => null() - class(DisBaseType), pointer, private :: dis => null() - type(BlockParserType), private :: parser + class(DisBaseType), pointer, private :: dis => null() + type(BlockParserType), private :: parser contains ! -- Public procedures procedure, public :: obs_df diff --git a/src/Utilities/Observation/ObsContainer.f90 b/src/Utilities/Observation/ObsContainer.f90 index 095a9c16070..db739bde361 100644 --- a/src/Utilities/Observation/ObsContainer.f90 +++ b/src/Utilities/Observation/ObsContainer.f90 @@ -16,7 +16,7 @@ module ObsContainerModule type :: ObsContainerType ! -- Public members - class(ObserveType), pointer, public :: obsrv => null() + class(ObserveType), pointer, public :: obsrv => null() end type ObsContainerType end module ObsContainerModule diff --git a/src/Utilities/Observation/ObsOutput.f90 b/src/Utilities/Observation/ObsOutput.f90 index e0f48f54a9d..6c9b808569d 100644 --- a/src/Utilities/Observation/ObsOutput.f90 +++ b/src/Utilities/Observation/ObsOutput.f90 @@ -21,13 +21,13 @@ module ObsOutputModule type :: ObsOutputType ! -- Public members ! kind specified to ensure consistent binary output - integer(kind=4), public :: nobs = 0 - integer(I4B), public :: nunit = 0 - character(len=500), public :: filename = '' + integer(kind=4), public :: nobs = 0 + integer(I4B), public :: nunit = 0 + character(len=500), public :: filename = '' character(len=LENOBSNAME), allocatable, dimension(:), public :: obsnames character(len=LENBIGLINE), public :: header = '' character(len=LENBIGLINE), public :: lineout = '' - logical, public :: FormattedOutput = .true. + logical, public :: FormattedOutput = .true. contains ! -- Public procedures procedure, public :: ClearLineout diff --git a/src/Utilities/SimVariables.f90 b/src/Utilities/SimVariables.f90 index 66697c1c118..51e87f94d03 100644 --- a/src/Utilities/SimVariables.f90 +++ b/src/Utilities/SimVariables.f90 @@ -3,10 +3,10 @@ module SimVariablesModule public character(len=9), parameter :: simfile = 'mfsim.nam' character(len=9), parameter :: simlstfile = 'mfsim.lst' - integer(I4B) :: iout ! -- unit number for simulation output - integer(I4B) :: isimcnvg ! -- 1 if all objects have converged, 0 otherwise - integer(I4B) :: isimcontinue = 0 ! -- 1 to continue if isimcnvg = 0, 0 to terminate - integer(I4B) :: isimcheck = 1 ! -- 1 to check input, 0 to ignore checks - integer(I4B) :: numnoconverge = 0 ! -- number of times there were convergence problems - integer(I4B) :: ireturnerr = 0 ! -- return code for program (0 successful, 1 non-convergence, 2 error) + integer(I4B) :: iout ! -- unit number for simulation output + integer(I4B) :: isimcnvg ! -- 1 if all objects have converged, 0 otherwise + integer(I4B) :: isimcontinue = 0 ! -- 1 to continue if isimcnvg = 0, 0 to terminate + integer(I4B) :: isimcheck = 1 ! -- 1 to check input, 0 to ignore checks + integer(I4B) :: numnoconverge = 0 ! -- number of times there were convergence problems + integer(I4B) :: ireturnerr = 0 ! -- return code for program (0 successful, 1 non-convergence, 2 error) end module SimVariablesModule diff --git a/src/Utilities/Sparse.f90 b/src/Utilities/Sparse.f90 index f0cf522dc76..66c87c902ba 100644 --- a/src/Utilities/Sparse.f90 +++ b/src/Utilities/Sparse.f90 @@ -7,15 +7,15 @@ module SparseModule implicit none type rowtype - integer(I4B) :: nnz ! number of nonzero entries in the row - integer(I4B),allocatable,dimension(:) :: icolarray ! array of column numbers + integer(I4B) :: nnz ! number of nonzero entries in the row + integer(I4B), allocatable, dimension(:) :: icolarray ! array of column numbers end type rowtype type, public :: sparsematrix - integer(I4B) :: nrow ! number of rows in the matrix - integer(I4B) :: ncol ! number of columns in the matrix - integer(I4B) :: nnz ! number of nonzero matrix entries - type(rowtype),allocatable,dimension(:) :: row ! one rowtype for each matrix row + integer(I4B) :: nrow ! number of rows in the matrix + integer(I4B) :: ncol ! number of columns in the matrix + integer(I4B) :: nnz ! number of nonzero matrix entries + type(rowtype), allocatable, dimension(:) :: row ! one rowtype for each matrix row contains procedure :: init => initialize procedure :: addconnection diff --git a/src/Utilities/TimeSeries/TimeArray.f90 b/src/Utilities/TimeSeries/TimeArray.f90 index 5bffd00635f..7ef431a290e 100644 --- a/src/Utilities/TimeSeries/TimeArray.f90 +++ b/src/Utilities/TimeSeries/TimeArray.f90 @@ -14,7 +14,7 @@ module TimeArrayModule type :: TimeArrayType ! -- Public members - real(DP), public :: taTime + real(DP), public :: taTime real(DP), dimension(:), pointer, contiguous, public :: taArray => null() contains ! -- Public procedures diff --git a/src/Utilities/TimeSeries/TimeArraySeries.f90 b/src/Utilities/TimeSeries/TimeArraySeries.f90 index 86ba6da3fc4..8e7985abc11 100644 --- a/src/Utilities/TimeSeries/TimeArraySeries.f90 +++ b/src/Utilities/TimeSeries/TimeArraySeries.f90 @@ -27,15 +27,15 @@ module TimeArraySeriesModule ! -- Public members character(len=LENTIMESERIESNAME), public :: Name = '' ! -- Private members - integer(I4B), private :: inunit = 0 - integer(I4B), private :: iout = 0 - integer(I4B), private :: iMethod = UNDEFINED - real(DP), private :: sfac = DONE - character(len=LINELENGTH), private :: dataFile = '' - logical, private :: autoDeallocate = .true. - type(ListType), pointer, private :: list => null() + integer(I4B), private :: inunit = 0 + integer(I4B), private :: iout = 0 + integer(I4B), private :: iMethod = UNDEFINED + real(DP), private :: sfac = DONE + character(len=LINELENGTH), private :: dataFile = '' + logical, private :: autoDeallocate = .true. + type(ListType), pointer, private :: list => null() class(DisBaseType), pointer, private :: dis => null() - type(BlockParserType), private :: parser + type(BlockParserType), private :: parser contains ! -- Public procedures procedure, public :: tas_init diff --git a/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 b/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 index dbff29899ec..72fb8cb33a9 100644 --- a/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 +++ b/src/Utilities/TimeSeries/TimeArraySeriesManager.f90 @@ -23,13 +23,13 @@ module TimeArraySeriesManagerModule type TimeArraySeriesManagerType ! -- Public members - integer(I4B), public :: iout = 0 ! output unit num - class(DisBaseType), pointer, public :: dis => null() ! pointer to dis + integer(I4B), public :: iout = 0 ! output unit num + class(DisBaseType), pointer, public :: dis => null() ! pointer to dis ! -- Private members - type(ListType), pointer, private :: boundTasLinks => null() ! list of TAS links - character(len=LINELENGTH), allocatable, dimension(:) :: tasfiles ! list of TA file names - type(TimeArraySeriesType), dimension(:), pointer, contiguous :: taslist ! array of TA pointers - character(len=LENTIMESERIESNAME), allocatable, dimension(:) :: tasnames ! array of TA names + type(ListType), pointer, private :: boundTasLinks => null() ! list of TAS links + character(len=LINELENGTH), allocatable, dimension(:) :: tasfiles ! list of TA file names + type(TimeArraySeriesType), dimension(:), pointer, contiguous :: taslist ! array of TA pointers + character(len=LENTIMESERIESNAME), allocatable, dimension(:) :: tasnames ! array of TA names contains ! -- Public procedures procedure, public :: tasmanager_df diff --git a/src/Utilities/TimeSeries/TimeSeries.f90 b/src/Utilities/TimeSeries/TimeSeries.f90 index d81f6ccd1ca..9a05be114a7 100644 --- a/src/Utilities/TimeSeries/TimeSeries.f90 +++ b/src/Utilities/TimeSeries/TimeSeries.f90 @@ -25,12 +25,12 @@ module TimeSeriesModule type TimeSeriesType ! -- Public members - integer(I4B), public :: iMethod = UNDEFINED - character(len=LENTIMESERIESNAME), public :: Name = '' + integer(I4B), public :: iMethod = UNDEFINED + character(len=LENTIMESERIESNAME), public :: Name = '' ! -- Private members - real(DP), private :: sfac = DONE - logical, public :: autoDeallocate = .true. - type(ListType), pointer, private :: list => null() + real(DP), private :: sfac = DONE + logical, public :: autoDeallocate = .true. + type(ListType), pointer, private :: list => null() class(TimeSeriesFileType), pointer, private :: tsfile => null() contains ! -- Public procedures diff --git a/src/Utilities/TimeSeries/TimeSeriesFileList.f90 b/src/Utilities/TimeSeries/TimeSeriesFileList.f90 index 98b29d88fa0..06bcfd1e8ef 100644 --- a/src/Utilities/TimeSeries/TimeSeriesFileList.f90 +++ b/src/Utilities/TimeSeries/TimeSeriesFileList.f90 @@ -15,7 +15,7 @@ module TimeSeriesFileListModule type :: TimeSeriesFileListType ! -- Public members - integer(I4B), public :: numtsfiles = 0 + integer(I4B), public :: numtsfiles = 0 type(ListType), public :: tsfileList contains ! -- Public procedures diff --git a/src/Utilities/TimeSeries/TimeSeriesLink.f90 b/src/Utilities/TimeSeries/TimeSeriesLink.f90 index 3f5f74306b6..f755903306f 100644 --- a/src/Utilities/TimeSeries/TimeSeriesLink.f90 +++ b/src/Utilities/TimeSeries/TimeSeriesLink.f90 @@ -16,23 +16,23 @@ module TimeSeriesLinkModule type :: TimeSeriesLinkType ! -- Public members - integer(I4B), public :: IRow = 0 ! row index (2nd dim) in bound or auxval array - integer(I4B), public :: JCol = 0 ! column index (1st dim) in bound or auxval array + integer(I4B), public :: IRow = 0 ! row index (2nd dim) in bound or auxval array + integer(I4B), public :: JCol = 0 ! column index (1st dim) in bound or auxval array integer(I4B), public :: Iprpak = 1 ! BndElement can point to an element in either the bound or auxval ! array of BndType, or any other double precision variable or array ! element that contains a value that could be controlled by a time series. - real(DP), pointer, public :: BndElement => null() - real(DP), pointer, public :: RMultiplier => null() - real(DP), public :: CellArea = DZERO - character(len=LENPACKAGENAME), public :: PackageName = '' - character(len=3), public :: AuxOrBnd = '' + real(DP), pointer, public :: BndElement => null() + real(DP), pointer, public :: RMultiplier => null() + real(DP), public :: CellArea = DZERO + character(len=LENPACKAGENAME), public :: PackageName = '' + character(len=3), public :: AuxOrBnd = '' character(len=LENTIMESERIESTEXT), public :: Text = '' - character(len=LENBOUNDNAME), public :: BndName = '' - logical, public :: Active = .true. - logical, public :: UseDefaultProc = .true. - logical, public :: ConvertFlux = .false. - type(TimeSeriesType), pointer, public :: TimeSeries => null() + character(len=LENBOUNDNAME), public :: BndName = '' + logical, public :: Active = .true. + logical, public :: UseDefaultProc = .true. + logical, public :: ConvertFlux = .false. + type(TimeSeriesType), pointer, public :: TimeSeries => null() end type TimeSeriesLinkType contains diff --git a/src/Utilities/TimeSeries/TimeSeriesManager.f90 b/src/Utilities/TimeSeries/TimeSeriesManager.f90 index 7fd8c6e912a..e0e24b4871e 100644 --- a/src/Utilities/TimeSeries/TimeSeriesManager.f90 +++ b/src/Utilities/TimeSeries/TimeSeriesManager.f90 @@ -25,14 +25,15 @@ module TimeSeriesManagerModule read_single_value_or_time_series, tsmanager_cr type TimeSeriesManagerType - integer(I4B), public :: iout = 0 ! output unit number - type(TimeSeriesFileListType), pointer, public :: tsfileList => null() ! list of ts files objs - type(ListType), pointer, public :: boundTsLinks => null() ! links to bound and aux - integer(I4B) :: numtsfiles = 0 ! number of ts files - character(len=MAXCHARLEN), allocatable, dimension(:) :: tsfiles ! list of ts files - type(ListType), pointer, private :: auxvarTsLinks => null() ! list of aux links - type(HashTableType), private :: BndTsHashTable ! hash of ts to tsobj - type(TimeSeriesContainerType), allocatable, dimension(:), private :: TsContainers + integer(I4B), public :: iout = 0 ! output unit number + type(TimeSeriesFileListType), pointer, public :: tsfileList => null() ! list of ts files objs + type(ListType), pointer, public :: boundTsLinks => null() ! links to bound and aux + integer(I4B) :: numtsfiles = 0 ! number of ts files + character(len=MAXCHARLEN), allocatable, dimension(:) :: tsfiles ! list of ts files + type(ListType), pointer, private :: auxvarTsLinks => null() ! list of aux links + type(HashTableType), private :: BndTsHashTable ! hash of ts to tsobj + type(TimeSeriesContainerType), allocatable, dimension(:), & + private :: TsContainers contains ! -- Public procedures procedure, public :: tsmanager_df diff --git a/src/Utilities/kind.f90 b/src/Utilities/kind.f90 index 3b2b56f21dc..cb14a960e8b 100644 --- a/src/Utilities/kind.f90 +++ b/src/Utilities/kind.f90 @@ -4,9 +4,9 @@ module KindModule public - integer, parameter :: DP = KIND(1.0D0) ! Precision of all real variables - integer, parameter :: I4B = SELECTED_INT_KIND(8) ! Integer kind - integer, parameter :: I8B = SELECTED_INT_KIND(18) ! Long integer kind + integer, parameter :: DP = KIND(1.0D0) ! Precision of all real variables + integer, parameter :: I4B = SELECTED_INT_KIND(8) ! Integer kind + integer, parameter :: I8B = SELECTED_INT_KIND(18) ! Long integer kind contains diff --git a/src/Utilities/version.f90 b/src/Utilities/version.f90 index e9ef8ed1f82..aa355de6203 100644 --- a/src/Utilities/version.f90 +++ b/src/Utilities/version.f90 @@ -3,7 +3,7 @@ module VersionModule public ! -- modflow 6 version integer(I4B), parameter :: IDEVELOPMODE = 1 - character(len=40), parameter :: VERSION = '6.0.3.10 08/29/2018' + character(len=40), parameter :: VERSION = '6.0.3.11 08/29/2018' character(len=10), parameter :: MFVNAM = ' 6' character(len=*), parameter :: MFTITLE = & 'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL' diff --git a/src/mf6.f90 b/src/mf6.f90 index a1af05bc668..1ba0a39bf30 100644 --- a/src/mf6.f90 +++ b/src/mf6.f90 @@ -31,10 +31,10 @@ program mf6 endofsimulation implicit none ! -- local - class(SolutionGroupType), pointer :: sgp - class(BaseSolutionType), pointer :: sp - class(BaseModelType), pointer :: mp - class(BaseExchangeType), pointer :: ep + class(SolutionGroupType), pointer :: sgp => null() + class(BaseSolutionType), pointer :: sp => null() + class(BaseModelType), pointer :: mp => null() + class(BaseExchangeType), pointer :: ep => null() integer(I4B) :: im, ic, is, isg logical :: exit_tsloop character(len=80) :: compiler diff --git a/version.txt b/version.txt index 2d2cc752bfe..c7d9c6f1840 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ # MODFLOW 6 version file automatically created using...pre-commit.py -# created on...August 29, 2018 15:10:18 +# created on...August 29, 2018 17:37:44 # add some comments on how this version file # should be manually updated and used @@ -7,6 +7,6 @@ major = 6 minor = 0 micro = 3 -build = 10 -commit = 111 +build = 11 +commit = 112 From 50458007f726a2510bd4b2b48f4c376e12accaf1 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Thu, 30 Aug 2018 10:31:23 -0400 Subject: [PATCH 008/170] docs(ReleaseNotes): Updated release notes Added section for current release and added header for 6.0.3 version changes. --- README.md | 4 ++-- code.json | 18 ++++++++--------- doc/ReleaseNotes/ReleaseNotes.tex | 32 ++++++++++++++++++++++++++++++- doc/version.tex | 4 ++-- src/Utilities/version.f90 | 2 +- version.txt | 6 +++--- 6 files changed, 48 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 6d0d3133b15..14290f7be6a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Automated Testing Status on Travis-CI -### Version 6.0.3 develop — build 11 +### Version 6.0.3 develop — build 12 [![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6) ## Introduction @@ -31,7 +31,7 @@ MODFLOW 6 is the latest core version of MODFLOW. It synthesizes many of the capa #### ***Software/Code citation for MODFLOW 6:*** -[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2018, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 29 August 2018, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV) +[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2018, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 30 August 2018, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV) ## Instructions for building definition files for new packages diff --git a/code.json b/code.json index 7a421e04403..aca9f514287 100755 --- a/code.json +++ b/code.json @@ -1,26 +1,26 @@ [ { "status": "Release Candidate", - "languages": [ - "Fortran2008" - ], + "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", "repositoryURL": "https://code.usgs.gov/usgs/modflow/modflow6.git", + "laborHours": -1, "disclaimerURL": "https://code.usgs.gov/usgs/modflow/modflow6/blob/master/DISCLAIMER.md", - "name": "modflow6", "tags": [ "MODFLOW", "groundwater model" ], + "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions.", + "languages": [ + "Fortran2008" + ], "contact": { "name": "Christian D. Langevin", "email": "langevin@usgs.gov" }, - "downloadURL": "https://code.usgs.gov/usgs/modflow/modflow6/archive/master.zip", "vcs": "git", - "laborHours": -1, - "version": "6.0.3.11", + "version": "6.0.3.12", "date": { - "metadataLastUpdated": "2018-08-29" + "metadataLastUpdated": "2018-08-30" }, "organization": "U.S. Geological Survey", "permissions": { @@ -33,6 +33,6 @@ "usageType": "openSource" }, "homepageURL": "https://code.usgs.gov/usgs/modflow/modflow6/", - "description": "MODFLOW is the USGS's modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions." + "name": "modflow6" } ] \ No newline at end of file diff --git a/doc/ReleaseNotes/ReleaseNotes.tex b/doc/ReleaseNotes/ReleaseNotes.tex index d5d9e6cb466..be7b3571282 100644 --- a/doc/ReleaseNotes/ReleaseNotes.tex +++ b/doc/ReleaseNotes/ReleaseNotes.tex @@ -106,7 +106,7 @@ % ------------------------------------------------- \section{Introduction} -This document describes MODFLOW 6 Version \modflowversion. This distribution is packaged for personal computers using the Microsoft Windows 7 operating system, although it may run on other versions of Windows. The executable file was compiled for 64-bit Windows operating systems and should run on most personal computers. +This document describes MODFLOW 6 Version \modflowversion. This distribution is packaged for personal computers using the Microsoft Windows 7 and 10 operating systems, although it may run on other versions of Windows. The executable file was compiled for 64-bit Windows operating systems and should run on most personal computers. Version numbers for MODFLOW 6 will follow a major.minor.revision format. The major number will be increased when there are substantial new changes that may break backward compatibility. The minor number will be increased when important, but relatively minor new functionality is added. The revision number will be added when errors are corrected in either the program or input files. @@ -118,6 +118,36 @@ \section{History} \item \currentmodflowversion +\underline{BASIC FUNCTIONALITY} +\begin{itemize} +\item Addressed issue with pointing contiguous pointer vectors/arrays to non-contiguous pointer vectors/arrays that caused code compilation failure with gfortran-8. A consequence of addressing this issue is that all pointer vectors/arrays that are allocated or pointed to using the memory manager must be defined to be contiguous. +\item - +\item - +\end{itemize} + +\underline{STRESS PACKAGES} +\begin{itemize} +\item - +\item - +\item - +\end{itemize} + +\underline{ADVANCED STRESS PACKAGES} +\begin{itemize} +\item - +\item - +\item - +\end{itemize} + +\underline{SOLUTION} +\begin{itemize} +\item - +\item - +\item - +\end{itemize} + +\item Version mf6.0.3--Aug. 9, 2018 + \underline{BASIC FUNCTIONALITY} \begin{itemize} \item Fixed issues with observations specified using boundnames that are enclosed in quotes. Previously, the closing quote was retained on a boundname enclosed in quotes and resulted in an error (the erroneous observation boundname could not be found in the package). diff --git a/doc/version.tex b/doc/version.tex index 1faa392693c..2f2ba7aa778 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,3 +1,3 @@ -\newcommand{\modflowversion}{mf6.0.3.11} -\newcommand{\modflowdate}{August 29, 2018} +\newcommand{\modflowversion}{mf6.0.3.12} +\newcommand{\modflowdate}{August 30, 2018} \newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate} diff --git a/src/Utilities/version.f90 b/src/Utilities/version.f90 index aa355de6203..327847b4796 100644 --- a/src/Utilities/version.f90 +++ b/src/Utilities/version.f90 @@ -3,7 +3,7 @@ module VersionModule public ! -- modflow 6 version integer(I4B), parameter :: IDEVELOPMODE = 1 - character(len=40), parameter :: VERSION = '6.0.3.11 08/29/2018' + character(len=40), parameter :: VERSION = '6.0.3.12 08/30/2018' character(len=10), parameter :: MFVNAM = ' 6' character(len=*), parameter :: MFTITLE = & 'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL' diff --git a/version.txt b/version.txt index c7d9c6f1840..1e231557e11 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ # MODFLOW 6 version file automatically created using...pre-commit.py -# created on...August 29, 2018 17:37:44 +# created on...August 30, 2018 10:31:23 # add some comments on how this version file # should be manually updated and used @@ -7,6 +7,6 @@ major = 6 minor = 0 micro = 3 -build = 11 -commit = 112 +build = 12 +commit = 113 From 2d819389e99b92264381f79258f4f9df3b718d3e Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Thu, 30 Aug 2018 13:49:51 -0400 Subject: [PATCH 009/170] docs: updates and additions Updated CONTRIBUTING.md and added DEVELOPER.md. DEVELOPER.md probably still needs additional work. --- CONTRIBUTING.md | 226 ++++++++++++++++++++++++++++++++++++-- DEVELOPER.md | 115 +++++++++++++++++++ README.md | 2 +- code.json | 18 +-- doc/version.tex | 2 +- src/Utilities/version.f90 | 2 +- version.txt | 6 +- 7 files changed, 345 insertions(+), 26 deletions(-) create mode 100644 DEVELOPER.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91740891a1d..efd141459e8 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,18 +1,222 @@ Contributing ============ -Contributions are welcome from the community. Questions can be asked on the -[issues page][1]. Before creating a new issue, please take a moment to search -and make sure a similar issue does not already exist. If one does exist, you -can comment (most simply even with just a `:+1:`) to show your support for that -issue. +Contributions to MODFLOW 6 are welcome from the community. As a contributor, here are the guidelines we would like you to follow: -If you have direct contributions you would like considered for incorporation -into the project you can [fork this repository][2] and -[submit a pull request][3] for review. + - [Code of Conduct](#coc) + - [Question or Problem?](#question) + - [Issues and Bugs](#issue) + - [Feature Requests](#feature) + - [Submission Guidelines](#submit) + - [Coding Rules](#rules) + - [Commit Message Guidelines](#commit) +## Code of Conduct +Help us keep MODFLOW 6 open and inclusive. Please read and follow our [Code of Conduct][coc]. +## Got a Question or Problem? -[1]: https://github.com/MODFLOW-USGS/modflow6/issues -[2]: https://help.github.com/articles/fork-a-repo/ -[3]: https://help.github.com/articles/about-pull-requests/ +Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [Stack Overflow](https://stackoverflow.com/questions/tagged/modflow6) where the questions should be tagged with tag `modflow6`. + +Stack Overflow is a much better place to ask questions since: + +- there are thousands of people willing to help on Stack Overflow +- questions and answers stay available for public viewing so your question / answer might help someone else +- Stack Overflow's voting system assures that the best answers are prominently visible. + +To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow. + +## Found a Bug? +If you find a bug in the source code, you can help us by +[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can [submit a Pull Request](#submit-pr) with a fix. + +## Missing a Feature? +You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository. If you would like to *implement* a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is: + +* For a **Major Feature**, first open an issue and outline your proposal so that it can be +discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, +and help you to craft the change so that it is successfully accepted into the project. +* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). + +## Submission Guidelines + +### Submitting an Issue + +Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. + +We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal, complete, and verifiable example. Having a minimal, complete, and verifiable example gives us a wealth of important information without going back & forth to you with additional questions like: + +- version of MODFLOW 6 used +- and most importantly - a use-case that fails (ideally an example that uses flopy to generate MODFLOW 6 input files - see test_gwf* python scripts in the `autotest/` directory) + +We will be insisting on a minimal minimal, complete, and verifiable example in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it. + +Unfortunately, we are not able to investigate / fix bugs without a minimal, complete, and verifiable example, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced. + +You can file new issues by filling out our [new issue form](https://github.com/MODFLOW-USGS/modflow6/issues/new). + + +### Submitting a Pull Request (PR) +Before you submit your Pull Request (PR) consider the following guidelines: + +1. Search [GitHub](https://github.com/MODFLOW-USGS/modflow6/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate effort. +1. Fork the MODFLOW-USGS/modflow6 repo. +1. Make your changes in a new git branch: + + ```shell + git checkout -b my-fix-branch develop + ``` + +1. Create your patch, **including appropriate test cases**. +1. Follow our [Coding Rules](#rules). +1. Run the full modflow6 test suite, as described in the [developer documentation][dev-doc], + and ensure that all tests pass. +1. Commit your changes using a descriptive commit message that follows our + [commit message conventions](#commit). Adherence to these conventions + is necessary because release notes are automatically generated from these messages. + + ```shell + git commit -a + ``` + Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. + +1. Push your branch to GitHub: + + ```shell + git push origin my-fix-branch + ``` + +1. In GitHub, send a pull request to `modflow6:develop`. +* If we suggest changes then: + * Make the required updates. + * Re-run the MODFLOW 6 test suites, in the autotest directory, to ensure tests are still passing. The test suites are run using python nosetests and require [flopy](https://github.com/modflowpy/flopy) and [pymake](https://github.com/modflowpy/pymake). + * Rebase your branch and force push to your GitHub repository (this will update your Pull Request): + + ```shell + git rebase develop -i + git push -f + ``` + +That's it! Thank you for your contribution! + +#### After your pull request is merged + +After your pull request is merged, you can safely delete your branch and pull the changes +from the main (upstream) repository: + +* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: + + ```shell + git push origin --delete my-fix-branch + ``` + +* Check out the develop branch: + + ```shell + git checkout develop -f + ``` + +* Delete the local branch: + + ```shell + git branch -D my-fix-branch + ``` + +* Update your develop with the latest upstream version: + + ```shell + git pull --ff upstream develop + ``` + +## Coding Rules +To ensure consistency throughout the source code, keep these rules in mind as you are working: + +* All features or bug fixes **must be tested** by one or more specs (unit-tests). + +## Commit Message Guidelines + +We have very precise rules over how our git commit messages can be formatted. This leads to **more +readable messages** that are easy to follow when looking through the **project history**. But also, +we use the git commit messages to **generate the MODFLOW 6 change log**. + +### Commit Message Format +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +