how to download and run LCC200 module?

30 views
Skip to first unread message

dnor...@gmail.com

unread,
Jul 5, 2019, 6:50:55 PM7/5/19
to SpaDES Users
HI all,
Still trying to get started with SpaDES.
Following the example:
https://github.com/PredictiveEcology/SpaDES-modules/tree/master/modules/LCC2005

Couple of errors listed below which prevent the data being downloaded and tutorial fails at the first simInit call.

Any help much appreciated,
Darren


# with download data generates error
#Error in curl::curl_fetch_memory(url, handle = handle) :
#Could not resolve host: NA
downloadModule("LCC2005", moduleDir, data = TRUE, overwrite = TRUE)

#Below is output and error from the first simInit call:

options(
reproducible.cachePath = 'C:/Users/Darren/Documents/2018 Unifilis demography/analysis/cmartr/inst/spadesdn/modules/LCC2005/cache'
spades.inputPath = 'C:/Users/Darren/Documents/2018 Unifilis demography/analysis/cmartr/inst/spadesdn/modules/LCC2005/simInputs'
spades.outputPath = 'C:/Users/Darren/Documents/2018 Unifilis demography/analysis/cmartr/inst/spadesdn/modules/LCC2005/simOutputs'
spades.modulePath = 'C:/Users/Darren/Documents/2018 Unifilis demography/analysis/cmartr/inst/spadesdn/modules/LCC2005/modules'
)
Module fireSpreadLcc still uses the old way of function naming.
It is now recommended to define functions that are not prefixed with the module name
and to no longer call the functions with sim$functionName.
Simply call functions in your module with their name: e.g.,
sim <- Init(sim), rather than sim <- sim$myModule_Init(sim)
Module forestAge still uses the old way of function naming.
It is now recommended to define functions that are not prefixed with the module name
and to no longer call the functions with sim$functionName.
Simply call functions in your module with their name: e.g.,
sim <- Init(sim), rather than sim <- sim$myModule_Init(sim)
Module LccToBeaconsReclassify still uses the old way of function naming.
It is now recommended to define functions that are not prefixed with the module name
and to no longer call the functions with sim$functionName.
Simply call functions in your module with their name: e.g.,
sim <- Init(sim), rather than sim <- sim$myModule_Init(sim)
Running .inputObjects for cropReprojectLccAge
Running preProcess
Preparing: can_age04_1km.tif
Checking local files...
Finished checking local files.
Can't download can_age04_1km.tif from ftp://ftp.daac.ornl.gov/data/nacp/NA_TreeAge//data/can_age04_1km.tif
Please download and provide the object 'lcc05' as input for cropReprojectLccAge manually
Running preProcess
Preparing: LCC2005_V1_4a.tif
Checking local files...
Finished checking local files.
Downloading ftp://ftp.ccrs.nrcan.gc.ca/ad/NLCCLandCover/LandcoverCanada2005_250m/LandCoverOfCanada2005_V1_4.zip ...
Can't download LCC2005_V1_4a.tif from ftp://ftp.ccrs.nrcan.gc.ca/ad/NLCCLandCover/LandcoverCanada2005_250m/LandCoverOfCanada2005_V1_4.zip
Please download and provide the object 'lcc05' as input for cropReprojectLccAge manually
Error in crs(sim$lcc05) : could not find function "crs"

Message has been deleted

Tati Micheletti

unread,
Jul 5, 2019, 7:06:01 PM7/5/19
to SpaDES Users
Hi Darren,

The government shut this link down about a year ago. Here is how you can get the file you need.

lcc05 <- reproducible::prepInputs(url = "https://drive.google.com/open?id=1pZoExaEDlm-TYmoUKvMq6h1AGTbsm71K", destinationPath = tempdir()) # destinationPath is the folder where you want to save the file once downloaded.

Let me know if you can't make it to work. :)

Bst,

Tati
Reply all
Reply to author
Forward
0 new messages