Newer
Older
This is the module containing all constants used in this project as well as the
running controls
import os
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
projnm = "FEDStest" # project name
dirhome = os.environ.get("HOME") # get system home directory
dirdata = './' # project directory -- only used For logging location
# run at MacBook
# dirdata = os.path.join(dirhome,'GoogleDrive','My','My.Research','UCI','ProjectData','CAFEDS','v2.0')
dirextdata = 's3://maap-ops-workspace/shared/gsfc_landslides/FEDSinput/' # exterior input data directory
dirtmpdata = 's3://maap-ops-workspace/shared/gsfc_landslides/FEDStemp-s3-conus/' # temporary data directory
diroutdata = 's3://maap-ops-workspace/shared/gsfc_landslides/FEDSoutput-s3-conus/' # output data directory
# lakedir = 'D:/fire_atlas/Data/GlobalSurfaceWater/vector/'
# ------------------------------------------------------------------------------
# spatiotemporal constraints of fire objects
# ------------------------------------------------------------------------------
# spatial parameters used for fire pixel clustering
# temporal parameters for fire object definition
maxoffdays = 5 # fire becomes inactive after this number of consecutive days without active fire detection
limoffdays = 20 # fire keeps sleeper status even at inactive but with inactive dates smaller than this value
expand_only = (
False # if set to true, only expand existing fires (no new fire objects created)
)
# ------------------------------------------------------------------------------
# shape parameters
# ------------------------------------------------------------------------------
VIIRSbuf = 187.5 # fire perimeter buffer (deg), corresponding to 375m/2 at lat=30
fpbuffer = 200 # buffer use to determine fire line pixels (deg), ~200m
flbuffer = (
500 # buffer for fire line pixels (radius) to intersect fire perimeter (deg), ~500m
)
extbuffer = 1000 # buffer to define interior/exterior region, 1000 m
area_VI = 0.141 # km2, area of each 375m VIIRS pixel
MCD64buf = 231.7 # MODIS fire perimeter buffer (deg), corresponding to 463.31271653 m/2
firesrc = "VIIRS" # source - ['SNPP', 'NOAA20', 'VIIRS', 'BAMOD']:
firenrt = True # NRT - True, False
# ------------------------------------------------------------------------------
# fire type related parameters
# ------------------------------------------------------------------------------
# fire type options
# 1: use CA type classifications
# 2: proposed global fire types
CONT_opt = 1 # 0: preset continuity threshold for all fires;
# 1: use CA type classifications dependent values
# 2: use global fire types and size dependent values
FTYP_preset = [2, "Forest"] # the default ftype
CONT_preset = 1 # km, default continuity threshold
# For FTYP_opt = 1, use algorithm in CAFEDS
FTYP_CA = {
0: "Other",
1: "Urban",
2: "Forest wild",
3: "Forest manage",
4: "Shrub wild",
5: "Shrub manage",
6: "Agriculture",
} # fire type names
0: "grey",
1: "rosybrown",
2: "darkolivegreen",
3: "olive",
4: "saddlebrown",
5: "sandybrown",
6: "darkviolet",
} # colors used for each fire type
0: 1,
1: 1,
2: 2.5,
3: 5,
4: 5,
5: 5,
6: 1,
} # preset fire type dependent CONNECTIVITY_THRESHOLD_KM
# For FTYP_opt = 2, use algorithm proposed for global study
FTYP_Glb = {
0: "Other",
1: "Temp Forest",
2: "Trop Forest",
3: "Bore Forest",
4: "Savana",
5: "Agriculture",
6: "Deforestation",
} # fire type names
# ------------------------------------------------------------------------------
# other options
# ------------------------------------------------------------------------------
epsg = 9311 # epsg projection code ( 3571: North Pole LAEA; 32610: WGS 84 / UTM zone 10N; 9311: US National Atlas Equal Area)
remove_static_sources_bool = True # remove areas with known flaring/gas sources from region
remove_static_sources_sourcefile = "VIIRS_Global_flaring_d.7_slope_0.029353_2017_web_v1.csv"
remove_static_sources_buffer = 0.01 # Buffer around static source points. Units defined by epsg.
opt_rmstatfire = False # do the removal of small fires with high pixel density