Download MERRA2 Data

As we want to analyse MERRA2 data, we’ll need to download the data first.

Bosilovich et al. have produced a technical report with the file specification for MERRA2, available here.

In order to download MERRA2 data, you need to register with Earthdata Login and then authorize NASA GESDISC Data Access. Instructions are here:

You should log in to and download the data from there. Once you’ve downloaded what you want, move your data to our shared folder (so we don’t all download the same thing): /storage-earth/ESIPP/MERRA2

You can download MERRA2 data, using a subsetter to select your area of interest, here.

  • The area that I used for my initial download was:
    West:  -12  North:  60  South:  49  East:  3
  • The select start and end dates. Do only one month at first, to make sure that everything works.
  • Select the parameter(s) you want.
  • Then click ‘Start Search’
  • This ends up showing you instructions on how to download your data using wget:
    • Save the list of URLs  (click on the link on the page) to your local workstation. Change the file name to myfile.dat. Then transfer this (scp ) to sonic – you’ll download the data from sonic.
    • The first time you retrieve data, you’ll need to create two files in your home directory on sonic:
      • create an empty ~/.urs_cookies file.
      • create a ~/.netrc file pointing to with your NASA Earthdata login username (USERNAMEHERE) and password (PASSWORDHERE) by placing the following text in the file:

        machine login USERNAMEHERE password PASSWORDHERE
    • Now use wget to retrieve the files named in your myfile.dat file (NOTE: this includes the -content-disposition flag):
      wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --auth-no-challenge=on --keep-session-cookies --content-disposition -i myfile.dat