osmose-model / osmose

OSMOSE: Modelling Marine Exploited Ecosystems
http://www.osmose-model.org/
GNU General Public License v3.0
21 stars 7 forks source link

Problems with run_osmose outputs in R #23

Open Jose-Rubilar opened 11 months ago

Jose-Rubilar commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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 commented 10 months ago

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