Compare commits

..
5 Commits
Author SHA1 Message Date
Matt Walsh 86c2f9e8ee 2.6.4 2024-05-30 11:33:53 -05:00
Matt Walsh f881493aa4 update and test for node 20 2024-05-30 11:33:49 -05:00
Matt Walsh 5767f2a10e 2.6.3 2023-01-16 12:36:21 -06:00
Matt Walsh a718f5c3e3 correct tdwr gate size scaling 2023-01-16 12:36:09 -06:00
Matt Walsh 20c4552d0a add demo to readme 2023-01-04 22:35:15 -06:00
75 changed files with 1909 additions and 2128 deletions

No files matched your search

+3
View File
@@ -2,6 +2,9 @@
> A javascript implementation for plotting Nexrad Level II data parsed via [nexrad-level-2-data](https://github.com/netbymatt/nexrad-level-2-data/).
# Demo
A live demo showing the output of this library (via [nexrad-level-2-data](https://www.github.com/netbymatt/nexrad-level-2-data)) for select radar sites is available at https://nexrad-demo.netbymatt.com/
# Use
## Install
```bash
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -10,9 +10,9 @@ const { plot, writePngToFile } = require('../src');
// const files = glob.sync('./data/KLOT/381/*');
// const files = glob.sync('./data/KLOT/548/*');
// const files = glob.sync('./data/KLOT/940/*');
// const files = glob.sync('./data/KSRX/804/*');
// const files = glob.sync('./data/TORD/767/*');
const files = glob.sync('./data/KLOT/KLOT20210812_171451_V*'); // ref palette tuning
const files = glob.sync('./data/KSRX/804/*');
// const files = glob.sync('./data/TORD/168/*');
// const files = glob.sync('./data/KLOT/KLOT20210812_171451_V*'); // ref palette tuning
// const files = glob.sync('./data/KLOT/KLOT20210621_041151_V06'); // vel palette tuning
// const store each file's data
+1898 -2119
View File
File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "nexrad-level-2-plot",
"version": "2.6.2",
"version": "2.6.4",
"description": "Plotting library for nexrad-level-2-data",
"main": "src/index.js",
"scripts": {
@@ -24,14 +24,14 @@
},
"homepage": "https://github.com/netbymatt/nexrad-level-2-plot#readme",
"dependencies": {
"canvas": "^2.9.1",
"canvas": "^2.11.2",
"nexrad-level-2-data": "^2.3.5"
},
"devDependencies": {
"eslint": "^8.0.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.23.4",
"glob": "^7.1.7"
"glob": "^10.0.0"
},
"engines": {
"node": ">=13.0.0"
+2 -3
View File
@@ -76,11 +76,10 @@ const draw = (data, _options) => {
if (options.size < 1) throw new Error('Provide options.size > 0');
const scale = DEFAULT_OPTIONS.size / options.size;
// wsr88d uses a gate size of 0.25km, tdwr uses a gate size of 0.15km, although it is reported as 0.3km for processing reasons
// wsr88d uses a gate size of 0.25km, tdwr uses a gate size of 0.15km or 0.30km
// this calculation scales the plot accordingly to the nominal 0.25km so all generated plots are at the same scale
const rawGateSize = data?.data?.[options.elevation]?.[0]?.record?.reflect?.gate_size ?? 0.25;
const realGateSize = rawGateSize !== 0.3 ? rawGateSize : rawGateSize / 2;
const gateSizeScaling = 0.25 / realGateSize;
const gateSizeScaling = rawGateSize / 0.25;
// calculate crop, adjust if necessary
const cropTo = Math.min(options.size, options.cropTo);