Hosted by "1PLs Agency"

Marine Data Literacy

Providing instruction for managing, converting, analyzing and displaying oceanographic station data, marine meteorological data, GIS-compatible marine and coastal data, and mapped remote sensing imagery


2.1 Preliminaries
2.2 Project Area
2.3 Project Map
2.4 Graticules & Frames
___2.4.1 Frames Check
2.5 Grid Templates
___2.5.1 Grid Check
2.6 GEBCO Contours
2.7 Sediment Thickness
2.8 Boundaries & Coast
2.9 Marine Regions
2.10 Text Spreadsheet
2.11 Number Spreadsheet
2.12 Cutting a Shape
___2.12.1 Cutting Check
2.13 0-360 System
2.15 Shape from XYs
2.18 Navy Waves
2.20 Land Stations
2.21 HDF Chloro/Sal
2.22 HDF SST
2.24 Coastal Survey
2.25 NetCDF with NaN
2.26 Google Digitizing
2.27 UTM->WGS84
2.29 Nav Charts
2.30 Argo MLDs
2.31 SST/Ice Climate
2.32 EU Wave Climate
2.33 GSHHG Vectors
2.34 GlobWave Grids
2.35 MGD77 Surveys
2.36 ColorWeb T/Chl/S

Home > 2. Marine GIS > 2.22 Scaled SST Climatology

2.22 Importing "Scaled" HDF Satellite Surface Temperature Climatologies into Marine GIS: OceanColor Web

  • Title:  Importing "Scaled" HDF Satellite Surface Temperature Climatologies into Marine GIS: OceanColor Web

  • Abstract:  In this exercise you'll work with the highest quality monthly climatologies available for SST; related sets of chlorophyll and salinity data are covered in Exercise 2.21.  These data are provided in a slightly awkward format, requiring several steps to obtain grids usable in Saga GIS. 

  • Preliminary Reading (in OceanTeacher, unless otherwise indicated):

    • N/A

  • Required Software:

  • Other Resources: 

    • US NASA Ocean Color Web - Huge archive of marine optics parameters and SST from a long series of satellites, all in a non-standard HDF format that previously required laborious conversion to ASCII before use in GIS.  Latest version of Saga can accommodate these data directly.

    • frame_grid_liberia_0.05deg.sgrd - Dummy 0.05-degree grid for Liberia made in Exercise 2.5

  • Author:  Murray Brown

  • Version:  1-xx-2014

1.  Perform the exercise 2.36 Obtaining Long-Term, Satellite HDF Climatologies at OceanColor Web: Temperature, Chlorophyll, Salinity to obtain data needed in this exercise.  Be sure to read over all the ancillary information so you have a good idea of what you're working with and how it was obtained.
2.  Use your unzipping program to de-compress the January file to this much larger file:
  • A20030012014031.L3m_MC_SST_4_jan

You have to add the filename extension, HDF, yourself, as you see here:

  • A20030012014031.L3m_MC_SST_4_jan.hdf

In the same way, add the extension to the other files.

3.  You now have these global temperature grids in the folder LIBERIA > DATA > OCEAN > COLORWEB > SST, or perhaps all 12 months.
  • A20030012014031.L3m_MC_SST_4_jan.hdf
  • A20030012014031.L3m_MC_SST_4_apr.hdf
  • A20030012014031.L3m_MC_SST_4_jul.hdf
  • A20030012014031.L3m_MC_SST_4_oct.hdf


4.  Run Saga.
5.  So you use this tool to load the rasters one-at-a-time.  Here the first file, January, has been selected.

Then click OK.

6.  The raster is provided as a "data" grid, and a "quality" grid. Check only the data grid.

Then click OK.

7.  And here you see the new grid in Saga.  It has been automatically renamed as you see here.

What's wrong with this name?  Saga uses the same name for all months.

8.  To identify the grid, change the name back to the original HDF filename.

NOTE:  How to change the name?  Find the name at the top of the properties panel; change it, then click APPLY at the bottom of that panel. 

Here's a set of the desired filenames you can copy and paste into Saga for that purpose.


  • A20030012014031.L3m_MC_SST_4_jan

  • A20030012014031.L3m_MC_SST_4_apr

  • A20030012014031.L3m_MC_SST_4_jul

  • A20030012014031.L3m_MC_SST_4_oct

9.  Here's what you see after you change the name of the first grid

Load the grids in calendar order, and rename each one as soon as it is loaded.

10.  And here you see all 4 grids loaded and renamed.


11.  Use ADD TO MAP to display the first grid, January.  If you examine the map, you'll find pixel coordinates, not geographic coordinates.
12.  We must assign geographic coordinates, so select TOOLS > PROJECTION-GEOREFERENCING > DEFINE GEOREFERENCE FOR GRIDS.
13.  For GRID SYSTEM, select the current system for the HDF rasters.  Then click on the ellipsis (...) to the right of GRIDS.
14.  Here you see the familiar 2-sided object selector.  On the left are all 4 available rasters.
15.  Use the >> control to move all 4 over to the selected side.

