/* text_wcrit.aml /* Script for producing one VIC layer of Wcr (critical 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_wcrit 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 mo_wcr_cell -grid] &then kill mo_wcr_cell all relate restore relsoil.rel grid /* Mean wcr is computed for all 9 layers /* Since there isn't room on the drive to create all nine pixel-level /* grids simultaneously, try this approach: wcr_pix = mean ( mo_stext.txsoil1//wcr, mo_stext.txsoil2//wcr, ~ mo_stext.txsoil3//wcr, mo_stext.txsoil4//wcr, ~ mo_stext.txsoil5//wcr, mo_stext.txsoil6//wcr, ~ mo_stext.txsoil7//wcr, mo_stext.txsoil8//wcr, ~ mo_stext.txsoil9//wcr) kill wcr_9 all /* aggregate to 1/8 degree cell size wcr_cell = aggregate (wcr_pix, 15, mean, expand, data) kill wcr_pix all /* wcr_cell is the VIC Wcr grid which can be exported in ascii format. /* display result for debugging display 9999 mape wcr_cell grids wcr_cell