Deltares / imod-python

🐍🧰 Make massive MODFLOW models
https://deltares.github.io/imod-python/
MIT License
18 stars 3 forks source link

Well: ipf files with the same name, but different folder, are grouped #1167

Open JoerivanEngelen opened 2 months ago

JoerivanEngelen commented 2 months ago

With the changes made in #1147, I had to group wells by name, derived from the IPF file name, in open_projectfile_data

However, it is possible to put seperate wells with the same name filename, in a different folder. These are now assigned the same name, as I didn't want to use the full path to wells for bookkeeping: In the end names need to be truncated to 16 characters for MODFLOW6. This happens in from_imod5_data now.

Huite commented 2 months ago

A thought: you make this complicated by truncating to 16 chars, then look for uniques, then decide if you need to truncate further to 14, then postfix -1, -2, etc. It might be simpler to truncate to 14 all the time and number them regardless of name uniqueness.

JoerivanEngelen commented 2 months ago

The truncating takes place way later now, just before assigning packages to the GroundwaterFlowModel in from_imod5_data. But probably better to truncate already in open_projectfile_data. That would also prevent grouping packages by same ipf name there.