-
Notifications
You must be signed in to change notification settings - Fork 1
/
SCPETMappingPythonScript.py
56 lines (43 loc) · 2.56 KB
/
SCPETMappingPythonScript.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# SCPETMappingPythonScript.py
# Created on: 2018-10-16 18:58:51.00000
# (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------
# Import arcpy module
import arcpy
# Local variables:
SC_NOAA_Weather_Stations = "SC NOAA Weather Stations"
Output_variance_of_prediction_raster = ""
Output_geostatistical_layer = ""
Idw_PT_SCPET_tif = "P:\\SCWRC2018\\Output\\Idw_PT_SCPET.tif"
South_Carolina = "South Carolina"
IDW_SC_PET_tif = "P:\\SCWRC2018\\Output\\IDW_SC_PET.tif"
Spline_PT_SCPET_tif = "P:\\SCWRC2018\\Output\\Spline_PT_SCPET.tif"
Spline_SC_PET_tif = "P:\\SCWRC2018\\Output\\Spline_SC_PET.tif"
Kriging_PT_SCPET_tif = "P:\\SCWRC2018\\Output\\Kriging_PT_SCPET.tif"
Kriging_SC_PET_tif = "P:\\SCWRC2018\\Output\\Kriging_SC_PET.tif"
Baye_PT_SCPET = "P:\\SCWRC2018\\Output\\Baye_PT_SCPET"
BayeKrig_SC_PET_tif = "P:\\SCWRC2018\\Output\\BayeKrig_SC_PET.tif"
# Set Geoprocessing environments
arcpy.env.scratchWorkspace = "P:\\SCWRC2018\\Output"
arcpy.env.snapRaster = ""
arcpy.env.extent = "-83.3506813397253 32.0681676250835 -78.5794511465637 35.2083497499111"
arcpy.env.workspace = "P:\\SCWRC2018"
# Process: Kriging
arcpy.gp.Kriging_sa(SC_NOAA_Weather_Stations, "P_T_PET__m", Kriging_PT_SCPET_tif, "Spherical 0.012561", "1.25607284993101E-02", "VARIABLE 12", Output_variance_of_prediction_raster)
# Process: Empirical Bayesian Kriging
arcpy.EmpiricalBayesianKriging_ga(SC_NOAA_Weather_Stations, "P_T_PET__m", Output_geostatistical_layer, Baye_PT_SCPET, "1.25607284993101E-02", "NONE", "100", "1", "100", "NBRTYPE=StandardCircular RADIUS=1.32098448136229 ANGLE=0 NBR_MAX=15 NBR_MIN=10 SECTOR_TYPE=ONE_SECTOR", "PREDICTION", "0.5", "EXCEED", "", "POWER")
# Process: IDW
arcpy.gp.Idw_sa(SC_NOAA_Weather_Stations, "P_T_PET__m", Idw_PT_SCPET_tif, "1.25607284993101E-02", "2", "VARIABLE 12", "")
# Process: Extract by Mask
arcpy.gp.ExtractByMask_sa(Idw_PT_SCPET_tif, South_Carolina, IDW_SC_PET_tif)
# Process: Spline
arcpy.gp.Spline_sa(SC_NOAA_Weather_Stations, "P_T_PET__m", Spline_PT_SCPET_tif, "1.25607284993101E-02", "REGULARIZED", "0.1", "12")
# Process: Extract by Mask (2)
arcpy.gp.ExtractByMask_sa(Spline_PT_SCPET_tif, South_Carolina, Spline_SC_PET_tif)
# Process: Extract by Mask (3)
arcpy.gp.ExtractByMask_sa(Kriging_PT_SCPET_tif, South_Carolina, Kriging_SC_PET_tif)
# Process: Extract by Mask (4)
arcpy.gp.ExtractByMask_sa(Baye_PT_SCPET, South_Carolina, BayeKrig_SC_PET_tif)