feature: opt into old-school formatted files
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
I would like to push for structured data (DIS) to be written as nrow, ncol format, which flopy is supposed to do right now. My guess is that some of the current issues with writing external data (specifically external data written before user calls sim.write_simulation()) is missing the logic that "auto sets" the max_columns_of_data parameter.
I agree that the default for max_columns_of_data should be much larger and potentially be automatically set to ncpl for DISV and nnodes for DISU.