Using NODD and Polar2Grid to create Day Night Band imagery anywhere
The NOAA Open Data Dissemination (NODD) resource (more information at this link) provides global data from JPSS. One source from which data are available is Amazon Web Services, with separate portals for Suomi NPP, for NOAA-20 and for NOAA-21. The data at those sites are arranged by times; step one for data acquisition/imagery creation will be: how do I find the time of the data that I want? Time-stamped polar orbit tracks for many satellites are available at the SSEC Polar Orbit Tracker. For this exercise, I’ve decided to plot imagery over Oman, using data from Suomi-NPP, from 11 July and 12 July 2023. These two orbital path plots are also shown below, side-by-side. Based on these plots, data 2215 to 2220 UTC on 11 July, and from 2156 to 2201 UTC on 12 July, are needed. As expected, the orbit on 12 July is a bit earlier, and a bit farther east, than the orbit on 11 July.
The front page of the Amazon Web Services data portal (url) is shown below. Various data sources are indicated, and the ones relevant for Day Night Band imagery, the Sensor Data Record (SDR) and the geolocation data, are highlighted. Clicking on those two links will lead you down through dates: first, the year (2023), then the month (07), then the days (11 and 12) of the month.
At the AWS website, the files highlighted below can be found within the VIIRS-DNB-SDR file structure highlighted above. The 4 files cover the time from 2156 UTC through 2201 UTC on 12 July. Four files covering the same time must also be retrieved from the VIIRS-DNB-GEO directories (so that Polar2Grid can georeference the imagery).
The 8 files, 4 SDR files, and 4 Geolocation files, were downloaded into a single directory ($POLAR2GRID_HOME/bin/Oman/12July/) and are shown below. Data for the first granule starts at 21:56:05.6 ; data for the last granule ends at 22:01:46.0. Compare these times to the predicted orbit path for 12 July.
GDNBO_npp_d20230712_t2156056_e2157298_b60659_c20230712231823180765_oeac_ops.h5
GDNBO_npp_d20230712_t2157310_e2158552_b60659_c20230712231840091446_oeac_ops.h5
GDNBO_npp_d20230712_t2158564_e2200206_b60659_c20230712231842198229_oeac_ops.h5
GDNBO_npp_d20230712_t2200218_e2201460_b60659_c20230712231840745234_oeac_ops.h5
SVDNB_npp_d20230712_t2156056_e2157298_b60659_c20230712231944635733_oeac_ops.h5
SVDNB_npp_d20230712_t2157310_e2158552_b60659_c20230712232005061889_oeac_ops.h5
SVDNB_npp_d20230712_t2158564_e2200206_b60659_c20230712232018004433_oeac_ops.h5
SVDNB_npp_d20230712_t2200218_e2201460_b60659_c20230712232018845500_oeac_ops.h5
What kind of products will Polar2Grid create given these input fields? The –list-products-all flag shows that, that is: $POLAR2GRID_HOME/bin/polar2grid.sh -r viirs_sdr -w geotiff --list-products-all -f $POLAR2GRID_HOME/bin/Oman/12July/*.h5
, which yields the list below.
adaptive_dnb
dnb_lunar_azimuth_angle
dnb_lunar_zenith_angle
dnb_sat_azimuth_angle
dnb_sat_zenith_angle
dnb_solar_azimuth_angle
dnb_solar_zenith_angle
dynamic_dnb
dynamic_dnb_saturation
histogram_dnb
hncc_dnb
Several different types of Day Night Band products are available; I chose dynamic_dnb because it looked best for this day, and command used was $POLAR2GRID_HOME/bin/polar2grid.sh -r viirs_sdr -w geotiff -p dynamic_dnb -f $POLAR2GRID_HOME/bin/Oman/12July/*.h5
; that yields a geotiff file; $POLAR2GRID_HOME/bin/add_coastlines.sh --add-coastlines --add-grid --grid-D 5.0 5.0 --grid-d 5.0 5.0 npp_viirs_dynamic_dnb_20230712_215731_wgs84_fit.tif
adds georeferencing — coastlines and latitude/longitude lines, and writes out a png file that is shown at the top of this blog post. A similar set of commands produced the image from 11 July 2023 over about the same region, shown below.
What if you want to see how things change in a region from one image to the next? That is complicated if you look at the native projections as shown above. However, Polar2Grid allows you to re-grid data onto a pre-defined grid that you can easily create with the a built-in script: $POLAR2GRID_HOME/bin/p2g_grid_helper.sh Oman 57.0 23.0 500.0 -500.0 1440 1020 > $POLAR2GRID_HOME/bin/Oman/Oman.yaml
; this command defines the ‘Oman’ grid, centered at 57oE, 23oN, with grid-spacing of 500 m in the west-east and north-south directions. The grid size is 1440×1020. The Polar2Grid calls to make the output, and to add coastlines and latitute/longitude grids are shown below. These scripts all sit within the $POLAR2GRID_HOME/bin directory.
$POLAR2GRID_HOME/bin/polar2grid.sh -r viirs_sdr -w geotiff -p dynamic_dnb -g Oman --grid-configs $POLAR2GRID_HOME/bin/Oman/Oman.yaml -f $POLAR2GRID_HOME/bin/Oman/11July/*.h5
$POLAR2GRID_HOME/bin/polar2grid.sh -r viirs_sdr -w geotiff -p dynamic_dnb -g Oman --grid-configs $POLAR2GRID_HOME/bin/Oman/Oman.yaml -f $POLAR2GRID_HOME/bin/Oman/12July/*.h5
$POLAR2GRID_HOME/bin/add_coastlines.sh --add-coastlines --add-grid --grid-D 5.0 5.0 --grid-d 5.0 5.0 --grid-text-size 20 npp_viirs_dynamic_dnb_20230711_221501_Oman.tif
$POLAR2GRID_HOME/bin/add_coastlines.sh --add-coastlines --add-grid --grid-D 5.0 5.0 --grid-d 5.0 5.0 --grid-text-size 20 npp_viirs_dynamic_dnb_20230712_215605_Oman.tif
I annotated the png files created by the two add_coastlines.sh invocations above, and the result is shown below in a toggle. The moon on these two days was not providing illumination, but clouds can still be viewed over the bright lights of Oman and the United Arab Emirates.