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

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

Resampling radar rainfall rasters and conversion to time series #262

Closed saberraz closed 7 years ago

saberraz commented 7 years ago

@FLO-2DKaren requested to look into possibility of reading several ASCII grids and generate a raincell.dat file as an input to the model.

Each rainfall grid shows the spatial variation of rainfall at a certain time. Unfortunately, the ASCII grids do not contain any meta data so the only way to detect the time is from thier naming convention.

My proposed approach is to provide a basic tool to generate a NetCDF dataset from the ASCII grid.

The NetCDF layer then can be used to resample the rain over each grid. The format of raincell.dat is (page 103-104 of the GDS manual):

Line 1: Beginning date and time, ending date and time, time interval (in minutes) and number of time intervals.

Line 2: Grid element number and the total rainfall depth at that time. This line is repeated for each FLO-2D grid element.

Successive rainfall data for the entire grid system follows for the number of time-interval groups. For the example above, there would be two sets of rainfall data for the entire grid system.

15 72 6/12/2002 1:00:00 PM 6/12/2002 2:00:00 PM 60 2 1 1.8538 2 1.8537 . . 1234 2.272 1235 2.2709 1 1.4794 2 1.4791 . . 1234 1.6294 1235 1.6286

In this above example the beginning date is 6/12/2002 the beginning time 1:00 PM, the ending date 6/12/2002 and the ending time 2:00 PM. The time interval between files is 60 minutes, there are two time intervals and 1235 grid elements. The rainfall depth for grid element number 1 at time 1:00 PM is 1.8538 in. Successive grid element rainfall depths follow. For the second time interval, the rainfall depth for the first grid element is 1.4794 in and the rest of the grid elements follow. If the grid system has been prepared in International Units (meters), then the rainfall data file should be prepared in mm.

saberraz commented 7 years ago

Implemented