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.
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.
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.
For more information, please check out What is a voxel layer? in the help topics.