Skip to content

csiro/vin-vinelogic-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"vines" source code and test script

Description

Fortran 90 compatible source code and Python 3 test script for VineLOGIC.

The main program driver file is vines.for.

Source

A VineLOGIC CD provided by Rob Walker (CSIRO).

Compiling the code

To build the executable, type:

make

The following command will remove the built vines executable and intermediate object files.

make clean

Running the model

vines executable

In a directory with a VL2.input file, berry3.cul, input file and, .via file and path variables referred to in VL2.inp containing weather (*.wth) files, SOILS.SOL and cultivar files (Rootstock050.cul, Vines050.cul) enter:

<path-to-vine>/vines

e.g. if vines is in the same directory as the VL2.inp file:

./vines

IEEE floating point underflow error messages may be output for some inputs, but we are unaware of any deleterious effects associated with this based upon our testing.

Test script

The included test script allows the model to be run against treatments in a VIX file obtained from a suitable dataset (available via an intended future release in the CSIRO Data Access Portal), generating output and optionally comparing against expected output. The examples below show operations in a context in which a data directory is assumed to exist containing .VIX files, weather files, cultivar files, and soils file. The commands are shown as if being run in a Unix shell.

Examples

Generate VL2 files for each treatment in a VIX file but don't run the model

python script/gen-vl2inp-from-vix-and-run-model.py \
       --vix-file-path=../vinelogic-datasets/data/WNRA0103.vix \
       --output-directory=out \
       --data-path=../vinelogic-datasets/data

Generate VL2 files for each treatment in a VIX file and run vines, producing output

python script/gen-vl2inp-from-vix-and-run-model.py \
       --vix-file-path=../vinelogic-datasets/data/WNRA0103.vix \
       --output-directory=out \
       --data-path=../vinelogic-datasets/data \
       --model-command="./vines" --run

Generate VL2 files for each treatment in a VIX file and run vines, producing output, and generating textual unified diff for each file against a known set of output files to standard output

python script/gen-vl2inp-from-vix-and-run-model.py \
       --vix-file-path=../vinelogic-datasets/data/WNRA0103.vix \
       --output-directory=out8 --data-path=../vinelogic-datasets/data \
       --model-command="./vines" --run --ref-dir=out6

Generate VL2 files for the specified treatments in a VIX file and run vines, producing output

python script/gen-vl2inp-from-vix-and-run-model.py \
       --vix-file-path=../vinelogic-datasets/data/WNRA0103.vix \
       --output-directory=out \
       --data-path=../vinelogic-datasets/data \
       --model-command="./vines" --treatment-indices="1,2" --run

Generate VL2 files for each treatment in a VIX file and run vines, producing output, and generating HTML side-by-side diff for each file to the specifed output directory (can take several minutes!)

python script/gen-vl2inp-from-vix-and-run-model.py \
       --vix-file-path=../vinelogic-datasets/data/WNRA0103.vix \
       --output-directory=out8 --data-path=../vinelogic-datasets/data \
       --model-command="./vines" --run --ref-dir=out --html-diff-dir=diff

Generate VL2 files for each treatment in a VIX file and run vines, producing output, and generating textual unified diff for the specified files to standard output

python script/gen-vl2inp-from-vix-and-run-model.py \
       --vix-file-path=../vinelogic-datasets/data/WNRA0103.vix \
       --output-directory=out --data-path=../vinelogic-datasets/data \
       --model-command="./vines" --run --ref-dir=expected/WNRA0103 \
       --diff-files=VL2.inp,berry.out,GROWTH.OUT,WATER.OUT

Generate VL2 files for each treatment in a VIX file and run vines, producing output, and generating HTML side-by-side diff for the specified files to standard output

python script/gen-vl2inp-from-vix-and-run-model.py \
       --vix-file-path=../vinelogic-datasets/data/WNRA0103.vix \
       --output-directory=out --data-path=../vinelogic-datasets/data \
       --model-command="./vines" --run --ref-dir=expected/WNRA0103 \
       --diff-files=VL2.inp,berry.out,GROWTH.OUT,WATER.OUT \
       --html-diff-dir=html-out

Run unit tests for the test script itself

cd script
py.test -v

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors