Data acquisition and preprocessing for PRISMATIC
conda env create -f environment.yml
For MacOS M1/M2 users:
- It does not work with R arch arm64, so you will need to reinstall R arch x86_64, follow this guide here.
Library not loaded: /opt/X11/lib/libX11.6.dylib
: run this command:brew install xquartz --cask
- If you need to install
brew
, run this command:$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- If you need to install
GDAL, OSR:
- To import GDAL, use:
from osgeo import gdal, osr
Cannot install leafR:
- sudo aptitude install libgdal-dev
conf/paths/paths.yaml
: you may need to update the path.
data_raw_inv_path
: where to save processed data.data_raw_aop_path
: where to save raw NEON Airborne Observatory Platform (AOP) data.data_int_path
: where to save processed data.data_final_path
: where to save final-formatted data.
conf/sites/sites.yaml
: you may need to add other sites if you want to process those.
List of processes for each site: Workflow diagram of functions
download_lidar
: download lidar data from NEONdownload_veg_structure_data
: download vegetation data from NEONpreprocess_veg_structure_data
: process vegetation data and sampling effortdownload_polygons
: download polygons data from NEONpreprocess_polygons
: process polygons datanormalize_laz
: normalize laz filesclip_lidar_by_plots
: clip the laz/tif files given plots in processed vegetation structure and save to outputpreprocess_biomass
: process biomass and save to outputpreprocess_lad
: process Leaf Area Density and save to outputdownload_hyperspectral
: download imaging spectroscopy data from NEONprep_aop_imagery
: prepare NEON AOP imagery for plant functional type (PFT) classifiercreate_training_data
: generate training data for PFT classifiertrain_pft_classifier
: train PFT classifiergenerate_initial_conditions
: generate FATES initial conditions (cohort and patch files)
We generate FATES intital conditions in three types:
ic_type == field_inv_plots
: initialization from NEON forest inventory plotsic_type == rs_inv_plots
: initialization from remote sensing data over NEON forest inventory plotsic_type == rs_random_plots
: initialization from remote sensing data over plots randomly generated across entire NEON site
The final result is at data_final_path/site/year/ic_type
.
# run all sites with default params
python main.py
# force preprocess_biomass to rerun for all sites/years
python main.py sites.global_run_params.force_rerun.preprocess_biomass=True
# run only SJER
python main.py sites.global_run_params.run=SJER
# run SJER and SOAP
python main.py sites.global_run_params.run='[SJER, SOAP]'
# run only SJER, force to rerun preprocess_biomass on SJER
python main.py sites.global_run_params.run=SJER sites.SJER.2019.force_rerun.preprocess_biomass=True