⚠️ Notice: This package is still under construction and not fully production ready yet. API changes may occur and some features might be incomplete.
This project provides JavaScript/TypeScript support for reading and processing OmFile format data efficiently. OmFile format is a scientific data format optimized for meteorological data from the Open-Meteo project.
The repository is structured into two separate packages:
- file-format-wasm: WebAssembly bindings for the OmFileFormat C library
- file-reader: JavaScript/TypeScript API for working with OmFile data
- Efficient reading of OmFile format data through WebAssembly
- Support for multiple data sources (local files, HTTP, S3)
- Browser and Node.js compatibility
- TypeScript support
- High-performance data access
npm install @openmeteo/file-reader
import { OmFileReader, FileBackend } from '@openmeteo/file-reader';
// Create a reader with a file backend
const backend = new FileBackend('/path/to/your/file.om');
const reader = new OmFileReader.create(backend);
// Get data from a variable
const data = await reader.readVariable('temperature');
console.log(data);
import { OmFileReader, S3Backend } from '@openmeteo/file-reader';
import { S3Client } from '@aws-sdk/client-s3';
// Create S3 client
const s3Client = new S3Client({ region: 'us-west-2' });
// Create backend
const backend = new S3Backend(
s3Client,
'your-bucket-name',
'path/to/your/file.om'
);
const reader = new OmFileReader.create(backend);
const data = await reader.readVariable('temperature');
- Node.js 16+
- Docker (for building the WebAssembly component)
# Clone the repository with submodules
git clone --recursive https://github.com/open-meteo/typescript-omfiles.git
# Install dependencies
npm install
# This will use docker emscripten/emsdk container
# to compile the C code to WASM
npm run build
# Run the tests
npm run test
Contributions are welcome! Please feel free to open an Issue or to submit a Pull Request.