NCAR/lrose-core

error trying to run RadxQc

Closed this issue · 2 comments

running RadxQc, I've run into errors

  1. I'm getting errors about the PID thresholds file, even though I've set compute_pid = FALSE.
  2. I'm seeing two other errors at the bottom that I don't quite understand. -vv didn't give me any other information.

We now have standalone applications for Kdp and PID. But the application does appear to have some good QC procedures within it. Is there an issue with the application or my parameter file?

  1. The parameter compute_pid = FALSE; is never consulted in the code.

  2. There is a function ComputeEngine::_pidInit() that is called and it insists on reading the PID thresholds from a file, regardless of the value of compute_pid. Here is the section of code ...
    if (_pid.readThresholdsFromFile(_params.pid_thresholds_file_path)) {

    cerr << "ERROR - RadxPartRain::ComputeEngine::_run" << endl;

    cerr << " Cannot read in pid thresholds from file: "

      << _params.pid_thresholds_file_path << endl;
    

    cerr << " PID will not be computed" << endl;

    return -1;

}

This is producing the second ERROR message you see. Note that pid_thresholds_file_path = "" in your parameter file.

This function returns -1; which indicates a fatal error.

  1. This sections of code

_engine = new ComputeEngine(params, threadNum);

if (!_engine->OK) {

delete _engine;

OK = FALSE;

}

attempts to delete _engine, which causes memory to be freed that was never allocated by the NcarParticleId stuff. This is the malloc error. malloc is a C function to allocate and free memory.

So, there needs to probably be some code changes, to consult the compute_pid parameter, perhaps, and then act appropriately. Some better error recovery, perhaps.

I made the change to RadxQc to skip the PID threshold file, if compute_pid = FALSE in the parameter file. I ran a quick test with your data and parameter file and RadxQc completed without error and seemed to generate output.