{"id":37856,"date":"2020-08-05T13:27:34","date_gmt":"2020-08-05T13:27:34","guid":{"rendered":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/?p=37856"},"modified":"2020-08-05T17:49:07","modified_gmt":"2020-08-05T17:49:07","slug":"creating-sector-spanning-imagery-from-viirs-today-imagery","status":"publish","type":"post","link":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/archives\/37856","title":{"rendered":"Creating sector-spanning imagery from VIIRS today imagery"},"content":{"rendered":"<div id=\"attachment_37859\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20216.GreatLakes.143.1000m.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-37859\" class=\"wp-image-37859\" src=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20216.GreatLakes.143.1000m.jpg\" alt=\"\" width=\"625\" height=\"417\" srcset=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20216.GreatLakes.143.1000m.jpg 1649w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20216.GreatLakes.143.1000m-300x200.jpg 300w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20216.GreatLakes.143.1000m-1024x683.jpg 1024w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20216.GreatLakes.143.1000m-768x512.jpg 768w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20216.GreatLakes.143.1000m-1536x1025.jpg 1536w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><p id=\"caption-attachment-37859\" class=\"wp-caption-text\">NOAA-20 True-Color Imagery showing all five Great Lakes, 3 August 2020 (Click to enlarge)<\/p><\/div>\n<p><a href=\"https:\/\/ge.ssec.wisc.edu\/viirs-today\">VIIRS Today<\/a>, like <a href=\"https:\/\/ge.ssec.wisc.edu\/modis-today\">MODIS today<\/a>, subsects the US into 8 sectors of equal size. If you live in central South Carolina, or in the middle of Florida, for example, the <a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/Sector7TrueColor.png\">Sector 7<\/a>\/<a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/Sector8TrueColor.png\">Sector 8<\/a> seam is right on top of you. Perhaps you want to view the entire Great Lakes in one image, rather than a split between Sector 3 and Sector 4. (<a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/8SectorsOverUSA.png\">This image<\/a>, from <a href=\"https:\/\/lance-modis.eosdis.nasa.gov\/imagery\/subsets\/?area=na\">this website<\/a>, shows the 8 sectors over the United States).\u00a0 There are easy ways to create seam-spanning imagery.<\/p>\n<p>Because the sectors are of fixed and unchanging locations and sizes (1300&#215;1500 for 1-km resolution, 5200&#215;6000 for 250-m resolution), it&#8217;s a simple matter to create a script to access the imagery, cut parts out, and paste them back together. For this task, I use <a href=\"https:\/\/imagemagick.org\/index.php\">ImageMagick<\/a>, a useful, scriptable image manipulation package. The two grid sizes (<code>950x1100<\/code> for sector USA3, <code>700x1100<\/code> for sector USA4) and offsets (<code>+351+101<\/code> for sector USA3,<code>+0+101<\/code> for sector USA4) were determined by trial and error that took about 5 minutes.<\/p>\n<p>The first script below is for the 1-km resolution images. The second script below is for 250-m resolution images; it has a multiplication factor of 4 applied. These scripts are on a unix system, and it would be simple enough to put some date-enabling at the front end to make this useful in a cron. That exercise, as they say, is left to the reader.<\/p>\n<p><code>wget http:\/\/ge.ssec.wisc.edu\/viirs-today\/images\/noaa20\/true_color\/2020_08_03_216\/n2.20216.USA3.143.1000m.jpg<br \/>\nwget http:\/\/ge.ssec.wisc.edu\/viirs-today\/images\/noaa20\/true_color\/2020_08_03_216\/n2.20216.USA4.143.1000m.jpg<br \/>\nconvert -crop 950x1100+351+101 n2.20216.USA3.143.1000m.jpg test1_1000.jpg<br \/>\nconvert -crop 700x1100+0+101 n2.20216.USA4.143.1000m.jpg test2_1000.jpg<br \/>\nconvert test1_1000.jpg test2_1000.jpg +append n2.20216.GreatLakes.143.1000m.jpg<\/code><\/p>\n<p><code>wget http:\/\/ge.ssec.wisc.edu\/viirs-today\/images\/noaa20\/true_color\/2020_08_03_216\/n2.20216.USA3.143.250m.jpg<br \/>\nwget http:\/\/ge.ssec.wisc.edu\/viirs-today\/images\/noaa20\/true_color\/2020_08_03_216\/n2.20216.USA4.143.250m.jpg<br \/>\nconvert -crop 3800x4400+1401+401 n2.20216.USA3.143.250m.jpg test1_250.jpg<br \/>\nconvert -crop 2800x4400+0+401 n2.20216.USA4.143.250m.jpg test2_250.jpg<br \/>\nconvert test1_250.jpg test2_250.jpg +append n2.20216.GreatLakes.143.250m.jpg<\/code><\/p>\n<p>The 1-km resolution True-Color imagery from NOAA-20 (&#8216;n2&#8217; in the file name; &#8216;n1&#8217; is Suomi-NPP) for the Great Lakes on day 216 of the years 2020 (<em>i.e.<\/em>, 3 August 2016, represented as <code>20216<\/code> in the url) is shown above; it spans sectors <a href=\"http:\/\/ge-test.ssec.wisc.edu\/viirs-today\/images\/noaa20\/true_color\/2020_08_03_216\/n2.20216.USA3.143.2000m.jpg\">USA3<\/a> and <a href=\"http:\/\/ge-test.ssec.wisc.edu\/viirs-today\/images\/noaa20\/true_color\/2020_08_03_216\/n2.20216.USA4.143.1000m.jpg\">USA4<\/a>. The 250-m resolution image is <a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20216.GreatLakes.143.250m.jpg\">here<\/a>.<\/p>\n<hr \/>\n<p>From an email received from South Carolina:\u00a0\u00a0<code>Our area is always split between USA7 and USA8, making it hard to use the sectorized imagery.<\/code><\/p>\n<p>A script for that region, in this case for Day Night Band imagery, is below. This script accesses both Suomi-NPP and NOAA-20 data.<\/p>\n<p><code>wget http:\/\/ge.ssec.wisc.edu\/viirs-today\/images\/noaa20\/night_dynamic\/2020_08_05_218\/n2.20218.USA8.DNBD.1000m.jpg<br \/>\nwget http:\/\/ge.ssec.wisc.edu\/viirs-today\/images\/noaa20\/night_dynamic\/2020_08_05_218\/n2.20218.USA7.DNBD.1000m.jpg<br \/>\nconvert -crop 800x750+501+0  n2.20218.USA7.DNBD.1000m.jpg test1_1000.jpg<br \/>\nconvert -crop 800x750+0+0 n2.20218.USA8.DNBD.1000m.jpg test2_1000.jpg<br \/>\nconvert test1_1000.jpg test2_1000.jpg +append n2.20218.SOUTHCAROLINA.DNBD.1000m.jpg<br \/>\nwget http:\/\/ge.ssec.wisc.edu\/viirs-today\/images\/snpp\/night_dynamic\/2020_08_05_218\/n1.20218.USA8.DNBD.1000m.jpg<br \/>\nwget http:\/\/ge.ssec.wisc.edu\/viirs-today\/images\/snpp\/night_dynamic\/2020_08_05_218\/n1.20218.USA7.DNBD.1000m.jpg<br \/>\nconvert -crop 800x750+501+0  n1.20218.USA7.DNBD.1000m.jpg test1_1000.jpg<br \/>\nconvert -crop 800x750+0+0 n1.20218.USA8.DNBD.1000m.jpg test2_1000.jpg<br \/>\nconvert test1_1000.jpg test2_1000.jpg +append n1.20218.SOUTHCAROLINA.DNBD.1000m.jpg<\/code><\/p>\n<p>The Day Night Band Composite from NOAA-20 is shown below. Click <a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n1.20218.SOUTHCAROLINA.DNBD_.1000m.jpg\">here <\/a>to see the Suomi-NPP image.<\/p>\n<div id=\"attachment_37871\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20218.SOUTHCAROLINA.DNBD_.1000m.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-37871\" class=\"wp-image-37871\" src=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20218.SOUTHCAROLINA.DNBD_.1000m.jpg\" alt=\"\" width=\"625\" height=\"293\" srcset=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20218.SOUTHCAROLINA.DNBD_.1000m.jpg 1599w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20218.SOUTHCAROLINA.DNBD_.1000m-300x141.jpg 300w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20218.SOUTHCAROLINA.DNBD_.1000m-1024x480.jpg 1024w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20218.SOUTHCAROLINA.DNBD_.1000m-768x360.jpg 768w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2020\/08\/n2.20218.SOUTHCAROLINA.DNBD_.1000m-1536x720.jpg 1536w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><p id=\"caption-attachment-37871\" class=\"wp-caption-text\">NOAA-20 Day Night Band composite, 5 August 2020 (Click to enlarge)<\/p><\/div>\n<p>This technique would work with MODIS Today imagery as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VIIRS Today, like MODIS today, subsects the US into 8 sectors of equal size. If you live in central South Carolina, or in the middle of Florida, for example, the Sector 7\/Sector 8 seam is right on top of you. Perhaps you want to view the entire Great Lakes in one image, rather than a [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":37859,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[78,39],"tags":[],"class_list":["post-37856","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-noaa-20","category-training"],"acf":[],"_links":{"self":[{"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/posts\/37856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/comments?post=37856"}],"version-history":[{"count":11,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/posts\/37856\/revisions"}],"predecessor-version":[{"id":37876,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/posts\/37856\/revisions\/37876"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/media\/37859"}],"wp:attachment":[{"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/media?parent=37856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/categories?post=37856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/tags?post=37856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}