|
|
|
|
|
|
|
|
|
|
|
# 🗺️ `nc2geostructure`
|
|
|
|
|
|
|
|
The `nc2geostructure` command extracts geospatial features from a NetCDF file and saves them in a vector format.
|
|
|
|
By default, it writes a GeoJSON file, but a Shapefile can be requested by setting the output path accordingly (e.g. `.shp` extension).
|
|
|
|
|
|
|
|
## 📌 Usage
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nes nc2geostructure -i INPUT.nc -o OUTPUT.geojson [--var-list VAR1 VAR2 ...] [--time-step IDX] [--level IDX]
|
|
|
|
```
|
|
|
|
|
|
|
|
Use `-h` or `--help` to view the full list of available options:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nes nc2geostructure --help
|
|
|
|
```
|
|
|
|
|
|
|
|
## 🔧 Arguments
|
|
|
|
|
|
|
|
| Argument | Description |
|
|
|
|
|------------------|-----------------------------------------------------------------------------------------|
|
|
|
|
| `-i`, `--input` | Path to the input NetCDF file (required) |
|
|
|
|
| `-o`, `--output` | Path to the output file. If it ends in `.geojson`, a GeoJSON will be written (default). |
|
|
|
|
| `--var-list` | Space-separated list of variable names to include. If omitted, all variables are used. |
|
|
|
|
| `--time-step` | Index of the time step to extract. Default is `0`. |
|
|
|
|
| `--level` | Index of the vertical level to extract. Default is `0`. |
|
|
|
|
|
|
|
|
## 💡 Examples
|
|
|
|
|
|
|
|
### Use case 1: Convert all variables from timestep 0 and level 0 to GeoJSON
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nes nc2geostructure -i emissions.nc -o emissions.geojson
|
|
|
|
```
|
|
|
|
|
|
|
|
### Use case 2: Export only NO2 and PM10 from timestep 3 and level 0 as Shapefile
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nes nc2geostructure -i emissions.nc -o emissions_subset.shp --var-list NO2 PM10 --time-step 3 --level 0
|
|
|
|
``` |
|
|
|
\ No newline at end of file |