Hello team!
I was revisiting this code for someone and thought I would share this alternative method in case that's helpful for future tutorials using this repository.
A faster way to run 01_getNLDAS.R that doesn't require updating the links formatting in the Rscript every once in a while.
This requires using the command line and using wget from the command line:
For example:
- Go on https://disc.gsfc.nasa.gov/datasets?keywords=NLDAS as usual
- Use the filters to find the dataset
- Click on "Subset/Get data"
- Refine date ranges
- Click on Get data
- Click on "Downloads links list in the lower left pop-up", which creates a txt file with URLs

Open the terminal
mkdir NLDAS_data
cd NLDAS_data
wget --user [username] --password [password] -i [text_file_downloaded] --content-disposition
where [text_file_downloaded] is the path to the file downloaded in step 6 above.
--content-disposition ensures the files are not renamed but keep their ".grb" file extension/naming format.