fdetsch / MODIS

Download and processing framework for MODIS imagery. The package provides automated access to the global online data archives LP DAAC, LAADS and NSIDC as well as processing capabilities such as file conversion, mosaicking, subsetting and time series.
Other
58 stars 27 forks source link

`checkEarthdataLogin` called with wrong parameters from `MODISoptions` #136

Open barryrowlingson opened 1 year ago

barryrowlingson commented 1 year ago

When MODISoptions calla checkEarthdataLogin to test login/connectivity, it seems to pass the dlmethod and the MODISserverOrder:

    if ((is.null(opt$EarthdataLogin) || isFALSE(opt$EarthdataLogin)) && 
        check_earthdata_login) {
        opt$EarthdataLogin = checkEarthdataLogin(opt$dlmethod, 
            opt$MODISserverOrder)
    }

But the second argument to checkEarthdataLogin looks like it should be the .netrc file with the credentials in:

> MODIS:::checkEarthdataLogin
function (method = "auto", path = "~/.netrc") 
{[etc]

Found this while chasing up a StackOverflow Q: https://gis.stackexchange.com/questions/462743/earthdata-log-in-error-for-downloading-modis-data-r-language - I'm not sure it answers their question though...

fdetsch commented 1 year ago

Thanks – also for the efforts on SO! I believe I fixed that in #135 that was supposed to close #134 a while ago (see the changes in MODISoptions.R), but never got to actually merging it into main 🤦‍♂️ I'll try to bring this PR to a close (hopefully) soon.