Skip to content

mf6: IRCH is repeated for subsequent stress periods in MODFLOW-6 but not in Flopy #1028

@aleaf

Description

@aleaf

The documentation isn't very clear on this, but from talking to @langevin-usgs, IRCH only needs to be specified once, and then MODFLOW-6 will use that array for subsequent stress periods. However, in Flopy, specifying a single (2D) IRCH array results in a transient2d array that is populated with zeros after the initial stress period. The behavior is the same after loading a model with irch specified once.

import flopy
mf6 = flopy.mf6
sim_name = 'testsim'
model_name = 'testmodel'
out_dir = 'tmp'

tdis_name = '{}.tdis'.format(sim_name)
sim = mf6.MFSimulation(sim_name=sim_name,
                   version='mf6', exe_name=exe_name,
                   sim_ws=out_dir)
tdis_rc = [(6.0, 2, 1.0), (6.0, 3, 1.0), (6.0, 3, 1.0)]
tdis = mf6.ModflowTdis(sim, time_units='DAYS', nper=3,
                          perioddata=tdis_rc)

model = mf6.ModflowGwf(sim, modelname=model_name,
                         model_nam_file='{}.nam'.format(model_name))

dis = mf6.ModflowGwfdis(model, length_units='FEET', nlay=1,
                                     nrow=2, ncol=2, delr=500.0,
                                     delc=500.0,
                                     top=100.0, botm=50.0,
                                     filename='{}.dis'.format(model_name))
irch = [[0, 1], 
        [2, 3]]
rcha = mf6.ModflowGwfrcha(model, irch=irch, recharge={0: 1, 1: 1, 2: 1})
rcha.irch.array.sum(axis=(1, 2, 3))

Output:

array([6, 0, 0])

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions