tarfile <- "C:/Users/admin/Desktop/ty/7_netcdf_files/2000.tar" #reading in the file of interest ( year 2000)
untar(tarfile = "2000.tar", exdir = "./rain_files") #extracting the netCDF files from the tar and saving to a new directory that I named rain_files
Hi all,
I have 6 month's worth of precipitation data being collected every 15 mins for the years 2000-2021. I am trying to analyze the files in R and was wondering if there was a way to do this without extracting each of the .tar files one by one. I used the untar function like above to do this for a few years but it took a long time!! I am most interested in the netCDF files that are housed within the tar files. Is there a way to read this information without extracting each tar file?