Saturday, September 19, 2015

Work around for issues with the Climatic Water Deficit Toolbox yearly normals



I've encountered some issues with the yearly normals toolset in the Climatic Water Deficit.tbx. It worked well for us a year and half ago when we did the analysis for the Dilts et al. 2015. Journal of Biogeography. doi:10.1111/jbi.12561. Since then, however, I've been encountering issues when helping others. I think that it has a lot to do with the fact that there is a lot of arcgisscripting module (.gp) in that tool instead of arcpy. I've got plans to convert the whole thing to arcpy.

In the mean time, what I'm recommending is that you use the time series toolset and trick the tool into thinking that it is processing a time series. This approach has worked really well in a number of cases. Here is how you can accomplish this:

1. Change your predictor variables from prcp_01.img to prcp_2000_01.img for all months for all three PRISM variable types (tmax, tmin, precip).
2. Make a copy of the rasters so that you also have a prcp_2001_01.img.
3. Run the all-in-one model or each step separately in the time series toolset of the Climatic Water Deficit.
4. Once the tool is done running delete all variables that have 2000 in the name. This first year is a dummy year in which soil water is set to 0 in January.
5. Rename your files from prcp_2001_01.img back to prcp_01.img so that you don't get confused and think that they correspond to a specific year.

I hate workarounds, but this has worked out really well for me.  It should do the trick until I finish recoding the yearly normals toolset.