Coder Social home page Coder Social logo

rhessysioinr's Introduction

+ TRUNK IS NOW THE DEFAULT BRANCH (REPLACING MASTER).
+ THE MASTER BRANCH WILL REMAIN FOR ARCHIVAL PURPOSES, BUT TRUNK SHOULD NOW BE USED AS THE MAIN BRANCH.
- SEE NEW CHANGES.    
- NEW CODE MAY NOT BE BACKWARD COMPATIBLE WITH YOUR CURRENT FILES.    
- PLEASE REVIEW INFORMATION ABOUT CHANGES ON THE WHAT'S NEW WIKI PAGE   

https://github.com/RHESSys/RHESSys/wiki/What's-New

RHESSys - The Regional Hydro-Ecologic Simulation System

Github is the new home for the RHESSys code repository.

The project homepage is at http://fiesta.bren.ucsb.edu/~rhessys/

The old SVN repository was at http://sourceforge.net/projects/rhessys/

Branches

The "develop" branch should be used for day-to-day development, with RHESSys releases pushed to the "trunk" (formerly "master") branch periodically (for example yearly).

Continuous Build and Test

We are using Travis-CI (http://travis-ci.org) to host our continuous integration efforts. Continuous integration helps us run our test suite upon every commit to this repository and let us know if and when we break the build.

The current build status is: Build Status

The above icon should be clickable and point to the latest build at Travis-CI: https://travis-ci.org/RHESSys/RHESSys

The .travis.yml configuration file defines how this project is hooked to Travis-CI. Github has a post-commit hook that is fired upon every commit to this repository. This post-commit hook uses an authentication token to login to Travis-CI and run the configured steps on a virtual machine. A return value of 0 means success and generates a 'green' status indicator (hopefully illustrated in the previous paragraph).

While the code is successfully compiling and running, there are a significant number of compiler warnings at this time:

$ GISBASE=/usr/lib/grass64 make 2>&1 | grep warning | wc -l
1233

Tests

The Create Flowpaths subproject has a growing suite of tests that can be run via make test. Tests are defined as .c files in the cf/test/src directory and will automatically get compiled and run by the make test target.

Code Coverage

The Create Flowpaths subproject also has a code coverage script. This script will use gcov and lcov to generate an HTML coverage report and show where more tests are needed by illustrating which lines of code are not being exercised by the existing tests.

Run the code coverage script:

cd cf/
./generate_coverage.sh

This will generate an HTML report in the newly formed cf/coverage_report/ directory. This new directory can be copied to a webserver or opened directly in your web browser.

Static Analysis

RHESSys can be analyzed by cppcheck in a few seconds with the following command:

cppcheck . --quiet

OR to see the output, and save the errors out to a textfile:

cppcheck . 2> err.txt
cat err.txt

$ wc -l err.txt
16

Static analysis will show things like memory leaks, out-of-bound references, and null pointers. It is generally assumed a good thing to have your code be "static analysis clean".

rhessysioinr's People

Contributors

jschoate avatar naomitague avatar ryanrbart avatar wburke24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rhessysioinr's Issues

added new parameter, adjust the num_variables in phys_constants.h

Good afternoon,

I am working using RHESSysIOinR in a watershed of 70 km2,

I could compile rhessys 7.4 and I created my worldfile and flowtable,

However, when I use run_rhessys_single I have this message:


===== Beginning RHESSysIO file writing =====

===== Wrote hdr file 'worldfiles/waterford/waterford.hdr' =====
===== Wrote tec file =====


===== Finished RHESSysIO file writing =====

Command line echo: bash -c "rh_dev/rhessys//rhessys7.4 -w worldfiles/waterford.world -whdr worldfiles/waterford/waterford.hdr -t tecfiles/w8TC.tec -r flowtables/waterford.flow -st 1998 10 1 1 -ed 2000 10 1 1 -pre out//waterford -g -b"


===== Beginning RHESSys Simulation =====

added new parameter, adjust the num_variables in phys_constants.h
added new parameter, adjust the num_variables in phys_constants.h
added new parameter, adjust the num_variables in phys_constants.h
added new parameter, adjust the num_variables in phys_constants.h
added new parameter, adjust the num_variables in phys_constants.h
added new parameter, adjust the num_variables in phys_constants.h
.
.
.
NULL

Also when I created my worldfile/flowtable file there were some warnings :

Warning messages:
1: In getProjectionRef(x, OVERRIDE_PROJ_DATUM_WITH_TOWGS84 = OVERRIDE_PROJ_DATUM_WITH_TOWGS84, ... :
Discarded datum Not_specified_based_on_GRS_1980_ellipsoid in Proj4 definition: +proj=longlat +ellps=GRS80 +no_defs
2: In getProjectionRef(x, OVERRIDE_PROJ_DATUM_WITH_TOWGS84 = OVERRIDE_PROJ_DATUM_WITH_TOWGS84, ... :
Discarded datum Not_specified_based_on_GRS_1980_ellipsoid in Proj4 definition: +proj=longlat +ellps=GRS80 +no_defs
3: In getProjectionRef(x, OVERRIDE_PROJ_DATUM_WITH_TOWGS84 = OVERRIDE_PROJ_DATUM_WITH_TOWGS84, ... :
Discarded datum Not_specified_based_on_GRS_1980_ellipsoid in Proj4 definition: +proj=longlat +ellps=GRS80 +no_defs

I wonder if that's the problem.
Or if you have an idea why RHESSysIO did not recognize my data,

Thank you,

package dependencies/loading

currently there are many other packages used in rhessysIOinR, they're included in the imports in the description, but that doesn't attach the packages for use, currently you have to attach all the packages along with RHESSysIOinR but I think we should be able to get around this. It looks like right now it explicitly refers to the functions via :: so i'm not sure why you need to load the other packages, maybe just missing :: for some functions?

C Stack Usage is too close to the limit - RHESSysIOinR running in VM

Able to run test RHESSysPreprocess Script.

Attempting to run script with real world data.

Right after the Finished reading in maps message I get a 100% completion bar and a bar that hangs up at 50%, right after this I get the message "Error: C stack usage 7969812 is too close to the limit"

I have checked my files and they all work with R 5.18. They have been converted to tif files and the only map that has been modified is the topidx map to remove missing data within bounds of the world map.

Any ideas on what is causing the issue?

Moving yml file name from IOin_output_filter to IOin_rhessys_input

Will,

I am thinking of moving the output filter file name to IOin_rhessys_input. I think this would make the usage more consistent with the other inputs (like the tec file) and would simplify the IOin_output_filter structure.

For example, if an existing output_filter was being used, then a path name in IOin_rhessys_input is all that would be need. If a new output filter is desired, then the path name in IOin_rhessys_input would be specified but an output_filter argument would be added.

Any thoughts or objections?

Ryan

Issue/Warning Message Cannot Compile

Attempting to run RHESSysIOinR on a windows machine with WSL installed. I have had success in running older versions (5.18) via RHESSysIOinR by swapping out the files in the rh_dev folder to the older 5.18 files.

I have not had success in running the most recent version of RHESSys via RHESSysIOinR. The test code provided which is titled "test-single_run.R" downloads from the develop branch but both this branch and the master branch give the same error.

Version 7.3 is the current version that is downloaded and compiled. 7.4 on develop.

"8 warnings generated.
cd output_filter/parser &&
bison --report=none -d output_filter_parser.y &&
flex output_filter_parser.l
/bin/sh: 2: bison: not found
make: *** [makefile:1080: output_filter/parser/output_filter_parser.tab.c] Error 127
make: Leaving directory '/mnt/c/Users/Carlos/Documents/R/win-library/4.0/RHESSysIOinR/extdata/rh_dev/rhessys'

Command line echo: wsl make -C rh_dev//rhessys -f makefile
RHESSys objects removed after compilation

-------------------- End compile_rhessys.R --------------------
Warning message:
In compile_rhessys(location = "rh_dev/") :
Make probably failed, returned: 2"

Are there any modifications to be made when attempting to run newer versions of RHESSys via RHESSysIOinR?

Segmentation fault (core dumped)

Hi, I'm using RhessysIOinR with Rhessys 6.0 with one of the examples in GitHub (ws_hja) and when I run the script I get:
[1] Output files with prefix patch_sim alerady exist in out/ and will be overwritten.
[1] "New def files written for file defs/veg_p300_shrub.def"
[1] "New hdr file written : worldfiles/ws/ws_1.hdr"
[1] "Tec file has been written"
[1] "----------------- Run 1 of 1 -----------------"
[1] Command line echo: /home/maria/rhessys_git/rhessys_git/rhessys/rhessys6.0 -w worldfiles/p300.world -whdr worldfiles/ws/ws_1.hdr -t tecfiles/p300.tec -r flowtables/p300.flow -st 1941 10 1 1 -ed 1998 10 1 1 -pre out//patch_sim -s 2.000000 2.000000 -sv 2.000000 2.000000 -svalt 1.000000 1.000000 -gw 0.200000 0.200000 -b -h -z -g -p -c
Segmentation fault (core dumped)
user system elapsed
0.037 0.005 0.225

I've been days stucked with it, Can anybody help me please?

Duplicate parameter names when using awk for multiple canopies

Need to create an alternative approach for assigning parameter names in the get_parameter_sets function that accounts for duplicate parameter names from multiple canopies. Current approach adds a ".1" to the second parameter listed in the parameter_change_list that is passed to run_rhessys.

Can't use preexisting parameter table and search parameters simultaneously

The code doesn't allow both a preexisting parameter table to be used in addition to searching other parameters. This can come up in multi-step calibrations. In my case, I calibrated subsurface parameters and identified the top parameter set. I wanted to bring this parameter set in from a preexisting table and further calibrate fire effect parameters.

A solution will allow both methods to be used but will require some error checking in case both methods refer to the same parameter.

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.