@earthyscience/netcdf4-wasm 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +151 -0
- package/LICENSE +1 -0
- package/README.md +65 -134
- package/dist/constants.d.ts +7 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +26 -3
- package/dist/constants.js.map +1 -1
- package/dist/group.d.ts +3 -1
- package/dist/group.d.ts.map +1 -1
- package/dist/group.js +45 -4
- package/dist/group.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/netcdf-getters.d.ts +87 -8
- package/dist/netcdf-getters.d.ts.map +1 -1
- package/dist/netcdf-getters.js +441 -104
- package/dist/netcdf-getters.js.map +1 -1
- package/dist/netcdf-worker.js +63 -68
- package/dist/netcdf-worker.js.map +1 -1
- package/dist/netcdf4-wasm.js +1 -1
- package/dist/netcdf4-wasm.wasm +0 -0
- package/dist/netcdf4.d.ts +139 -12
- package/dist/netcdf4.d.ts.map +1 -1
- package/dist/netcdf4.js +422 -36
- package/dist/netcdf4.js.map +1 -1
- package/dist/types.d.ts +106 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +1 -1
- package/dist/wasm-module.d.ts.map +1 -1
- package/dist/wasm-module.js +337 -5
- package/dist/wasm-module.js.map +1 -1
- package/package.json +19 -4
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Contributors Guide
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to `netcdf4-wasm`! We welcome everyone, whether you're new to open source, WebAssembly, TypeScript, or scientific computing, or an experienced developer. Every contribution, big or small, helps make this project better.
|
|
4
|
+
|
|
5
|
+
If you have questions, ideas, or just want to chat, please reach out to us anytime. We're happy to help and discuss anything related to `netcdf4-wasm`, NetCDF, or science in general.
|
|
6
|
+
|
|
7
|
+
## How You Can Contribute
|
|
8
|
+
|
|
9
|
+
* **Report bugs or suggest features:** [Open a GitHub issue](https://github.com/EarthyScience/netcdf4-wasm/issues/new/) to let us know about problems or ideas.
|
|
10
|
+
* **Start or join a discussion:** [Create a GitHub discussion](https://github.com/EarthyScience/netcdf4-wasm/discussions/new/choose) to ask questions, share experiences, or brainstorm.
|
|
11
|
+
* **Improve documentation:** Help us make our docs clearer and more helpful for everyone.
|
|
12
|
+
* **Write code:** Fix bugs, add features, or improve performance.
|
|
13
|
+
* **Add examples:** Create usage examples or tutorials showing how to use `netcdf4-wasm` in different scenarios.
|
|
14
|
+
|
|
15
|
+
### Tips for Creating Issues
|
|
16
|
+
|
|
17
|
+
The most helpful bug reports:
|
|
18
|
+
|
|
19
|
+
* Include a clear code snippet (not just a link) that shows the problem in the latest version of `netcdf4-wasm`. A ["minimal working example"](https://en.wikipedia.org/wiki/Minimal_working_example) is ideal.
|
|
20
|
+
* Paste the full error message you received, even if it's long.
|
|
21
|
+
* Use triple backticks (```` ``` ````) for code, and [markdown formatting](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) to keep things readable.
|
|
22
|
+
* Share your `netcdf4-wasm` version, Node.js/browser version, and details about your environment (OS, browser, etc.).
|
|
23
|
+
|
|
24
|
+
Discussions are great for questions about usage, implementation, WebAssembly compilation, NetCDF formats, or anything else.
|
|
25
|
+
|
|
26
|
+
## Development Setup
|
|
27
|
+
|
|
28
|
+
To start developing `netcdf4-wasm`:
|
|
29
|
+
|
|
30
|
+
1. [Fork the `netcdf4-wasm` repository](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks) and clone your fork
|
|
31
|
+
2. Navigate to the project directory
|
|
32
|
+
3. Install dependencies:
|
|
33
|
+
```bash
|
|
34
|
+
npm install
|
|
35
|
+
```
|
|
36
|
+
4. Check that you have all build dependencies:
|
|
37
|
+
```bash
|
|
38
|
+
npm run check-deps
|
|
39
|
+
```
|
|
40
|
+
5. If you need Emscripten for building WASM:
|
|
41
|
+
```bash
|
|
42
|
+
npm run install-emscripten
|
|
43
|
+
```
|
|
44
|
+
6. Build the project:
|
|
45
|
+
```bash
|
|
46
|
+
npm run build
|
|
47
|
+
```
|
|
48
|
+
7. Run tests to ensure everything works:
|
|
49
|
+
```bash
|
|
50
|
+
npm test
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Project Structure
|
|
54
|
+
|
|
55
|
+
Understanding the project structure will help you navigate the codebase:
|
|
56
|
+
```
|
|
57
|
+
netcdf4-wasm/
|
|
58
|
+
├── src/ # TypeScript source code
|
|
59
|
+
│ ├── __tests__/ # Test files
|
|
60
|
+
│ ├── constants.ts # NetCDF constants
|
|
61
|
+
│ ├── dimension.ts # Dimension class
|
|
62
|
+
│ ├── group.ts # Group class
|
|
63
|
+
│ ├── index.ts # Main API exports
|
|
64
|
+
│ ├── netcdf-getters.ts # Data getter utilities
|
|
65
|
+
│ ├── netcdf-worker.ts # Web Worker implementation
|
|
66
|
+
│ ├── netcdf4-wasm.d.ts # TypeScript declarations
|
|
67
|
+
│ ├── netcdf4.ts # Main NetCDF4 class
|
|
68
|
+
│ ├── test-setup.ts # Test configuration
|
|
69
|
+
│ ├── types.ts # Type definitions
|
|
70
|
+
│ ├── variable.ts # Variable class
|
|
71
|
+
│ └── wasm-module.ts # WASM module loader
|
|
72
|
+
├── scripts/ # Build scripts
|
|
73
|
+
│ ├── build-wasm.sh # Main WASM build script
|
|
74
|
+
│ ├── check-dependencies.sh
|
|
75
|
+
│ └── install-emscripten.sh
|
|
76
|
+
├── bindings/ # WASM bindings
|
|
77
|
+
│ ├── pre.js # Pre-run JavaScript
|
|
78
|
+
│ └── post.js # Post-run JavaScript
|
|
79
|
+
├── build/ # Build artifacts (generated)
|
|
80
|
+
├── dist/ # Distribution files (generated)
|
|
81
|
+
└── package.json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Making Your Contribution
|
|
85
|
+
|
|
86
|
+
1. [Fork the repository](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks), make your changes, and [open a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). We'll review and help you get it merged.
|
|
87
|
+
2. For small fixes (like typos), you can use the [GitHub editor](https://docs.github.com/en/github/managing-files-in-a-repository/managing-files-on-github/editing-files-in-your-repository) for a quick edit and pull request.
|
|
88
|
+
3. Please try to follow our code style and formatting conventions.
|
|
89
|
+
4. Always test your changes before submitting:
|
|
90
|
+
```bash
|
|
91
|
+
# Run all tests
|
|
92
|
+
npm test
|
|
93
|
+
|
|
94
|
+
# Run tests with coverage
|
|
95
|
+
npm run test:coverage
|
|
96
|
+
|
|
97
|
+
# Run tests in watch mode while developing
|
|
98
|
+
npm run test:watch
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Good First Steps
|
|
102
|
+
|
|
103
|
+
* Try out `netcdf4-wasm` using the examples in our documentation. If you hit any problems or have questions, please open an issue!
|
|
104
|
+
* Write an example or tutorial showing how to use `netcdf4-wasm` for reading/writing NetCDF files in the browser or Node.js.
|
|
105
|
+
* Suggest improvements to documentation or code comments.
|
|
106
|
+
* Work on issues labeled `good first issue` or `help wanted`.
|
|
107
|
+
* Improve TypeScript type definitions for better developer experience.
|
|
108
|
+
* Add or improve test coverage.
|
|
109
|
+
|
|
110
|
+
If you want to work on something, let us know by commenting on an issue or opening a new one. This helps us coordinate and support you.
|
|
111
|
+
|
|
112
|
+
## Useful Commands
|
|
113
|
+
|
|
114
|
+
Here are the main commands you'll use during development:
|
|
115
|
+
```bash
|
|
116
|
+
# Install dependencies
|
|
117
|
+
npm install
|
|
118
|
+
|
|
119
|
+
# Build the entire project (WASM + TypeScript)
|
|
120
|
+
npm run build
|
|
121
|
+
|
|
122
|
+
# Build only the WASM module
|
|
123
|
+
npm run build:wasm
|
|
124
|
+
|
|
125
|
+
# Build only TypeScript
|
|
126
|
+
npm run build:ts
|
|
127
|
+
|
|
128
|
+
# Clean build artifacts
|
|
129
|
+
npm run clean
|
|
130
|
+
|
|
131
|
+
# Run tests
|
|
132
|
+
npm test
|
|
133
|
+
|
|
134
|
+
# Run tests with coverage
|
|
135
|
+
npm run test:coverage
|
|
136
|
+
|
|
137
|
+
# Run tests in watch mode
|
|
138
|
+
npm run test:watch
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Code of Conduct
|
|
142
|
+
|
|
143
|
+
We are committed to providing a welcoming and inclusive environment. Please be respectful, kind, and constructive in all interactions. We do not tolerate harassment or discriminatory behavior of any kind.
|
|
144
|
+
|
|
145
|
+
## Getting Help
|
|
146
|
+
|
|
147
|
+
* **Questions about usage?** Open a [GitHub discussion](https://github.com/EarthyScience/netcdf4-wasm/discussions)
|
|
148
|
+
* **Found a bug?** Open an [issue](https://github.com/EarthyScience/netcdf4-wasm/issues)
|
|
149
|
+
* **Want to chat?** Reach out to the maintainers
|
|
150
|
+
|
|
151
|
+
We're excited to have you join our community. Thank you for helping make `netcdf4-wasm` better!
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,177 +1,108 @@
|
|
|
1
|
-
# netcdf4-wasm
|
|
1
|
+
# netcdf4-wasm [](https://earthyscience.github.io/netcdf4-wasm/next-js/)
|
|
2
2
|
|
|
3
|
-
Partial compilation of NetCDF4 library to WebAssembly with TypeScript bindings.
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
[](https://www.npmjs.com/package/@earthyscience/netcdf4-wasm)
|
|
5
|
+
[](https://github.com/EarthyScience/netcdf4-wasm/blob/main/LICENSE)
|
|
6
|
+
[](https://www.unidata.ucar.edu/software/netcdf/)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
[](https://webassembly.org/)
|
|
9
|
+
[](https://emscripten.org/)
|
|
10
|
+
[](https://jestjs.io/)
|
|
11
|
+
[](https://kulshekhar.github.io/ts-jest/)
|
|
6
12
|
|
|
7
|
-
This project provides a partial WebAssembly port of the NetCDF4 C library, enabling NetCDF file operations in browser and Node.js environments. It includes:
|
|
8
13
|
|
|
9
|
-
-
|
|
10
|
-
- High-level TypeScript/JavaScript API
|
|
11
|
-
- Support for reading and writing NetCDF4 files
|
|
14
|
+
<img src="https://raw.githubusercontent.com/EarthyScience/netcdf4-wasm/6eecb7eea2da775c139ebddf3f544efc6593ee2f/assets/logo.svg" align="right" style="padding-left:10px;" width="180"/>
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install @earthyscience/netcdf4-wasm
|
|
17
|
-
```
|
|
16
|
+
**Partial WebAssembly port of the NetCDF4 C library with TypeScript bindings for browser and Node.js**
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
`netcdf4-wasm` brings the power of NetCDF4 to web browsers and Node.js through WebAssembly. Read and write NetCDF files directly in JavaScript with a familiar, Python-inspired API.
|
|
20
19
|
|
|
21
|
-
For building from source, you'll need:
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
21
|
+
**Features:**
|
|
22
|
+
- 🌐 Works in browsers and Node.js
|
|
23
|
+
- 📦 Partial NetCDF4 file format support
|
|
24
|
+
- 🐍 API modeled after [netcdf4-python](https://unidata.github.io/netcdf4-python)
|
|
25
|
+
- 🚀 High-performance WASM compilation
|
|
26
|
+
- 📝 Complete TypeScript type definitions
|
|
27
27
|
|
|
28
|
-
Check dependencies:
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
```
|
|
29
|
+
> [!TIP]
|
|
30
|
+
> Want to do more? Plot, visualize, and explore your data at [browzarr.io](https://browzarr.io/)
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
## Installation
|
|
35
33
|
|
|
36
34
|
```bash
|
|
37
|
-
npm
|
|
35
|
+
npm install @earthyscience/netcdf4-wasm
|
|
38
36
|
```
|
|
39
37
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
The JavaScript API is modeled closely on the [netcdf4-python](https://unidata.github.io/netcdf4-python) API.
|
|
43
|
-
|
|
44
|
-
### Basic Example
|
|
45
|
-
|
|
46
|
-
- WIP
|
|
38
|
+
## Quick Start
|
|
47
39
|
|
|
48
40
|
### Reading Files
|
|
41
|
+
```typescript
|
|
42
|
+
import { NetCDF4 } from '@earthyscience/netcdf4-wasm';
|
|
49
43
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### Alternative Constructor (Direct Instantiation)
|
|
53
|
-
|
|
54
|
-
- WIP
|
|
55
|
-
|
|
56
|
-
### Working with Groups
|
|
57
|
-
|
|
58
|
-
- WIP
|
|
59
|
-
|
|
60
|
-
## API Reference
|
|
61
|
-
|
|
62
|
-
The API closely follows netcdf4-python conventions for ease of use by scientists familiar with Python.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## Building
|
|
66
|
-
|
|
67
|
-
### Install dependencies
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
npm install
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Check build dependencies
|
|
44
|
+
// Open existing file
|
|
45
|
+
const ds = await NetCDF4.fromBlobLazy(file);
|
|
74
46
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```
|
|
47
|
+
// Access dimensions
|
|
48
|
+
// TODO: Add example
|
|
78
49
|
|
|
79
|
-
|
|
50
|
+
// Read variables
|
|
51
|
+
// TODO: Add example
|
|
80
52
|
|
|
81
|
-
|
|
82
|
-
|
|
53
|
+
// Close when done
|
|
54
|
+
ds.close();
|
|
83
55
|
```
|
|
84
56
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
3. Compile TypeScript bindings
|
|
90
|
-
|
|
91
|
-
### Clean build artifacts
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
npm run clean
|
|
57
|
+
### Working with Groups
|
|
58
|
+
```typescript
|
|
59
|
+
// Access groups
|
|
60
|
+
// TODO: Add example
|
|
95
61
|
```
|
|
96
62
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
63
|
+
### Writing Files
|
|
64
|
+
```typescript
|
|
65
|
+
import { NetCDF4 } from '@earthyscience/netcdf4-wasm';
|
|
100
66
|
|
|
101
|
-
|
|
102
|
-
|
|
67
|
+
// Create a new NetCDF file
|
|
68
|
+
// TODO: Add example
|
|
103
69
|
```
|
|
104
70
|
|
|
105
|
-
|
|
71
|
+
## API Reference
|
|
106
72
|
|
|
107
|
-
|
|
108
|
-
npm run test:coverage
|
|
109
|
-
```
|
|
73
|
+
The API closely follows [netcdf4-python](https://unidata.github.io/netcdf4-python) conventions, making it intuitive for scientists familiar with Python.
|
|
110
74
|
|
|
111
|
-
|
|
75
|
+
**Core Classes:**
|
|
76
|
+
- `NetCDF4` - Main file interface
|
|
77
|
+
-
|
|
112
78
|
|
|
113
|
-
```bash
|
|
114
|
-
npm run test:watch
|
|
115
|
-
```
|
|
116
79
|
|
|
117
|
-
##
|
|
80
|
+
## Advanced Usage
|
|
118
81
|
|
|
119
|
-
|
|
82
|
+
<details>
|
|
83
|
+
<summary><strong>Memory Configuration</strong></summary>
|
|
120
84
|
|
|
85
|
+
If you encounter memory-related errors with large files, you can increase the initial memory allocation:
|
|
86
|
+
```typescript
|
|
87
|
+
// TODO: Add example once API is stable
|
|
121
88
|
```
|
|
122
|
-
|
|
123
|
-
├── src/ # TypeScript source code
|
|
124
|
-
│ ├── index.ts # Main API exports
|
|
125
|
-
│ ├── types.ts # Type definitions
|
|
126
|
-
│ ├── constants.ts # NetCDF constants
|
|
127
|
-
│ ├── netcdf4.ts # Main NetCDF4 class
|
|
128
|
-
│ ├── netcdf-workers.ts
|
|
129
|
-
│ ├── netcdf-getters.ts
|
|
130
|
-
│ ├── group.ts # Group class
|
|
131
|
-
│ ├── variable.ts # Variable class
|
|
132
|
-
│ ├── dimension.ts # Dimension class
|
|
133
|
-
│ ├── wasm-module.ts # WASM module loader
|
|
134
|
-
│ └── __tests__/ # Test files
|
|
135
|
-
├── scripts/ # Build scripts
|
|
136
|
-
│ ├── build-wasm.sh # Main WASM build script
|
|
137
|
-
│ ├── check-dependencies.sh
|
|
138
|
-
│ └── install-emscripten.sh
|
|
139
|
-
├── bindings/ # WASM bindings
|
|
140
|
-
│ ├── pre.js # Pre-run JavaScript
|
|
141
|
-
│ └── post.js # Post-run JavaScript
|
|
142
|
-
├── build/ # Build artifacts (generated)
|
|
143
|
-
├── dist/ # Distribution files (generated)
|
|
144
|
-
└── package.json
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
## NetCDF4 Documentation
|
|
149
|
-
|
|
150
|
-
For more information about NetCDF4, visit: https://docs.unidata.ucar.edu/netcdf-c/current/
|
|
151
|
-
|
|
152
|
-
## Troubleshooting
|
|
89
|
+
</details>
|
|
153
90
|
|
|
154
|
-
|
|
91
|
+
## Building from Source
|
|
155
92
|
|
|
156
|
-
|
|
93
|
+
See our [Contributing Guide](CONTRIBUTING.md) for detailed build instructions.
|
|
157
94
|
|
|
158
|
-
|
|
159
|
-
npm run build:wasm
|
|
160
|
-
```
|
|
95
|
+
## Contributing
|
|
161
96
|
|
|
162
|
-
|
|
97
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
163
98
|
|
|
164
|
-
|
|
99
|
+
## Resources
|
|
165
100
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
101
|
+
- [NetCDF4 C Library Documentation](https://docs.unidata.ucar.edu/netcdf-c/current/)
|
|
102
|
+
- [netcdf4-python Documentation](https://unidata.github.io/netcdf4-python)
|
|
103
|
+
- [GitHub Issues](https://github.com/EarthyScience/netcdf4-wasm/issues)
|
|
104
|
+
- [GitHub Discussions](https://github.com/EarthyScience/netcdf4-wasm/discussions)
|
|
170
105
|
|
|
171
|
-
|
|
106
|
+
## Acknowledgments
|
|
172
107
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
```typescript
|
|
176
|
-
const netcdf = new NetCDF4({ memoryInitialPages: 512 });
|
|
177
|
-
```
|
|
108
|
+
This project builds upon the initial work from [oceanum-io/netcdf4-wasm](https://github.com/oceanum-io/netcdf4-wasm). We're grateful for their foundational efforts in bringing NetCDF4 to WebAssembly and are continuing their work with additional features and improvements.
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const NC_CONSTANTS: {
|
|
2
2
|
NC_NOERR: number;
|
|
3
|
+
NC_ERANGE: number;
|
|
3
4
|
NC_NOWRITE: number;
|
|
4
5
|
NC_WRITE: number;
|
|
5
6
|
NC_CLOBBER: number;
|
|
@@ -11,7 +12,13 @@ export declare const NC_CONSTANTS: {
|
|
|
11
12
|
NC_INT: number;
|
|
12
13
|
NC_FLOAT: number;
|
|
13
14
|
NC_DOUBLE: number;
|
|
15
|
+
NC_UINT: number;
|
|
16
|
+
NC_UINT64: number;
|
|
17
|
+
NC_INT64: number;
|
|
18
|
+
NC_UBYTE: number;
|
|
14
19
|
NC_LONGLONG: number;
|
|
20
|
+
NC_USHORT: number;
|
|
21
|
+
NC_STRING: number;
|
|
15
22
|
NC_CHUNKED: number;
|
|
16
23
|
NC_CONTIGUOUS: number;
|
|
17
24
|
NC_COMPACT: number;
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCxB,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAoBlD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAavD,CAAA;AAED,eAAO,MAAM,cAAc,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAanD,CAAA"}
|
package/dist/constants.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export const NC_CONSTANTS = {
|
|
3
3
|
// Error codes
|
|
4
4
|
NC_NOERR: 0,
|
|
5
|
+
NC_ERANGE: -60,
|
|
5
6
|
// File modes
|
|
6
7
|
NC_NOWRITE: 0,
|
|
7
8
|
NC_WRITE: 1,
|
|
@@ -9,13 +10,20 @@ export const NC_CONSTANTS = {
|
|
|
9
10
|
NC_NOCLOBBER: 4,
|
|
10
11
|
NC_NETCDF4: 4096,
|
|
11
12
|
// Data types
|
|
13
|
+
// See: https://docs.unidata.ucar.edu/nug/current/md_types.html
|
|
12
14
|
NC_BYTE: 1,
|
|
13
15
|
NC_CHAR: 2,
|
|
14
16
|
NC_SHORT: 3,
|
|
15
17
|
NC_INT: 4,
|
|
16
18
|
NC_FLOAT: 5,
|
|
17
19
|
NC_DOUBLE: 6,
|
|
20
|
+
NC_UINT: 7,
|
|
21
|
+
NC_UINT64: 8,
|
|
22
|
+
NC_INT64: 9,
|
|
23
|
+
NC_UBYTE: 9,
|
|
18
24
|
NC_LONGLONG: 10,
|
|
25
|
+
NC_USHORT: 11,
|
|
26
|
+
NC_STRING: 12,
|
|
19
27
|
// Storage types
|
|
20
28
|
NC_CHUNKED: 0,
|
|
21
29
|
NC_CONTIGUOUS: 1,
|
|
@@ -39,7 +47,12 @@ export const DATA_TYPE_MAP = {
|
|
|
39
47
|
'short': NC_CONSTANTS.NC_SHORT,
|
|
40
48
|
'byte': NC_CONSTANTS.NC_BYTE,
|
|
41
49
|
'char': NC_CONSTANTS.NC_CHAR,
|
|
42
|
-
'longlong': NC_CONSTANTS.NC_LONGLONG
|
|
50
|
+
'longlong': NC_CONSTANTS.NC_LONGLONG,
|
|
51
|
+
'str': NC_CONSTANTS.NC_STRING,
|
|
52
|
+
'u1': NC_CONSTANTS.NC_UBYTE,
|
|
53
|
+
'u2': NC_CONSTANTS.NC_USHORT,
|
|
54
|
+
'u4': NC_CONSTANTS.NC_UINT,
|
|
55
|
+
'u8': NC_CONSTANTS.NC_UINT64
|
|
43
56
|
};
|
|
44
57
|
export const CONSTANT_DTYPE_MAP = {
|
|
45
58
|
1: 'i1',
|
|
@@ -48,7 +61,12 @@ export const CONSTANT_DTYPE_MAP = {
|
|
|
48
61
|
4: 'i4',
|
|
49
62
|
5: 'f4',
|
|
50
63
|
6: 'f8',
|
|
51
|
-
|
|
64
|
+
7: 'u4',
|
|
65
|
+
8: 'u8',
|
|
66
|
+
9: 'u1',
|
|
67
|
+
10: 'i8',
|
|
68
|
+
11: 'u2',
|
|
69
|
+
12: 'str'
|
|
52
70
|
};
|
|
53
71
|
export const DATA_TYPE_SIZE = {
|
|
54
72
|
1: 1,
|
|
@@ -57,6 +75,11 @@ export const DATA_TYPE_SIZE = {
|
|
|
57
75
|
4: 4,
|
|
58
76
|
5: 4,
|
|
59
77
|
6: 8,
|
|
60
|
-
|
|
78
|
+
7: 4,
|
|
79
|
+
8: 8,
|
|
80
|
+
9: 1,
|
|
81
|
+
10: 8,
|
|
82
|
+
11: 2,
|
|
83
|
+
12: 0
|
|
61
84
|
};
|
|
62
85
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,cAAc;IACd,QAAQ,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,cAAc;IACd,QAAQ,EAAE,CAAC;IACX,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AY,CAAC,WAAW;IACpC,KAAK,EAAE,YAAY,CAAC,SAAS;IAC7B,IAAI,EAAE,YAAY,CAAC,QAAQ;IAC3B,IAAI,EAAE,YAAY,CAAC,SAAS;IAC5B,IAAI,EAAE,YAAY,CAAC,OAAO;IAC1B,IAAI,EAAE,YAAY,CAAC,SAAS;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAA8B;IACzD,CAAC,EAAG,IAAI;IACR,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,KAAK;CACZ,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAA8B;IACrD,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;CACR,CAAA"}
|
package/dist/group.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare class Group {
|
|
|
6
6
|
protected netcdf: NetCDF4;
|
|
7
7
|
readonly name: string;
|
|
8
8
|
protected groupId: number;
|
|
9
|
+
protected parent?: Group | undefined;
|
|
9
10
|
readonly dimensions: {
|
|
10
11
|
[name: string]: Dimension;
|
|
11
12
|
};
|
|
@@ -16,7 +17,7 @@ export declare class Group {
|
|
|
16
17
|
[name: string]: Group;
|
|
17
18
|
};
|
|
18
19
|
private _attributes;
|
|
19
|
-
constructor(netcdf: NetCDF4, name: string, groupId: number);
|
|
20
|
+
constructor(netcdf: NetCDF4, name: string, groupId: number, parent?: Group | undefined);
|
|
20
21
|
setAttr(name: string, value: any): void;
|
|
21
22
|
getAttr(name: string): any;
|
|
22
23
|
attrs(): string[];
|
|
@@ -28,6 +29,7 @@ export declare class Group {
|
|
|
28
29
|
[name: string]: Group;
|
|
29
30
|
};
|
|
30
31
|
get path(): string;
|
|
32
|
+
load(): Promise<void>;
|
|
31
33
|
toString(): string;
|
|
32
34
|
}
|
|
33
35
|
//# sourceMappingURL=group.d.ts.map
|
package/dist/group.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../src/group.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,qBAAa,KAAK;IAOV,SAAS,CAAC,MAAM,EAAE,OAAO;aACT,IAAI,EAAE,MAAM;IAC5B,SAAS,CAAC,OAAO,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../src/group.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,qBAAa,KAAK;IAOV,SAAS,CAAC,MAAM,EAAE,OAAO;aACT,IAAI,EAAE,MAAM;IAC5B,SAAS,CAAC,OAAO,EAAE,MAAM;IACzB,SAAS,CAAC,MAAM,CAAC,EAAE,KAAK;IA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|
variables = {};
|
|
11
12
|
groups = {};
|
|
12
13
|
_attributes = {};
|
|
13
|
-
constructor(netcdf, name, groupId) {
|
|
14
|
+
constructor(netcdf, name, groupId, parent) {
|
|
14
15
|
this.netcdf = netcdf;
|
|
15
16
|
this.name = name;
|
|
16
17
|
this.groupId = groupId;
|
|
18
|
+
this.parent = parent;
|
|
17
19
|
}
|
|
18
20
|
// Attribute methods
|
|
19
21
|
setAttr(name, value) {
|
|
@@ -127,7 +129,7 @@ export class Group {
|
|
|
127
129
|
}
|
|
128
130
|
createGroup(name) {
|
|
129
131
|
// For simplicity, groups use the same ncid for now
|
|
130
|
-
const group = new Group(this.netcdf, name, this.groupId);
|
|
132
|
+
const group = new Group(this.netcdf, name, this.groupId, this);
|
|
131
133
|
this.groups[name] = group;
|
|
132
134
|
return group;
|
|
133
135
|
}
|
|
@@ -137,9 +139,48 @@ export class Group {
|
|
|
137
139
|
}
|
|
138
140
|
// Get group path (Python-like)
|
|
139
141
|
get path() {
|
|
140
|
-
if (this.
|
|
142
|
+
if (!this.parent)
|
|
141
143
|
return '/';
|
|
142
|
-
|
|
144
|
+
const parentPath = this.parent.path;
|
|
145
|
+
return parentPath === '/' ? `/${this.name}` : `${parentPath}/${this.name}`;
|
|
146
|
+
}
|
|
147
|
+
async load() {
|
|
148
|
+
// 1. Dimensions
|
|
149
|
+
const dims = await this.netcdf.getDims(this.path);
|
|
150
|
+
for (const key in this.dimensions)
|
|
151
|
+
delete this.dimensions[key];
|
|
152
|
+
for (const [name, d] of Object.entries(dims)) {
|
|
153
|
+
this.dimensions[name] = new Dimension(name, d.size, false);
|
|
154
|
+
}
|
|
155
|
+
// 2. Variables
|
|
156
|
+
const vars = await this.netcdf.getGroupVariables(this.path);
|
|
157
|
+
for (const key in this.variables)
|
|
158
|
+
delete this.variables[key];
|
|
159
|
+
for (const [name, v] of Object.entries(vars)) {
|
|
160
|
+
const info = await this.netcdf.getVariableInfo(v.id, this.path);
|
|
161
|
+
const dimNames = info.dims.map((d) => d.name);
|
|
162
|
+
const variable = new Variable(this.netcdf, name, info.dtype, dimNames, v.id, this.groupId);
|
|
163
|
+
if (info.attributes) {
|
|
164
|
+
for (const [k, val] of Object.entries(info.attributes)) {
|
|
165
|
+
variable.setAttr(k, val);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
this.variables[name] = variable;
|
|
169
|
+
}
|
|
170
|
+
// 3. Subgroups
|
|
171
|
+
const groups = await this.netcdf.getGroups(this.groupId);
|
|
172
|
+
for (const key in this.groups)
|
|
173
|
+
delete this.groups[key];
|
|
174
|
+
for (const [name, grpid] of Object.entries(groups)) {
|
|
175
|
+
const group = new Group(this.netcdf, name, grpid, this);
|
|
176
|
+
await group.load();
|
|
177
|
+
this.groups[name] = group;
|
|
178
|
+
}
|
|
179
|
+
// 4. Attributes
|
|
180
|
+
const attrs = await this.netcdf.getGlobalAttributes(this.path);
|
|
181
|
+
for (const [k, v] of Object.entries(attrs)) {
|
|
182
|
+
this.setAttr(k, v);
|
|
183
|
+
}
|
|
143
184
|
}
|
|
144
185
|
toString() {
|
|
145
186
|
return `<netCDF4.Group '${this.path}'>`;
|
package/dist/group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.js","sourceRoot":"","sources":["../src/group.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAGjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG7D,MAAM,OAAO,KAAK;IAOA;IACM;IACN;
|
|
1
|
+
{"version":3,"file":"group.js","sourceRoot":"","sources":["../src/group.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAGjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAA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