1.11.0 • Published 5 years ago

netcdf4-node v1.11.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Read hdf5、netCDF4 files base on netCDF4-python

中文说明

Install

  • nodejs
  • python 2.7 or later
  • netCDF4-python
  • HDF4,if you want to be able to read HDF4 "Scientific Dataset" (SD) files.

example

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:

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]
1.11.0

5 years ago

1.10.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago