Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with run_osmose outputs in R #23

Open
Jose-Rubilar opened this issue Dec 14, 2023 · 3 comments
Open

Problems with run_osmose outputs in R #23

Jose-Rubilar opened this issue Dec 14, 2023 · 3 comments

Comments

@Jose-Rubilar
Copy link

Jose-Rubilar commented Dec 14, 2023

Hello everyone, I have a query about the demo version example of Osmose. I tried the demo version example of version 4.3.2, where I managed to run the 'osmose.config_class' code, but I had difficulties trying to obtain results with the 'osmose_class' code. When using it, the following error is generated:

Error in read_osmose(path = demoPaths$output_dir, input = demoPaths$config_file) :
The output directory does not exist.

I was able to solve this problem by creating the folder 'output-PAPIER-trophic' within 'eec_4.3.0'. After this adjustment, the program runs but then the following new error occurs:

print method
print(outputs)
OSMOSE v.4
Model ‘NA’
Error in seq.default(0, x$model$nsp - 1) : 'to' must be of length 1

This error seems to indicate that the model does not generate or read the output data, which prevents its correct functioning. I must say that my programming level in R is not very advanced, so I would appreciate your help on how to solve this problem.

I did not use version 4.3.3 because it generated other errors.

Regards.

@barriern
Copy link
Member

Hi @Jose-Rubilar

First, I will suggest that we try to make Osmose v4.3.3 work, because it is always best to use the latest version of the code.

Could you please send me the R script that you used to run the model?

Thanks

Nicolas

@Jose-Rubilar
Copy link
Author

Jose-Rubilar commented Dec 18, 2023

Hi Nicolas, thank you for replying.

I am writing the code that I am using to run the demo version here.

setwd("C:/Users/CLJG300940/Desktop/Osmose_1/osmose-4.3.3")
library(osmose)

options(timeout = max(1000, getOption("timeout")))

demo(package = "osmose")

demo(package = "osmose", topic = "osmose.config_class")

demo(package = "osmose", topic = "osmose_class")

Thank you and regards

@barriern
Copy link
Member

Hi @Jose-Rubilar

I think this is because you used demo instead of osmose_demo. This will work:

demo = osmose_demo("./", config="eec_4.3.0")

Nicolas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants