Skip to main content

Description

This code converts the snow water equivalent (‘SWE’) parameter in the AMSR2 NRT daily snow product in HDF-EOS5 format to GeoTIFF. Documentation is provided in the Python code to outline what each section of code does.

Supporting Software Information

TYPEACCESS
Python ScriptOpen Source

How to use

This code converts the snow water equivalent (‘SWE’) parameter in the AMSR2 NRT daily snow product in HDF-EOS5 format to GeoTIFF. Documentation is provided in the Python code to outline what each section of code does.

Step1

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 EASE-Grid North and NSIDC EASE-Grid South.

Screenshot of code block of output projection information.

Step 2

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

Screenshot of code block with file path highlighted.

Step 3

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

Screenshot of code block with file path highlighted.

Step 4

The code defines which data parameter layer(s) in the HDF-EOS5 file will be used to create the GeoTIFF files. In this data recipe, a “for” loop is used to extract the “SWE_NorthernDaily” and “SWE_SouthernDaily” parameters and define the projection accordingly. Read latitude and longitude values from the input file (Line 69 to Line 72).

Screenshot of code block with data parameters.

Step 5

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

Screenshot of code block showing parameters.

Step 6

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

Screenshot of code block with file path highlighted.

Step 7

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

Screenshot of file folder showing file locations.

Example of GeoTIFF files created by this geotiff_snow.py:

Example of GeoTIFF files created by this geotiff_snow.py

Dataset Information

Dataset NameNRT AMSR2 Unified L3 Global Daily 25 km EASE-Grid Snow Water Equivalent
PlatformGlobal Change Observation Mission - Water 1 (GCOM-W1) 
InstrumentAdvanced Microwave Radiometer 2 (AMSR2)
Science ParameterSnow Water Equivalent
FormatHDF-EOS5
Data InformationCMR Search

Key Parameters

VariableDescriptionDimensionUnitsScale Factor
SWE_NorthernDailyDaily snow water equivalent (SWE); Northern Hemisphere2Dmm1
SWE_SouthernDailyDaily snow water equivalent (SWE); Southern Hemisphere2Dmm1

Details

Last Updated

Published on

Data Centers

Global Hydrometeorology Resource Center DAAC (GHRC DAAC)