GithubHelp home page GithubHelp logo

dynacof_inputs's Introduction

Templates for DynACof input files

Introduction

This repository contains the templates for the input parameter files needed for a DynACof simulation (R-version), and was made to simplify the user experience.

Download

Non-coders

If you don't have a GIT client installed, or if you don't even know what GIT is, you can download all the template files at once using this link.

Experienced users

To clone the repository, use this command:

git clone https://github.com/VEZY/DynACof_inputs.git

Details

The values of the parameters in these files can be customized to fit new conditions. To do so, you'll have to download this repository, open the files, identify the parameters you need to adapt, and use these new input files for your simulation.

Example

All steps are made using R for simplicity in this example.

  1. The first step is to download (or clone) this repository to get the data. For this example, we will download the repository into a temporary directory created from R.

    • If you have GIT installed on your computer:
# install.packages("git2r")
dynacof_data= normalizePath(tempdir(), winslash = "/", mustWork = FALSE)
git2r::clone("https://github.com/VEZY/DynACof_inputs.git",dynacof_data)
* or else, downloading the `ZIP` archive:
dynacof_data= normalizePath(tempdir(), winslash = "/", mustWork = FALSE)
data_dir_zip= normalizePath(file.path(dynacof_data,"master.zip"), winslash = "/", mustWork = FALSE)
download.file("https://github.com/VEZY/DynACof_inputs/archive/master.zip", data_dir_zip)
unzip(data_dir_zip, exdir = dynacof_data)
unlink(data_dir_zip)
dynacof_data= normalizePath(list.dirs(dynacof_data)[2])
  1. Then you have to download the DynACof package. To do so, you have to install the remotes package (or devtools):

    • For remotes:
    install.packages("remotes")
    remotes::install_github("VEZY/DynACof")
    • For devtools:
    install.packages("remotes")
    remotes::install_github("VEZY/DynACof")

    The remotes package is lighter than devtools. But if you already are an R developer you should have devtools installed on your system.

  2. Then, load the DynACof package:

library(DynACof)
  1. And finally, execute the model using your custom parameter files:
sim= DynACof(Inpath = dynacof_data,
                FileName = list(Site = "site.R", Meteo ="meteorology.txt",
                                Soil = "soil.R",Coffee = "coffee.R",
                                Tree = "tree.R"))

And DynACof should run the simulation.

Julia version

If you need to run a simulation with the Julia version of DynACof from R, you have to use a different repository with the Julia input format. This repository is in DynACof.jl_inputs.

dynacof_inputs's People

Contributors

vezy avatar

Watchers

 avatar  avatar  avatar

dynacof_inputs's Issues

Error in Tree() : object 'Metamodels' not found

I've downloaded and unzipped the inputs file, and tried running the code with

sim= DynACof(Inpath = dynacof_data, FileName = list(Site = "site.R", Meteo ="meteorology.txt", Soil = "soil.R",Coffee = "coffee.R", Tree = "tree.R"))

as suggested, but keep getting the error:

Error in Tree() : object 'Metamodels' not found

The tree.R file seems to define Metamodels = Metamodels, but as far as I can tell the function or object does not exist. In contrast, Allometries seems to be a function that loads as part of the DynACof library.

How can I obtain a version of Metamodels?

The code does run with Tree = NULL, but if I understand the settings correctly, this means that no shade trees are included in the model. Please let me know if I am misunderstanding something.

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.