-
Notifications
You must be signed in to change notification settings - Fork 15
/
README.Rmd
92 lines (65 loc) · 2.53 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
fig.path = "images/"
)
```
GLM3r
====
|Linux | Windows |
| -------------|-------------|
|[![Build Status](https://travis-ci.org/GLEON/GLM3r.svg?branch=master)](https://travis-ci.org/GLEON/GLM3r)| [![Build status](https://ci.appveyor.com/api/projects/status/uevfoyg53n6wk2bv?svg=true)](https://ci.appveyor.com/project/jread-usgs/GLM3r)
[![DOI](https://zenodo.org/badge/23404/GLEON/GLM3r.svg)](https://zenodo.org/badge/latestdoi/23404/GLEON/GLM3r)
R package for basic [GLM](http://aed.see.uwa.edu.au/research/models/GLM/) model running. `GLM3r` is designed to hold the most current version of the General Lake Model (GLM) for linux, mac, and windows platforms. This package does not contain the source code for the model, only the executable, and functions for handling the various platform requirements for running the model. Also, use `glm_version()` to figure out what version of GLM you are running.
## Installation
You can install GLM3r from Github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("GLEON/GLM3r")
```
## Usage
### Run
```{r example, eval=FALSE}
library(GLM3r)
sim_folder <- system.file('extdata', package = 'GLM3r')
run_glm(sim_folder)
```
```{r echo=FALSE, results='hide'}
suppressPackageStartupMessages(library(GLM3r))
example("run_glm")
```
```{ }
Reading config from glm3.nml
No WQ config
No diffuser data, setting default values
WARNING: Initial profiles problem - epected 0 wd_init_vals entries but got 30
------------------------------------------------
| General Lake Model (GLM) Version 2.2.0rc5 |
------------------------------------------------
nDays 165825900 timestep 3600.000000
Maximum lake depth is 49.000000
Simulation begins...
Running day 2451636, 0.66% of days complete
Running day 2451637, 1.32% of days complete
---
Running day 2451785, 99.34% of days complete
Running day 2451786, 100.00% of days complete
Wall clock runtime 11 seconds : 00:00:11 [hh:mm:ss]
------------------------------------------------
Run Complete
```
### Visualize
```{r eval=FALSE}
library(glmtools)
out_file <- file.path(sim_folder, 'output/output.nc')
plot_var(nc_file = out_file, var_name = 'temp')
```
```{r echo=FALSE}
suppressPackageStartupMessages(library(glmtools))
out_file <- file.path(sim_folder, 'output/output.nc')
plot_var(nc_file = out_file, var_name = 'temp')
```