# netcdf4-node

> Read hdf5、netCDF4 files base on netCDF4-python.

Latest version **1.11.0** (published 2019-07-09) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install netcdf4-node
pnpm add netcdf4-node
yarn add netcdf4-node
bun add netcdf4-node
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.11.0 |
| Published | 2019-07-09 |
| First published | 2019-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 21.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | weixiuyong |
| Maintainers | weixiuyong |
| Keywords | netCDF4, netCDF4-node, netCDF4-python, hdf4 |

## Links

- npm: https://www.npmjs.com/package/netcdf4-node
- npm.io page: https://npm.io/package/netcdf4-node

## Dependencies (2)

- [ndarray](https://npm.io/package/ndarray.md) ^1.0.18
- [python-runtime](https://npm.io/package/python-runtime.md) ^1.0.0

## Recent versions

- 1.11.0 (latest) — 2019-07-09
- 1.10.0 — 2019-05-29
- 1.0.9 — 2019-05-29
- 1.0.8 — 2019-05-29
- 1.0.7 — 2019-05-29
- 1.0.6 — 2019-05-29
- 1.0.5 — 2019-05-29
- 1.0.4 — 2019-05-04
- 1.0.3 — 2019-05-04
- 1.0.2 — 2019-05-03
- 1.0.1 — 2019-05-03
- 1.0.0 — 2019-05-03

## README

# Read hdf5、netCDF4 files base on netCDF4-python
[中文说明](readmeCn.md)
## Install
* nodejs
* python 2.7 or later
* [netCDF4-python](http://unidata.github.io/netcdf4-python/netCDF4/index.html)  
* [HDF4](http://www.hdfgroup.org/products/hdf4),if you want to be able to read HDF4 "Scientific Dataset" (SD) files.
## example
javascript:
``` javascript

(async function () {
    var netCDF4 = require('./index')
    var path = require('path')
    var ds = new netCDF4.Dataset()
    var ncOrHdf5FileName = path.join(__dirname, 'sampleData/FY4A-_AGRI--_N_REGC_1047E_L2-_CTT-_MULT_NOM_20190210073834_20190210074250_4000M_V0001.NC')
    await ds.readFile(ncOrHdf5FileName).catch((err) => {
        console.error(err)
        throw err
    })
    var subDatasets = ds.subDatasets();
    var variable = await ds.readVariable(subDatasets[0]);
    console.log(variable) 
    console.log(variable.get(0, 10)) 
    console.log(variable.minMax); //variable.attributes['valid_range'] 
    ds.close();//Close dataset，exit python process，delete temporary  files
})()
```
print：
``` json 
Variable {name: "CTT", attributes: Object, dataType: "float32", shape: Array(2), data: Float32Array(3044784), …}
index.js:29
65535
index.js:30
Array(2) [180, 311.4605712890625]
```

---
_Source: https://npm.io/package/netcdf4-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
