/* text_wiltp.aml /* Script for producing one VIC layer of Wp (wilting point water content) /* based on processed STATSGO soils data from Penn State. See text_ksat.aml /* for more explanation of methods and assumptions used. /* /* this is run with &run text_wiltp from the arc prompt. /* The required input files that must be in the active workspace are: /* mo_stext (this is the grid of soil texture layers clipped to basin) /* relate environment relsoil.rel must be available /* info file text_soil must be available /* /* First, remove old version of the output file &if [exists wp_cell -grid] &then kill wp_cell all relate restore relsoil.rel grid /* Mean wp is computed for all 9 layers /* Again, creating 9 individual grids uses too much disk space, so use /* one command wp_pix = mean ( mo_stext.txsoil1//wp, mo_stext.txsoil2//wp, ~ mo_stext.txsoil3//wp, mo_stext.txsoil4//wp, ~ mo_stext.txsoil5//wp, mo_stext.txsoil6//wp, ~ mo_stext.txsoil7//wp, mo_stext.txsoil8//wp, ~ mo_stext.txsoil9//wp ) /* aggregate to 1/8 degree cell size wp_cell = aggregate (wp_pix, 15, mean, expand, data) kill wp_pix all /* display result for debugging display 9999 mape wp_cell grids wp_cell