Package: nasadap
The nasadap package contains a class and associated methods/functions to download NASA satellite data products and convert them toxarraydatasets. It uses the python packagepydapto access the NASAHyraxOPeNDAP servers.At the moment, nasadap can only download the satellite precipitation data from the GPM mission.The official list of precipitation products can be foundhere.
The products available via nasadap are described below.New users must register an account withEarthdatato get a username and password to access any NASA data. Thenregister“apps” once logged in. These “apps” are: NASA GESDISC DATA ARCHIVE, GES DISC, and Pydap. More details on general data access can be found on theEathdata wiki.Installationnasadap can be installed via pip or conda:pip install nasadapor:conda install -c mullenkamp nasadapThe core dependencies arexarray,pydap, andrequests.Mission and product descriptionsTropical Rainfall Measuring Mission (TRMM)A full description and documentation of the TRMM can be found on theNASA TRMM site[1].
“This dataset is the output from the TMPA (TRMM Multi-satellite Precipitation) Algorithm, and provides precipitation estimates in the TRMM regions that have the (nearly-zero) bias of the ”TRMM Combined Instrument” precipitation estimate and the dense sampling of high-quality microwave data with fill-in using microwave-calibrated infrared estimates. The granule size is 3 hours.”UpdateThis dataset has been deprecated since NASA has processed the TRMM data using the GPM algorithm, which means GPM data is available back to 2000.[1]Tropical Rainfall Measuring Mission (TRMM) (2011), TRMM (TMPA) Rainfall Estimate L3 3 hour 0.25 degree x 0.25 degree V7, Greenbelt, MD, Goddard Earth Sciences Data and Information Services Center (GES DISC), Accessed: 2018-12-28,10.5067/TRMM/TMPA/3H/7Global Precipitation Mission (GPM)A full description and documentation of the GPM can be found on theNASA GPM site[2].
“The Integrated Multi-satellitE Retrievals for GPM (IMERG) is the unified U.S. algorithm that provides the Day-1 multi-satellite precipitation product for the U.S. GPM team.The precipitation estimates from the various precipitation-relevant satellite passive microwave (PMW) sensors comprising the GPM constellation are computed using the 2014 version of the Goddard Profiling Algorithm (GPROF2014), then gridded, intercalibrated to the GPM Combined Instrument product, and combined into half-hourly 10x10 km fields.”This dataset has three downloadable products.
The core product set has a temporal resolution of 30 minutes and have three different “runs”: Early (3IMERGHHE), Late (3IMERGHHL), and Final (3IMERGHH). Early is 4 hours behind real-time, Late is 12 hours behind real-time, and Late has been rain-gauge calibrated and is several months behind. A more thorough description can be found at the link above.
The daily products have been deprecated as it is better to download the finer temporal resolution products and aggregate them as needed due to time zone issues that might arise when only using the daily products.The dataset that most people would want is called “precipitationCal”.NOTE:According to theofficial TRMM docsunder B-9, NASA will be reprocessing the TRMM data back until 2000 using the GPM IMERG V05 algorithm for consistency across the two mission’s products. This will be integrated into nasadap once it’s up.UpdateThey have done it! GPM data back to 2000 has been integrated into nasadap. It has currently been processed for the 3IMERGHH product and has been given a new version number (6).[2]George Huffman (2017), GPM IMERG Final Precipitation L3 Half Hourly 0.1 degree x 0.1 degree V05, Greenbelt, MD, Goddard Earth Sciences Data and Information Services Center (GES DISC), Accessed: 2018-12-28,10.5067/GPM/IMERG/3B-HH/05Usage ExamplesAt the moment, there is a single class called NASA that provides access to the data. It’s highly recommended to use a cache directory as NASA’s Hyrax server is a bit slow.fromnasadapimportNasa,parse_nasa_catalog################################## Parametersusername=''# Need to change!password=''# Need to change!mission='gpm'product='3IMERGHH'version=6from_date='2019-03-28'to_date='2019-03-29'dataset_type='precipitationCal'min_lat=-49max_lat=-33min_lon=165max_lon=180cache_dir='nasa/cache/nz'################################## Examplesmin_max1=parse_nasa_catalog(mission,product,version,min_max=True)# Will give you the min and max available dates for productsge1=Nasa(username,password,mission,cache_dir)products=ge1.get_products()datasets=ge1.get_dataset_types(products[0])ds1=ge1.get_data(product,version,dataset_type,from_date,to_date,min_lat,max_lat,min_lon,max_lon)ge1.close()Once you’ve got the cached data, you might want to aggregate the netcdf files by year or month to make it more accessible outside of nasadap. The time_combine function under the agg module provides a way to aggregate all of the many netcdf files together and will update the files as new data is added to NASA’s server. It will also shift the time to the appropriate time zone (since the NASA data is in UTC+00).fromnasadapimportagg################################## Parameterscache_dir='nasa/cache/nz'save_dir='nasa/precip'username=''# Need to change!password=''# Need to change!mission='gpm'freq='M'product='3IMERGHH'version=6datasets=['precipitationCal']min_lat=-49max_lat=-33min_lon=165max_lon=180dl_sim_count=50tz_hour_gmt=12agg.time_combine(mission,product,version,datasets,save_dir,username,password,cache_dir,tz_hour_gmt,freq,min_lat,max_lat,min_lon,max_lon,dl_sim_count)