Coder Social home page Coder Social logo

rhessysioinr's Issues

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?

run_rhessys_multi :FATAL ERROR: in construct_command_line option #21 is invalid. for argument -par

library(RHESSysIOinR)
setwd("/mnt/hgfs/Ubuntu/nice0416/")
rh_path = file.path("/usr/local/bin/rhessys7.4")
input_rhessys = IOin_rhessys_input(
version = rh_path,
tec_file = "tecfiles/tec.test",
world_file = "worldfiles/ParWorld/adh.world",
world_hdr_prefix = "adh",
flowtable = "flowtables/adh.flow",
start = "2010 6 20 1",
end = "2011 10 1 1",
output_folder = "out/",
output_prefix = "adh",
commandline_options = c("-g")
)
input_tec_data = IOin_tec_std(start = "2010 6 20 1",
end = "2011 10 1 1",
output_state = TRUE)
input_hdr = IOin_hdr(
basin = "defs/basin.def",
hillslope = "defs/hill.def",
zone = "defs/zone.def",
soil = c("defs/soil_sandyloam.def", "defs/soil_clay.def", "defs/soil_loam.def","defs/soil_loamysand.def","defs/soil_sandyclayloam.def","defs/soil_siltyloam.def"),
landuse = c("defs/lu_undev.def","defs/lu_agriculture.def"),
stratum = c("defs/veg_douglasfir.def","defs/veg_deciduous.def","defs/veg_eucalypt.def","defs/veg_evergreen.def","defs/veg_grass.def","defs/veg_shrub.def"),
basestations = "clim/adh_base"
)
filter2 = build_output_filter(
timestep = "daily",
output_format = "csv",
output_path = "/out",
output_filename = "basin_daily",
spatial_level = "basin",
spatial_ID = as.integer("1"),
variables = "patch.streamflow"
)

output_filter = IOin_output_filters(filter2, file_name = "tecfiles/test_output_filter.yml")
n=5
input_def_pars_monte_carlo = IOin_def_pars_simple(
list("defs/soil_sandyloam.def", "m", runif(n, 0.1, 1)),
list("defs/soil_sandyloam.def", "Ksat_0", runif(n, 0.1, 2000)),
list("defs/soil_sandyloam.def", "m_z", runif(n, 0.1, 1)),
list("defs/soil_sandyloam.def", "pore_size_index", runif(n, 0.01, 1)),
list("defs/soil_sandyloam.def", "psi_air_entry",runif(n, 0.1, 3)),
list("defs/soil_sandyloam.def", "sat_to_gw_coeff", runif(n, 0, .7)),
list("defs/hill.def", "gw_loss_coeff", runif(n, 0, .7))
)

run_rhessys_multi(
input_rhessys = input_rhessys,
hdr_files = input_hdr,
tec_data = input_tec_data,
def_pars = input_def_pars_monte_carlo,
output_filter = output_filter
)
The above shows my entire code
try

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,

Output Filter

Able to run RHESSys within R environment but unable to run with output filtering

when included filter is used error that returns is
"Error: syntax error, unexpected DOT, expecting PATH_SPEC or FILENAME_SPEC, for token: |.|
construct_output_filter failed with error: output_filter_parser returned with an error."

when a custom filter that was created is used what is returned is
"Error: syntax error, unexpected IDENTIFIER, expecting PATH_SPEC or FILENAME_SPEC, for token: |test|
construct_output_filter failed with error: output_filter_parser returned with an error."

output_path is "test/" for the custom filter but other combinations of "test","/test/","./test/" have been applied.

RHESSys is being run via Windows in R

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.

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?

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.

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.