200 likes | 240 Views
Preparation of input data and raster datasets. Christian Folberth Systems Analyses, Integrated Assessment and Modelling EAWAG, Swiss Federal Institute for Aquatic Sciences christian.folberth@eawag.ch. Datasets. Data type. Elevation [m] EPIC parameter Slope [m m -1 ] EPIC parameter
E N D
Preparation of input data and raster datasets Christian Folberth Systems Analyses, Integrated Assessment and Modelling EAWAG, Swiss Federal Institute for Aquatic Sciences christian.folberth@eawag.ch
Datasets Data type • Elevation [m] EPIC parameter • Slope [m m-1] EPIC parameter • Fertilizer [kg ha-1 ] EPIC parameter • Land use [Code: 1=rain-fed 2=irrigated] GEPIC parameter • Country or other area [Country/area codes] GEPIC parameter • Soil [Filename = <code>.sol] File • Climate [Filename = <code>.pcp, .tmx, …] File • Optional: Irrigation, … any variable can be implemented
Data types in simulation file Soil code Irrigation volume Elevation Climate code Latitude Longitude Slope Fertilizer
Datasets • Soil data (required) • Soil albedo • Soil hydrologic group • No. of layers after splitting • Depth of layers • Sand and silt content • pH • org. carbon • K and P contents • Electrical condition
Monthly climate files TEMP.PCP | TEMP.TMX | TEMP.TMN | TEMP.WTD Year Jan. Feb. March April May June July Aug. Sept. Oct. Nov. Dec.
Creating input rasters • Create the desired raster • Convert to data format „Long“ using the Hawth‘s Tools for Spatial Analysis
Creating a landuse raster • Load „mirca_04_30ir“ from the directory DVD:\Additional\HarvestedAreas\Harvested_Area_MIRCA2000_irrigated_2009 • Open the Raster calculator and type con([mirca_04_30ir] > 0, 2, 0) • Store the new raster layer as C:\Myproject\Data\LandUse\mirca_irr_30\mirc_ir_04_i 2 = irrigated | write 1 for rainfed areas
Creating a landuse raster • Load the stored raster layer C:\Myproject\Data\LandUse\mirca_irr_30\mirc_ir_04_i • Open the Hawth‘s Tools „Raster Tools“ „Raster Data Type Conversion“ • Choose „mirc_ir_04_i“ as an input • Choose output format „Grid“ and data type „Long“ • Store as C:\Myproject\Data\LandUse\mirca_irr_30\mirc_ir_04_30 • Delete „mirc_ir_04_i“ with ArcCatalog
Creating a landuse raster Let‘s do this
Creating an area raster • Load the district raster for Romania C:\Myproject\Data\Country\Romania\ro.shp • Use “Feature to Raster” with cell size 0.5 to convert to raster dataset • Add raster layer “blank” from DVD:\Additional\Blank • Use “Mosaic to new raster” to combine both • Safe the new raster as C:\Myproject\Data\Country\Romania\ro_30 • Convert to data type “Long” and store as C:\Myproject\Data\Country\Romania\ro_30_l
Creating an area raster • To use the new raster in GEPIC: • Recode the raster to values that are not used in the country_30_l raster (5 - 251) • Add the name(s) of the area(s) to the file „Country.txt“ in the main folder EPIC0509 • Add the name(s) and corresponding value(s) to the GEPIC code Open the ArcGIS VBA editor
Creating an area raster Open the code for „This document“ Scroll down to the subroutine WriteAll_Click() Go to the section „Country specific“ Add for each of your areas a line like If sCountry = “name" Then sCountry = “value“ • Save the GEPIC file with a new name • Do a test run with the new area
Always check raster extent !!! bad always put new raster on top of the blank