I have forty years of data in the form of one raster per day. I am hoping to aggregate these rasters so that I get one raster per month.
I would like to aggregate the files using their files names, which are in the form "TOMS_YEARmMONTHDAY_v8.HDF" (i.e. "TOMS_1976m0105_v8.HDF" for January 5, 1976).
USGS GeoData Portal
http://cida.usgs.gov/climate/gdp/
The USGS Geo Data Portal (GDP) project provides scientists and environmental resource managers access to downscaled climate projections and other data resources that are otherwise difficult to access and manipulate. This user interface demonstrates an example implementation of the GDP project web-service software and standards-based data integration strategy.
A user of the GDP interface can supply their area of interest as a pre-existing GIS shapefile with one to many unique polygons or by drawing a single polygon using an interactive web-map. A user can select from available GDP project web-service processing algorithms, which include raw data subsetting and area-weighted statistics summarization.
Processing algorithm options such as dataset component of interest, time period of interest and output file formatting must be specified. As the GDP project progresses, other processing algorithms and output formatting options will become available. Datasets available from the initial public release of the portal include historic weather and downscaled climate projections.
Thanks for the reply Curtis. I'm the GIS research specialist helping Amy with her model and suggested she look to the forum for more help. Unfortunately the constraints of academic based GIS research are such that "learning python" isn't really an option for most researchers, especially those with no prior programming background.
I've used iterators in model builder quite a bit but am not familiar with model variables (other than %name%). In your example ""TOMS_%year%m%month%*", where do the year and month model variables come from? Can we create a list for the years and add that as a variable to the model or do we need to run a search cursor to get all of the names first?
import arcpy arcpy.CheckOutExtension("spatial") arcpy.env.workspace = pathWhereMyRastersAre outWks = pathToWriteOutput for year in range(1976,1979): # 1976 through 1978 for month in range(13): # 1 to 12 # wildcard - "TOMS_1976m01*.HDF" (format month 1 -> "01") wild = "TOMS_{0}m{1:02d}*.HDF".format(year,month) rasList = arcpy.ListRasters(wild) # list all rasters for a month outRas = arcpy.sa.CellStatistics(rasList,"MEAN") # monthly mean outPath = outWks + "/" + "m{0}m{1:02d}".format(year,month) outRas.save(outPath)