This repository contains scripts and Jupyter notebooks utilized for data processing, analysis, and visualization in the SHIFT Dangermond Traits vs. PFT project. The repository is structured to help navigate through various phases of data manipulation, from raw data processing to detailed visualizations and analysis.
Scripts dedicated to initial data manipulation, including clipping and regridding operations. Essential for preparing the data for further analysis.
clip_dangermond.py: Clips data to a specified region.regrid_netcdf.py: Regrids data from one spatial resolution to another.clip_dangermond_updated.py: Updated version of the initial clipping script.regrid_script.py: Another script for regridding data with additional functionality.spatial_ref_dangermond.py: Sets spatial references for datasets.
Contains scripts that perform complex data analysis tasks, including statistical comparisons and trait extraction.
- Various
compare_*.pyscripts: Perform statistical comparisons across different data metrics like solar-induced fluorescence and plant functional traits. extract_*.pyscripts: Extract specific traits or variables from datasets.pft_trait_map_all.pyandpft_trait_map.py: Map and analyze plant functional traits.
Scripts for generating plots and visual representations of data.
plot_trait_pdf.py: Generates PDFs of plant traits plots.figure_2_schematic.py: Builds the complete Figure 2 CliMA Land workflow schematic — geographic trait/flux maps (graticule, scale bar, north arrow), the PFT reflectance spectrum, a LiDAR point-cloud icon, and the vector schematic — exported asfigures/figure2_schematic.pdf(vector) and.png(600 dpi).figure_4_seasonal_histograms.py: Builds the seasonal trait histograms, split by season into three legible sub-figures per the editor's request — Figure 4a (Early), 4b (Mid), 4c (Late), each a CHL/LMA/LWC row by PFT (figure4{a,b,c}.{png,pdf}). Kept as 4a/b/c for now so the downstream figure numbers are undisturbed; full renumbering to follow once Figures 5 and 6 are revised.figure_5_spatial_trait_maps_legible.py: Builds the spatial trait maps, split into two print-legible figures (editor item 9):figure5a_trait_vs_pft(Trait vs PFT, 2 columns × CHL/LMA/LWC rows with a shared per-row colorbar) andfigure5b_difference(the three Trait−PFT difference maps as a 1×3 row, each with its own colorbar and a Δ-distribution inset). Enlarged scale numbers, 2-tick lat/lon, two-line colorbar titles, panel letters outside the maps, and LWC as g/cm² (×10⁻³) to match Figure 4 and §3.2.
Figure outputs are written to figures/.
Julia language scripts for specific analytical tasks, providing efficient computation and processing capabilities.
- Scripts like
1_gpp.jlandshift_spectra.jl: Focus on gross primary productivity calculations and spectral data analysis.
Shell scripts to automate routine tasks such as data merging and regridding.
- Scripts such as
clip_bash.shandregrid_files.sh: Help in automating the workflow and data management.
Jupyter notebooks that provide interactive environments to explore and visualize data dynamically.
- Notebooks like
plot_hyperspectral_curves.ipynbandplt_chl_gifs.ipynb: Offer detailed and interactive visual analysis of the data.
Clone the repository and navigate to the desired directory to run specific scripts or notebooks:
git clone https://github.com/braghiere/shift_dangermond_trait.git
cd shift_dangermond_traitThe datasets used in this study are accessible at the Caltech Data Library under https://doi.org/10.22002/7xgrn-qtc49, including the SHIFT AVIRIS-NG dataset for the Dangermond Preserve at 30m resolution, which provides detailed spectral reflectance information across 399 wavelengths. This also includes TROPOMI sun-induced fluorescence data at 740 nm, CliMA Land model outputs of ecosystem fluxes, and trait variations for different plant functional types. These datasets cover the period from February to May 2022.
The Level 2A (L2A) unrectified surface reflectance images from NASA's Airborne Visible / Infrared Imaging Spectrometer-Next Generation (AVIRIS-NG) instrument, collected as part of the Surface Biology and Geology High-Frequency Time Series (SHIFT) campaign during February to May 2022, including reflected radiance at 5-nm intervals in the Visible to Shortwave Infrared (VSWIR) spectral range from 380-2510 nm, can be found at https://doi.org/10.3334/ORNLDAAC/2183 (Brodrick et al., 2023).
The California Multi-Source Vegetation Layer, specifically depicting Wildlife Habitat Relationship classes (WHRTYPE) (California Department of Forestry and Fire Protection, 2014), is available at https://gis.data.ca.gov/maps/CALFIRE-Forestry::california-vegetation-whrtype/about.
The CliMA Land model (the Emerald Julia package, version 0.3.0; adapted from CliMA Land) used to simulate surface hyperspectral reflectance and transmittance, energy, and carbon fluxes is archived at Zenodo under https://doi.org/10.5281/zenodo.21479295 and at https://github.com/braghiere/Land (release tag shift-dangermond-clima-land). The CliMA Land project is hosted at https://github.com/CliMA/Land.
The code used in the analysis presented in this paper is available at https://github.com/braghiere/shift_dangermond_trait/ (see REPRODUCE.md for environment and reproduction instructions).
Brodrick, P., R. Pavlick, M. Bernas, J.W. Chapman, R. Eckert, M. Helmlinger, M. Hess-Flores, L.M. Rios, F.D. Schneider, M.M. Smyth, M. Eastwood, R.O. Green, D.R. Thompson, K.D. Chadwick, & D.S. Schimel. (2023). SHIFT: AVIRIS-NG L2A Unrectified Reflectance. ORNL DAAC. https://doi.org/10.3334/ORNLDAAC/2183
Chadwick, K. D., Davis, F., Miner, K. R., Pavlick, R., Reynolds, M., Townsend, P. A., Brodrick, P. G., Ade, C., Allen, J., Anderegg, L., Angel, Y., Boving, I., Byrd, K. B., Campbell, P., Carberry, L., Cavanaugh, K. C., Cavanaugh, K. C., Easterday, K., Eckert, R., … Schimel, D. (2025). Unlocking Ecological Insights from Sub-Seasonal Visible-to-Shortwave Infrared Imaging Spectroscopy: The SHIFT Campaign. Ecosphere, 16(3), e70194. https://doi.org/10.1002/ecs2.70194
Queally, N., Davis, F. W., Chadwick, K. D., Ade, C., Anderegg, L., Angel, Y., Baker, B., Boving, I., Braghiere, R. K., Brodrick, P., Campbell, P., Cryer, J., Cushman, K. C., Dao, P. D., Dibartolo, A., Eckert, R., Grant, K., Heberlein, B., Johnson, M., … Schimel, D. S. (2024). SHIFT: Vegetation Plot Characterization, Santa Barbara County, CA, 2022. ORNL Distributed Active Archive Center. https://doi.org/10.3334/ORNLDAAC/2295
Nature Conservancy (2022). Lidar Survey of Dangermond Preserve, CA. OpenTopography. https://doi.org/10.5069/G9T43R8K