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

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

RAIN.DAT is exported with zeroes #1554

Closed FLO-2DNoemi closed 6 days ago

FLO-2DNoemi commented 1 month ago

RAIN.DAT is exported with zeroes when no data is entered.

image

FLO-2DKaren commented 1 month ago

It’s always been like this. Don’t know if it’s worth fixing since it won’t use that data because the switch is off.

FLO-2DNoemi commented 1 month ago

I remember this is something that also happened in the previous plugin, I have seen it before, but eventually we need to fix it. It is misleading.

On Tue, Sep 10, 2024 at 5:01 PM Karen @.***> wrote:

It’s always been like this. Don’t know if it’s worth fixing since it won’t use that data because the switch is off.

— Reply to this email directly, view it on GitHub https://github.com/FLO-2DSoftware/qgis-flo-2d-plugin/issues/1554#issuecomment-2342002595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE32O3TCP72FUGZZSXMKA43ZV5MZRAVCNFSM6AAAAABN7LPJJ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBSGAYDENJZGU . You are receiving this because you authored the thread.Message ID: @.***>

rpachaly commented 1 month ago

I'll fix it.

rpachaly commented 1 month ago

The rain table is created even if there is no data defined. I did not change that. I just added a check for the RTT (tot_rainfall) right before exporting and, if it is 0, it does not export the RAIN.DAT and shows the following message:

image

All other files are exported.

Is this a good approach?

FLO-2DNoemi commented 1 month ago

One thing to consider is the case when RAINCELL.DAT and RAINCELL.HDF5 are used, RAIN.DAT must be generated with the following data:

1 0 IRAINREAL IRAINBUILDING 0 0.0 0 0

Also, there is a simplified methodology for the spatially and temporal variable rainfall data (NEXRAD) that can be used instead of the RAINCELL file. I created this for SFWMD project and it is much more simple. The plugin does not currently create the data files. The files are the following:

FLO2DRainCell.dat RainCellRaw.dat

I will add a separate issue for this. Eventually we need to discuss this simplified method and figure out if we want to keep it, then we can create these files in HDF5 format only.

rpachaly commented 1 month ago

Ok, I improved the check to evaluate the case of RAINCELL. It is done, tested and merged on https://github.com/FLO-2DSoftware/qgis-flo-2d-plugin/pull/1557

FLO-2DKaren commented 6 days ago

Tested and working good.