TMPA products

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
EarthdataForumContributor
Posts: 284
Joined: Thu Jul 11, 2019 4:32 pm America/New_York
Answers: 3

TMPA products

by EarthdataForumContributor » Wed Feb 19, 2020 2:03 pm America/New_York

How to subset and download TMPA products in ASCII via a URL call

Tags:

GES DISC - zliu
User Services
User Services
Posts: 19
Joined: Tue Sep 17, 2019 2:11 pm America/New_York
Answers: 0

Re: TMPA products

by GES DISC - zliu » Wed Feb 19, 2020 2:16 pm America/New_York

We discourage downloading large datasets such as TMPA in ASCII format. The download will likely be much slower and may take much more network bandwidth, and storage, especially for large subset regions. All TMPA files at GES DISC are internally compressed, which is seamless to the user, and thus they download fast in their original format. The best strategy is to download these data in the original format, and then locally use some HDF tools to convert to ASCII. Simple command-line utilities, like ncdump, hdp, h5dump, or HDFView, are capable of doing it and are free and available from the HDF Group, https://www.hdfgroup.org.

Nevertheless, examples of on-the-fly ASCII conversions that can be scripted are provided below. Keep in mind, they are based on OPeNDAP functionality, and work good for small areas. You need to be a registered user and have wget v1.18.

You'll have to apply a simple algebra to calculate the subset indexes, for your desired (lon,lat) subset. For the research quality 3B42 and 3B43:

i = ( 49.875 + lat ) / 0.25 for latitudes
j = ( 179.875 + lon ) / 0.25 for longitudes

For instance, for Sacramento, CA, area: i=341; j=237

Then, using OPeNDAP:

wget --no-check-certificate "https://disc2.gesdisc.eosdis.nasa.gov/opendap/TRMM_L3/TRMM_3B42.7/2008/133/3B42.20080512.21.7A.HDF.ascii?precipitation[237:238][341:342],nlon[237:238],nlat[341:342]" -O 3B42.20080512.21.7A.ascii

Notes: Although this example is for one granule, it is easy to see how to script it for series of granules. TMPA file names and directories follow a clear pattern that is easy to guess.



Download series of Daily Precipitation, into one file, for 2016, using THREDDS:

wget --no-check-certificate "https://disc2.gesdisc.eosdis.nasa.gov/thredds/dodsC/aggregation/TRMM_3B42_Daily.7/TRMM_3B42_daily.7_Aggregation_2016.ncml.ncml.ascii?lat[341:342],lon[237:238],precipitation[0:365][237:238][341:342],time[0:365]"
-O TRMM_3B42_daily.7_Aggregation_2016.ascii

Notes: Since this is time series, time appears as an extra dimension.



Other Notes: Remember, latitude indexes will be different for the Near Real-Time products (3B42RT, 3B42RT_Daily), and the data arrays are transposed:

i = ( 59.875 + lat ) / 0.25 for latitudes

Sacramento, CA: i = 381

wget --no-check-certificate "https://disc2.gesdisc.eosdis.nasa.gov:443/opendap/TRMM_RT/TRMM_3B42RT.7/2008/133/3B42RT.2008051221.7R2.nc4.ascii?precipitation[381:382][237:238],lat[381:382],lon[237:238]" -O 3B42RT.2008051221.7R2.ascii

Post Reply