modflowpy / flopy

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

bug: Model name in tutorial too long #2182

Closed pya closed 3 months ago

pya commented 4 months ago

Describe the bug The model name in the first tutorial is tutorial01_mf6_data. It has a length of 19 characters. But Modflow 6 only accepts names with a maximum length of 16 characters.

To Reproduce Steps to reproduce the behavior:

  1. Execute the code form the tutorial.
  2. Use sim.write_simulation() to write the Modflow input files.
  3. Run the model with sim.run_simulation().

This creates the following error report.

ERROR REPORT:

  1.     ERROR. INVALID MODEL NAME: TUTORIAL01_MF6_DATA
  2.     NAME LENGTH OF 19 EXCEEDS MAXIMUM LENGTH OF 16

UNIT ERROR REPORT:

  1. ERROR OCCURRED WHILE READING FILE 'mfsim.nam'

Expected behavior The tutorial should use a valid model name. In addition, raising an exception when the model name is too long could be helpful.

Screenshots N/A.

Desktop (please complete the following information):

spaulins-usgs commented 3 months ago

@pya, an updated tutorial with a shorter model name has been checked in to the FloPy develop branch.

pya commented 3 months ago

Thanks. :)