Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fireatlas_nrt
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gcorradini
fireatlas_nrt
Commits
47d6b444
Commit
47d6b444
authored
3 years ago
by
screbec
Browse files
Options
Downloads
Patches
Plain Diff
clean & add region
parent
3d45615b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FireConsts.py
+20
-41
20 additions, 41 deletions
FireConsts.py
with
20 additions
and
41 deletions
FireConsts.py
+
20
−
41
View file @
47d6b444
"""
FireConsts
This is the module containing all constants used in this project
Also used for run control: which region is being used?
"""
# region
region
=
''
# project directories
#import os
dirhome
=
'
D:/fire_atlas
'
# home directory
dirpjcode
=
dirhome
+
'
/1_code/
'
# project code directory
dirpjdata
=
dirhome
+
'
/2_pipeline/
'
# output data directory
dirextdata
=
dirhome
+
'
/Data/
'
# exterior input data directory
dirhome
=
'
D:/fire_atlas
'
# home directory
dirpjcode
=
dirhome
+
'
/1_code/
'
# project code directory
dirextdata
=
dirhome
+
'
/Data/
'
# input data directory
dirNOAA20
=
'
D:/shared_data/VIIRS_375m_NOAA20/monthly
'
mcd64dir
=
dirextdata
+
'
burned_grid/
'
lakedir
=
'
D:/fire_atlas/Data/GlobalSurfaceWater/vector/
'
lakedir
=
dirextdata
+
'
GlobalSurfaceWater/vector/
'
if
region
:
# output data directory
dirpjdata
=
dirhome
+
'
/2_pipeline/
'
+
region
+
'
/
'
else
:
dirpjdata
=
dirhome
+
'
/2_pipeline/
'
dir_temp
=
dirpjdata
+
'
temp/
'
# directory for temporary file
# extents of test regions
ext_SL
=
[
-
119
,
60
,
-
110
,
64
]
# test area for slave lake 2014
ext_NT
=
[
-
136
,
60
,
-
102
,
79
]
# Northwest territories
ext_AKsmall
=
[
-
156
,
65.5
,
-
152
,
66.3
]
# small test area for AK 2015
ext_AK
=
[
-
168
,
51
,
-
140
,
72
]
# all of AK
ext_NY
=
[
147
,
65
,
154
,
70
]
# test area for Northern Yakutia 2020
ext_YAK
=
[
106
,
55
,
163
,
72
]
# test area for yakutia 2020
ext_ssib
=
[
89
,
48
,
132.1
,
67
]
# test area southern siberia 2018 reference data
ext_all
=
{
'
AK2015
'
:
ext_AKsmall
,
'
AK
'
:
ext_AK
,
'
SL2014
'
:
ext_SL
,
'
NT
'
:
ext_NT
,
'
NY2020
'
:
ext_NY
,
'
YAK
'
:
ext_YAK
,
'
Sib2018
'
:
ext_ssib
}
# shapefiles for regional clipping
shp_all
=
{
'
AK
'
:
dirextdata
+
'
shapefiles/Alaska.gpkg
'
,
'
NT
'
:
dirextdata
+
'
shapefiles/nwt.gpkg
'
,
'
CA
'
:
dirextdata
+
'
shapefiles/canada.gpkg
'
,
'
YAK
'
:
dirextdata
+
'
shapefiles/yakutia.gpkg
'
,
'
RU
'
:
dirextdata
+
'
shapefiles/russia.gpkg
'
,
'
full
'
:
dirextdata
+
'
shapefiles/wwf_borealarctic_diss_1deg.gpkg
'
}
if
region
:
shp_fnm
=
shp_all
[
region
]
else
:
shp_fnm
=
shp_all
[
'
full
'
]
# parameters used for fire pixel clustering
EARTH_RADIUS_KM
=
6371.0
# earth radius, km
SPATIAL_THRESHOLD_KM
=
1
# threshold of spatial distance (between pixels, km) used to do fire initial clustering
#MAX_THRESH_CENT_KM = 50 # threshold of spatial distance (between clusters centroid, km) used to filter nearby clusters
# fire type and visualization parameters
lc_dict
=
{
# dictionary for simplifying ESA CCI land cover types
...
...
@@ -104,27 +107,3 @@ dd = {'fireid':'int', # id
'
lake_border
'
:
'
float
'
,
# fire perimeter length that ends at lake
'
lake_border_tot
'
:
'
float
'
}
# dd = {'fid':'int', # id
# 'clat':'float', # centroid latitude -> centroid[0]
# 'clon':'float', # centroid longitude -> centroid[1]
# 'ftype':'int', # fire type
# 'isactive':'int', # active status
# 'invalid':'int', # invalid status
# 'n_pixels':'int', # number of total pixels
# 'n_newpixels':'int', # number of new pixels
# 'farea':'float', # fire size
# 'fperim':'float', # fire perimeter length
# 'flinelen':'float', # active fire front line length
# 'duration':'float', # fire duration
# 'pixden':'float', # fire pixel density
# 'meanFRP':'float', # mean FRP of the new fire pixels
# 'tst_year':'int', # t_st[0]
# 'tst_month':'int',
# 'tst_day':'int',
# 'tst_ampm':'str',
# 'ted_year':'int', # t_ed[0]
# 'ted_month':'int',
# 'ted_day':'int',
# 'ted_ampm':'str',
# }
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment