Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
!/bundle/CMakeLists.txt
/bundle/*
__pycache__/
_codeql_detected_source_root
7 changes: 7 additions & 0 deletions src/ioda-dump/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ The program reads a single YAML file. Required keys:
- `input files`: list of explicit file paths
- `output file`: path to the ASCII report to write (ensure the directory exists)

Optional keys:

- `shared path`: path to directory containing mapping and query files for ODB files (defaults to `./` if not specified)
- `query prefix`: prefix for query files used with ODB files

### Example: directory scan mode

```yaml
Expand All @@ -64,6 +69,7 @@ time window:
# Scan a directory (non-recursive). Files with extensions .nc, .nc4, .h5, .hdf5, .odb are included.
input directory: /path/to/ioda/files

# Optional: only required for ODB files. Defaults to './' if not specified.
shared path: [/path/to/ioda/shared/yaml]
query prefix: [iodatest_odb_]

Expand Down Expand Up @@ -95,6 +101,7 @@ input files:
- /data/ioda/sst/file3.nc4
- /data/ioda/sst/file4.odb

# Optional: only required for ODB files. Defaults to './' if not specified.
shared path: [/path/to/ioda/shared/yaml]
query prefix: [iodatest_odb_]

Expand Down
9 changes: 3 additions & 6 deletions src/ioda-dump/ioda-dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ namespace dautils {
fullConfig.get("shared path", sharedPath);
oops::Log::info() << "Shared Path: " << sharedPath << std::endl;
} else {
throw eckit::Exception("Missing 'Shared Path' in YAML configuration");
// Use default value and print warning
sharedPath.push_back("./");
oops::Log::warning() << "Shared Path not defined in YAML configuration, using default: './' " << std::endl;
}

// get "query prefix" for mapping and query files
Expand Down Expand Up @@ -303,11 +305,6 @@ namespace dautils {
std::string base = filename.substr(0, filename.find_last_of('.'));
std::string instrument = base.substr(base.find_last_of("/\\") + 1);

if (sharedPath.empty()) {
oops::Log::error() << "No shared path available for file " << filename << std::endl;
throw eckit::Exception("Shared path not available");
}

std::string yamlDir = sharedPath[0];
std::string queryFile;
if (queryPrefix.empty()) {
Expand Down