FM.readPrecip: Load Precipitation Data
Description
After all rasters (DEM, land cover, and soil) are loaded, users may use this function to load precipitation data. Precipitation data can come from multiple weather stations or gridded remote sensing data.
Usage
FM.readPrecip(datatype = 0, txtfile, startdatetime, enddatetime,
interval, idwpower = 2)Arguments
datatype
0 = weather stations, 1 = raster data from NWP models, reanalysis datasets, or other remote sensing datasets.
txtfile
full file path of the text file required for precipitation data. If the data comes from multiple weather stations, the format of this text file should be given as follows:
#: ------------------------------------------
#: ID Lon Lat Datafile
#: 1 -92.0296 30.1800 p1.txt
#: 2 -92.0260 30.1779 p2.txt
#: 3 ... ... ...
#: ------------------------------------------
If the precipitation data comes from rasters, the format of this text file should be given as follows:
#: ------------------------------------------
#: ID Rasterfile
#: 1 p_2016-06-09_12-00-00.tif
#: 2 p_2016-06-09_13-00-00.tif
#: 3 ...
#: ------------------------------------------
startdatetime
start datetime of precipitation records, should be formated as "YYYY-MM-DD hh:mm:ss". E.g., "2016-06-09 12:00:00".
enddatetime
end datetime of precipitation records, should be formated as "YYYY-MM-DD hh:mm:ss". E.g., "2016-06-09 13:00:00".
interval
interval of precipitation records, unit: seconds. For example, 1 hr = 60 min * 60 sec = 3600 sec.
idwpower
(OPTIONAL) the power of IDW method, default: 2, suggested options: 1, 2, or 3.
Examples
Run this code# NOT RUN {
## Load FloodMapper package
library(FloodMapper)
## Refer to Step 6 in the sample code of FM.start():
## Step 6. Load precipitation data from one weather station
# }
Run the code above in your browser using DataLab