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

Some models are artificially bounded #4

Open
jcoliver opened this issue Jan 10, 2018 · 3 comments
Open

Some models are artificially bounded #4

jcoliver opened this issue Jan 10, 2018 · 3 comments
Assignees
Labels

Comments

@jcoliver
Copy link
Owner

jcoliver commented Jan 10, 2018

Some funkiness is going on with models where one or more of the species' ranges are not realistic (i.e. portions of the range border is a long straight line). See scripts/examples/Papilio_cresphontes-future-sdm-pairwise.R and scripts/examples/Papilio_cresphontes-sdm-pairwise.R for an examples.
Note western and eastern border for plant in: Papilio_cresphontes-pairwise-prediction.pdf

@jcoliver jcoliver self-assigned this Jan 10, 2018
@jcoliver jcoliver added the bug label Jan 10, 2018
@jcoliver
Copy link
Owner Author

Likely caused by cropping the bioclim variables by the geographic extent of the observations. Bioclim data are tiled, so cropping might exclude tiles outside geographic extent of observations. Lines 76-88 of scripts/examples/Zanthoxylum_americanum-sdm-single.R:

# Determine geographic extent of our data
max.lat = ceiling(max(obs.data$lat))
min.lat = floor(min(obs.data$lat))
max.lon = ceiling(max(obs.data$lon))
min.lon = floor(min(obs.data$lon))
geographic.extent <- extent(x = c(min.lon, max.lon, min.lat, max.lat))

# Get the biolim data
bioclim.data <- getData(name = "worldclim",
                        var = "bio",
                        res = 2.5,
                        path = "data/")
bioclim.data <- crop(x = bioclim.data, y = geographic.extent)

@jcoliver
Copy link
Owner Author

Easiest quick fix is probably to just buffer the crop area by padding the geographic.extent used in the crop call.

@jcoliver
Copy link
Owner Author

Added some padding to extents, but the 10% default may not be enough. See scripts/examples/Papilio_cresphontes-future-sdm-single.R; the eastern boundary appears to still suffer from the arbitrary cutoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant