{"id":64759,"date":"2025-05-12T15:34:37","date_gmt":"2025-05-12T15:34:37","guid":{"rendered":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/?p=64759"},"modified":"2025-05-12T15:58:28","modified_gmt":"2025-05-12T15:58:28","slug":"using-polar2grid-and-direct-broadcast-files-to-create-imagery","status":"publish","type":"post","link":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/archives\/64759","title":{"rendered":"Using Polar2grid and Direct Broadcast files to create imagery"},"content":{"rendered":"\n<p>It was another clear night over the Great Lakes on 12 May 2025 and <a href=\"https:\/\/www.ssec.wisc.edu\/datacenter\/polar_orbit_tracks\/data\/JPSS-1\/2025\/2025_05_12_132\/NA.gif\">NOAA-20 had a descending orbit<\/a> over western lower Michigan around 0740 UTC that allowed a view of all <span style=\"text-decoration: underline;\">five<\/span> Great Lakes. <a href=\"https:\/\/cimss.ssec.wisc.edu\/cspp\/\">CSPP software<\/a> running at CIMSS produces both SDR (Sensor Data Record) and EDR (Environmental Data Record) files that can be then manipulated by <a href=\"https:\/\/www.ssec.wisc.edu\/software\/polar2grid\/\">polar2grid<\/a> to create imagery. There are sites where imagery is routinely available. The image below, for example, shows NOAA-20 ACSPO SSTs from the <a href=\"http:\/\/erb-dbps.ssec.wisc.edu\/browser\/MADISON\/\">CIMSS DBPS website<\/a>, as discussed <a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/archives\/64191\">here<\/a>, but that Madison-centered image does not include Lake Ontario, and the colorbar used is a little too warm for mid-May!  (Note:  <a href=\"https:\/\/realearth.ssec.wisc.edu\/?products=j01-viirs-dynamic-dnb-msn-daily.100,j01-viirs-sst-msn-daily.100&amp;center=39.958175094600094,-61.30645751953126&amp;zoom=8&amp;width=1487&amp;height=1175&amp;basemap=bw&amp;labels=line&amp;view=leaflet&amp;collection=VIIRS%20Direct%20Broadcast&amp;timeproduct=j01-viirs-dynamic-dnb-msn-daily&amp;timespan=-6t&amp;animationspeed=50\">RealEarth also used the data<\/a>)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_MADISON.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_MADISON.png\" alt=\"\" class=\"wp-image-64760\" srcset=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_MADISON.png 1024w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_MADISON-300x300.png 300w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_MADISON-150x150.png 150w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_MADISON-768x768.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">ACSPO SSTs centered from the CIMSS DBPS website, 0733 UTC on 12 May 2025 (Click to enlarge)<\/figcaption><\/figure>\n\n\n\n<p>The direct broadcast website (<a href=\"https:\/\/ftp.ssec.wisc.edu\/pub\/eosdb\/\">https:\/\/ftp.ssec.wisc.edu\/pub\/eosdb\/<\/a>) does include an image of the entire Great Lakes produced by NOAA-20 data (<a href=\"https:\/\/bin.ssec.wisc.edu\/pub\/eosdb\/j01\/viirs\/2025_05_12_132_0733\/images\/noaa20_viirs_sst_20250512_073317_GreatLakes.png\">at this ephemeral url<\/a>).  Again, the colorbar is a little too warm.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_GreatLakes-scaled.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"685\" src=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_GreatLakes-1024x685.png\" alt=\"\" class=\"wp-image-64761\" srcset=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_GreatLakes-1024x685.png 1024w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_GreatLakes-300x201.png 300w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_GreatLakes-768x514.png 768w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_GreatLakes-1536x1027.png 1536w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/noaa20_viirs_sst_20250512_073317_GreatLakes-2048x1370.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">ACSPO SSTs over the Great Lakes, 0737 UTC on 12 May 2025 (Click to enlarge)<\/figcaption><\/figure>\n\n\n\n<p>The data to create (using polar2grid) more customized imagery is available at the CIMSS ftp site mentioned above. ACSPO SSTs can be created using an EDR file (that is, the file <code>20250512073000-CSPP-L2P_GHRSST-SSTsubskin-VIIRS_N20-ACSPO_V2.80-v02.0-fv01.0.nc<\/code> shown in <a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/FileListForACSPOSSTs_EDR_0733_12May2025.png\">this file list<\/a> at <a href=\"https:\/\/ftp.ssec.wisc.edu\/eosdb\/j01\/viirs\/2025_05_12_132_0733\/edr\/\">https:\/\/ftp.ssec.wisc.edu\/eosdb\/j01\/viirs\/2025_05_12_132_0733\/edr\/<\/a>.  I then followed the directions in the polar2grid documentation <a href=\"https:\/\/www.ssec.wisc.edu\/software\/polar2grid\/examples\/acspo_example.html\">here<\/a> to produce a Lake Surface Temperature scaled from 273.15 K &#8211; 293.15 K.  The commands I used are listed below.  Note that &#8216;p2g_sst_palette.txt&#8217; is pre-loaded within the polar2grid directories.  The &#8216;rescale.yaml&#8217; file is something I created following the <a href=\"https:\/\/www.ssec.wisc.edu\/software\/polar2grid\/examples\/acspo_example.html\">documentation<\/a>.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>..\/p2g_grid_helper.sh greatlakes -83.5 45.1 750 -750 1800 1200 &gt; GreatLakes.yaml\n..\/polar2grid.sh -r acspo -w geotiff -p sst -g greatlakes --grid-configs .\/GreatLakes.yaml --extra-config-path .\/rescale.yaml -f \/pathToVIIRS_SSTfile\/20250512073000-CSPP-L2P_GHRSST-SSTsubskin-VIIRS_N20-ACSPO_V2.80-v02.0-fv01.0.nc\n..\/add_colormap.sh ..\/..\/colormaps\/p2g_sst_palette.txt noaa20_viirs_sst_20250512_073317_greatlakes.tif\n..\/add_coastlines.sh --add-coastlines --coastlines-resolution f --add-colorbar --colorbar-height 42 --colorbar-text-size 24  --colorbar-min 0.0 --colorbar-max 20.0 noaa20_viirs_sst_20250512_073317_greatlakes.tif\n<\/code><\/pre>\n\n\n\n<p>The SST image created with the commands above has no value &#8212; is transparent &#8212; where there is no water.  Let&#8217;s put the SSTs on top of Day Night Band imagery, and for that I needed SDR files that can be found at <a href=\"https:\/\/ftp.ssec.wisc.edu\/eosdb\/j01\/viirs\/2025_05_12_132_0733\/sdr\/\">https:\/\/ftp.ssec.wisc.edu\/eosdb\/j01\/viirs\/2025_05_12_132_0733\/sdr\/<\/a> ; I downloaded all the SVDNB files (containing the data) and the GDNB0 files (containing georeferencing) to an otherwise empty directory, and created the the DNB imagery.  Of the three varieties of Day Night Band imagery created (hncc, dynamic and adaptive), I decided for this day that adaptive looked the most acceptable.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>..\/p2g_grid_helper.sh greatlakes -83.5 45.1 750 -750 1800 1200 &gt; GreatLakes.yaml\n..\/polar2grid.sh -r viirs_sdr -w geotiff -p hncc_dnb dynamic_dnb adaptive_dnb -g greatlakes --grid-configs .\/GreatLakes.yaml -f \/pathToFiles\/DNB\/*\n..\/add_coastlines.sh --add-coastlines --coastlines-resolution f *dnb*.tif<\/code><\/pre>\n\n\n\n<p>I then used ImageMagick, shown below, to combine the two images.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>convert -composite -gravity center noaa20_viirs_adaptive_dnb_20250512_073317_greatlakes.png noaa20_viirs_sst_20250512_073317_greatlakes.png NOAA20_VIIRS_DNB_ACSPO_SST_20250512_0733UTC.png<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/NOAA20_VIIRS_DNB_ACSPO_SST_20250512_0733UTC.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/NOAA20_VIIRS_DNB_ACSPO_SST_20250512_0733UTC-1024x683.png\" alt=\"\" class=\"wp-image-64763\" srcset=\"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/NOAA20_VIIRS_DNB_ACSPO_SST_20250512_0733UTC-1024x683.png 1024w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/NOAA20_VIIRS_DNB_ACSPO_SST_20250512_0733UTC-300x200.png 300w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/NOAA20_VIIRS_DNB_ACSPO_SST_20250512_0733UTC-768x512.png 768w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/NOAA20_VIIRS_DNB_ACSPO_SST_20250512_0733UTC-1536x1024.png 1536w, https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-content\/uploads\/sites\/5\/2025\/05\/NOAA20_VIIRS_DNB_ACSPO_SST_20250512_0733UTC.png 1800w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">NOAA-20 ACSPO SSTs over Day Night Band imagery, 0733 UTC on 12 May 2025 (Click to enlarge)<\/figcaption><\/figure>\n\n\n\n<p>Western Lake Erie, as is typical, has the warmest waters &#8212; almost 60<sup>o<\/sup> F!  Saginaw and Green Bays also have relatively warm water.  In contrast, Lake Superior and much of Lakes Huron and Ontario remain very cold &#8212; 40<sup>o<\/sup> F or cooler.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It was another clear night over the Great Lakes on 12 May 2025 and NOAA-20 had a descending orbit over western lower Michigan around 0740 UTC that allowed a view of all five Great Lakes. CSPP software running at CIMSS produces both SDR (Sensor Data Record) and EDR (Environmental Data Record) files that can be [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":64763,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[78,109,39],"tags":[],"class_list":["post-64759","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-noaa-20","category-software","category-training"],"acf":[],"_links":{"self":[{"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/posts\/64759","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=64759"}],"version-history":[{"count":2,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/posts\/64759\/revisions"}],"predecessor-version":[{"id":64765,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/posts\/64759\/revisions\/64765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/media\/64763"}],"wp:attachment":[{"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/media?parent=64759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/categories?post=64759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cimss.ssec.wisc.edu\/satellite-blog\/wp-json\/wp\/v2\/tags?post=64759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}