Skip to content
Snippets Groups Projects
Commit 55e4e446 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Diff: Print warning message once

parent 8be142c4
No related branches found
No related tags found
1 merge request!294M214003/develop
Subproject commit cf8e957e756279c23be849352d55ae0e55ddf164
Subproject commit beac578c7a38640a274287482827b01e8bcf1d2d
......@@ -307,14 +307,22 @@ compare_fields(Field &field1, Field &field2, int fieldNumber, const CdoVar &var,
if (dr.absm > params.absLimit || (checkRelativeLimit && dr.relm >= params.relLimit)) params.numDiffFields++;
if (dr.absm > params.absLimit2 || (checkRelativeLimit && dr.relm >= params.relLimit)) params.numDiffFields2++;
if (numNANs1)
cdo_warning("Found %zu NaNs in infile1 which are not treated as missing values. This can lead to incorrect CDO results in all "
"other arithmetic functions!",
numNANs1);
if (numNANs2)
cdo_warning("Found %zu NaNs in infile2 which are not treated as missing values. This can lead to incorrect CDO results in all "
"other arithmetic functions!",
numNANs2);
static auto lwarn1{ true };
static auto lwarn2{ true };
if (lwarn1 && numNANs1)
{
lwarn1 = false;
cdo_warning("Found %zu NaNs in infile1 which are not treated as missing values. This can lead to incorrect CDO results in "
"all other arithmetic functions!",
numNANs1);
}
if (lwarn2 && numNANs2)
{
lwarn2 = false;
cdo_warning("Found %zu NaNs in infile2 which are not treated as missing values. This can lead to incorrect CDO results in "
"all other arithmetic functions!",
numNANs2);
}
}
class Diff : public Process
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment