modflowpy / flopy

A Python package to create, run, and post-process MODFLOW-based models.
https://flopy.readthedocs.io
Other
517 stars 313 forks source link

run_model3() 'NoneType' object is not callable #18

Closed wchristensen closed 8 years ago

wchristensen commented 9 years ago

I am new to flopy. I am following the "getting started" example on the page below. I have copied everything verbatim [although I believe it should be mf.run_model3()?] and I've also tried syntax from earlier examples but get an error when the model tries to run. Suggestions?

http://modflowpy.github.io/flopydoc/tutorial1.html#getting-started

flopy

wchristensen commented 9 years ago

I am also confused about the post-processing block a bit further down in the same tutorial.

np.arange(1,10,1) gives [1,2,3,4,5,6,7,8,9], which unless I misunderstand should become the values of the contours when passed as:

plt.contour(head[0, :, :], levels=levels, extent=extent)

If the left boundary (x=0) is specified head = 10 and the right boundary (x=1000) is specified head = 0, shouldn't the head contours be linear... i.e. head = 9 (level = 9) line up with x=100, head = 8 (level = 8) line up with x = 200, etc?

Thank you for helping me understand!

jtwhite79 commented 9 years ago

run_model3() is no longer in mbase. If I follow your link, the run command shown in the notebook is: # Run the MODFLOW model success, buff = mf.run_model()

Are you sure you are using the most current version of flopy?

wchristensen commented 9 years ago

Thank you for the reply.

It appears I have the most current version of flopy, unless I am missing something (see below).

I was going back and forth between the tutorial I previously linked and this older one (https://flopy.googlecode.com/svn/sphinx/_build/html/tutorial1.html#getting-started).

This is the error I get when I use:

success, buff = mf.run_model()

flopy - update - buff

langevin-usgs commented 9 years ago

You need to have the MODFLOW executable in your path. If not, then flopy cannot run the model.

FloPy team -- we should probably do an os check on mfexe to make sure that it exists and issue a better error.

Christian LangevinResearch HydrologistOffice of GroundwaterU.S. Geological Survey411 National CenterReston, VA 20192Office: 703-648-4169Fax: 703-648-6693Email: langevin@usgs.gov langevin@usgs.govhttps://profile.usgs.gov/langevin https://profile.usgs.gov/langevin

On Fri, Mar 6, 2015 at 10:43 AM, wchristensen notifications@github.com wrote:

Thank you for the reply.

It appears I have the most current version of flopy, unless I am missing something (see below).

I was going back and forth between the tutorial I previously linked and this older one ( https://flopy.googlecode.com/svn/sphinx/_build/html/tutorial1.html#getting-started).

This is the error I get when I use:

success, buff = mf.run_model()

[image: flopy - update - buff] https://cloud.githubusercontent.com/assets/11322377/6527786/60b08506-c3d2-11e4-964f-b89c8f3d3ba5.png

— Reply to this email directly or view it on GitHub https://github.com/modflowpy/flopy/issues/18#issuecomment-77579683.

wchristensen commented 9 years ago

doh! Thanks.

wchristensen commented 9 years ago

Might I also suggest mentioning the requirement for python 2.7 in the documentation for those of us who are not embedded in the python world.

Thanks for your help.

On Fri, Mar 6, 2015 at 8:03 AM, langevin-usgs notifications@github.com wrote:

You need to have the MODFLOW executable in your path. If not, then flopy cannot run the model.

FloPy team -- we should probably do an os check on mfexe to make sure that it exists and issue a better error.

Christian LangevinResearch HydrologistOffice of GroundwaterU.S. Geological Survey411 National CenterReston, VA 20192Office: 703-648-4169Fax: 703-648-6693Email: langevin@usgs.gov langevin@usgs.govhttps://profile.usgs.gov/langevin https://profile.usgs.gov/langevin

On Fri, Mar 6, 2015 at 10:43 AM, wchristensen notifications@github.com wrote:

Thank you for the reply.

It appears I have the most current version of flopy, unless I am missing something (see below).

I was going back and forth between the tutorial I previously linked and this older one (

https://flopy.googlecode.com/svn/sphinx/_build/html/tutorial1.html#getting-started ).

This is the error I get when I use:

success, buff = mf.run_model()

[image: flopy - update - buff] < https://cloud.githubusercontent.com/assets/11322377/6527786/60b08506-c3d2-11e4-964f-b89c8f3d3ba5.png

— Reply to this email directly or view it on GitHub https://github.com/modflowpy/flopy/issues/18#issuecomment-77579683.

— Reply to this email directly or view it on GitHub https://github.com/modflowpy/flopy/issues/18#issuecomment-77583287.

Wesley Christensen

Hydrologist

2730 N. Deer Run Rd.

Carson City, NV 89701

Phone: (775) 887-7711

langevin-usgs commented 9 years ago

This is mentioned on the main FloPy Github site: https://github.com/modflowpy/flopy

Christian LangevinResearch HydrologistOffice of GroundwaterU.S. Geological Survey411 National CenterReston, VA 20192Office: 703-648-4169Fax: 703-648-6693Email: langevin@usgs.gov langevin@usgs.govhttps://profile.usgs.gov/langevin https://profile.usgs.gov/langevin

On Fri, Mar 6, 2015 at 12:17 PM, wchristensen notifications@github.com wrote:

Might I also suggest mentioning the requirement for python 2.7 in the documentation for those of us who are not embedded in the python world.

Thanks for your help.

On Fri, Mar 6, 2015 at 8:03 AM, langevin-usgs notifications@github.com wrote:

You need to have the MODFLOW executable in your path. If not, then flopy cannot run the model.

FloPy team -- we should probably do an os check on mfexe to make sure that it exists and issue a better error.

Christian LangevinResearch HydrologistOffice of GroundwaterU.S. Geological Survey411 National CenterReston, VA 20192Office: 703-648-4169Fax: 703-648-6693Email: langevin@usgs.gov langevin@usgs.govhttps://profile.usgs.gov/langevin https://profile.usgs.gov/langevin

On Fri, Mar 6, 2015 at 10:43 AM, wchristensen notifications@github.com wrote:

Thank you for the reply.

It appears I have the most current version of flopy, unless I am missing something (see below).

I was going back and forth between the tutorial I previously linked and this older one (

https://flopy.googlecode.com/svn/sphinx/_build/html/tutorial1.html#getting-started ).

This is the error I get when I use:

success, buff = mf.run_model()

[image: flopy - update - buff] <

https://cloud.githubusercontent.com/assets/11322377/6527786/60b08506-c3d2-11e4-964f-b89c8f3d3ba5.png

— Reply to this email directly or view it on GitHub https://github.com/modflowpy/flopy/issues/18#issuecomment-77579683.

— Reply to this email directly or view it on GitHub https://github.com/modflowpy/flopy/issues/18#issuecomment-77583287.

Wesley Christensen

Hydrologist

2730 N. Deer Run Rd.

Carson City, NV 89701

Phone: (775) 887-7711

— Reply to this email directly or view it on GitHub https://github.com/modflowpy/flopy/issues/18#issuecomment-77597110.