NOTE: This is a workflow discussion using proprietary software (Esri ArcGIS Desktop and Global Mapper) to run raster calculations. There are other tools to do this job (even free), most notably in the OpenSource Quantum GIS (QGIS) Package.
I’ve been working with a client to generate visuals of historical precipitation data, in order to help visualize patterns of change over the last 30 years, and help with future projections. We started out with the Oregon State PRISM datasets (from the PRISM Climate Group) and wanted to generate winter precipitation maps in order to begin looking at 30-year averages.
In figuring out a workflow, we ran into the first hurdle which is the PRISM data is available as either 30-year average precipitation (Annual) or 30-year average precipitation (by Month). Since we only want to visualize the winter month precipitation, we could not use the Annual data and simply overlay it on a map. We had some work to do in order to prepare the data using the monthly data – which would require us to run raster calculations (Addition) in order to total up the values for winter months only.
I’ve been using Esri ArcGIS since 2001 and also spend a significant amount of time in Global Mapper and QGIS for my daily GIS workflow needs. Because of this, when I am working with rasters, many times I don’t need to invest in Esri’s additional (expensive) Analysis Extensions, when I can usually get the same analysis output with my simple Esri ArcView license and a copy of Global Mapper together, for a much lower cost. For this particular workflow, I am using Esri 9.3.1 View license with no extensions, and Global Mapper 14.2.
The task at hand is to take the 30-year average (by month) datasets from PRISM and generate a visual for winter precipitation – winter months only. This requires downloading the 1971-2000 Monthly Average (800m) data for the months of Oct/Nov/Dec/Jan/Feb/Mar/Apr/May. Once these are downloaded and unzipped to their native ASCII GRID formats, the next step is to generate a final output grid which contains precip totals over the winter months. This is where using both Global Mapper and Esri tools come in handy, for my particular workflow.
First I loaded all of the winter month ASC GRIDS into Global Mapper and displayed them accordingly. The intention is to add the precipitation values from October to November, and then add those with December, January, February and so on…
In Esri, you can easily do this IF you have the Spatial Analyst or 3D Analyst tools e nabled. I do not have those extensions purchased, so I am using Global Mapper for this particular workflow. In Global Mapper, I click the “Analysis” menu and then click the dropdown “Compare/Combine Terrain Layers…”
This particular tool will allow me to add the values from one grid to another. In this case, the grids are the same resolution, geography and format, so this should be a simple operation. In the dialog box, I make sure to name the first combined grid “CombinedGrid1″ or something like that. Next, I choose “Addition” as the operation to perform (which adds the value from Grid 1 (October) to Grid 2 (November) and generates an output grid with the total for each grid cell.
Then I go back in and choose the same tool again: Analysis > Compare/Combine Terrain Layers… and then add my newly-generated output grid (CombinedGrid1) to Grid #3 (December). TIP: Make sure you choose the dropdown for Operation Type to be “ADDITION” again, because of you just whiz right through the dialog, it will automatically default to “Subtraction” which is the opposite of what we want to do (for this workflow).
Cycling through this Global Mapper stage of the workflow, adding each winter month to the previous total, I finally get my resulting output grid: The addition of precipitation values for the winter months of October-May in one final grid.
In Global Mapper, this resulting final grid is stored temporarily, so we need to take it and export to a “real” GRID format to move into the next step. To do this, Click on your final output (temporary) grid and then go to File > Export > Export Elevation Grid Format.
In this case, since I am going to bring the resulting output grid into Esri, I am choosing “Arc ASCII GRID as the format. I click OK, and then save my grid in my local workspace accordingly.
Now, In Esri desktop I load the ASCII GRID and open ArcToolbox. My next step is to convert this ASCII GRID to an Integer Grid so that I can generate a final output of a shapefile, with the “VALUE” field being my total winter month precipitation number.
So, in ArcToolbox (View License or higher), I expand the “Conversion Tools” and choose “To Raster > ASCII to RASTER”. I enter my input grid and the output name (saving as an Esri GRID at this point) and generate. Now I am ready to convert this grid to a shapefile, which will have an individual polygon for each grid cell, carrying the VALUE field which is my totaled average precipitation for the winter months during the 30 years of 1971-2000.
To do this, I once again go back to ArcToolbox > Conversion Tools. This time, I expand the FROM Raster toolset and choose “Raster to Polygon” I choose my output Esri GRID from the step above and name my output shapefile accordingly. In order to maintain the exact grid cell dimensions from my grid, I make sure to UNCHECK “Simplify Polygons” in the output polygon shapefile. I run the tool and my final shapefile output is ready for mapping and visuals.
Note: It’s always a good idea to run some random spot checks to make sure the final output is as expected – which means the raster-calculations (Addition) for each month carried through as expected. To do this, I load the individual month grids plus the final output shapefile in Esri desktop, then use the Identify tool. The check I use is to identify the VALUE for all of the grid layers over specific grid cell, and then add them up using a calculator. They should match the GRIDCODE attribute contained in the final output shapefile, for that specific polygon/grid cell. If not, you have to go back and either start over, or review your interim grids created by Global Mapper to see where the issue may lie.
The resulting grid.
I hope this workflow helps you, especially if you don’t have Esri’s 3D or Spatial Analyst extensions, but still need to run raster calculations (Addition, Subtraction, Multiplication etc).
Brett J Marraccini, GISP