Skip to content

terraputix/omfiles-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omfiles-rs

codecov Test GitHub license

Rust reader and writer implementation for the om file format.

The file format is documented in the open-meteo/om-file-format repository.

Development

cargo test

Reading files

Assuming the file data.om directly contains a floating point array with 3 dimensions

use omfiles_rs::io::reader::OmFileReader;

let file = "data.om";
let reader = OmFileReader::from_file(file).expect(format!("Failed to open file: {}", file).as_str());
// read root variable into a (dynamical) 3D array
let data = reader.read::<f32>(&[50u64..51, 20..21, 10..200], None, None).expect("Failed to read data");

// Metadata information
let dimensions = reader.get_dimensions();
let chunk_size = reader.get_chunk_dimensions();
println!("Dimensions: {:?}", dimensions);
println!("Chunk size: {:?}", chunk_size);

Features

  • Read data from om v2 and v3 files
  • Write data to om v3 files
  • Integrates with the ndarray crate for data representation
  • Tested on Linux, MacOS and Windows in CI

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages