Using Polar2Grid software to create JPSS Imagery
Polar2Grid is Python-based software created at CIMSS/SSEC to process data from Polar Orbiting satellites into useful imagery (or into files that can be imported directly into the National Weather Service Advanced Weather Information Processing System (AWIPS) for display). (You can download it for a linux machine at this site.) This tutorial will describe where to find downloadable NOAA-20 (or Suomi-NPP) data, and how to create imagery. Thus, this blog post is similar to earlier blogs posts (here, and here) that described how to use Geo2Grid for Geostationary Satellites. Earlier blog posts showing Polar2Grid output are here and here.
There are data repositories associated with many direct broadcast antennas — but they are not always publically available. NOAA CLASS data is a reliable source for NOAA-20 and Suomi-NPP data. Typically data shows up there within six hours of its being sampled by the satellite. For a post-event analysis, this is a good data source. For near-real time investigation, it’s better to acquire data from a direct broadcast site. (Data from the Direct Broadcast antenna at CIMSS are available here.)
The first thing required at the NOAA CLASS site is to request the data that you want to access. There is a long drop-down menu (‘Please select a product to search’ is its original title) on the CLASS front page; use the drop down to select ‘JPSS Visible Infrared Imaging Radiometer Suite Sensor Data Record (VIIRS_SDR)’. This tells CLASS that you want VIIRS data from either Suomi NPP or NOAA-20. Click on the ‘Go’ button to the right of the menu bar. That takes you to a selection page.
It is necessary to log into the CLASS system. When you order data, an email is sent acknowledging the order, and a follow-on email once the data are available specifies how you can download it. The log-in tells CLASS where to send the emails.
Polar2Grid expects the data to be ‘de-aggregated’, so you must set User Preferences in NOAA CLASS to do this. Click on the ‘User Preferences’ link in the table on the left-hand side of the main NOAA CLASS Page (after you have logged in). The location is shown below in the toggle.
Once you have entered the User Preference page, make certain that the ‘Package Geolocation with JPSS Data Products’ button is toggled to ‘No’. (Shown here) You also do want to De-aggregate JPSS Data Products. (That is, separate files for each band). In practice, this blogger finds it easier (that is, Polar2Grid complains less) if I make separate data requests at CLASS for each VIIRS band I want to view. (Update: ‘JPSS Companion Files to deliver with data’ should also be blank, as as shown at the link. This allows for one data request.)
Data requests require you to know something about the orbits of the satellites — so you can narrow down the amount of data you want. This handy website shows where all polar orbiters have been flying. Follow the links to the specific satellite and location; for example, if we’re interested in NOAA-20 orbits over Hawai’i on April 8 2019, this map shows them. The map suggests requesting NOAA-20 from 23:20 to 23:30 on 8 April 2019 will give a good view of the islands.
The data we will request are I01, I03 and I05 (0.64 µm, 1.61 µm and 11.45 µm, respectively). In addition to requesting the Sensor Data Records, it is also necessary to request, near the bottom of the page, the ‘VIIRS Image Bands SDR Ellipsoid Terrain Corrected Geolocation (GITCO) (public)’. These geolocation files are used by Polar2Grid to navigate the imagery.
After submitting the data request, and waiting a period of time (sometimes as short as two or three minutes), you will receive an email telling you exactly where the data sits, and how to access it. It will look something like this. Download the data into a directory, and you’re ready to have Polar2Grid create imagery for you. The directory for I05 (I will put data for each band in a separate directory) should include files named like this:
GIMGO_j01_d20190408_t2320306_e2321551_b07188_c20190409223158545413_noac_ops.h5
GITCO_j01_d20190408_t2320306_e2321551_b07188_c20190409223155222712_noac_ops.h5
SVI03_j01_d20190408_t2320306_e2321551_b07188_c20190409223158545413_noac_ops.h5
‘GIMGO’ and ‘GITCO’ refer to geolocation data; even though you only requested GITCO fields, CLASS will give both. That’s okay. SVI01, SVI03 and SVI05 hold data from bands I01, I03 and I05, respectively. The ‘j01’ tag signifies data from NOAA-20, or JPSS-1. For the 20-minute request I made for each band, I received 8 of each type of file.
The Polar2Grid command that creates imagery is this one:
polar2grid.sh viirs_sdr gtiff -p i03 -f /home/scottl/Polar2Grid/data/viirs/I03/
The polar2grid.sh shell script is within the bin directory of the Polar2Grid software that emerges after you g-unzip and untar the file from the Polar2Grid download site. The command results in a .tif file with highest-resolution grey-scaled imagery. The image below (converted from .tif to .png) shows the scene. It’s quite large: 6876×7616 pixels!
It’s useful to add maps to the imagery, and that is done in Polar2Grid after the .tif file has been created by using ‘add_coastlines.sh’, also in the bin directory. The command can add coastlines (–add-coastlines), borders (–add-borders), rivers (–add-rivers) and lat/lon lines (–add-grid). Lat/Lon lines can also be labeled. When maps are added to the .tif file, the image is also saved as a .png file so the original scene is not overwritten. You can use the -o flag to rename the new file. The command I used is shown below.
add_coastlines.sh –add-coastlines j01_viirs_i03_20190408_231906_wgs84_fit.tif –coastlines-resolution=f –coastlines-level=6 –coastlines-outline=’magenta’ -o j01_I03_20190408_231906.png
After adding maps to all three files created, I used ImageMagick to crop the large fields to something more manageable in size (convert -crop 1520×900+2112+2409 +repage -quality 100 j01_I05_20190408_231906.png j01_I05_20190408_231906.gif, for example), and added annotation to the imagery:
convert -font helvetica -fill yellow -pointsize 36 -draw “text 70,70 ‘NOAA-20 VIIRS Image Band I01 (0.64 µm) 23:25 UTC 8 April 2019′” j01_I01_20190408_231906.gif j01_I01_20190408_231906.annot.gif
The animation at the top of this blog post shows all three images (I01, I03 and I05) sequentially.
Final note: Infrared imagery by default is not color-enhanced, and built-in enhancements are not (yet) available. Polar2Grid does support creation of colortables, however. That will be the subject of a future blog post.