Main Module (lpjg2nc)
The main module provides the command-line interface and orchestrates the overall conversion process.
Command-line Interface
parse_args(): Parses command-line arguments and provides help information
The main script handles several key operations:
Parsing command-line arguments
Finding and grouping output files by pattern
Coordinating parallel processing of files (with significant performance improvements through vectorization)
Handling the test mode for specific patterns
Optional remapping to regular grids using CDO
Processing Functions
process_ifs_input_test(path, output_path, verbose=False, n_jobs=1, remap=None): Processes ifs_input.out test filesmain(): Main entry point for the command-line tool
Utility Functions
run_subprocess(cmd): Executes and monitors external commands