Skip past header information
USGS - science for a changing world
EPA Logo with link to EPA Home Page.  

U.S. Geological Survey Open-File Report 2010-1251

Moderate-Resolution Sea Surface Temperature Data for the Nearshore North Pacific


Scripts

Skip past contents information

Here a number of scripts are provided that were developed to process the SST data. The scripts are written in the Python Language. Python is a freely-available, open-source scripting language that is object oriented and is supported by ArcGIS as a framework for creating and executing Geoprocessor tasks. Python also runs as a stand-alone programming language. The scripts were built using Python release 2.5.1, which is included with ESRI's ArcGIS 9.3.1. ArcGIS 9.3.x also supports Python version 2.5.4, but does not support later Python versions. Python is downloadable from http://www.python.org/download/releases/2.5.4/.

The PythonWin development environment provides a Graphic User Interface (GUI) for the python scripting editor. PythonWin is located in the "Python for Windows extensions" bundle available at http://sourceforge.net/projects/pywin32/. To use the scripts provided, the user will need access to ArcGIS 9.x software and install the Marine Geospatial Ecology Tools (MGET). MGET is available at http://code.env.duke.edu/projects/mget. The first step involved in preparing HDF SDS files for conversion to ArcGIS GRID files (preceding use of the processing scripts) is a manual renaming of the files to conform to ArcGIS specifications; specifically, the rasters may have filenames no longer than 13 characters and must begin with a letter (they may not begin with a number or symbol). The original HDF filenames violate both of these rules. As file naming conventions are a personal preference, a name-converting script is not provided here. However, for clarity of the processing scripts provided, note that our file-naming convention is "sstallyyyymm.hdf" for SST rasters, and "qualyyyymm.hdf" for quality rasters (where y = year and m = month).

These scripts can be modified to the users' needs or run in sequence (as presented below) to obtain a similar dataset to those made available in this report. The point and polygon shapefile included in the data processing steps of the scripts are available for download in zipped form from the table below.

Python Scripts

Script Description File Type
SST_HDF2ArcRaster.py This script imports AVHRR Pathfinder SST data in HDF SDS format and converts them into georeferenced, scaled, SST rasters in ArcGIS GRID format with the help of the Marine Geospatial Ecology Tools (MGET). .py
Qual_HDF2ArcRaster.py This script imports AVHRR Pathfinder quality flag data in HDF SDS format and converts them into georeferenced, scaled, SST rasters in ArcGIS GRID format with the help of the Marine Geospatial Ecology Tools (MGET). .py
CreateBSST.py This script uses the SST and Qual ArcGIS grids constructed with the "SST_HDF2ArcRaster.py" and "Qual_HDF2ArcRaster.py" scripts to apply a quality constraint to the SST data. .py
NPac_ns_SST.py The purpose of this script is to clip the global SST grids to a nearshore region (20 km offshore) of the North Pacific Ocean. A clipping polygon shapefile, "lowres_TNP_coast_Buffer.shp" is provided below. .py
NPac_ns_SST_pts.py This script uses the nearshore grids created with the "NPac_ns_SST.py" script. It employs the ArcGIS Spatial Analyst extension, "Extract Values to Points" tool to extract SSTs from a nearshore SST raster underlying the 'TNP_pts.shp' point shapefile provided below that traces the perimeter of the Temperate Northern Pacific. .py

Shapefiles

Filename Description File Type File Size Metadata
lowres_TNP_coast_Buffer.zip Polygon shapefile used in the 'NPac_ns_SST.py' script to clip georeferenced global SST rasters to a nearshore (< 20 km from shoreline) North Pacific SST raster. ESRI shapefile (*.shp) 2.3 MB
TNP_pts.zip Point shapefile used in the 'NPac_ns_SST_pts.py' script to extract nearshore SST point values from nearshore raster grid cells. The attribute table for NPac_pts.shp also includes relational information to MEOW* ESRI shapefile (*.shp) 14.4 MB

*Marine Ecosystems of the World (Spalding and others, 2007)

Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://pubsdata.usgs.gov/pubs/of/2010/1251/scripts.html
Page Contact Information: GS Pubs Web Contact
Page Last Modified: Wednesday, 07-Dec-2016 23:21:54 EST