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

Problem with runLPJ #49

Open
gianlucafilippa opened this issue Jan 28, 2019 · 11 comments
Open

Problem with runLPJ #49

gianlucafilippa opened this issue Jan 28, 2019 · 11 comments

Comments

@gianlucafilippa
Copy link

Hi,
I am totally new to the model so apologies if my question is a silly one. I am trying to follow the code in the appendix of your EMS paper. Specifically I can run with no errors appendix 1. But when it cums to run the model my output is the following:

`> results_PFT <- runLPJ(x = mainDir, parameterList = parameterStandard_PFT,

  • typeList = typeList, settings = LPJsettings_PFT)
    

Using package template (template 1)
Saving package template in the mainDir
Using package template (template 2)
Saving package template in the mainDir
Starting run
Calling LPJ-GUESS

/home/gian/Testcode/LPJrunTest/guess -input cf /home/gian/Testcode/LPJrunTest/runDirectory/global_cf.ins
Error in getLPJData(runObject$outDir, runObject$typeList, runObject, runObject$processing) :
There are not model outputs. Please check the guess.log files
In addition: Warning messages:
1: In createSingleObject(x, typeList, settings) :
The file.wetdays has not been provided
2: In createSingleObject(x, typeList, settings) :
The file.minTemp has not been provided
3: In createSingleObject(x, typeList, settings) :
The file.maxTemp has not been provided
4: In createSingleObject(x, typeList, settings) :
The variable.wetdays has not been provided
5: In createSingleObject(x, typeList, settings) :
The variable.minTemp has not been provided
6: In createSingleObject(x, typeList, settings) :
The variable.maxTemp has not been provided
7: running command '/home/gian/Testcode/LPJrunTest/guess -input cf /home/gian/Testcode/LPJrunTest/runDirectory/global_cf.ins' had status 99
8: In getLPJData(runObject$outDir, runObject$typeList, runObject, runObject$processing) :
There is no cmass.out
9: In getLPJData(runObject$outDir, runObject$typeList, runObject, runObject$processing) :
There is no lai.out
Error in runLPJ(x = mainDir, parameterList = parameterStandard_PFT, typeList = typeList, :
Error when running the model
`

It seems that the model cannot create output files and then does not find them. The guess.log file is created and contains the following:
"In /home/gian/Testcode/LPJrunTest/runDirectory/global.ins, line 135, "lcfrac_fixed":
Error: Undefined identifier
Bad instruction file!"

And this is the line into the global.ins which the guess.log file refers to:
"lcfrac_fixed run_lcfrac_fixed ! use landcover fractions (%) below (1) or read from input file (0)"

Any help will be much appreciated.

Gianluca

@gianlucafilippa
Copy link
Author

Routput.txt

here is also the full output from a clean R session

@Rasilgon
Copy link
Collaborator

Hi Gianluca,

from you have posted it seems that there is an error with the instruction file
"In /home/gian/Testcode/LPJrunTest/runDirectory/global.ins, line 135, "lcfrac_fixed": Error: Undefined identifier Bad instruction file!"

The package should be replacing the " run_lcfrac_fixed" by a value. In the created instruction file is there a value or the text string " run_lcfrac_fixed" ?

@Rasilgon
Copy link
Collaborator

Rasilgon commented Feb 17, 2019

And some quick questions:

  • which LPJ-GUESS version are you using?
  • which OS?
  • which R version?

@gianlucafilippa
Copy link
Author

Thanks for your reply.
lcfrac_fixed is set at 0, anyway here is my global.ins (I simply changed the extension to txt, otherwise I could not attach it)

More info:

GUESS version 3.1
R version 3.4.4 (2018-03-15)
Ubuntu 16.04.5 LTS 64-bit

global (copy).txt

@florianhartig
Copy link
Member

Hi guys, is this problem solved in any way?

@cbbenavidez
Copy link

cbbenavidez commented Dec 18, 2020

