Getting error while running an existing modflow model using flopy package #1545
-
I am using flopy package to change the content of well package and then to run the model and finally get all output heads. I have loaded my model successfully and I have changed the content of well package but when it comes to running the model after all these changes I've got this error. You know, there is no file named .name file in the file of my model but instead I have used ".mfn" file which can be considered as an alternative for ".name" file in my model. I don't know how can I solve this problem. Thanks in advance for your answers. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @zargol7419, are you sure namefile 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() |
Beta Was this translation helpful? Give feedback.
Hi @zargol7419, are you sure namefile
step6.mfn
is inmodel_ws
— models expect the namefile to exist in the workspace whenrun_model
is calledIf 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: