ArcGIS Pro

How to manipulate Pacific centric NetCDF data as a Voxel Layer

ArcGIS Pro enables users to create high performance voxel layers using NetCDF data.  This blog describes how to use a publicly available toolkit to modify NetCDF data that is ‘Pacific centric,’ which is a common requirement for some users.

When working with NetCDF data, some data may be ‘Pacific centric’ with a longitude stretching from [0,360], instead of [-180,180]. Meaning, the Pacific Ocean is in the center of the map rather than the Atlantic Ocean.  Currently, ArcGIS Pro has no way of changing the longitude to be correct in this case, and instead the data must be manipulated to draw correctly.  If the longitude starts after 180 degrees, then 360 must be subtracted from all longitude values.  If the data longitude starts at a value less than 180 degrees, no changes should be made to the longitude values.

United States Voxel Layer Offset
Voxel layer of data covering the continental United States with an invalid longitude.

To determine more information about a NetCDF file, it is recommended to use a data viewer. One of my favorites is Panoply.  With Panoply examining the longitude array is as simple as loading the NetCDF, and double clicking the variable that is to be examined. In our example, our longitude values range from 230.1 to 304.9.  If your data were to cross the prime meridian, this method of data correction will not be enough.

Graph for longitude values
Graph for longitude values.

Using the open source NCO tools, the necessary changes can easily be made.  NCO tools, otherwise known as NetCDF Operator tools, are a collection of command line applications which can be used to analyze and manipulate NetCDF files.  NCO has been supported by volunteers and professionals, with external support from DOE, NASA, and NSF .  The ncap2 tool from NCO can be used for arithmetic operations on NetCDF variables.  In general, the command is

ncap2 -s “expression” input.nc output.nc

Therefore, the following will correct the example dataset

ncap2 -s “lon=lon-360” example.nc correctedExample.nc

The new NetCDF will now draw in the correct location in ArcGIS Pro.

Correct projection of the United States
Data covering the continental United States is projected correctly

For more information, please check out What is a voxel layer? in the help topics.

About the author

Richard is a Product Engineer (SDET) on the 3D Scene Layers Team at ESRI. In this role he works on multidimensional voxel and 3D object layers, as well as a maintainer for the ESRI I3S specification. Richard has a Bachelor of Science in Computer Science from California State University San Bernardino, and is currently enrolled at Georgia Institute of Technology for a Master of Science in Computer Science. Outside of work, Richard likes to indulge in video games, fiddle with the guitar, and go on hikes.

Connect:

Leave a Reply

Please Login to comment

Next Article

What’s new in ArcGIS for Office (July 2021)

Read this article