Menu

MakeNewFVSProgram

Anonymous Dan Wagner

FVS Home Repository Has Moved

Please note, the official FVS repository has recently migrated from Source Forge to GitHub. Please visit us at https://github.com/USDAForestService/ForestVegetationSimulator for the latest in code and wiki updates. This Source Forge repository will no longer be maintained, and is kept here as archival reference only.


Introduction

One of the key goals of the open-fvs project is to foster innovation. This often means that someone in the community will modify an existing FVS program to create a new or refined variant or a program with new features or extensions.

This Wiki page provides a very short set of instructions for getting started. The instructions assume you have installed the necessary build tools and can build and run FVS .

Steps

  1. Identify an existing FVS program you will use as a starting point or template. In these instructions I use FVSne as an example.
  2. Create a name for your new program. Here, FVSacd is an example.
  3. In the bin directory, you will find a *.source_list.txt file for the template. Copy it to your new program name:

    cp FVSne_sourceList.txt FVSacd_sourceList.txt
    
  4. Add the new program to the make file. An approach for accomplishing this task is to search the current makefile for FVSne and make corresponding entries for FVSacd. Note that you need not worry about the make rules. The make file uses FVSacd_sourceList.txt to automatically build the make rules, you simply modify that file as you progress.

  5. Make your new program, on Windows, use the following command, on other systems, leave off the .exe:

    make FVSacd.exe
    
  6. Lets assume you desire to create a modified version of the diameter growth function, dgf.f. Find where the original one you are using is stored in the directory tree by finding the path name in the FVSacd_sourceList.txt file. Because you are not changing this file, you need to create a new, customized copy for your new program. Create a source file directory and file for your use, following the file naming conventions evident by inspecting the directory tree. In this case, you would likely desire to create an acd directory and make copy the dgf.f source file in it.

  7. Modify your FVSacd_sourceList.txt file to show the new location of dgf.f. The program build process will now use your copy. Modify it at will, building and testing as you go.
  8. Follow this pattern for as many changes or additions you desire.
  9. Remember to add appropriate tests to the FVS tests, see Testing for more information.

Support for added libraries

The current build process and make file are not designed to support added new shared libraries. If that is the objective, please let the team know so we can build in the necessary features to support this need.


Related

Wiki: FAQ
Wiki: Testing

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.