From 58f9118b75e6537ed198fdf7bef1d228dabca5a2 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 8 Jan 2025 13:44:25 -0700 Subject: [PATCH] correct the SRCROOT path when using create_clone, should be new SRCROOT not the old one --- CIME/case/case_clone.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CIME/case/case_clone.py b/CIME/case/case_clone.py index 7b81e0e91b5..eeda3885f78 100644 --- a/CIME/case/case_clone.py +++ b/CIME/case/case_clone.py @@ -54,9 +54,9 @@ def create_clone( if os.path.isdir(os.path.join(newcase_cimeroot, "share")) and get_model() == "cesm": srcroot = newcase_cimeroot else: - srcroot = self.get_value("SRCROOT") - if not srcroot: - srcroot = os.path.join(newcase_cimeroot, "..") + srcroot = os.path.join(newcase_cimeroot, "..") + if not os.path.isdir(srcroot): + srcroot = self.get_value("SRCROOT") newcase = self.copy(newcasename, newcaseroot, newsrcroot=srcroot) with newcase: