npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@azohra/meteo.grib

v0.1.4

Published

GRIB2 decoder in pure TypeScript: section parsing, multi-field messages, grid geometry with O(1) nearest-gridpoint lookup (regular, rotated, and Lambert conformal grids), simple and complex packing, JPEG 2000 via an injected decoder, and NOMADS .idx range

Downloads

2,844

Readme

@azohra/meteo.grib

A GRIB2 decoder in pure TypeScript, written because the forecast engine needs grid template 3.1 (rotated latitude-longitude: every ECCC HRDPS, RDPS, REPS, and RAQDPS field) and multi-field messages (NCEP's paired U/V submessages), and no maintained JavaScript decoder provides either. The browser-safe core carries no I/O; JPEG 2000 and the worker pool live in the Node-only @azohra/meteo.grib/j2k-node subpath.

pnpm add @azohra/meteo.grib

Decode a real field

This decodes a committed HRDPS 2 m temperature field (rotated grid, JPEG 2000 packing, the combination that motivated the package) and samples one launch:

// decode-fixture.mjs — run inside grib/ after `pnpm build`
import { readFileSync } from "node:fs";
import {
  decodeFieldValues,
  nearestGridpoint,
  parseFields,
  parseGrid,
  splitMessages,
} from "./dist/index.js";
import { createNodeJ2kDecoder } from "./dist/j2k-node.js";

const bytes = readFileSync("test/fixtures/hrdps-continental-tmp-2m.grib2");
const [field] = parseFields(splitMessages(bytes)[0]);
const grid = parseGrid(field.section3); // rotated lat-lon (GDT 3.1)
const decodeJ2k = await createNodeJ2kDecoder(); // every ECCC field is JPEG 2000
const { values } = decodeFieldValues(field, { decodeJ2k });
const site = nearestGridpoint(grid, 49.3634, -117.2361); // a launch near Nelson, BC
console.log(`${grid.kind} ${grid.ni}x${grid.nj} = ${values.length} points`);
console.log(site);
console.log(`2 m temperature: ${(values[site.index] - 273.15).toFixed(2)} C`);
rotated 2540x1290 = 3276600 points
{
  index: 879425,
  latitude: 49.3642714812993,
  longitude: -117.23441055371016,
  distanceKm: 0.1560769875776412
}
2 m temperature: 23.05 C

Every decode path is accepted bit-for-bit against ecCodes over the frozen twenty-message corpus in test/fixtures/; the gate's full story is at https://meteo.azohra.com/docs/grib/correctness/.

Documentation

The reference lives in docs/ (coverage, the ecCodes gate, and the JPEG 2000 codecs and worker pool each have a page) and is served at https://meteo.azohra.com/docs/grib/.

MIT © Justin Watts