Closed SamPassmore closed 1 year ago
What version of terra
are you using? We have seen this problem before on Macs when terra
is not downgraded to version 1.6.3. If you have a more recent version, can you please downgrade it as suggested on the pastclim
website and report back?
For your information, the problem stems from the fact that recent versions of terra
on CRAN have not been compiled with support for netcdf. terra
is then unable to properly read variables from any .nc file, not just the ones in pastclim
. Those // in front of variable names are the giveaway; there are no such //, it's a problem with gdal installations that lack netcdf support
A bit more discussion on this issue from StackOverflow:
https://stackoverflow.com/questions/73599324/r-terra-gdal-version-incorrect-cannot-read-nc-gdal-error-4
Let me know if downgrading terra
fails to fix the problem, and we can try to dig a bit deeper.
Hello. Thank-you for the quick response. My apologies I did not realize the downgrading related to this error, I thought it was due to the error listed at the end of the readme page.
Downgrading terra did not immediately solve my problem, but uninstalling both terra and pastclim, and re-installing with the aforementioned versions fixed the issue.
Hi @SamPassmore, no worries, glad it got resolved easily. It is a rather annoying bug, but hopefully it will get fixed on CRAN soon.
Hi,
First let me congratulate you on creating such a valuable resource. This package is exactly what I have been looking for and I think it is going to be hugely useful for me.
I am just learning the ropes of this package and have hit a roadblock. I think perhaps this might be an probably with a dependency package, or perhaps I have not installed things correctly, but I have run out of things to try and was hoping you could offer some pointers.
I am walking through the vignette code* but when I get the location_slice function, I get errors saying the variables I would like to use aren't available, with some alternatives offered. When I use the alternative names, I get the same message with the expected variable names offered as alternatives.
*I also couldn't compile the vignettes during installation which might stem from the same problem
I used this code, with the following errors:
Stepping through the location_slice function, the error comes from the following line:
Remove the subsetting argument allows the function to run, but with a warning:
My conclusion then is there is either something missing from the .nc file or something else is going on. Since I get the same errors for the Beyer2020 dataset, I would guess it is something else. What could I try to figure out what is going wrong?
I am running MacOS Monterey with Apple M1 Chip.