FM.animate: Create An Animation for An Existing Model Run

Description Usage Arguments Author(s) Examples

Description

Once a model run is completed successfully, users can use this function to create an animation into a *.gif file.

Usage

1
FM.animate(runname = "", workdir = "")

Arguments

runname

(OPTIONAL) the name of an existing model run. If it is empty, the current model run will be selected.

workdir

(OPTIONAL) full path to user's work directory. If it is empty, the work directory of current model run will be selected.

Author(s)

Xander Wang <xiuquan.wang@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Load FloodMapper package
library(FloodMapper)

s_return <- NA

## Assume that the current model run with a name of "Lafayette_1km" 
## has been completed successfully, you can run the following
## command to create an animation in *.gif format.

    s_return <- FM.animate("Lafayette_1km", workdir = tempdir())


## Check if there are any errors
if (!is.na(s_return)) {
    if (s_return != "") {
        cat("Creating animation is failed because of the following error:\n")
        cat(s_return)
    } else {
        cat("Creating animation is successful!\n")
    }
}

FloodMapper documentation built on May 2, 2019, 5:08 a.m.