Giter Site home page Giter Site logo

tharen / pyfvs-testing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forest-modeling/pyfvs

0.0 0.0 0.0 5.62 MB

Python wrappers and utilities for using the Forest Vegetation Simulator

License: MIT License

Python 31.49% Fortran 13.17% CMake 14.76% Batchfile 0.20% Jupyter Notebook 37.49% Meson 2.89%

pyfvs-testing's Introduction

Project generated with PyScaffold

PyFVS

Python wrappers and utilities for using the Forest Vegetation Simulator

The PyFVS FVS source code is forked from the USFS FVS GitHub repository, open-dev branch

Features

  • FVS Class

    • FVS Step API - Iterate projection cycles
    • Initialize inventory trees from arrays
    • Access to all FVS internal arrays and variables
  • Keywords - Object based FVS keyword file generation

  • Command line interface

Documentation forthcoming

Usage

NOTE: The PyFVS API is beta. Names and arguments may change as features evolve. Deprecation warnings will be raise when possible. However, there is guarantee of backward compatibility.

Command Line

>pyfvs --help
>pyfvs run PN -k path/to/keywords.key

Run a simulation using an existing keyword file and treelist

from pyfvs import fvs
f = fvs.FVS('PN')
kwds = 'path/to/keywords.key'
f.init_projection(kwds)

# Iterate through the simulation cycles
for cycle in f:
    print(f.year)
    # Do something interesting

# Closeout the simulation
f.end_projection()

Genarate keywords from a bareground simulation at runtime

from pyfvs import fvs,keywords
f = fvs.FVS('PN')
# Setup the KeywordSet for the simulation
kw = f.keywords
# Grow for 20 periods
kw += keywords.NUMCYCLE(20)
# Add default STDINFO keyword
kw += keywords.STDINFO()
# This is a bareground simulation, so no treelist
kw += keywords.NOTREES()
# Initialize the ESTAB keywordset
est = keywords.ESTAB()
# Add 350 planted DF seedlings to the ESTAB
est += keywords.PLANT(1,'DF',350)
# Add the ESTAB keywordset to the simulation
kw += est
# Execute the simulation
f.run()
# Print the summary table
print(f.summary)

Note

This project has been set up using PyScaffold. For details and usage information on PyScaffold see https://pyscaffold.org/.

pyfvs-testing's People

Contributors

tharen avatar tharen-odf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.