Description Details Author(s) References Examples
This package is a handy wrapper for the General Lake Model.
Package: | GLM3r |
Type: | Package |
Version: | 2.0.0.6.2 |
Date: | 2019-09-06 |
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 |
Luke A Winslow, Jordan S Read, Hilary A. Dugan
Maintainer: Luke Winslow <lwinslow@usgs.gov>
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.
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', 'glm3.nml', package = 'GLM3r')
example_driver <- system.file('extdata','met_hourly.csv', package = 'GLM3r')
#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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.