FLO-2DSoftware / qgis-flo-2d-plugin

A plugin for pre-processing/post-processing FLO-2D models
6 stars 7 forks source link

Compatibility when importing an old inp (Subcatchments table) #784

Open FLO-2DNoemi opened 2 years ago

FLO-2DNoemi commented 2 years ago

@FLO-2DJJ

We need to check the compatibility when importing an old *.INP to create the FLO-2D SD model (SWMMFLO.DAT, SWMMFLORT.DAT). The tables junctions and subcatchments (if exists) have different order of the inlets. This affects the order of the inlets in SWMMFLO.DAT file and could create bad output or an error running the model (FLOPRO.exe).

Also, when the INP is imported, the type of inlets is set as 1 (all), but the type of inlets should be equal to 0 so the user can enter 1 to 5 only for inlets and keep 0 for junctions.

FLO-2DKaren commented 1 year ago

@FLO-2DNoemi We can test this on UEFCC.

FLO-2DKaren commented 3 months ago

@rpachaly I put you on this for 2024 development. It isn't critical but we should ask Noemi about it.

FLO-2DNoemi commented 3 months ago

The SWMM.INP with sub-catchments can be from an old FLO-2D model or a different SWMM software. The following comments can help to fix the compatibility issue:

Inlets' names do not need to start with "I". Inlets can be identified as those junctions connected to subcatchments, they collect water from the surface. Junctions are not connected to subcatchments. The table that contains rain data was created in SWMM.INP for old versions. This triggered the collection of water from FLO-2D grids ( subcathments) The rain table is not needed in the new version of the FLO-2D inp.

Noemi

On Mon, May 27, 2024 at 3:54 PM Karen @.***> wrote:

@rpachaly https://github.com/rpachaly I put you on this for 2024 development. It isn't critical but we should ask Noemi about it.

— Reply to this email directly, view it on GitHub https://github.com/FLO-2DSoftware/qgis-flo-2d-plugin/issues/784#issuecomment-2133990425, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE32O3WRXSBYU5R5J465C2TZEOFQJAVCNFSM5L4IVYYKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJTGM4TSMBUGI2Q . You are receiving this because you were mentioned.Message ID: @.***>

FLO-2DKaren commented 1 month ago

@FLO-2DNoemi Noemi, Robson tested uefcc and fbsc and the subcatchments are ignored.

@rpachaly Robson, Did you need to convert the names of the inlets? Or were they automatically updated with in I or i?

rpachaly commented 1 month ago

The names are not updated but the sd_inlets are.

if subcatchments is not None:
    if "subcatchment" in values:
        sd_type = "I"
    elif "out_type" in values:
        continue   # Skip outlets
    elif name[0].lower() in ["i"]:
        if (
            "junction_invert_elev" in values
        ):  # if 'junction_invert_elev' is there => it was read from [JUNCTIONS]
            sd_type = "I"
        elif (
            "outfall_invert_elev" in values
        ):  # if 'outfall_invert_elev' is there => it was read from [OUTFALLS]
            continue
        else:
            continue
    else:
        sd_type = "J"
FLO-2DNoemi commented 1 month ago

Hi Robson and Karen,

Let me know if you need any input from me to fix this issue.

Noemi

On Wed, Jul 10, 2024 at 9:58 AM Robson Pachaly @.***> wrote:

The names are not updated but the sd_inlets are.

if subcatchments is not None: if "subcatchment" in values: sd_type = "I" elif "out_type" in values: continue # Skip outlets elif name[0].lower() in ["i"]: if ( "junction_invert_elev" in values ): # if 'junction_invert_elev' is there => it was read from [JUNCTIONS] sd_type = "I" elif ( "outfall_invert_elev" in values ): # if 'outfall_invert_elev' is there => it was read from [OUTFALLS] continue else: continue else: sd_type = "J"

— Reply to this email directly, view it on GitHub https://github.com/FLO-2DSoftware/qgis-flo-2d-plugin/issues/784#issuecomment-2220582183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE32O3T4FAFB2QRJAGZ424LZLU4YJAVCNFSM5L4IVYYKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMRSGA2TQMRRHAZQ . You are receiving this because you were mentioned.Message ID: @.***>