Then click OK.

16.  Now you can complete the previous window:
  • DEFINITION - As you see here; but read through the choices to see how they could be used
  • CELLSIZE - The value here is 360/8640 or 180/4320
  • LEFT - The WESTERNMOST LONGITUDE from the metadata, i.e. the left edge.
  • LOWER - The SOUTHERNMOST LATITUDE from the metadata, i.e. the bottom edge

Then click OK.

17.  These 4 new rasters (at the top), in an entirely different grid system, will appear.
18.  Use ADD TO MAP to see one of the grids.  Look to see if the cursor position reveals reasonable longitudes and latitudes, e.g. from -180 on the left to +180 on the right, etc.
19.  If the grid location appears to be OK, then rename all 4 new grids, as you see here.

You should now delete all 4 original grids (on the bottom) to open up some memory space.

20.  Now select any grid, and use HISTOGRAM to see the relation between the values and the colors.

Here is the readily apparent effect of "scaling" the data.  The original data with values such as 12.345 degrees, for example, have been "scaled" to integers, for example 29168.  The reason is that real values (the former) require 4 bytes (32 bits), but integer values (the latter) only require 2 bytes (16 bits referred to during file loading, above). 

Scaling was a popular method to save memory some years ago, but is not so widely used now.  The downside is the need to "de-scale" the data prior to use, as we are about to do now.


Begin by selecting for GRID SYSTEM the new grid system just created above.

Then click on the ellipsis (...) to select the objects.

22.  Find the 4 new grids on the left, "available," side.
23.  Then move them to the right, "selected," side with the >> control.

Then click OK.

24.  Now you can complete the settings:
  • RESULT - Must be set to CREATE
  • FORMULA - Insert this formula, taken directly from the metadata, above
  • NAME - Use the name shown here, to help you identify the result
  • TAKE FORMULA - Do not check
  • USE NODATA - Do not check
  • DATA TYPE - As shown here

Then click OK.

25.  Now, check to see a new grid, named jan_descaled has been added.
26.  Use ADD TO MAP to inspect the new grid, to make sure the temperature values are within the possible range (i.e. -2 to 45, depending on location).
27.  If everything looks ok, you can continue by running the same tool again, as you see here.  Make sure you change these items appropriately:
  • RESULT - Back to CREATE
  • FORMULA - Change the g number
  • NAME - Change the month name
28.  Now check to see that you have these 4 new grids (bottom 4).
29.  Change the names of the new (bottom) 4 grids to the long strings you see here, for certain identification later:
  • sst_11mu_day_jan_global_modisa_colorweb_4km_located_descaled
  • sst_11mu_day_apr_global_modisa_colorweb_4km_located_descaled
  • sst_11mu_day_jul_global_modisa_colorweb_4km_located_descaled
  • sst_11mu_day_oct_global_modisa_colorweb_4km_located_descaled
30.  Delete the earlier (upper) 4 grids, to save space.
31.  Now, you might want to save the current shape(s) or grid(s) to make sure you don't lose anything in case of problems later on.  Just name them with the above filenames (or equally descriptive ones), and use a logical folder location (such as PRODUCTS > SAGA > GRIDS > COLORWEB).
32.  Now the only that remains to do is to subset the grids down to the Liberia area of interest.  Load the grid frame_grid_liberia_0.05deg.
33.  Open TOOLS > GRID TOOLS > RESAMPLING.  Then make these choices for the first subsetting:
  • GRID SYSTEM - System for the new grids, with 0.041667 km resolution.
  • GRID - Select the Jan grid
  • PRESERVE DATA TYPE - Check box

Then click OK.

34.  Now you're asked which GRID to use for a target.
  • GRID SYSTEM - Select the 0.05 dummy grid because it is closest to 4 km
  • GRID - Create
35.  For INTERPOLATION METHOD just pick NEAREST NEIGHBOR for now.  You can experiment later.

Then click OK.

36.  This new object appears in the frame_grid_liberia system.
37.  You should immediately rename it, as you see here to correspond to these actual details:
  • 0.05 DEGREE not 4 KM


38.  And you can use ADD TO MAP to see the grid and verify that it's a subset just for Liberia.
39.  Go ahead and resample the other 3 grids and rename them properly, as you see here.
40.  Just to see what they look like, here they are on a tiled map group.  They're shown here with an 11-color, Saga default palette, with a value range of 23-33 degrees, roughly picked by visual inspection.
41.  Now, you might want to save the current shape(s) or grid(s) to make sure you don't lose anything in case of problems later on.  Just name them with the above filenames (or equally descriptive ones), and use a logical folder location (such as PRODUCTS > SAGA > GRIDS > COLORWEB).

The exercises, notes and graphics in this website are copyrighted, and may not be copied or abstracted in any way, without my explicit permission (in writing).  Making one copy for your personal use is allowed.  If you see any of these materials copied into any other website than MARINEDATALITERACY.ORG then they have been illegally pirated by others.  Please report any such instances of copyright infringement to me. Murray Brown m.brown.nsb <at>