/Remote_sensing_CH4

Combining remote sensing products from Google Earth Engine with a methane emission model to characterize surface conditions of methane hotspots in wetlands.

Primary LanguageJupyter Notebook

Remote_sensing_CH4

Combining remote sensing products from Google Earth Engine with a methane emission model to characterize surface conditions of methane hotspots in wetlands.

This method relies on 2D spatial outputs from Camilo Rey-Sanchez's Footprint Aggregated Relative Flux Mapping model. Landsat 8 maps are then overlaid to analyze the correlation between satellite spatial indices (NDVI, NDWI, Brightness Temp) and methane emissions.

sector_plot.py is the principle script that runs the analysis.

Download the "sample" folder and run Sample_notebook.ipynb in Jupyter Notebooks to see how the script runs.

Important: you'll need a set of datafiles outputted from Camilo Rey-Sanchez's model (see "data" folder in the sample folder), and a Landsat 8 datafile (see bb1_spatial_indices_big.csv in my github releases) to run the code.

Scripts:

  1. sector_plot.py

    • sector_plot.py is the final python script that holds all sub-functions that work together to organize Landsat 8 and FARF data for the purposes of this analysis. Read comments for function input details. A broad overview:

      1. Reads Landsat 8 spatial index data exported as a .csv from Google Earth Engine.
      2. Grabs single Landsat date from full satellite image dataset that ranges from 03/2013 - 07/2020.
      3. Reads methane hotspot model data from Camilo Rey-Sanchez's model
      4. Uses Flux Footprint modelling (K&M) to mask out landsat data that's not within 80% of flux tower's footprint.
      5. Bins hotspot data into 30 sq.m cells to match Landsat 8's spatial resolution (Hotspot model has a much finer resolution than Landsat).
      6. We now have a preliminary pair of maps (one Landsat, one hotspot 2D model) to compare between. sector_plot.py does a preliminary correlation analysis to show the relationship between spatial indices (NDVI, NDWI, BT) and CH4 emissions
      7. To account for artifacts in hotspot model (hotspots cast "shadows" of higher emissions that trail out from the origin), both maps have their data binned into radial cells that expand out from the origin at an angle pi/4 (i.e. map is divided up like pizza slices).
      8. Final correlation analysis is done with these sectored maps to study the relationship between spatial indices and CH4 emissions.
    • Generates 4 figures: - fig: Discretized flux footprint map with bin sector overlay (after step e, and outlines from step g overlaid) - fig2: Correlation with sector-binned landsat vs. ffp (step h) - fig3: Flux footprint visualization (step e) - fig4: Unbinned spatial correlation landsat vs. ffp (step f)

    • Example of how to call script and show figures in Jupyter Notebooks: - from sector_plot import sector_plot - from IPython.display import display - fig,fig2,fig3,fig4 = sector_plot(20170728, 'june_aug2017.csv') - display(fig,fig2,fig3,fig4)

  2. get_spatial.py

    • get_spatial.py is a sub-function that gathers a single landsat image of a specified date. Outputs: 1) latitude, 2) longitude, 3) spatial index
  3. landsat_footprint.py

    • landsat_footprint.py holds 2 sub-functions: landsat_footprint, and ffp_matched_to_landsat
      • landsat_footprint: masks out all satellite data that falls outside of the flux footprint.

      • ffp_matched_to_landsat: bins hotspot model into 30 sq.m cells to match landsat spatial resolution

  4. lat_to_m.py and lon_to_m.py

    • lat_to_m and lon_to_m are sub-functions to turn latitude and longitude degrees into metres.
  5. v1_Landsat_Spatial.js

  6. Landsat_LST.js

    • Edited Javascript code (original from Sofia Ermida) that computes NDVI, NDWI, MNDWI, and BT

Matlab support scripts for Camilo Rey-Sanchez's methane hotspot model. Please contact Camilo Rey-Sanchez for details regarding his model.

  1. Output_as_csv.m

    • Saves model output as csv file under naming convention: "BB_fluxMap_x_" followed by time period (e.g. BB_fluxMap_ch4_june_aug2017.csv)
  2. Fast_camilo_plot.m

    • Script that initiates model parameters (i.e. save path, period start/end), runs the hotspot model, and runs the plotting script
    • Used to run multiple instances of Camilo's model with less set-up time in between.

Data:

  • Keep landsat data in same folder as python scripts, but hotspot files are in a sub-folder called "data".
  • Landsat 8 csv file was too big to upload to repository. Please download the file from my github releases to see a sample.
  • See sample folder: "Sample" for example of file setup.