Script to download IMERG
-
- Posts: 2
- Joined: Sun Jul 09, 2023 12:36 pm America/New_York
Script to download IMERG
Hi,
I could download IMERG data manually from https://disc.gsfc.nasa.gov/datasets/GPM_3IMERGDL_06/summary > Web Services> Subset Get Data. I would like to download IMERG data automatically and routinely. May I ask how can I do that? Can someone help me to write such a script, please?
Sincerely
I could download IMERG data manually from https://disc.gsfc.nasa.gov/datasets/GPM_3IMERGDL_06/summary > Web Services> Subset Get Data. I would like to download IMERG data automatically and routinely. May I ask how can I do that? Can someone help me to write such a script, please?
Sincerely
Tags:
-
- User Services
- Posts: 19
- Joined: Tue Sep 17, 2019 2:11 pm America/New_York
Re: Script to download IMERG
You could write a script to generate a list of links using a sample from Subset/Get Data. Also add wget or curl to the script to download the data from the list of links. The instructions for wget or curl: https://disc.gsfc.nasa.gov/information/howto?title=How%20to%20Access%20GES%20DISC%20Data%20Using%20wget%20and%20curl
-
- Posts: 2
- Joined: Sun Jul 09, 2023 12:36 pm America/New_York
Re: Script to download IMERG
GES DISC - zliu wrote:
> You could write a script to generate a list of links using a sample from
> Subset/Get Data. Also add wget or curl to the script to download the data
> from the list of links. The instructions for wget or curl:
> https://disc.gsfc.nasa.gov/information/howto?title=How%20to%20Access%20GES%20DISC%20Data%20Using%20wget%20and%20curl
Dear zliu,
Thank you so much for your helpful reply.
I tried the following script. It seems to work and I hope the data is downloaded correctly.
#!/bin/bash
year2d=$(date -d -2day +"%Y")
mon2d=$(date -d -2day +"%m")
day2d=$(date -d -2day +"%d")
cd /home1/data/imergdl
#Download last IMERG data
wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --keep-session-cookies --content-disposition https://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGDL.06/${year2d}/${mon2d}/3B-DAY-L.MS.MRG.3IMERG.${year2d}${mon2d}${day2d}-S000000-E235959.V06.nc4.nc4?precipitationCal[0:0][2150:2500][1099:1349],time,lon[2150:2500],lat[1099:1349] -O IMERGDL${year2d}${mon2d}${day2d}.nc4
> You could write a script to generate a list of links using a sample from
> Subset/Get Data. Also add wget or curl to the script to download the data
> from the list of links. The instructions for wget or curl:
> https://disc.gsfc.nasa.gov/information/howto?title=How%20to%20Access%20GES%20DISC%20Data%20Using%20wget%20and%20curl
Dear zliu,
Thank you so much for your helpful reply.
I tried the following script. It seems to work and I hope the data is downloaded correctly.
#!/bin/bash
year2d=$(date -d -2day +"%Y")
mon2d=$(date -d -2day +"%m")
day2d=$(date -d -2day +"%d")
cd /home1/data/imergdl
#Download last IMERG data
wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --keep-session-cookies --content-disposition https://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGDL.06/${year2d}/${mon2d}/3B-DAY-L.MS.MRG.3IMERG.${year2d}${mon2d}${day2d}-S000000-E235959.V06.nc4.nc4?precipitationCal[0:0][2150:2500][1099:1349],time,lon[2150:2500],lat[1099:1349] -O IMERGDL${year2d}${mon2d}${day2d}.nc4
-
- User Services
- Posts: 19
- Joined: Tue Sep 17, 2019 2:11 pm America/New_York
Re: Script to download IMERG
You could use Giovanni, https://giovanni.gsfc.nasa.gov/giovanni/#service=TmAvMp&starttime=&endtime=&data=GPM_3IMERGDL_06_precipitationCal
and Panoply (displaying the downloaded file), https://www.giss.nasa.gov/tools/panoply/ to verify your downloaded file.
and Panoply (displaying the downloaded file), https://www.giss.nasa.gov/tools/panoply/ to verify your downloaded file.
-
- Posts: 2
- Joined: Sun Jul 09, 2023 12:36 pm America/New_York
Re: Script to download IMERG
Dear zliu,
Thank you for your helpful suggestion. I will try these.
Thank you for your helpful suggestion. I will try these.
Last edited by ehsantaghizadeh on Mon Jul 17, 2023 3:42 pm America/New_York, edited 1 time in total.