Skip to content

Commit

Permalink
update clone cimeroot variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 15, 2016
1 parent 5b514cc commit 87d0c1a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions utils/python/CIME/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from CIME.XML.standard_module_setup import *

from CIME.utils import expect, get_cime_root, append_status
from CIME.utils import convert_to_type, get_model, get_project
from CIME.utils import convert_to_type, get_model, get_project, get_current_branch
from CIME.XML.machines import Machines
from CIME.XML.pes import Pes
from CIME.XML.files import Files
Expand Down Expand Up @@ -826,13 +826,17 @@ def create_clone(self, newcase, keepexe=False, mach_dir=None, project=None):
# create clone from self to case
clone_cimeroot = self.get_value("CIMEROOT")
if newcase_cimeroot != clone_cimeroot:
case_branch = get_current_branch(clone_cimeroot)
clone_branch = get_current_branch(newcase_cimeroot)
logger.warning(" case CIMEROOT is %s " %newcase_cimeroot)
logger.warning(" clone CIMEROOT is %s " %clone_cimeroot)
logger.warning(" It is NOT recommended to clone cases from different versions of CIMEROOT")
logger.warning(" It is NOT recommended to clone cases from different versions of CIME %s %s"%(case_branch, clone_branch))


# *** create case object as deepcopy of clone object ***
srcroot = os.path.join(newcase_cimeroot,"..")
newcase = self.copy(newcasename, newcaseroot, newsrcroot=srcroot)
newcase.set_value("CIMEROOT", newcase_cimeroot)

# determine if will use clone executable or not
if keepexe:
Expand Down

0 comments on commit 87d0c1a

Please sign in to comment.