[GRASSLIST:2449] Re: BGC GRASS module
chiara.sboarina at katamail.com
chiara.sboarina at katamail.com
Tue Feb 3 07:30:59 EST 2004
Kirk,
my approach is very simple, I've taken the Biome-BGC code and I've modified the initialization part to conform to GRASS module style. The other thing I've done is to call the calculation code part from inside a for cicle on rows and columns. How to create a module? I downloaded from GRASS web site the Programmer's Manual, but the thing that helped me more was to have a look at how other modules are made. I warn you that I'm not so good in writing C code so I find very useful to have examples.
I simplified Biome-BGC in the initialization part and I took away the possibility to do spin-up simulations. I didn't do modifications to the calculation algorithms so at the end I didn't simplify it very much. Now the module works, or better, I think it works because I need to find the appropriate initialization parameters. I can tell you that at this moment it works only with regions smaller than 16x16 pixels and it takes few seconds to do the job. For bigger regions I get error messages like "too many raster open" or for much bigger region "segmentation fault". As you can see I have still some problems.
I hope to have been helpful.
Best Regards,
Chiara
Da: Kirk R. Wythers <kwythers at umn.edu>
Data: Mon, 2 Feb 2004 09:56:02 -0600
A: "chiara.sboarina at katamail.com" <chiara.sboarina at katamail.com>
Oggetto: Re: BGC GRASS module
Chiara,
I'd be very interested in learning more about your approach (right down
to the nitty gritty details). I have a big leaf ecosystem model with
which I would like to do something similar. Is there any documentation
(anywhere) that describes the process of "module" creation for grass?
If so where?
How much did you simplify Biome-BGC in your module? and if you have it
working, can you give an estimate on process time based on a number of
cells that you are analyzing?
Best Regards,
Kirk
On Jan 21, 2004, at 2:04 AM, chiara.sboarina at katamail.com wrote:
> Kirk,
> you are right I modified Biome-BGC of Running et al. . I simplified it
> a lot because my aim is to calculate the amount of C stocked in a year
> by forest of a region. So I chose as out put only totalc, vegc, soilc
> and litterc. I removed the spinup simulation not to weight down the
> module so the user must have many initialization parameters. Now I'm
> testing the module to see if it works. If you need more informations
> just tell me and I will try to answer you.
> Bye
> Chiara
>
>
>
------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers at umn.edu
------------------------------------------------------------------------
More information about the grass-user
mailing list