Skip to content

Getting error while running an existing modflow model using flopy package #1545

Answered by wpbonelli
zargol7419 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @zargol7419, are you sure namefile step6.mfn is in model_ws — models expect the namefile to exist in the workspace when run_model is called

If you want to load a model from one location, then switch to a new workspace and run the model there, you can use the following pattern:

model = flopy.modflow.Modflow.load('my_namefile.nam', model_ws='my/workspace')
model.change_model_ws('new/workspace')
model.write_name_file()
model.write_input()
model.run_model()

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zargol7419
Comment options

@wpbonelli
Comment options

Answer selected by zargol7419
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants