Animating NetCDF Data in ArcMap

Tim Whiteaker, CRWR

 


Table of Contents

 


Introduction

NetCDF

NetCDF is a data format and library designed to store multidimensional arrays of scientific data, and is widely used in the atmospheric sciences and oceanography.  Unidata, a largely NSF funded program under the University Corporation for Atmospheric Research (UCAR), is the “home” of netCDF and provides the following definition:

 

NetCDF (network Common Data Form) is an interface for array-oriented data access and a library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data.  <http://www.unidata.ucar.edu/software/netcdf/>

 

NetCDF in ArcGIS 9.2

ArcGIS version 9.2 introduces support for working with netCDF files.  With the new Multidimension Tools toolbox, you can create raster layers, feature layers, and table views from netCDF data in ArcMap, or convert feature, raster, and table data to netCDF. 

 

The Multidimension Tools toolbox is new for ArcGIS 9.2

 

Also new in ArcGIS 9.2 is the Animation toolbar and Animation Manager, which supports the animation of data through space and time. 

 

This document walks you through the procedure for downloading and animating netCDF data in ArcMap.  The exercise uses precipitation model forecasts from NCEP’s North American Mesoscale model. 

Computer and Data Requirements

To complete this exercise, your computer must have

  • ArcGIS 9.2 software
  • Internet connection

 

An ArcMap document (netCDF.mxd) and basemap data (Continents.shp) have been prepared for you.  This data may be downloaded here: NetCDF.zip.

 

 

This zip file also includes the netCDF file (NAM_CONUS_12km_20060721_1200.grib2.nc) shown in the screenshots in this exercise.  In the exercise, you will download your own netCDF file.  However, NAM_CONUS_12km_20060721_1200.grib2.nc is provided for reference, and may come in handy if the netCDF server used in the exercise is down.

 


Downloading NAM NetCDF Data

The National Centers for Environmental Prediction (NCEP) produce the North American Mesoscale model (also known as the North American Model or NAM), which predicts climate variables up to 84 hours into the future.  The model is run every six hours, with a catalog of results published at:

 

http://motherlode.ucar.edu:8080/thredds/idd/nam_model.html

 

Note: The 8080 server is meant for a modest academic community.  If you want to use it more often than just trying it out, contact support-thredds@unidata.ucar.edu and let them know who you are and what your planned use is.

 

In this portion of the exercise, you will download a netCDF file of total precipitation data (in millimeters) from the NAM model at 12 km resolution. 

 

Note:  If you do not have a high speed Internet connection, or if the netCDF server is down, you may skip to the Adding NetCDF Data to ArcMap section of the exercise and use the NAM_CONUS_12km_20060721_1200.grib2.nc file that was included in the zip file for this exercise. 

 

  1. Open a web browser (e.g., Mozilla Firefox, Internet Explorer, etc.).
  2. Browse to http://motherlode.ucar.edu:8080/thredds/idd/nam_model.html.
  3. Click CONUS_12_km to view the catalog for the continental US at 12 km resolution.

 

 

  1. Click the link for the most recent grib2 file.  Note:  Because the model is updated every 6 hours, the most recent file that you download (and your subsequent data) will be different from that shown in the screenshots below.

 

 

  1. Click the link in the Access section after NetcdfServer. 

 

 

NetcdfServer provides a user interface for extracting a portion of a grib2 dataset.  You will use NetcdfServer to download total precipitation data from within the dataset.

 

  1. Scroll to the bottom of the page and check Total_precipitation.

 

 

For the bounding box and forecast hours, you will accept the defaults in order to download data for the entire prediction time range and the entire model area.

 

  1. Scroll back up and click Submit. 

 

 

  1. After a few moments, you will be prompted to save the resulting netCDF file to your computer.  Click Save and save the file to your computer.

 

 

You have now downloaded predicted precipitation data from NCEP’s NAM model in netCDF format.  Next, you will add the data to ArcMap as a raster layer.

 


Adding NetCDF Data to ArcMap

With the Multidimension Tools, you can visualize netCDF data as a feature layer, raster layer, or table view in ArcMap.  In this portion of the exercise, you will add the precipitation data to ArcMap as a netCDF raster layer.

 

  1. Open netCDF.mxd.  You will see an outline of continents.

 

 

  1. If you can’t see ArcToolbox, click the Show/Hide ArcToolbox Window button.

 

 

  1. In ArcToolbox, expand the Multidimension Tools toolbox.
  2. Double click the Make NetCDF Raster Layer tool to run the tool.

 

 

  1. Input the path to the netCDF file that you downloaded.  Make sure Total_precipitation is listed as the Variable, x is listed as the X Dimension, and y is listed as the Y Dimension.

 

 

  1. Click OK to create the layer.  The map now shows a raster layer of precipitation in millimeters.  By default, data the first time stamp in the netCDF is displayed. 

 

 

Next, you will use the Animation Manager to animate the precipitation data through each time step.

 


Animating the Precipitation Data

The Animation Manager in ArcGIS 9.2 is a powerful utility with features for creating various types of animations in ArcMap.  More information and tutorials about animating in ArcMap can be found in the ArcGIS Desktop Help in the Mapping and Visualization heading.

 

 

In this portion of the exercise, you will use the Animation Manager to animate the netCDF precipitation raster through time.  The first step is to create a new animation track and keyframes.

 

  1. If you can’t see the Animation toolbar, click View, then point to Toolbars, then click Animation.
  2. In the Animation toolbar, click the Animation menu, and then click Create Keyframe…

 

 

In the Create Animation Keyframe window that opens, you will create a new track for your animation, and create the start and end keyframes within the track.  These are the minimal keyframes required for an animation.

 

  1. For Type, select Time Layer.
  2. For Source object, select Total_precipitation_Layer (or whatever you netCDF raster layer is called).
  3. Click New to create a new destination track for your keyframe.
  4. Input start as the Keyframe name, and click Create.  This creates a new keyframe, which you see in the Animation Manager later on.

 

 

  1. Input end as the Keyframe name, replacing “start”.  Then click Create.

 

 

  1. Click Close.

 

The next step is to use the Animation Manager to calculate the time stamps for the start and end keyframes, and specify the duration of each frame.

 

  1. Click the Animation menu, and then click Animation Manager…

 

 

  1. In the Animation Manager, click the Tracks tab.
  2. Select the track that you just created, and then click Properties…

 

 

  1. Click the Time Track Properties tab.  Here you will specify the field that represents time, and calculate the times for the start and end keyframes.
  2. Select time1 as the Start Time field. 

 

 

There is no need to specify an End Time field, because our data occur at regular steps.  You would specify the End Time field for data with irregular time steps.  See the ArcGIS help for more information.

 

  1. Click Calculate Times.
  2. Make sure Show time in the display is checked.  This will add a text label to the display to show the current timestamp for the data.
  3. Click OK.
  4. In the Animation Manager, click the Keyframes tab.  You will see the start and end keyframes that you created earlier.
  5. Change the Interval to 3, and the Units to Hours.  The precipitation data that you downloaded uses three hour time steps.

 

 

  1. Click Close.

 

Now you’re ready to animate the data.

 

  1. On the Animation toolbar, click the Open Animation Controls button.

 

 

  1. On the Animation Controls toolbar, click the Play button.

 

 

The display will animate the precipitation data through time.  A text label shows the current time stamp for the data, and the progress bar at the bottom of the ArcMap display shows the total progress of the animation.

 

 

Congratulations!  You have downloaded precipitation data in netCDF format, added the data to ArcMap as a raster layer, and animated the data through time.  Be sure to peruse the NCEP catalog for more information about available datasets, and check out the ArcGIS Help for more information about customizing animations in ArcMap.

 


Primary Contact:

Tim Whiteaker
University of Texas at Austin

e-mail: twhit@mail.utexas.edu
Phone: (512) 471-0570


These materials may be used for study, research, and education, but please credit the authors and the Center for Research in Water Resources, The University of Texas at Austin. All commercial rights reserved. Copyright 2006 Center for Research in Water Resources.