MazamaScience / MazamaSatelliteUtils

Satellite Data Download and Utility Functions
http://mazamascience.github.io/MazamaSatelliteUtils
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Listing local scan files #94

Closed tabrasel closed 3 years ago

tabrasel commented 3 years ago

When goesaodc_listScanFiles() is called with useRemote=FALSE, it will only search for the closest file currently on disk. However, part of the searching process involves subsetting all of the available scan files by day. For instance, if the requested datetime = "2020-09-08 12:30", then only files for 2020-09-08 will be searched for close files. This is necessary since the local disk or remote server might have thousands (or hundreds of thousands) of files which each require time calculations to determine the closest one to the requested datetime. Without subsetting, it could take a while to find the closest one.

The problem with this method is that the local disk might not have any files for that day, so the function returns NA. First: it should probably return NULL, and second: this is a problem since this function should be used by goesaodc_downloadScanFiles() in order to determine which files are already on disk and don't need to be redownloaded.