Skip to content

Commit

Permalink
refactor(transport): merge in develop (#444)
Browse files Browse the repository at this point in the history
* fix(uzf): fix indexing error in UZF (#274)

* Error introduced as part of recent UZF refactoring
* Closes #273

* fix(memory): some variables not deallocated (#278)

Implemented new check in develop mode so code bombs with error if memory manager variable not deallocated

* refactor(budobj): new budget object for advanced packages (#279)

* single code base for writing binary budget files for advanced packages
* single code base for creating and writing budget tables to list file for advanced packages
* implemented for MAW, UZF, LAK, SFR, and MVR
* closes #277
* update mf6exes from 2.0 to 3.0
* will allow generalized transport calculations for advanced packages

* refactor(advanced packages): read static data as part of df() (#281)

* refactor(advanced packages): modify advanced packages to read all static data as part of df()
* modify setup_budobj to include the connectivity so that it is available to other models

* fix(budterm): initialize nlist to zero (#283)

* initialize nlist to zero (#284)

* fix(lak): initialize chdratin and chdratout to zero (#286)

* fix(lak): added sign checks for user specified lak flow terms (#288)

* User-specified values for RAINFALL, EVAPORATION, RUNOFF, INFLOW, and WITHDRAWAL must be positive.  The program worked if these values were negative, but that doesn't necessarily make sense and is probably an input error.
* Updated definition file to reflect these changes
* Corrected minor typo in lake definition file
* Updated release notes to reflect this change
* Close #287

* feat(sfr): add storage term to sfr budget (#293)

* Also includes a reach volume term written as an aux variable.  This is needed for transport.
* initialize str so non-ascii characters don't show up in output files
* updated notes for these changes

* * fix(csub): Fix CSUB binary budget data saved as IMETH=6 datatype

closes #290

* refactor(sfr): Refactor SFR Package to remove use of Geometry objects (#296)

* refactor(sfr): Refactor SFR Package to remove use of Geometry objects

* doc(pak-ts): update description of package timeseries variables. 

* ci(yml): update yml to clone shallow copy of flopy and pymake repos

* doc(release): Update release notes

* Closes #276, and #289

* refactor(xt3d): accumulate flowja instead of set (#306)

This change is required for transport, which accumulates terms in flowja

* fix(dis): corrected connection vector error in DIS package (#308)

Code was incorrectly calculating cell center elevations when nozee was .false.  This error would have affected XT3D simulations with unconfined flow and non-zero values specified for ANGLE2 in the NPF Package.  It also would affect dispersive transport with XT3D for unconfined conditions.

* Update sln-ims-example.dat

* refactor(maw): refactor MAW conductance calculation for issue 305 (#310)

Add traps to catch 1) skin factors that are <= 0 when using the SKIN
conductance equation and 2) and negative saturated conductances values.

Closes #305

* feat(tableobj): Add a generic table object for lst file output (#303)

Full implementation for SFR package. Partial implementation for LAK, MAW, and UZF packages.

* feat(tableobj): update MAW package to use tableobj for data output (#315)

Also fix some budget reporting issues in the MAW package

* fix(auxmult): auxmult fix when auxmult and bound are in time series (#316)

* change order of time series interpolation so aux is done first in case it is an auxmult column
* partially addresses #314
* updated release notes

* refactor(BoundaryPackage): Add use of TableObject for print_flows option (#317)

* feat(lnf): update n-point geometry package data

* Revert "feat(lnf): update n-point geometry package data"

This reverts commit 3460cfb.

* fix(lak): revise the way outlet to-mvr flows are stored in budobj (#321)

* fix(lak): revise the way outlet to-mvr flows are stored in budobj

* updated release notes

* refactor(lak/maw/sfr): for CONSTANT features write fixed value instead of DHNOFLO to binary file (#329)

* refactor(lak/maw/sfr): for CONSTANT features write fixed value instead of DHNOFLO to binary file

* update release notes

* fix(maw): new headtable corrected to have mawwells rows instead of maxbound (#332)

* fix(sfr): Remove upstream_fraction check from PACKAGEDATA block (#334)

closes #324

* feat(transport): update develop with some general routines needed for transport (#339)

* feat(transport): update develop with some general routines needed for transport
* fix(mover): correct typo in error message
* closes #336
* refactor(disu): correct type in disu error message
* closes #635

* fix(csub): Allow interbed observations when no interbeds specified (#338)

DNODATA values reported if 1) delay interbed observations are specified
and no delay interbeds are specified and 2) interbed observations are
specified and the number of interbeds is zero. Added test of all
observation types to test_gwf_csub_sk01.py which has no interbeds.

closes #298

* ci(travis): update travis.yml to install miniconda instead of apt python (#346)

* refactor(mf6): standardize output to STDOUT to use istdout variable

* refactor(mf6): standardize output to STDOUT to use istdout variable

Modify mf5to6 to use standard SimVariables.f90 in mf6 src and add
ListType variables in original mf5to6 SimVariables.f90 file to
SimListVariables.f90 and update use statements.

* feat(npf): add save saturation option to NPF (#351)

* changed some things to public in lak, uzf, sfr
* fixed minor bug in uzf
* updated release notes and dfn files
* modified lak to store hlak and clak in the bound array

* refactor(sim_message): Refactor to have independent sim_message (#353)

* bug(csub): Write better cellid format to strain csv files (#355)

Write integer cellids to csv files instead of string. Add method
to discretization classes to return array of user indices. Refactored
table output to use table object instead of UWWORD.

closes #299

* fix(csub): Add additional inelastic- and elastic-compaction-cell obs. (#356)

Closes #302

* fix(csub): Report NODATA for CSUB observ. not calculated in steady-state (#359)

CSUB source has been modified to report NODATA values for observations
that are not calculated during steady-state stress periods.
Observations that are not calculated for steady-state stress
periods include SKE, SK, SKE-CELL, SK-CELL, DELAY-HEAD,
DELAY-PRECONSTRESS, DELAY-GSTRESS, DELAY-ESTRESS, PRECONSTRESS-CELL.
Update mfio to reflect these changes.

Also modified CSUB observations so that thick-cell observation is
correctly calculated during steady-state stress periods.

Closes #300

* Merge refactor-src into develop (#361)

* refactor(ListReader): Refactor ListReader to use table object (#362)

* fix(npf): remove isavsat hardwire (#364)

* refactor(src): remove unused variables (#366)

* update mkdist.py to copy additional MSVS solutions and projects

* refactor(uzf): refactor uzf to use table object instead of UWWORD (#367)

* refactor(uzf): refactor uzf to use table object instead of UWWORD

Also simplify table object to write tables of unknown length.

* refactor(uzf): refactor uzf to use table object instead of UWWORD

Simplify table object to write tables of unknown length. Update
observations to use table object when PRINT_INPUT (iprpak=1) is
specified to write input observation data.

* fix(uzf): flowjaface is not ordered for uzf (#372)

* fix(bnd_cf): make another call to bnd_cf routines in gwf bnd_bd (#378)

* boundary budgets were being calculated using hcof and rhs values from the previous iteration.  This could cause drain flows to be into the aquifer, for example. This fix recalculates the package hcof and rhs values in bd using the final head solution.

* update release notes to reflect this change

* docs(sfr/lak): couple minor doc changes (#380)

* refactor(src): remove unused variables

* update mkdist.py to copy additional MSVS solutions and projects

* docs(sfr/lak): couple minor doc changes

* feature(ims): add additional solver output (#375)

Closes #375

* refactor(lak package dfn - perioddata): combined all perioddata into one recarray (#381)

* refactor(lak package dfn - perioddata): combined lakeperioddata and outletperioddata into perioddata

* refactor(lak stress period data): updated dfn

* feature(ims): refactor package convergence check (#382)

* Introduce end-of-line normalization (#386)

* refactor(xt3d): update develop with minor changes needed for transport (#388)

* feature(ims): update inner iteration summary (#389)

* refactor(NumericalSolution): refactor csv output (#395)

* refactor(NumericalSolution): refactor csv output

Refactor csv output to save at the end of the each outer iteration. Add
options to save separate outer and inner iteration data.

closes #172

* refactor(NumericalSolution): refactor *_cc() methods (#396)

Refactor *_cc() methods to pass package integer (ipak) location
information and the total number of inner iterations. The ipak
variable simplifies construction of the solution outer iteration
information for the csv file. The total number of inner iterations
makes package convergence csv files consistent with the outer iteration
csv file.

Update the release notes to reflect recent changes to csv convergence
output. Also moved changes for previous versions to release notes
appendix (Appendix A).

* refactor(Sim): Add MessageModule to containerize message functionality (#399)

Add generic message functionality (in Message.f90) to standardize messages
(errors, warnings, notes) written at the end of the simulation. Added initial 
warning messages in mf6. Warning messages and notes are not written if
the 'SUMMARY' level command line switch is specified.

Refactor IMS package to replace outer_hclose and inner_hclose with
outer_dvclose and inner_dvclose. Using outer_hclose and inner_hclose
will return warning messages. Added error messages for outer_rclosebnd
and csv_output.

* docs(gwf-mvr.dfn): clarify mvrtype definition (#408)

Closes #393

* refactor(misc): bringing in changes made on transport branch (#409)

* implemented table writer for mvr flows
* turned on fpp preprocessing in vfproj for compilerversion.fpp
* modifed obs table header in tex file
* minor changes to budget and budgetobject to support transport

* Output in bmi
- writing stdout to file or screen is now configurable through bmi

(cherry picked from commit ba98a37)

* Cleaning up the bmi a bit...

(cherry picked from commit 798afe9)

* Introduced option to update storage (sc2) for each timestep

(cherry picked from commit 93b5cc9)

* and also update flag for sc1 now

(cherry picked from commit c4ff085)

* refactor(misc): add deprecated tag to dfn, refactor budget.f90 (#413)

* refactor(misc): add deprecated tag to dfn, refactor budget.f90

* updated mf6ivar readme.md to included deprecated description

* fix for maw02 failure resulting from flopy updates

* feat(DRN): add option for scaling drainage discharge

* feat(DRN): add option for scaling drainage discharge

Add autotest (test_gwf_drn_ddrn02) that compares cubic scaled drain
discharge to groundwater seepage calculated by the UZF package.

* feat(DRN): add option for scaling drainage discharge

Add autotest (test_gwf_drn_ddrn01) that compares scaled drain
discharge to calculated values. Update release notes with scaled
drainage discharge option.

* feat(sim): add standard subroutine for deprecation warnings

* feat(sim): add standard subroutine for deprecation warnings

* feat(sim): add standard subroutine for deprecation warnings

Modify get_filename() subroutine to trim filename path based on OS.

* feat(sim): add standard subroutine for deprecation warnings

Modify get_filename() subroutine to trim filename path based on OS.

* BMI work: writing bmi messages through generic utils

* sorry, forgot width specifier...

* docs(gwf-sfr.dfn): clarify 2nd idv definition (#418)

Close #417

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): cleanup

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(advanced packages): minor changes to support buoyancy package (#422)

* refactor(advanced packages): add minor changes to support buoyancy package

* add change to boundarypackage.f90 to support the noupdateauxvar variable

* fix for latests flopy changes

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

Fixed issue in HashTable when key does not exist and return from
function with uninitialized indx. With gfortran indx was initialized
by default to a value greater than 0.

* refactor(lak): refactor timeseries to use read_value_or_time_series()

Cleanup of error messages.

* fix(exg-mvr): dis object not associated for binary save flows (#425)

* refactoring of the budget object resulted in an unassociated dis object when writing flows for exchange water mover
* dis is no longer optional for mvr_cr()
* closes #423

* refactor(sfr): use read_value_or_time_series_adv() for timeseries (#424)

* refactor(uzf): use read_value_or_time_series_adv() for timeseries (#429)

* docs(gwf-uzf.dfn): fix typo (#431)

* refactor(maw): use read_value_or_time_series_adv() for timeseries (#430)

* refactor(Memory): remove unused MemoryTSType (#434)

* fix(sfr): fix error in upstream factor check with diversions (#435)

Initialize diversion flow (divflow) to zero in the event that they are
not defined in the first stress period.

* fix(uzf): fix memory leak in UzfCellGroup (#437)

close #436

* refactor(lak/sfr): changes for future support of density variations (#441)

* feat(sfr): Add picard iteration loop in sfr_fc() (#440)

Also cleanup sparse and remove as a sfrtype variables.

* docs(gwf-drn.dfn): fix typo (#439)

* refactor(csub): use read_value_or_time_series_adv() for timeseries (#442)

Also error message cleanup.

Co-authored-by: Hughes, J.D <[email protected]>
Co-authored-by: spaulins-usgs <[email protected]>
Co-authored-by: Eric Morway <[email protected]>
Co-authored-by: mjr-deltares <[email protected]>
  • Loading branch information
5 people committed May 16, 2020
1 parent c571c7a commit 602d905
Show file tree
Hide file tree
Showing 12 changed files with 994 additions and 337 deletions.
20 changes: 17 additions & 3 deletions autotest/test_gwf_csub_subwt02.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import sys
import numpy as np

try:
Expand All @@ -22,6 +21,7 @@
from simulation import Simulation

ex = ['csub_subwt02a', 'csub_subwt02b', 'csub_subwt02c', 'csub_subwt02d']
timeseries = [True, False, True, False]
exdirs = []
for s in ex:
exdirs.append(os.path.join('temp', s))
Expand Down Expand Up @@ -54,6 +54,7 @@
nstp = [1, 60, 60]
tsmult = [1., 1., 1.]
steady = [True, False, False]
ts_times = np.arange(0., 60000, 10000., dtype=np.float)

# spatial discretization
nlay, nrow, ncol = 4, ib0.shape[0], ib0.shape[1]
Expand Down Expand Up @@ -293,13 +294,22 @@ def get_model(idx, dir):

# csub files
gg = []
if timeseries[idx]:
sig0v = 'geostress'
ts_methods = ['linearend']
ts_data = []
for t in ts_times:
ts_data.append((t, gs0[idx]))
else:
sig0v = gs0[idx]
for i in range(nrow):
for j in range(ncol):
if ib0[i, j] > 0:
gg.append([(0, i, j), gs0[idx]])
gg.append([(0, i, j), sig0v])
sig0 = {0: gg}
opth = '{}.csub.obs'.format(name)
csub = flopy.mf6.ModflowGwfcsub(gwf,
# print_input=True,
# interbed_stress_offset=True,
boundnames=True,
compression_indices=True,
Expand All @@ -314,6 +324,11 @@ def get_model(idx, dir):
packagedata=swt6,
maxsig0=len(gg),
stress_period_data=sig0)
if timeseries[idx]:
fname = '{}.csub.ts'.format(name)
csub.ts.initialize(filename=fname, timeseries=ts_data,
time_series_namerecord=[sig0v],
interpolation_methodrecord=ts_methods)

cobs = [('w1l1', 'interbed-compaction', '01_09_10'),
('w1l2', 'interbed-compaction', '02_09_10'),
Expand Down Expand Up @@ -356,7 +371,6 @@ def get_model(idx, dir):
('sk2l4', 'ske-cell', (3, 11, 6)),
('t1l2', 'theta', '02_09_10')]


orecarray = {'csub_obs.csv': cobs}
csub_obs_package = csub.obs.initialize(filename=opth, digits=10,
print_input=True,
Expand Down
3 changes: 2 additions & 1 deletion autotest/test_gwf_ts_sfr01.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def build_model(ws, name, timeseries=False):
nper=nper, perioddata=tdis_rc)
# create iterative model solution and register the gwf model with it
ims = flopy.mf6.ModflowIms(sim,
print_option='NONE',
print_option='SUMMARY',
outer_dvclose=hclose,
outer_maximum=nouter,
under_relaxation='NONE',
Expand Down Expand Up @@ -175,6 +175,7 @@ def build_model(ws, name, timeseries=False):
budpth = '{}.{}.cbc'.format(name, paktest)
cnvgpth = '{}.sfr.cnvg.csv'.format(name)
sfr = flopy.mf6.ModflowGwfsfr(gwf,
maximum_picard_iterations=1,
auxiliary=auxnames,
print_input=True,
budget_filerecord=budpth,
Expand Down
Loading

0 comments on commit 602d905

Please sign in to comment.