Description
This code converts total column water vapor (‘TotalColWaterVapor’) in the AMSR2 NRT Rain product in HDF-EOS5 format to GeoTIFF.
This code converts total column water vapor (‘TotalColWaterVapor’) in the AMSR2 NRT Rain product in HDF-EOS5 format to GeoTIFF.
TYPE | ACCESS |
---|---|
Python Script | Open Source |
This code converts total column water vapor (‘TotalColWaterVapor’) in the AMSR2 NRT Rain product in HDF-EOS5 format to GeoTIFF.
Navigate to the folder on your computer where you have saved the AMSR2 NRT Rain HDF-EOS5 data file. From the address bar, copy the file path (i.e., ‘C:\Users\lwang\Documents\AMSR\data\’). Paste the file path within the quotation marks for the variable ‘h5file’ highlighted in blue below (Line 48). For Python, the backslashes need to be changed to forward slashes. At the end of the file path, add the filename of the AMSR2 NRT Rain file after the last forward slash as shown.
Documentation is provided in the Python code to outline what each section of code does. For this data recipe we are extracting the “TotalColWaterVapor” parameter from the HDF-EOS5 file to create the GeoTIFF file.
Users can set ‘useGIBScolors’ to True/False to elect the use of GIBS color scheme or not. In the case of using GIBS color scheme, unzip the colormaps.zip in the code folder (i.e., unzipped from Geotiff_recipes.zip) to get a folder labeled ‘colormaps’. It contains a set of GIBS colormap files to use. Save this folder on your computer. From the address bar, copy the file path (i.e., ‘C:\Users\lwang\Documents\AMSR\colormaps\’). Paste the file path within the quotation marks for the variable ‘gibsMapDir’ highlighted in blue below (Line 64). Again, the backslashes need to be changed to forward slashes.
Read ‘TotalColWaterVapor’, latitude, and longitude values from the input file.
Call the remapping function ‘remapSwath()’ from ConvSwath.py to remap SWATH data to epsg4326 projection.
Create and save a GEOTIFF file to a folder on your computer. Line 100 defines the GeoTIFF filename. Create or locate a folder on your computer where you would like this GeoTIFF file to be saved. As done in STEP 1, copy the file path and paste it within the code in the area highlighted in blue below. Make sure a forward slash is included at the end of the file path.
Simply run the code and check your output folder, a GeoTIFF file should now be located within the folder.
Example of Geotiff files created by geotiff_rain.py:
Dataset Name | NRT AMSR2 Unified Global Swath Surface Precipitation GSFC Profiling Algorithm |
---|---|
Platform | Global Change Observation Mission - Water 1 (GCOM-W1) |
Instrument | Advanced Microwave Radiometer 2 (AMSR2) |
Science Parameter | Total Column Water Vapor |
Format | HDF-EOS5 |
Data Information | CMR Search |
Variable | Description | Dimension | Units | Scale Factor |
---|---|---|---|---|
TotalColWaterVapor | Integrated water vapor in the atmospheric column | 2D | mm | none |