Open kellijohnson-NOAA opened 7 years ago
Thanks @kellijohnson for pointing that out. It's true I've hardcoded most of those substr()
functions which would throw errors on other machines. As I update the code I'll make sure to change those and thanks for sharing your fix.
No problem. I also came across an issue with stack
because of the order in which I loaded packages, so raster::stack
works better for me and may lead to increased robustness for others as well.
Minor issue I am dealing with when trying to recreate the pressure layers from raw data. I first download the data from the original sources (thank you very much for providing links to those). Then, I changed the working directories in your code to my local machine. Subsequently, all calls using
substr
do not work because my working directory, which influences the full file path, is different. I have changed the code on my local machine to usegsub("\\.[a-z]{3}", "", sapply(strsplit(x, "-|_"), tail, 1))
, which will work for some of the uses ofsubstr
to pull out the year.