Skip to content

Instantly share code, notes, and snippets.

@jdbcode
Last active July 21, 2021 15:45
Show Gist options
  • Save jdbcode/b14b2d4a1614afc50f5e57a33f127b08 to your computer and use it in GitHub Desktop.
Save jdbcode/b14b2d4a1614afc50f5e57a33f127b08 to your computer and use it in GitHub Desktop.
Earth Engine GOES Bootleg fire progression
/**
* This script generates a GOES animation of MCMIP overlayed with FDC to
* show fire progression.
*/
// #############################################################################
// ### INPUTS ###
// #############################################################################
// Area of interest.
var AOI = ee.Geometry.Polygon(
[[[-122.2703125, 44.70356633552686],
[-122.2703125, 42.053125287543644],
[-117.0408203125, 42.053125287543644],
[-117.0408203125, 44.70356633552686]]], null, false);
// Define the GOES MCMIP collection ID.
var COLLECTION = 'NOAA/GOES/17/MCMIPF';
// Animation start and end date time (UTC).
var START_TIME = '2021-07-06T20:00';
var END_TIME = '2021-07-21T20:00';
// Video parameters.
var MAX_VID_DIMENSION = 512; // Max dimension in pixels
var FRAMES_PER_SECOND = 12; // Playback speed
var VID_NAME = 'bootleg_fire'; // Task/file name
// #############################################################################
var goes = require('users/jstnbraaten/modules:ee-goes.js');
var col = goes.getMcmipCol(
COLLECTION, START_TIME, END_TIME, {filterHours: [13, 3]});
var visColFire = goes.visActiveFire(col, {resample: 'bicubic'});
// Test layout with GIF (comment/uncomment as needed).
// var gifParams = {
// dimensions: MAX_VID_DIMENSION,
// framesPerSecond: FRAMES_PER_SECOND
// };
// goes.showGif(visColFire.limit(50), AOI, gifParams);
// Run the MP4 export (comment/uncomment as needed).
var mp4Params = {
dimensions: MAX_VID_DIMENSION,
framesPerSecond: FRAMES_PER_SECOND,
description: VID_NAME,
fileNamePrefix: VID_NAME,
maxFrames: 5000
};
goes.exportMp4(visColFire, AOI, mp4Params);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment