Skip to content
Snippets Groups Projects
Commit 5c2f071b authored by ranchodeluxe's avatar ranchodeluxe
Browse files

Merge branch 'primarykeyv2' into preprocess-db

parents 50925b3d a8072c21
Branches preprocess-db
No related tags found
3 merge requests!70Make it easier to use filepaths as inputs to pipelines,!67Back all `AllFires` and `Fire` objects with 2 dataframes,!61Additions: primary keys, speed ups (preprocessing and postprocessing), tests, scalene, reorg entire fireatlas
...@@ -153,7 +153,7 @@ remove_static_sources_bool = True # remove areas with known flaring/gas sources ...@@ -153,7 +153,7 @@ remove_static_sources_bool = True # remove areas with known flaring/gas sources
remove_static_sources_sourcefile = "VIIRS_Global_flaring_d.7_slope_0.029353_2017_web_v1.csv" 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. remove_static_sources_buffer = 0.01 # Buffer around static source points. Units defined by epsg.
opt_rmstatfire = True # do the removal of small fires with high pixel density opt_rmstatfire = False # do the removal of small fires with high pixel density
number_of_multi_proc_workers = 3 number_of_multi_proc_workers = 3
......
...@@ -276,7 +276,7 @@ def make_sf_nfplist(allfires, t, regnm, fids): ...@@ -276,7 +276,7 @@ def make_sf_nfplist(allfires, t, regnm, fids):
sfkeys = list(dd.keys()) sfkeys = list(dd.keys())
if t != allfires.t: if t != allfires.t:
allfires = FireIO.load_fobj(t, regnm, activeonly=True) allfires = FireIO.load_fobj(t, regnm, activeonly=False)
# record all nfps for all fires with fids to make nfplist at t # record all nfps for all fires with fids to make nfplist at t
gdf_1d = None gdf_1d = None
for fid in fids: for fid in fids:
...@@ -473,14 +473,14 @@ def save_sfts_all(queue: multiprocessing.Queue, t, regnm, layers=["perimeter", " ...@@ -473,14 +473,14 @@ def save_sfts_all(queue: multiprocessing.Queue, t, regnm, layers=["perimeter", "
tstart = time.time() tstart = time.time()
# read allfires object # read allfires object
logger.info(f'Load allfires..') logger.info(f'Load allfires..')
allfires = FireIO.load_fobj(t, regnm, activeonly=True) allfires = FireIO.load_fobj(t, regnm, activeonly=False)
t_pt = FireTime.t_nb(t, nb="previous") t_pt = FireTime.t_nb(t, nb="previous")
try: try:
# read allfires object at previous time step # read allfires object at previous time step
logger.info(f'Load allfires_pt...') logger.info(f'Load allfires_pt...')
allfires_pt = FireIO.load_fobj(t_pt, regnm, activeonly=True) allfires_pt = FireIO.load_fobj(t_pt, regnm, activeonly=False)
except: except:
allfires_pt = FireObj.Allfires(t_pt) allfires_pt = FireObj.Allfires(t_pt)
# find all large active fires and sleepers # find all large active fires and sleepers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment