Open ekluzek opened 2 days ago
@jedwards4b @billsacks this is a potential fix that does get it to work. But, I'm not sure it's the right thing to do. It simply removes the space character from the comparison.
diff --git a/cime_config/buildnml b/cime_config/buildnml
index 44116d98..91cb4f41 100755
--- a/cime_config/buildnml
+++ b/cime_config/buildnml
@@ -605,7 +605,7 @@ def compare_drv_flds_in(first, second, infile1, infile2):
###############################################################################
sharedKeys = set(first.keys()).intersection(second.keys())
for key in sharedKeys:
- if first[key] != second[key]:
+ if first[key].replace(" ", "") != second[key].replace(" ", ""):
print(
"Key: {}, \n Value 1: {}, \n Value 2: {}".format(
key, first[key], second[key]
I'm not very familiar with the details of this, but the diff you give looks reasonable to me.
@ekluzek I'm not sure I like this - whitespace should already be removed in buildnml lines 534 and 535:
name = name.strip()
var = var.strip()
Why is it needed again?
I see it's needed because in this case the extra space is in the middle of the string. I think that your fix is fine.
Please submit a PR with the change.
I have a case that's failing in the merge of the CAM and CTSM namelist for drv_flds_in in preview_namaelists even though the difference is only in whitespace. This is in cmeps1_0_20 the latest version right now...
Here is the error I'm getting:
How to replicate this case: