How to convert LANCE NRT AMSR2 Seaice data to GeoTIFF Format using Python

This code converts selected parameters in AMSR2 NRT Seaice products in HDF-EOS5 format to GeoTIFF. Documentation is provided in the Python code to outline what each section of code does.

Data Recipe Type
Data Format Conversion
Supporting Software Information
TYPE ACCESS
Python Script Python Script Open Source Open Source

This code converts selected parameters in AMSR2 NRT Seaice products in HDF-EOS5 format to GeoTIFF. Documentation is provided in the Python code to outline what each section of code does.

Step 1

The output projection information that will be used to georeference the Northern and Southern hemisphere AMSR2 NRT Snow data are defined. These projections are NSIDC Sea Ice Polar Stereographic North and NSIDC Sea Ice Polar stereographic South.

Step 2

Navigate to the folder on your computer where you have saved the AMSR2 NRT Seaice 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 40). 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 Seaice file after the last forward slash as shown.

Step 3

The code defines which data parameter layer(s) in the HDF-EOS5 file will be used to create the GeoTIFF files. This code applies to three Sea Ice products whose spatial resolutions are 6, 12 and 25 km, respectively (i.e., ‘SeaIce6km’, ‘SeaIce12km’ and ‘SeaIce25km’). For ‘SeaIce6km’ product, the ‘89H_DAY’ parameter is extracted and create the GeoTIFF file. For ‘SeaIce12km’ and ‘SeaIce25km’, the ‘ICECON_DAY’ parameter is extracted.

Step 4

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 58). Again, the backslashes need to be changed to forward slashes.

Step 5

A “for” loop is used to extract the Northern/Southern hemisphere parameters (i.e., ‘SI_25km_NH_ICECON_DAY ‘, ‘SI_25km_SH_ICECON_DAY ‘; variable labeled ‘vname’ in Line 81) and defines the projection accordingly. Read latitude and longitude values from the input file (Line 89 to Line 92).

Step 6

Perform a geographic transformation to georeference the data according to the NSIDC North/South EASE-Grid parameters:

Step 7

Create and save a GEOTIFF file to a folder on your computer. Line 115 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 2, 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.

Step 8

Simply run the code and check your output folder, two GeoTIFF files should now be located within the folder.

 

Example of GeoTIFF files created by geotiff_seaice.py:

Dataset Name
NRT AMSR2 Unified L3 Daily 6.25 km Polar Gridded 89 GHz Brightness Temperatures
NRT AMSR2 Unified L3 Daily 12.5 km Brightness Temperature & Sea Ice Concentration
NRT AMSR2 Unified L3 Daily 25 km Brightness Temperature & Sea Ice Concentration Polar Grids
Platform Global Change Observation Mission - Water 1 (GCOM-W1) 
Instrument Advanced Microwave Radiometer 2 (AMSR2)
Science Parameter Brightness Temperature; Sea Ice Concentration
Format HDF-EOS5
NRT AMSR2 Unified L3 Daily 6.25 km Polar Gridded 89 GHz Brightness Temperatures Data Information Data information
NRT AMSR2 Unified L3 Daily 12.5 km Brightness Temperature & Sea Ice Concentration Data Information Data information
NRT AMSR2 Unified L3 Daily 25 km Brightness Temperature & Sea Ice Concentration Polar Grids Data Information Data information

 

Variable Description Dimension Units Scale Factor
SI_06km_NH_89H_DAY 89.0 GHz horizontal daily average brightness temperature; Northern Hemisphere 2D degree of Kelvin 0.1
SI_06km_SH_89H_DAY 89.0 GHz horizontal daily average brightness temperature; Southern Hemisphere 2D degree of Kelvin 0.1
SI_12km_NH_ICECON_DAY Sea ice concentration daily average; Northern Hemisphere 2D percent none
SI_12km_SH_ICECON_DAY Sea ice concentration daily average; Southern Hemisphere 2D percent none
SI_25km_NH_ICECON_DAY Sea ice concentration daily average; Northern Hemisphere 2D percent none
SI_25km_SH_ICECON_DAY Sea ice concentration daily average; Southern Hemisphere 2D percent none

 

Have you used our data? Register for updates