Hi guys, I have the same problem, I am working with LPJGUESS version 4.0.1 in R Version 4.02, R Studio Version 1.3.1093 in Windows 10, and when run:

results_PFT <- runLPJ (x = mainDir, parameterList = parameterStandard_PFT,
                       typeList = typeList, settings = LPJsettings_PFT)

I see the following error:

Using package template (template 1)
Saving package template in the mainDir
Using package template (template 2)
Saving package template in the mainDir
Starting run
Calling LPJ-GUESS

C:/rlpjguess/Testcode/LPJrunTest/guesscmd.exe -input cf C:/rlpjguess/Testcode/LPJrunTest/runDirectory/global_cf.ins
Error in getLPJData(runObject$outDir, runObject$typeList, runObject, runObject$processing) :
There are not model outputs. Please check the guess.log files
Además: There were 11 warnings (use warnings() to see them)
Error in runLPJ(x = mainDir, parameterList = parameterStandard_PFT, typeList = typeList, :
Error when running the model

The model cannot create output files, and cannot find them, the guess.log file has been created and indicates the following

Couldn't find input module cf

Is there a compatibility problem? Or is there an additional step that I need to execute?

@florianhartig
Copy link
Member

Hi, LPJGUESS version 4.0.1 ist not supported by the package, at least not as it currently is in the Repo. However, @JohannesOberpriller has modified the code for a 4.x version, I'm not sure if that would work for for your version (the problem is, as you probably know, that there are various modified version). Just to clarify, @cbbenavidez - you are using 4.0.1 (not the education version) from the official LPJGUESS trunk? @JohannesOberpriller, would that be compatible with your code?

@JohannesOberpriller
Copy link

Hi, i've tried to write the updated version of the package as general as possible. Now it reads in the guess files, and recreates everything needed to identify the correct paths and so on. There are, however, some minor issues I need to fix. @cbbenavidez, we could give it a try with the version I have at the moment, but I must admit i have not fully and exhaustively tested all newly implemented features. @florianhartig probably we should merge the new version into this repo soon.

@florianhartig
Copy link
Member

Hi,

sounds good to me. I have created an issue to discuss the 4.x merge here #52 . If this can be done fast, I would suggest that @cbbenavidez can just get the code from there, and report any problems via the issue tracker, preferably in #52. Else contact Johannes directly via https://www.uni-regensburg.de/biologie-vorklinische-medizin/theoretische-oekologie/mitarbeiter/johannes-oberpriller/index.html

@hanqinggong
Copy link

hanqinggong commented Dec 18, 2020 via email

@bailulu21
Copy link

大家好,我有同样的问题,我在 R 版本 4.02 中使用 LPJGUESS 版本 4.0.1,在 Windows 10 中使用 R Studio 版本 1.3.1093,并且在运行时:

results_PFT <- runLPJ (x = mainDir, parameterList = parameterStandard_PFT,
                       typeList = typeList, settings = LPJsettings_PFT)

我看到以下错误:

使用包模板(模板 1) 将包模板
保存在 mainDir
使用包模板(模板 2) 将包模板
保存在 mainDir
开始运行
调用 LPJ-GUESS
C:/rlpjguess/Testcode/LPJrunTest/guesscmd.exe -input cf C:/rlpjguess/Testcode/LPJrunTest/runDirectory/global_cf.ins
getLPJData(runObject$outDir, runObject$typeList, runObject, runObject$processing) 中的错误:
有不是模型输出。请检查guess.log文件
Además:有11个警告(使用warnings()查看它们)
运行LPJ中的错误(x = mainDir,parameterList = parameterStandard_PFT,typeList = typeList,:
运行模型时出错

模型无法创建输出文件,也找不到,guess.log 文件已创建,提示如下

找不到输入模块 cf

是否存在兼容性问题?还是我需要执行一个额外的步骤?
嗨,你解决了吗?我也遇到了相同的问题

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

8 participants
@florianhartig @Rasilgon @gianlucafilippa @JohannesOberpriller @hanqinggong @cbbenavidez @bailulu21 and others