SCM

Forum: biomod2 is now devel on github

Posted by: damien georges
Date: 2020-03-02 17:08
Summary: biomod2 is now devel on github
Project: BioMod

Content:

The new development page of biomod2 package is now:

https://github.com/biomodhub/biomod2

Latest News

biomod2 is now devel on github

damien georges - 2020-03-02 17:08 -

biomod2 package is now available !

damien georges - 2012-07-26 13:56 -
...

 

Monitor Forum | Start New Thread Start New Thread
RE: biomod2 in terminal - Error in .rasterFromASCIIFile(x, ...) : [ Reply ]
By: Sebastian Kirchhof on 2020-06-19 13:58
[forum:47876]
Hi,
Here is what caused the error:
I entered grd files in biomod2 (for GLM, GAM, MAXENT.Phillips). In order to use maxent, biomod2 converts them from grd to ascii - this process resulted in ascii that were of slightly different extent then the input grd, but only for the grd that were not from bioclim (in my case "croppedPETseason.grd", "croppedPETcold.grd", "croppedPETwet.grd") .
I.e. instead of extent 33, 45, 3, 16 they changed to 33.000000001,45,3.00000000001,16 - that way they could not get stacked which resulted in the error.
I now use only Maxent GUI.
Best, Sebi

biomod2 in terminal - Error in .rasterFromASCIIFile(x, ...) : [ Reply ]
By: Sebastian Kirchhof on 2020-05-26 15:05
[forum:47854]
Dear Damien, dear all,
I hope you are all well!
I have a question that I have seen in a similar way in 2014 here in this forum, but I cannot solve it anyway (https://r-forge.r-project.org/forum/forum.php?thread_id=28552&forum_id=995&group_id=302).
I try to run maxent using biomod2 in R (version 4.0.0) on a hpc using Terminal (MacOS Sierra).
After facing several other minor issues I could ultimately solve, I am now stuck with projecting my model output to the same baseline climate in my study area (BIOMOD_projection).
For a practice run I used the following code:

ModelOut <- get(load("path_to_/speciesname.randomPA_1_MAX.models.out"))

files=c("croppedPETseason.grd", "croppedPETcold.grd", "croppedPETwet.grd", "croppedFORESTresample","croppedBIO4", "croppedBIO13.grd", "croppedBIO17.grd", "croppedBIO18.grd", "croppedBIO19.grd")

raster_stack=stack(files)
new.env =raster_stack


ProjBas <- BIOMOD_Projection(modeling.output=ModelOut,
+ new.env=new.env,
+ proj.name="baseline",
+ selected.models = 'all',
+ filtered.meth = NULL,
+ compress = TRUE)

The error I get says

-=-=-=-=-=-=-=-=-=-=-=-=-=-= Do Models Projections -=-=-=-=-=-=-=-=-=-=-=-=-=-=

> Building clamping mask

> Projecting Pcooperi_PA1_RUN1_MAXENT.Phillips ...Error in .rasterFromASCIIFile(x, ...) :
speciesname/./m_26862473/part1/projMaxent.asc does not exist
In addition: Warning message:
In system(command = maxent.command, wait = TRUE, intern = TRUE) :
running command 'java -mx512m -cp "/scratch/user/nichemodel/maxent.jar" density.Project "speciesname/models/randomPA_1_MAX/speciesname_PA1_RUN1_MAXENT.Phillips_outputs/speciesname_PA1_RUN1.lambdas" "speciesname/./m_26862473/part1" "speciesname/./m_26862473/part1/projMaxent.asc" doclamp=false visible=false autorun nowarnings notooltips'

The path speciesname/./m_26862473/part1/

should actually be speciesname/m_26862473/part1/

I would appreciate your help, I am really stuck.
It works in R when I use my computer and not terminal, but then java blocks my computer.
If you have a suggestion how to run maxent in biomod2 on my computer and not on terminal without getting constantly stuck when java is activated that would be fine, too, then I can avoid running it on hpc.
Thanks and all the best,
Sebastian




Thanks to:
Vienna University of Economics and Business Powered By FusionForge