|
|
# NES User Guide
|
|
|
|
|
|
- [Console Line Interface](#console-line-interface)
|
|
|
|
|
|
|
|
|
## Console Line Interface
|
|
|
|
|
|
The NES CLI allows you to run core operations such as reordering longitudes and checking data directly from the command line.
|
|
|
Once NES is installed, the `nes` command becomes available in your terminal.
|
|
|
|
|
|
|
|
|
- [Reorder Longitudes](#reorder-longitudes
|
|
|
- [Checker](#checker)
|
|
|
|
|
|
To list all available subcommands:
|
|
|
|
|
|
```bash
|
|
|
nes -h
|
|
|
```
|
|
|
|
|
|
or
|
|
|
|
|
|
```bash
|
|
|
nes --help
|
|
|
```
|
|
|
|
|
|
To see help for a specific subcommand:
|
|
|
|
|
|
```bash
|
|
|
nes <subcommand> -h
|
|
|
```
|
|
|
|
|
|
For example:
|
|
|
|
|
|
```bash
|
|
|
nes check -h
|
|
|
nes reorder -h
|
|
|
```
|
|
|
|
|
|
|
|
|
### Reorder Longitudes
|
|
|
|
|
|
Reorders the longitude dimension in a NetCDF file, converting values from [0, 360] to [-180, 180] and shifting data accordingly.
|
|
|
|
|
|
#### Syntax
|
|
|
|
|
|
```bash
|
|
|
nes reorder -f <input_file.nc> -o <output_file.nc>
|
|
|
```
|
|
|
|
|
|
#### Arguments
|
|
|
|
|
|
- `-f`, `--file`: Path to the input NetCDF file. **(required)**
|
|
|
- `-o`, `--output`: Path to the output NetCDF file. If omitted, the input file is not modified in-place.
|
|
|
|
|
|
#### Example
|
|
|
|
|
|
```bash
|
|
|
nes reorder -f emissions_360.nc -o emissions_180.nc
|
|
|
```
|
|
|
|
|
|
### Checker
|
|
|
|
|
|
Checks all variables in a NetCDF file for NaN and/or Inf values.
|
|
|
|
|
|
#### Syntax
|
|
|
|
|
|
```bash
|
|
|
nes check -f <input_file.nc> [--nan] [--no-nan] [--inf] [--no-inf]
|
|
|
```
|
|
|
|
|
|
#### Arguments
|
|
|
|
|
|
- `-f`, `--file`: Path to the NetCDF file to validate. **(required)**
|
|
|
- `--nan`: Enable NaN checking (default: enabled).
|
|
|
- `--no-nan`: Disable NaN checking.
|
|
|
- `--inf`: Enable Inf checking (default: enabled).
|
|
|
- `--no-inf`: Disable Inf checking.
|
|
|
|
|
|
#### Example
|
|
|
|
|
|
```bash
|
|
|
nes check -f output.nc
|
|
|
```
|
|
|
|
|
|
Disables Inf checking:
|
|
|
|
|
|
```bash
|
|
|
nes check -f output.nc --no-inf
|
|
|
``` |
|
|
\ No newline at end of file |