Skip to content

Method for list of all model files #1637

Answered by spaulins-usgs
laat0003 asked this question in Q&A
Discussion options

You must be logged in to vote

@laat0003, there is unfortunately no single method that returns a list of all files in a simulation. However, by iterating through a tree of objects you should be able to do this. I can add a method to flopy that does this, but I may not get to it for a little while. If you would like to try to do this yourself, below I describe the tree structure you will need to traverse to get the filenames. The objects are in bold and the methods/attributes used to access those objects are in italics.

  • Simulation
    • name_file
      • Namefile Package
    • get_package(None)
      • Package1
      • Package2
    • model_dict
      • Model1
      • Model2
        • name_file
          • Namefile Package
        • get_package(None)
          • Package1
          • Package2
            • filename
              • Package's filena…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@laat0003
Comment options

Answer selected by laat0003
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