-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathssr_params.py
More file actions
executable file
·100 lines (88 loc) · 4.79 KB
/
ssr_params.py
File metadata and controls
executable file
·100 lines (88 loc) · 4.79 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env python
############################################################################
#
# MODULE: ssr_params.py
# AUTHOR: Collin Bode, UC Berkeley
#
# PURPOSE: Consolidate parameters for all SSR scripts.
#
# COPYRIGHT: (c) 2012 Collin Bode
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
# for details.
#
#############################################################################
# ----------------------------------------------------------------------------
# Run Parts? 0 = do not run, 1 = run (no overwrite), 2 = run (overwrite)
lidar_run = 2 # Imports point cloud as canopy and point density rasters
lpi_run = 0 # Creates Light Penetration Index (LPI) from point cloud
preprocessing_run = 0 # Creates slope, aspect, tree height, albedo rasters
rsun_run = 0 # Runs solar radiation model
algore_run = 0 # Algorithm combining all parts into the SSR
# ----------------------------------------------------------------------------
# GENERAL PARAMETERS
workspace = '/data/ssr_workspace' # Root directory for all outputs
location = 'angelo2014' # Project/location name
# Resolution
C = '2' # cell size in meters
bregion = 'default' # boundary region: b5k, b8k, b10k, default
# INPUT FILES
dem_path = '/data/source/DTM/angelo1m2014dem.tif' # bare-earth DTM in TIFF format
cansource = '' # Path to existing canopy raster (leave '' to auto-create)
# Study area coordinates (used for solar calculations)
latitude = 39.7392 # decimal degrees N
longitude = -123.6308 # decimal degrees W
timezone = 'America/Los_Angeles'
elevation_mean = 400.0 # mean site elevation in meters (for Ineichen model)
# ----------------------------------------------------------------------------
# MAP NAMES (used as output filenames without extension)
P = bregion + C + 'm' # Prefix for raster maps
dem = P + 'dem' # bare-earth dem
can = P + 'can' # canopy dem
sloped = P + 'demslope' # slope, bare-earth
slopec = P + 'canslope' # slope, canopy
aspectd = P + 'demaspect' # aspect, bare-earth
aspectc = P + 'canaspect' # aspect, canopy
vegheight = P + 'vegheight' # vegetation height
albedo = P + 'albedo' # albedo by vegtype
# ----------------------------------------------------------------------------
# SSR1: LIDAR IMPORT PARAMETERS
year = 'y14' # Year the LiDAR was flown
pdensitypref = 'pointdensity_c' + str(C) + year # prefix to point density rasters
inSuffix = 'xyz' # filename suffix to filter for
overlap = float(0) # tile overlap in meters
sep = ',' # separator in lidar files
LidarPoints = ['filtered', 'unfiltered'] # subdirectories under inPath
inPath = '/data/source/LiDAR/2014_EelBathymetry_LiDAR/Angelo/Tiles_ASCII_xyz/'
# ----------------------------------------------------------------------------
# SSR2: LPI PARAMETERS
boxsize = '17' # cell size of neighborhood box
lpipref = 'lpi_c' + C + year + 's' + boxsize # e.g. lpi_c2y14s17
# ----------------------------------------------------------------------------
# SSR3: HORIZON PARAMETERS
maxdistance = '10000' # maxdistance in meters
hstep = '1' # horizon step in degrees
dist = '0.5' # normal range 0.5-1.5
# ----------------------------------------------------------------------------
# SSR4: SOLAR MODEL PARAMETERS
linke_array = 'helios' # turbidity array option
tl = linke_array
start_day = 5 # First Julian Day calculated
week_step = 7 # run solar model once per week
timestep = 0.1 # decimal hour timestep (0.1 = 6 min)
calib = 'hd' # calibration code
# ----------------------------------------------------------------------------
# SSR5: ALGORE PARAMETERS
maxheight = '2' # Vegetation height threshold in meters
keeptemp = True # Keep intermediate files (False for production)
lpivsjune = False # Use June LPI only (analysis mode)
sky = 'cs' # cs = clear sky, rs = real sky
algore = 'gl' # Options: 'pl', 'nl', 'd', 'cl', 'cn', 'gn', 'gl'
# ----------------------------------------------------------------------------
# OUTPUT SUBDIRECTORIES (relative to workspace)
dir_lidar = 'lidar'
dir_lpi = 'lpi'
dir_sun = 'sun_' + bregion + '_' + calib
dir_ssr = 'ssr_' + bregion + '_' + algore
dir_temp = 'temp'
dir_logs = 'logs'