hollorol / RBBGCMuso

RBBGCMuso is a software package that supports the application of the Biome-BGCMuSo biogeochemical model.
GNU General Public License v2.0
20 stars 11 forks source link

Error with musoSensi #13

Closed 857687671 closed 3 years ago

857687671 commented 3 years ago

Hello,I used the sample data and my own data for sensitivity analysis according to the description of RBBGCMuso, but I don't know why there is such an error prompt,thank you. library(RBBGCMuso)

setwd("D:/F8_BGC_R") parameters <- read.csv("parameters.csv") musoSensi(iterations = 10000, varIndex = 2) [1] 1 Error in ans[npos] <- rep(no, length.out = len)[npos] :replacement has length zero musoMonte(parameters=parameters,iterations=1000,varIndex=8) [1] 1 Error in ans[npos] <- rep(no, length.out = len)[npos] : replacement has length zero

hollorol commented 3 years ago

Hello, thanks for reporting the issue.

Can you run the model, with runMuso() function, or calibMuso() function?

What are in your output section in your ini File? What is the content of your parameters.csv?

857687671 commented 3 years ago

Hello, thanks for your quick response.  I can run this model successfully with runMuso() function. These two attachments are my ini File(this file is modified from the sample file) and parameters.csv(this file is copied from the sample file). Thanks again.

------------------ 原始邮件 ------------------ 发件人: "hollorol/RBBGCMuso" @.>; 发送时间: 2021年5月13日(星期四) 晚上9:31 @.>; @.**@.>; 主题: Re: [hollorol/RBBGCMuso] Error with musoSensi (#13)

Hello, thanks for reporting the issue.

Can you run the model, with runMuso() function, or calibMuso() function?

What are in your output section in your ini File? What is the content of your parameters.csv?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

hollorol commented 3 years ago

Thank you very much. I cannot see the attached files (maybe github did not allow it via email). You can attache these files in github, in the comment section.

857687671 commented 3 years ago

Hello, thanks for your quick response. I uploaded a compressed file containing my ini File(this file is modified from the sample file) and parameters.csv(this file is copied from the sample file). Thanks again.

ini+par.zip

hollorol commented 3 years ago

Thanks! I'll look at it as soon as possible

hollorol commented 3 years ago

What is the output of this:

setwd("D:/F8_BGC_R")
parameters <- read.csv("parameters.csv")
musoSensi(iterations = 10000, varIndex = 2)
traceback()

It would help a lot

857687671 commented 3 years ago

Thanks a lot! These are the outputs:

library(RBBGCMuso) [1] "This is RBBGCMuso version 0.7" setwd("D:/F8_BGC_R") parameters <- read.csv("parameters.csv") musoSensi(iterations = 10000, varIndex = 2) [1] 1 Error in ans[npos] <- rep(no, length.out = len)[npos] : 更换参数长度为零 traceback() 7: ifelse(iterations < 3000, 3000, NULL) 6: limSolve::xsample(G = G, H = h, E = E, F = f, burninlength = burnin, iter = iterations) 5: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 4: suppressWarnings(limSolve::xsample(G = G, H = h, E = E, F = f, burninlength = burnin, iter = iterations)) 3: musoRand(parameters = parameters, fileType = "epc", iterations = iterations) 2: musoMonte(parameters = parameters, settings = settings, inputDir = inputDir, outLoc = outLoc, iterations = iterations, preTag = preTag, outputType = outputType, outVars = outVars, fun = fun, varIndex = varIndex, skipSpinup = skipSpinup, skipZero = skipZero, postProcString = postProcString, modifyOut = modifyOut) 1: musoSensi(iterations = 10000, varIndex = 2)

hollorol commented 3 years ago

Thanks! It's a helpful results. I already have an idea what can be the problem. I can test it tomorrow.

857687671 commented 3 years ago

Thank you very much for your help! I'm a beginner.  I've tried to solve this problem for a long time, but I couldn't solve it. I'm looking forward to your reply.

------------------ 原始邮件 ------------------ 发件人: "hollorol/RBBGCMuso" @.>; 发送时间: 2021年5月14日(星期五) 凌晨2:04 @.>; @.**@.>; 主题: Re: [hollorol/RBBGCMuso] Error with musoSensi (#13)

Thanks! It's a helpful results. I already have an idea what can be the problem. I can test it tomorrow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

hollorol commented 3 years ago

Good news here: the problem was with the most recent changes I made. Now it is obvious, that this is a bug. I'll fix it as soon as possible. You used the package correctly.

hollorol commented 3 years ago

I solved the issue. :) Thank you very much for your contribution! You should reinstall the R package :)

857687671 commented 3 years ago

Thank you very much for your help!I will try this again as soon as possible. If there is any problem, I will give you feedback. Thank you again!

------------------ 原始邮件 ------------------ 发件人: "hollorol/RBBGCMuso" @.>; 发送时间: 2021年5月14日(星期五) 晚上10:39 @.>; @.**@.>; 主题: Re: [hollorol/RBBGCMuso] Error with musoSensi (#13)

I solved the issue. :) Thank you very much for your contribution! You should reinstall the R package :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.