Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ArrayReaders): Fix issue reading binary 2d arrays #41

Merged
merged 11 commits into from
Sep 18, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Initial changes to address #36. Still need to test and perform clean up.
  • Loading branch information
jdhughes-usgs committed Aug 27, 2018
commit 57732dd77ef0dc4bc7b123623b4f327e9d8e20f9
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 9 additions & 9 deletions code.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"
},
"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": {
Expand All @@ -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."
}
]
4 changes: 2 additions & 2 deletions doc/version.tex
Original file line number Diff line number Diff line change
@@ -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}
22 changes: 11 additions & 11 deletions src/Exchange/GhostNode.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/Exchange/GwfGwfExchange.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/Exchange/NumericalExchange.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions src/Model/GroundWaterFlow/gwf3dis8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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, &
Expand Down
20 changes: 10 additions & 10 deletions src/Model/GroundWaterFlow/gwf3disu8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1217,15 +1217,15 @@ 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
integer(I4B) :: nrow
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
Expand Down Expand Up @@ -1281,15 +1281,15 @@ 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
integer(I4B) :: nrow
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
Expand Down Expand Up @@ -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
Expand All @@ -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, &
Expand Down
Loading