{"action":"created","issue":{"url":"https://api.github.com/repos/ESMCI/cime/issues/657","repository_url":"https://api.github.com/repos/ESMCI/cime","labels_url":"https://api.github.com/repos/ESMCI/cime/issues/657/labels{/name}","comments_url":"https://api.github.com/repos/ESMCI/cime/issues/657/comments","events_url":"https://api.github.com/repos/ESMCI/cime/issues/657/events","html_url":"https://github.com/ESMCI/cime/issues/657","id":181886347,"number":657,"title":"CIMEROOT environment variable used too aggressively","user":{"login":"billsacks","id":6266741,"avatar_url":"https://avatars.githubusercontent.com/u/6266741?v=3","gravatar_id":"","url":"https://api.github.com/users/billsacks","html_url":"https://github.com/billsacks","followers_url":"https://api.github.com/users/billsacks/followers","following_url":"https://api.github.com/users/billsacks/following{/other_user}","gists_url":"https://api.github.com/users/billsacks/gists{/gist_id}","starred_url":"https://api.github.com/users/billsacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billsacks/subscriptions","organizations_url":"https://api.github.com/users/billsacks/orgs","repos_url":"https://api.github.com/users/billsacks/repos","events_url":"https://api.github.com/users/billsacks/events{/privacy}","received_events_url":"https://api.github.com/users/billsacks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jgfouca","id":7292036,"avatar_url":"https://avatars.githubusercontent.com/u/7292036?v=3","gravatar_id":"","url":"https://api.github.com/users/jgfouca","html_url":"https://github.com/jgfouca","followers_url":"https://api.github.com/users/jgfouca/followers","following_url":"https://api.github.com/users/jgfouca/following{/other_user}","gists_url":"https://api.github.com/users/jgfouca/gists{/gist_id}","starred_url":"https://api.github.com/users/jgfouca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgfouca/subscriptions","organizations_url":"https://api.github.com/users/jgfouca/orgs","repos_url":"https://api.github.com/users/jgfouca/repos","events_url":"https://api.github.com/users/jgfouca/events{/privacy}","received_events_url":"https://api.github.com/users/jgfouca/received_events","type":"User","site_admin":false},"assignees":[{"login":"jgfouca","id":7292036,"avatar_url":"https://avatars.githubusercontent.com/u/7292036?v=3","gravatar_id":"","url":"https://api.github.com/users/jgfouca","html_url":"https://github.com/jgfouca","followers_url":"https://api.github.com/users/jgfouca/followers","following_url":"https://api.github.com/users/jgfouca/following{/other_user}","gists_url":"https://api.github.com/users/jgfouca/gists{/gist_id}","starred_url":"https://api.github.com/users/jgfouca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgfouca/subscriptions","organizations_url":"https://api.github.com/users/jgfouca/orgs","repos_url":"https://api.github.com/users/jgfouca/repos","events_url":"https://api.github.com/users/jgfouca/events{/privacy}","received_events_url":"https://api.github.com/users/jgfouca/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-10-09T13:16:07Z","updated_at":"2016-10-10T22:52:48Z","closed_at":null,"body":"If you have CIMEROOT defined in your environment (or, presumably, in your .cime_config), it appears that any scripts you run from cime load at least some things from the directory referenced from CIMEROOT, rather than the current directory.\r\n\r\nI tested this by setting:\r\n\r\n```bash\r\nexport CIMEROOT=/path/does/not/exist\r\n```\r\n\r\nand then trying to run create_test from cime/scripts. This gave:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"./create_test\", line 11, in <module>\r\n    from Tools.standard_script_setup import *\r\n  File \"/glade/p/work/sacks/cime/scripts/Tools/standard_script_setup.py\", line 15, in <module>\r\n    import CIME.utils\r\nImportError: No module named CIME.utils\r\n```\r\n\r\n(similar things happen for create_newcase, etc.)\r\n\r\nI'm not really concerned about this exact case (where CIMEROOT points to a non-existent directory). I was more using this as a measure of whether standard scripts like create_newcase and create_test try to load anything out of CIMEROOT - and apparently they do.\r\n\r\nIt's unclear to me, then, what comes from CIMEROOT and what comes from the current directory. \r\n\r\nThis could be very confusing and cause incorrect results in situations like this: Someone has CIMEROOT set to point to some cime clone, and they also have a CESM checkout with a different version of cime. They run create_newcase from their CESM checkout. Would this actually be using some / all things from CIMEROOT rather than from the current directory? This, in my opinion, would be a Bad Thing.\r\n\r\nI forget the reason why CIMEROOT was introduced originally. But I'm having trouble seeing any reason why you would ever want to run a script out of cime directory A, and have it use pieces from cime directory B. It feels like this creates potential for significant confusion and unexpected behavior."},"comment":{"url":"https://api.github.com/repos/ESMCI/cime/issues/comments/252767193","html_url":"https://github.com/ESMCI/cime/issues/657#issuecomment-252767193","issue_url":"https://api.github.com/repos/ESMCI/cime/issues/657","id":252767193,"user":{"login":"jedwards4b","id":6126104,"avatar_url":"https://avatars.githubusercontent.com/u/6126104?v=3","gravatar_id":"","url":"https://api.github.com/users/jedwards4b","html_url":"https://github.com/jedwards4b","followers_url":"https://api.github.com/users/jedwards4b/followers","following_url":"https://api.github.com/users/jedwards4b/following{/other_user}","gists_url":"https://api.github.com/users/jedwards4b/gists{/gist_id}","starred_url":"https://api.github.com/users/jedwards4b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedwards4b/subscriptions","organizations_url":"https://api.github.com/users/jedwards4b/orgs","repos_url":"https://api.github.com/users/jedwards4b/repos","events_url":"https://api.github.com/users/jedwards4b/events{/privacy}","received_events_url":"https://api.github.com/users/jedwards4b/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T22:52:48Z","updated_at":"2016-10-10T22:52:48Z","body":"I think that the submitted jobs : template.* need to have it in the environment, so be sure and test changes with a batch system :-)\r\n"}}
{"actor":{"display_login":"jedwards4b"}}