E3SM
E3SM copied to clipboard
EAMxx: add checks regarding uniqueness of output streams
There are some things we should check that could help debug problems. At least two people have had issues related to this.
- First, during buildnml, check that the same yaml file is not repeated in
output_yaml_files. This can happen if the user has a runscript that does
./atmchange output_yaml_files+="file1.yaml"
...
./atmchange output_yaml_files+="fileN.yaml"
rather than
./atmchange output_yaml_files="file1.yaml"
...
./atmchange output_yaml_files+="fileN.yaml"
Notice the += rather than = when adding the 1st file. This will cause every run of buildnml to append the same file twice. Which could lead to the next error.
- When two yaml file clash in terms of the output file name (happens if two yaml files have same prefix, same avg type, and same output freq), two instances of OutputManager will attempt to register stuff in the file. This usually cause an error of the form
3796: FAIL:
3796: f.time_dim==nullptr
3796: /path/to/e3sm/components/eamxx/src/share/io/scream_scorpio_interface.cpp:1099
3796: Error! Attempt to redeclare unlimited dimension.
3796: - filename: output.scream.decadal.1hourlyINST_ne1024pg2.INSTANT.nhours_x1.1994-10-27-03600.nc
This error does not really inform why we hit it. The OutputManager can help here: right before registering a file, we could check that a file with that name does NOT yet exist, since an OutputManager instance should be 100% in charge of a file.