update(Mf6Splitter): change how node mapping is stored and loaded#2465
Conversation
* `save_node_mapping` now writes a compressed `hdf5` file and stores additional modelgrid reconstruction information for original and split model representations * `load_node_mapping` changed to a static method that returns a Mf6Splitter object that can be used for array reconstruction * updated autotests * added example usage to `mf6_parallel_model_splitting_example.py` * json node mapping files no longer supported, user must rewrite node mapping files as hdf5 files.
|
@mjr-deltares, here are the updates to the model splitter for more efficient storage and loading of the "node mapping" files. If you'd like to give them a test, usage is as follows mfs = Mf6Splitter(my_sim)
new_sim = mfs.split_model(array)
node_map_file = "my_node_map.h5"
mfs.save_node_mapping(node_map_file)
mfs2 = Mf6Splitter.load_node_mapping(node_map_file)I tested this on the average annual long island model and HDF5 file processing and write time was ~5 seconds, read and reconstruction time was ~1.5 seconds, and HDF5 file size was about 63 MB, which includes information to reconstruct the original and split model grids, and the mappings to link these together. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2465 +/- ##
=========================================
+ Coverage 68.4% 74.8% +6.4%
=========================================
Files 294 296 +2
Lines 59390 62736 +3346
=========================================
+ Hits 40652 46977 +6325
+ Misses 18738 15759 -2979
🚀 New features to boost your workflow:
|
Hi @jlarsen-usgs , I forgot to answer you last week but it's on my radar now. Thanks for making these changes! |
|
ssm updates included in PR. Closes #2474 |
updates for model splitter node mapping changes, corresponds to modflowpy/flopy#2465
save_node_mappingnow writes a compressedhdf5file and stores additional modelgrid reconstruction information for original and split model representationsload_node_mappingchanged to a static method that returns a Mf6Splitter object that can be used for array reconstructionmf6_parallel_model_splitting_example.py