-
Notifications
You must be signed in to change notification settings - Fork 9
FAQs
Example simulations and tutorials can be accessed in the glm_examples folder of the glm-aed GitHub repository: Examples
Please NOTE: Different versions of the GLM model will require slightly different configurations, as new features are added and older redundant features are removed. Example simulations that were downloaded for a previous version may not run with updated model binaries. As such, it is best to download the examples and model binaries at the same time.
No. GLM is distributed under the GNU public release license, and is completely free of charge. GLM binaries downloaded from our website are provided pre-compiled with coupling to AED.
Modules can be turned on or off by commenting out (!) ALL LINES that particular section of the glm3.nml file (eg. &wq_setup or &snow_ice ). e.g.
!&wq_setup
!!-- Choose 'aed' or 'aed' (aed is the default)
! wq_lib = 'aed'
!! wq_nml_file = 'aed.nml'
! ode_method = 1
! split_factor = 1
! bioshade_feedback = .true.
! repair_state = .true. !! mobility_off = .false.
!! multi_ben = .true. ! benthic_mode =
!/
When commenting or uncommenting the glm.nml file take care to comment the entire section, including the “/”. Also, the glm.nml will have comments in the file explaining what configurations options are available for each section. Please make sure not to uncomment these text blocks.
We use ATOM for most editing tasks of the input files. For windows users, we also recommend Notepad++ for editing the nml files, and Microsoft Excel for the timeseries csv files. However, note that Excel will automatically convert the time column to it’s default time format (as specified by the operating system). Each time you save and close the file you will need to check/convert the time format back to yyyy-mm-dd. Word processing software like word, wordpad and notepad can place hidden characters into a text file, which may prevent the files being read properly.
GLM has an inbuilt visualization software (libplot
) which is configured via the plots.nml
file and executed at runtime via the command line argument --xdisp
. GLM also produces a series of csv files that can be viewed in Excel and a netcdf containing all of the raw output data. We recommend either R or Matlab for post-processing the netcdf (see relevant sections).
For windows users, you may want to use a *.bat
(batch) file to call the model software. . This batch file needs to be located in the same directory as the glm.nml file. The batch file needs to contain the path to the GLM binary, and any additional flags. An example of the batch text is below:
..\..\glm-bin\x64\glm.exe --xdisp
GLM can be compiled for OSX, and configured to run from a shell script (*.sh). Unlike a batch file under windows, the shell script path is a little more complex as the glm binary is contained within the glm.app file. An example is below:
../../glm.app/Contents/MacOS/glm
Although the GLM netcdf output is small compared to some of the 3D lake models, it can still be several GB is size. We recommend not running the model off a USB or network drive, unless there is at least 10GB of space available.
Below are some of the most common causes that a previously running model may crash:
- An output file is already open in Excel (eg lake.csv)
- An input file has the wrong date format. Open the relevant bc files in a text editor like notepad++ which and see if the time format is correct. Remember Excel routinely changes date format to a default style which may not be compatible.
- A section has been commented/uncommented incorrectly.
Background
Getting started
- Downloading
- Running the model
glm.nml
configuration file- Tutorials & examples
- Navigating GLM outputs
Advanced use
- Command line options
- Restarting a simulation
- Customising the WQ setup
- Adding a new example lake
- Using GLM in R
Developer guide
- Downloading the code
- Compiling the code
- Updating existing submodule state
- Adding new submodules
- Using GLM as a linked library