scream icon indicating copy to clipboard operation
scream copied to clipboard

Fix bug related to name clashing in output streams

Open bartgol opened this issue 1 year ago • 7 comments

While our prod runs use different filename prefix for different streams, the user may very well use the same prefix for 2 streams that have different avg type, or different freq specs (after all, these all enter the nc file name, so they can tell them apart).

However, when writing rhist files, to create the rhist file name we were

  • using INSTANT as avg type (since the rhist file is an instant output): this causes 2 streams with same prefix but different avg type to use the same rhist file
  • using rest freq-specs: this means two streams with same avg type (well, given the above, even with different avg types) and same prefix but different freq specs would use the same rhist file

This PR addresses this. Furthermore, I made find_filename_in_rpointer a bit more robust. I am relying on std::regex, and I am requiring the output avg/freq-specs in order to construct the rhist file name, since we now have the stream avg/freq-specs in the rhist file name.

Fixes #2981

@crterai @brhillman can you confirm me that cess/decadal runs used streams where the filename prefix was different for all streams? If not...we may have a problem...

bartgol avatar Sep 06 '24 02:09 bartgol