Skip to content

Commit

Permalink
feat(idm): update TDIS package for IDM (MODFLOW-USGS#1579)
Browse files Browse the repository at this point in the history
* integrate sim-tdis with idm

* rebuild makefiles

* fix comment

* rebuild makefiles

---------

Co-authored-by: mjreno <[email protected]>
  • Loading branch information
mjreno and mjreno authored Feb 9, 2024
1 parent 7f37518 commit 67f1891
Show file tree
Hide file tree
Showing 12 changed files with 549 additions and 247 deletions.
1 change: 1 addition & 0 deletions doc/mf6io/framework/processing_of_input.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ \subsection{Supported Components}
\textbf{Component / Subcomponent} & \textbf{File Type} \\
\hline
SIM/NAM & mfsim.nam \\
SIM/TDIS & TDIS6 \\
GWF/NAM & GWF name file \\
GWT/NAM & GWT name file \\
GWF/CHD & CHD6 \\
Expand Down
125 changes: 63 additions & 62 deletions make/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@ include ./makedefaults

# Define the source file directories
SOURCEDIR1=../src
SOURCEDIR2=../src/Model
SOURCEDIR3=../src/Model/TransportModel
SOURCEDIR4=../src/Model/GroundWaterFlow
SOURCEDIR5=../src/Model/Geometry
SOURCEDIR2=../src/Exchange
SOURCEDIR3=../src/Timing
SOURCEDIR4=../src/Model
SOURCEDIR5=../src/Model/Connection
SOURCEDIR6=../src/Model/ModelUtilities
SOURCEDIR7=../src/Model/GroundWaterTransport
SOURCEDIR8=../src/Model/Connection
SOURCEDIR9=../src/Distributed
SOURCEDIR10=../src/Utilities
SOURCEDIR11=../src/Utilities/Idm
SOURCEDIR12=../src/Utilities/Idm/mf6blockfile
SOURCEDIR13=../src/Utilities/Idm/selector
SOURCEDIR14=../src/Utilities/Vector
SOURCEDIR15=../src/Utilities/Matrix
SOURCEDIR16=../src/Utilities/Observation
SOURCEDIR17=../src/Utilities/ArrayRead
SOURCEDIR18=../src/Utilities/OutputControl
SOURCEDIR19=../src/Utilities/Libraries
SOURCEDIR20=../src/Utilities/Libraries/blas
SOURCEDIR21=../src/Utilities/Libraries/rcm
SOURCEDIR22=../src/Utilities/Libraries/sparsekit
SOURCEDIR23=../src/Utilities/Libraries/sparskit2
SOURCEDIR24=../src/Utilities/Libraries/daglib
SOURCEDIR25=../src/Utilities/Memory
SOURCEDIR26=../src/Utilities/TimeSeries
SOURCEDIR27=../src/Timing
SOURCEDIR28=../src/Solution
SOURCEDIR29=../src/Solution/PETSc
SOURCEDIR30=../src/Solution/LinearMethods
SOURCEDIR31=../src/Exchange
SOURCEDIR7=../src/Model/GroundWaterFlow
SOURCEDIR8=../src/Model/Geometry
SOURCEDIR9=../src/Model/TransportModel
SOURCEDIR10=../src/Model/GroundWaterTransport
SOURCEDIR11=../src/Solution
SOURCEDIR12=../src/Solution/LinearMethods
SOURCEDIR13=../src/Solution/PETSc
SOURCEDIR14=../src/Distributed
SOURCEDIR15=../src/Utilities
SOURCEDIR16=../src/Utilities/TimeSeries
SOURCEDIR17=../src/Utilities/Idm
SOURCEDIR18=../src/Utilities/Idm/selector
SOURCEDIR19=../src/Utilities/Idm/mf6blockfile
SOURCEDIR20=../src/Utilities/ArrayRead
SOURCEDIR21=../src/Utilities/Memory
SOURCEDIR22=../src/Utilities/Matrix
SOURCEDIR23=../src/Utilities/Vector
SOURCEDIR24=../src/Utilities/Observation
SOURCEDIR25=../src/Utilities/OutputControl
SOURCEDIR26=../src/Utilities/Libraries
SOURCEDIR27=../src/Utilities/Libraries/rcm
SOURCEDIR28=../src/Utilities/Libraries/sparskit2
SOURCEDIR29=../src/Utilities/Libraries/sparsekit
SOURCEDIR30=../src/Utilities/Libraries/blas
SOURCEDIR31=../src/Utilities/Libraries/daglib

VPATH = \
${SOURCEDIR1} \
Expand Down Expand Up @@ -88,36 +88,10 @@ $(OBJDIR)/TableTerm.o \
$(OBJDIR)/Table.o \
$(OBJDIR)/MemoryHelper.o \
$(OBJDIR)/CharString.o \
$(OBJDIR)/InputDefinition.o \
$(OBJDIR)/Memory.o \
$(OBJDIR)/List.o \
$(OBJDIR)/LongLineReader.o \
$(OBJDIR)/DevFeature.o \
$(OBJDIR)/MemoryList.o \
$(OBJDIR)/TimeSeriesRecord.o \
$(OBJDIR)/MathUtil.o \
$(OBJDIR)/BlockParser.o \
$(OBJDIR)/MemoryManager.o \
$(OBJDIR)/TimeSeries.o \
$(OBJDIR)/ats.o \
$(OBJDIR)/GeomUtil.o \
$(OBJDIR)/TimeSeriesLink.o \
$(OBJDIR)/TimeSeriesFileList.o \
$(OBJDIR)/tdis.o \
$(OBJDIR)/HashTable.o \
$(OBJDIR)/VectorBase.o \
$(OBJDIR)/Sparse.o \
$(OBJDIR)/DisvGeom.o \
$(OBJDIR)/ArrayReaders.o \
$(OBJDIR)/TimeSeriesManager.o \
$(OBJDIR)/SmoothingFunctions.o \
$(OBJDIR)/MemoryManagerExt.o \
$(OBJDIR)/MatrixBase.o \
$(OBJDIR)/ListReader.o \
$(OBJDIR)/Connections.o \
$(OBJDIR)/InputDefinition.o \
$(OBJDIR)/TimeArray.o \
$(OBJDIR)/ObsOutput.o \
$(OBJDIR)/DiscretizationBase.o \
$(OBJDIR)/simtdisidm.o \
$(OBJDIR)/simnamidm.o \
$(OBJDIR)/gwt1idm.o \
$(OBJDIR)/gwt1ic1idm.o \
Expand All @@ -144,18 +118,46 @@ $(OBJDIR)/gwf3chd8idm.o \
$(OBJDIR)/gwtgwtidm.o \
$(OBJDIR)/gwfgwtidm.o \
$(OBJDIR)/gwfgwfidm.o \
$(OBJDIR)/TimeArraySeries.o \
$(OBJDIR)/ObsOutputList.o \
$(OBJDIR)/Observe.o \
$(OBJDIR)/LongLineReader.o \
$(OBJDIR)/DevFeature.o \
$(OBJDIR)/MemoryList.o \
$(OBJDIR)/IdmSimDfnSelector.o \
$(OBJDIR)/IdmGwtDfnSelector.o \
$(OBJDIR)/IdmGwfDfnSelector.o \
$(OBJDIR)/IdmExgDfnSelector.o \
$(OBJDIR)/TimeSeriesRecord.o \
$(OBJDIR)/MathUtil.o \
$(OBJDIR)/BlockParser.o \
$(OBJDIR)/MemoryManager.o \
$(OBJDIR)/IdmDfnSelector.o \
$(OBJDIR)/TimeSeries.o \
$(OBJDIR)/SourceCommon.o \
$(OBJDIR)/MemoryManagerExt.o \
$(OBJDIR)/ats.o \
$(OBJDIR)/GeomUtil.o \
$(OBJDIR)/TimeSeriesLink.o \
$(OBJDIR)/TimeSeriesFileList.o \
$(OBJDIR)/tdis.o \
$(OBJDIR)/HashTable.o \
$(OBJDIR)/VectorBase.o \
$(OBJDIR)/Sparse.o \
$(OBJDIR)/DisvGeom.o \
$(OBJDIR)/ArrayReaders.o \
$(OBJDIR)/TimeSeriesManager.o \
$(OBJDIR)/SmoothingFunctions.o \
$(OBJDIR)/MatrixBase.o \
$(OBJDIR)/ListReader.o \
$(OBJDIR)/Connections.o \
$(OBJDIR)/TimeArray.o \
$(OBJDIR)/ObsOutput.o \
$(OBJDIR)/DiscretizationBase.o \
$(OBJDIR)/TimeArraySeries.o \
$(OBJDIR)/ObsOutputList.o \
$(OBJDIR)/Observe.o \
$(OBJDIR)/TimeArraySeriesLink.o \
$(OBJDIR)/ObsUtility.o \
$(OBJDIR)/ObsContainer.o \
$(OBJDIR)/BudgetFileReader.o \
$(OBJDIR)/IdmDfnSelector.o \
$(OBJDIR)/TimeArraySeriesManager.o \
$(OBJDIR)/PackageMover.o \
$(OBJDIR)/Obs3.o \
Expand All @@ -164,7 +166,6 @@ $(OBJDIR)/Budget.o \
$(OBJDIR)/BudgetTerm.o \
$(OBJDIR)/sort.o \
$(OBJDIR)/SfrCrossSectionUtils.o \
$(OBJDIR)/SourceCommon.o \
$(OBJDIR)/BoundaryPackage.o \
$(OBJDIR)/VirtualBase.o \
$(OBJDIR)/STLVecInt.o \
Expand Down
1 change: 1 addition & 0 deletions msvs/mf6core.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@
<File RelativePath="..\src\Solution\SolutionGroup.f90"/></Filter>
<Filter Name="Timing">
<File RelativePath="..\src\Timing\ats.f90"/>
<File RelativePath="..\src\Timing\simtdisidm.f90"/>
<File RelativePath="..\src\Timing\tdis.f90"/></Filter>
<Filter Name="Utilities">
<Filter Name="ArrayRead">
Expand Down
10 changes: 3 additions & 7 deletions src/SimulationCreate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,8 @@ end subroutine simulation_cr
subroutine simulation_da()
! -- modules
use MemoryManagerModule, only: mem_deallocate
use MemoryManagerExtModule, only: memorylist_remove
use SimVariablesModule, only: idm_context
! -- local
! ------------------------------------------------------------------------------
!
! -- Deallocate input memory
call memorylist_remove('SIM', 'NAM', idm_context)
call memorylist_remove(component='SIM', context=idm_context)
!
! -- variables
deallocate (model_names)
Expand Down Expand Up @@ -183,11 +177,13 @@ subroutine timing_create()
! -- dummy
! -- locals
character(len=LENMEMPATH) :: input_mempath
character(len=LENMEMPATH) :: tdis_input_mempath
character(len=:), pointer :: tdis6
logical :: terminate = .true.
!
! -- set input memory path
input_mempath = create_mem_path('SIM', 'NAM', idm_context)
tdis_input_mempath = create_mem_path('SIM', 'TDIS', idm_context)
!
write (iout, '(/1x,a)') 'READING SIMULATION TIMING'
!
Expand All @@ -196,7 +192,7 @@ subroutine timing_create()
!
! -- create timing
if (tdis6 /= '') then
call tdis_cr(tdis6)
call tdis_cr(tdis6, tdis_input_mempath)
else
call store_error('TIMING block variable TDIS6 is unset'// &
' in simulation control input.', terminate)
Expand Down
Loading

0 comments on commit 67f1891

Please sign in to comment.