Description Usage Arguments Value Author(s) See Also Examples
View source: R/write.river.newInflow.R
A new text file is created. The first row contains " DAILY RIVER RUNOFF" and the second row "[date in format 'YYYY.MM.DD hh:mm:ss'] [annual inflow 1] [annual inflow 2]" The 'annual inflow n' has to be printed in the Fortran format 'F8.6' (width=8; 6 digits in front of the '.'). One file is created per day.
1 2 | write.river.newInflow(riverInfo, riverData, dOt, year, month = 0, day = 0,
overwrite = TRUE, warn = TRUE)
|
riverInfo |
list with grid information |
riverData |
list with river inflow data |
dOt |
character; directory into which the final file should be written |
year |
integer; year to write out |
month |
integer; month to write out; if month==0 => write all months |
day |
integer; day to write out; if day==0 => write all days |
overwrite |
logical; overwrite 'dOt/filename' it already exists |
warn |
logical; allow/suppress warnings |
file written
Daniel Neumann, daniel.neumann@io-warnemuende.de
write.river.append2Inflow, write.river.newNML, write.river.netCDF
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # read a file:
test.mom.monthly <- read.river.mom('files/GER_Dan_Str_Warnow.dat')
# interpolate from monthly to daily
test.mom.daily <- interpolate.river.mom(test.mom.monthly, to = 'daily', method = 'step')
# get grid info
grid_info <- get.infos.grids.hbm.basic()
# get river infos
file <- 'files/river_list.dat'
riverInfos <- read.infos.rivers(file, grid_info)
# (you will get some warnings here)
# write new namelist
write.river.newInflow(riverInfos$Warnow, test.mom.daily, 'out_dir', 2012, month = 1, day = 1:5, overwrite=FALSE)
## example file content
# DAILY RIVER RUNOFF
# 2012.07.27 12:00:00 2.1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.