Skip to content

feature: opt into old-school formatted files #2572

@wpbonelli

Description

@wpbonelli

Seems there is agreement in #871 that external files should be formatted for numpy/etc compatibility by default, with the option to enable fortran-style formatting when needed. Something to keep in mind for 4.x

I've invoked set_all_data_external which is doing a good job of making all array and list-directed data pushed out to external files. Super helpful for PEST!

However, the files are only writing 20 values per line resulting in old-school file formats that can't be correctly read back into Python using tools like np.loadtxt unless you happen to have a multiple of 20 columns in the model. It would be more Pythonic and much more useful to write these files as nrow x ncol instead.

posted by deleted user

I would argue for having the max_columns_of_data be set to a very large number by default in flopy. If people want to have formatted-like files, then they can set that up. I, for example, just spent a couple hours searching for this setting, and it seems, given the conduit to pyemu, rasterio, etc, having these regular grid-like arrays makes more sense than having a default of 20 rows.

posted by @andyrich

@andyrich I completely agree. Let's move beyond punch card requirements! haha

posted by @jtwhite79

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions