if(interactive()){
# read a single file, look at its structure and plot
npp <- read.osunpp("vgpm.2013089.h5",
lats=c(20, 30), lons=c(-130, -105))
npp
str(npp)
plot(npp)
# read several files residing in the working directory
files <- list.files(pattern = glob2rx("*.h5"))
lats <- c(20, 30)
lons <- c(-130, -105)
mNPP <- read.osunpp(files, lats, lons)
# plotting the first processed file
plot(mNPP)
# plotting the second processed file
plot(mNPP, period = 2)
}
Run the code above in your browser using DataLab