GLEON / glmtools

Tools for interacting with the General Lake Model (GLM) in R
Other
22 stars 31 forks source link

Intention for rGLM #26

Closed andrewdolman closed 10 years ago

andrewdolman commented 10 years ago

Dear rGLM developers, Is the intention for rGLM to be an interface to GLM, i.e. you will be able to setup (set parameters and initial state) and run GLM from R? Or is it helper functions to process the output from GLM?

Thanks.

jordansread commented 10 years ago

Andrew - the intent is to do both. We run GLM from R, and use rGLM to set up the nml files for running the model and use it to process the output files.

What particular things are you looking to do with GLM? Hopefully you find these tools useful. If not, let us know what you think should be added.

andrewdolman commented 10 years ago

Thanks, that was fast.

At the moment I'm just looking around trying to decide which lake modelling system to use. Longer term I would be planning to model the effects of different nutrient input regimes and also using a couple of different phytoplankton submodels - so the GLM-FABM system looks attractive. If I can control it from R then that would be excellent.

I'm struggling a bit to work out how to get started with rGLM though, so I wanted to first check whether I "should" be able to get it working or if it's too alpha at the moment.

jordansread commented 10 years ago

Andrew - I have made the dive into GLM because it is free and actively supported (and the AED FABM connections). Luke and I created this package to make working with the model, calling it, iterating, and processing easier, and figured we would put it up on github so that others wouldn't need to duplicate these efforts.

You should be able to get it working, but the first major hurdle is getting ncdf4 library installed. Have you gotten through that? After that, some more current examples should be helpful. I will check that those are up to date. This is still in development, but we use it and it should work for you depending on what you are trying to do w/ GLM.

andrewdolman commented 10 years ago

I got ncdf4 installed. The instructions in README.md didn't work for me because when installing rGLM and GLEON the installation fails, and deletes itself, when it can't find an ncdf4 binary to download. So there is no 'lib' directory to get ncdf4_1.9.zip from. I just downloaded the rGLM-master.zip and installed ncdf first.

Anyway, I tried running some of the examples - but they all seemed to source from a non-existant "Source" directory e.g. source('../Source/GLMnetCDF.R')

Thanks for your help.

jordansread commented 10 years ago

Andrew...all of those examples are outdated, and I am in the process of deleting and/or updating them. will let you know when that is ready. Sorry about the hassle.

andrewdolman commented 10 years ago

No problem. At the moment this is just preparation for probable future projects.

jordansread commented 10 years ago

Andrew - this should be set now. There are 3 examples in the "examples" folder, which require rGLM and the files in the "resources" folder. You will need to re-install the rGLM package for these examples to work. Let me know if you have any questions.

andrewdolman commented 10 years ago

The examples run now thank you. I realise now that the GLM and AED are seperate entities, coupled by FABM. rGLM will only interact with GLM, and not GLM_FABM_AED, correct? You can see my understanding of the system is pretty limited.

lawinslow commented 10 years ago

It should work for editing the *.nml files for AED and GLM inputs. It will also work for extracting some of the physical data that is common to both GLM and AED as their output files are very similar. But it doesn't currently have any built-in functionality for dealing with biological and chemical output from AED.

We definitely welcome contributions though, even if just rough code, that would extend the functionality. There are many others working with AED as well that could benefit!

-Luke

andrewdolman commented 10 years ago

Thanks. I will try to get stuck into it when I have the chance and see if I can get a simple case working. If I end up working with it I will definitely be feeding code back into the project.

I just got the version downloaded from here: http://aed.see.uwa.edu.au/research/models/GLM/ running on my machine, so maybe I'll get a bit more familiar with that and then see how rGLM interacts with it.