convert3d v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
convert3d is a tool designed to add vertical levels to a 2D grid using either an existing grid or a notebook description. It processes input files to generate 3D gridded output files, enabling the conversion of 2D data into a 3D structure.
Usage¶
/home/softs/tools/debug/src/convert3d [OPTIONS]
Options¶
Option |
Description |
|---|---|
|
Show this help message and exit. |
|
Root name for input files. Default: |
|
Path to the directory containing input files. |
|
Build the grid based on a pre-set zone. |
|
Grid file to use for the conversion. |
|
Starting date in |
|
Ending date in |
|
Path to the directory for output files. |
|
Output file format. Default: |
|
Frame step for extraction (e.g., |
Examples¶
Basic Conversion with Default Settings¶
Convert files using default root name (archive) and output to the current directory:
convert3d -d /path/to/input -o /path/to/output
Specify Root Name and Grid File¶
Convert files with a custom root name and grid file:
convert3d -r my_model -g grid.nc -d /path/to/input -o /path/to/output
Convert for a Specific Time Range¶
Convert files for a specific time range (e.g., from January 2020 to December 2021):
convert3d -d /path/to/input -s 01/2020 -e 12/2021 -o /path/to/output
Use a Pre-Set Zone¶
Convert files using a pre-set zone (e.g., zone1):
convert3d -z zone1 -d /path/to/input -o /path/to/output
Extract Every Other Frame¶
Convert files while extracting every other frame (e.g., -i 2):
convert3d -d /path/to/input -i 2 -o /path/to/output
Specify Output Format¶
Convert files and save output in a specific format (e.g., nc for NetCDF):
convert3d -d /path/to/input -f nc -o /path/to/output
Full Example¶
Combine multiple options for a complete conversion:
convert3d -r my_model -d /path/to/input -z zone1 -s 01/2020 -e 12/2021 -o /path/to/output -f nc -i 2
Environment Variables¶
convert3d does not explicitly rely on environment variables for its core functionality. However, if it interacts with external libraries or tools (e.g., NetCDF, OpenMP), ensure that the relevant environment variables for those dependencies are set correctly.
Notes¶
Input Files:
Input files must be compatible with the tool’s expected format (e.g., NetCDF for grid data).
If using a pre-set zone (
-z), ensure the zone is properly defined in the tool’s configuration.
Output Files:
Output files are saved in the directory specified by
-o. If not provided, the current directory is used.The output format (
-f) defaults tocdf(NetCDF) if not specified.
Frame Step (
-i):
The frame step option (
-i) allows you to skip frames during conversion. For example,-i 2processes every other frame.
Date Format:
Dates (
-sand-e) must be provided inMM/YYYYformat. The tool processes all files within the specified range.
Grid File:
If a grid file (
-g) is not provided, the tool attempts to use the grid associated with the pre-set zone (-z).
Default Values:
If
-r(root name) is not specified, the tool defaults toarchive.If
-d(input directory) is not specified, the tool defaults to the current directory (.).If
-o(output directory) is not specified, the tool defaults to the current directory (.).