Skip to content

bug: set_data() method leaves stress period data intact for periods not included in dictionary #2663

@MickeyRush

Description

@MickeyRush

I am reading in a simulation of 48 stress periods, averaging stress period data down to 12, and then running the new simulation. Despite building a new stress period dictionary, reducing TDIS.NPER to 12, and then using the set_data() method, flopy still writes out stress periods 13–48. Is this the intended behavior?

Steps:

  1. I build an entirely new stress period dictionary for the RCH package (with keys 0–11).
  2. I update TDIS.NPER to 12.
  3. I use the set_data() method, passing my new stress period dictionary to RCH.
  4. I write out the simulation.

Stress period data for periods 13–48 is still written, even though keys 12–47 are not included in the dictionary. (Note that this also occurs for list type data – SFR, RIV etc.)

I would expect that we'd want set_data() to entirely overwrite the stress period data.

It's not a huge problem, except that loading in that new model takes FOREVER because NPER=12. I could fix by removing the old package and creating a new one, but this seems like overkill for something that should easily be accomplished via set_data().

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions