DHI-GRAS / zamwis-fd

ZAMWIS Floods and Droughts workflow
0 stars 0 forks source link

TRMM download script error #9

Closed AndersKlinting closed 6 years ago

AndersKlinting commented 6 years ago

(fd) C:\zamwis_fd>call flooddrought download_trmm --extent "18.375,36.5,-20.25,-8.875" C:\zamwis_fd\data\TRMM\TRMM.nc
Usage: flooddrought download_trmm [OPTIONS] OUTFILE

Error: Missing option "--username".

j08lue commented 6 years ago

That happens when the config file cannot be found (still only in ~/.config/fd_credentials.ini).

If it does not work for you to put the file there, you can also provide the credentials via environment variables EARTHDATA_USERNAME, EARTHDATA_PASSWORD and VITO_USERNAME, VITO_PASSWORD - or via --username and --password.

AndersKlinting commented 6 years ago

I think you said you would change the program to als look in current folder for the ini-file if it cannot be found in the default location. as we run the job in a cetrtain folder and start flooddrought.exe from there, so it would also work with current folder

j08lue commented 6 years ago

you would change the program to also look in current folder

That is right, we talked about that. I looked into it but found that it would require quite a large change that seems a bit overkill just for this one use case.

I can see that it would be nice to have a self-contained ZAMWIS data/scripts tree that has everything you need to update the data. But that is just not how the flooddrought tool currently is made. We could also hard-code the credentials in the scripts, but then we cannot put them in a public repo.

So how about we just define system environment variables and document that somewhere?

AndersKlinting commented 6 years ago

it think thesolutionswith environment variables is fine. could be in the form of fdcredentials.bat which is called as part of the run*.bat files will you do that?

j08lue commented 6 years ago

could be in the form of fdcredentials.bat which is called as part of the run*.bat files

good workaround

will you do that?

yes

j08lue commented 6 years ago

Done. TRMM download is still failing, but because of a corrupt file on the server. I will make sure we skip it instead.