2021-04-28 08:23:40 -05:00
2021-04-28 08:23:29 -05:00
2021-04-28 08:23:29 -05:00
2021-04-28 08:23:29 -05:00
2021-02-28 10:46:43 -06:00
2021-02-28 10:46:43 -06:00
2021-04-27 20:15:37 -05:00
2021-02-28 10:46:43 -06:00
2021-04-28 08:23:40 -05:00
2021-04-28 08:23:40 -05:00
2021-04-28 08:23:29 -05:00

nexrad-level-3-plot

A javascript implementation for plotting Nexrad Level III data parsed via nexrad-level-3-data.

Use

Install

npm -i nexrad-level-3-plot

Call

const fs = require('fs');
const { plot, writeToPngFile } = require('nexrad-level-3-plot');

// read a file
const file = fs.readFileSync('<path to data>');
// parse and plot
const level3Plot = plot(file);
// use bundled utility to write to disk
(async () => {
	await writePngToFile('<path to output>.png');
})();

Data

Level three data is available from NOAA free of charge. nexrad-level-3-data has additional details about these data sources.

Work in Progress

This package is currently incomplete. It will plot raster data created by the package mentioned above but there are several limitations that will be addressed in future releases.

  • Color scales do not dynamically change when needed such as with total precipitation products.
  • The size of the output image is hard coded to 1800x1800
  • Background color/transparency is hard coded
  • Only some products are supported

Supported Products

ID Code Description
78 N1P One-hour precipitation
80 NTP Storm total precipitation
170 DAA Digital One Hour Accumulation
172 DTA Digital Total Accumulation

Demos

Test code and data is provided in the ./demo folder. test.js can be used to test any one of the products by commenting/uncommenting the appropriate line in the file. All images will be output as PNG to ./output. A test-all.js is also provided to plot all of the products provided in the ./data/ folder.

Acknowledgements

The code for this project is based upon:

S
Description
No description provided
Readme MIT
724 KiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 100%