GLMr-package: An R package containing the core GLM files for Mac, Windows,...

Description Details Author(s) References Examples

Description

This package is a handy wrapper for the General Lake Model.

Details

Package: GLMr
Type: Package
Version: 2.0.0.6.2
Date: 2014-09-29
License: GPL 3.0
Function Description
run_glm Core model running function
glm_version Return version of GLM model
nml_template_path Return path to template NML file

Author(s)

Luke A Winslow, Jordan S Read

Maintainer: Luke Winslow <lwinslow@usgs.gov>

References

Hipsey, M.R., Bruce, L.C., Hamilton, D.P., 2013. GLM General Lake Model. Model Overview and User Information. The University of Western Australia Technical Manual, Perth, Australia.

Examples

 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
#Get the current version of GLM
glm_version()

#get the path to an NML file appropriate for the current version
nml_template_path() 


#Prep
sim_folder = tempdir()
example_nml <- system.file('extdata', 'glm2.nml', package = 'GLMr')
example_driver <- system.file('extdata','met_hourly.csv', package = 'GLMr')


#copy the MNL file
file.copy(example_nml, sim_folder)
file.copy(example_driver, sim_folder)


#run and visualize using glmtools
run_glm(sim_folder)
out_file <- file.path(sim_folder,'output.nc')

#run these only if we have glmtools available.
if(require(glmtools)){
	plot_temp(file = out_file)
}

GLEON/GLMr documentation built on June 4, 2020, 7:14 a.m.