File: test_hdf4.py

package info (click to toggle)
kerchunk 0.2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 135,172 kB
  • sloc: python: 6,477; makefile: 39
file content (16 lines) | stat: -rw-r--r-- 348 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os.path

import zarr

import kerchunk.hdf4
from kerchunk.utils import refs_as_store


def test1():
    here = os.path.dirname(__file__)
    fn = os.path.join(here, "MOD14.hdf4")

    out = kerchunk.hdf4.HDF4ToZarr(fn).translate()
    store = refs_as_store(out)
    g = zarr.open(store, zarr_format=2)
    assert g["fire mask"][:].max() == 5