├── cime_config ├── README.md ├── testmods_dirs │ └── allactive │ │ ├── default │ │ ├── user_nl_cam │ │ ├── user_nl_cice │ │ ├── user_nl_clm │ │ ├── user_nl_mosart │ │ ├── user_nl_pop │ │ └── user_nl_rtm │ │ ├── defaultio │ │ ├── include_user_mods │ │ ├── user_nl_cam │ │ ├── user_nl_clm │ │ ├── user_nl_pop │ │ ├── user_nl_cism │ │ ├── user_nl_rtm │ │ ├── user_nl_mosart │ │ └── user_nl_cice │ │ ├── defaultiomi │ │ ├── include_user_mods │ │ └── shell_commands │ │ ├── cism │ │ ├── test_coupling │ │ │ ├── include_user_mods │ │ │ ├── README │ │ │ ├── shell_commands │ │ │ ├── user_nl_cism │ │ │ └── user_nl_clm │ │ ├── trilinos │ │ │ ├── user_nl_cism │ │ │ ├── include_user_mods │ │ │ ├── shell_commands │ │ │ └── README │ │ └── oneway │ │ │ ├── README │ │ │ └── shell_commands │ │ ├── defaultio_noclminterp │ │ ├── include_user_mods │ │ ├── shell_commands │ │ └── README │ │ ├── cesm2dev01 │ │ └── include_user_mods │ │ ├── cesm2dev01io │ │ └── include_user_mods │ │ ├── defaultio_min │ │ ├── README │ │ └── user_nl_pop │ │ ├── maxthroughputb │ │ ├── user_nl_cam │ │ └── shell_commands │ │ └── maxthroughputfw │ │ └── shell_commands └── usermods_dirs │ ├── cmip6_noresm_DECK │ ├── SourceMods │ │ └── src.cam │ │ │ └── preprocessorDefinitions.h │ ├── user_nl_cam │ └── user_nl_clm │ ├── cmip6_noresm_xaer │ ├── SourceMods │ │ └── src.cam │ │ │ └── preprocessorDefinitions.h │ ├── user_nl_cam │ └── user_nl_clm │ ├── cmip6_noresm_hifreq │ ├── SourceMods │ │ └── src.cam │ │ │ └── preprocessorDefinitions.h │ ├── user_nl_clm │ └── user_nl_cam │ ├── cmip6_noresm_keyCLIM │ ├── SourceMods │ │ └── src.cam │ │ │ └── preprocessorDefinitions.h │ ├── user_nl_cam │ └── user_nl_clm │ ├── cmip6_noresm_hifreq_xaer │ ├── SourceMods │ │ └── src.cam │ │ │ └── preprocessorDefinitions.h │ ├── user_nl_clm │ └── user_nl_cam │ ├── cmip6_noresm_keyCLIM_ism │ ├── SourceMods │ │ ├── src.cam │ │ │ └── preprocessorDefinitions.h │ │ └── src.cism │ │ │ ├── source_cism │ │ │ └── README │ │ │ └── README │ ├── user_nl_cam │ ├── user_nl_clm │ └── user_nl_cism │ ├── README │ ├── nhistr227 │ ├── user_nl_cice │ ├── user_nl_cpl │ ├── user_nl_clm │ └── user_nl_cam │ └── n1850r227 │ ├── user_nl_cice │ ├── user_nl_mosart │ ├── user_nl_cpl │ ├── user_nl_clm │ └── user_nl_cam ├── manage_externals ├── test │ ├── doc │ │ ├── .gitignore │ │ ├── index.rst │ │ ├── Makefile │ │ ├── testing.rst │ │ ├── conf.py │ │ └── develop.rst │ ├── repos │ │ ├── container.git │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ │ └── heads │ │ │ │ │ └── master │ │ │ ├── description │ │ │ ├── config │ │ │ ├── objects │ │ │ │ ├── 41 │ │ │ │ │ └── 1de5d96ee418c1c55f3e96e6e6e7c06bb95801 │ │ │ │ ├── 71 │ │ │ │ │ └── 5b8f3e4afe1802a178e1d603af404ba45d59de │ │ │ │ ├── b0 │ │ │ │ │ └── f87705e2b9601cb831878f3d51efa78b910d7b │ │ │ │ └── f9 │ │ │ │ │ └── e08370a737e941de6f6492e3f427c2ef4c1a03 │ │ │ └── info │ │ │ │ └── exclude │ │ ├── mixed-cont-ext.git │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ │ └── heads │ │ │ │ │ ├── master │ │ │ │ │ └── new-feature │ │ │ ├── description │ │ │ ├── config │ │ │ ├── objects │ │ │ │ ├── 14 │ │ │ │ │ └── 368b701616a8c53820b610414a4b9a07540cf6 │ │ │ │ ├── 15 │ │ │ │ │ └── 2b57e1cf23721cd17ff681cb9276e3fb9fc091 │ │ │ │ ├── 37 │ │ │ │ │ └── f0e70b609adc90f4c09ee21d82ed1d79c81d69 │ │ │ │ ├── 38 │ │ │ │ │ └── 9a2b876b8965d3c91a3db8d28a483eaf019d5c │ │ │ │ ├── 41 │ │ │ │ │ └── 1de5d96ee418c1c55f3e96e6e6e7c06bb95801 │ │ │ │ ├── 93 │ │ │ │ │ └── a159deb9175bfeb2820a0006ddd92d78131332 │ │ │ │ ├── 95 │ │ │ │ │ └── 80ecc12f16334ce44e42287d5d46f927bb7b75 │ │ │ │ ├── 00 │ │ │ │ │ └── 437ac2000d5f06fb8a572a01a5bbdae98b17cb │ │ │ │ ├── 01 │ │ │ │ │ └── 97458f2dbe5fcd6bc44fa46983be0a30282379 │ │ │ │ ├── 06 │ │ │ │ │ └── ea30b03ffa2f8574705f8b9583f7ca7e2dccf7 │ │ │ │ ├── 1f │ │ │ │ │ └── 01fa46c17b1f38b37e6259f6e9d041bda3144f │ │ │ │ ├── 6e │ │ │ │ │ └── 9f4baa6e94a0af4e094836c2eb55ccedef5fc4 │ │ │ │ ├── 6f │ │ │ │ │ └── c379457ecb4e576a13c7610ae1fa73f845ee6a │ │ │ │ ├── a9 │ │ │ │ │ └── 288dcd8a719a1f4ed3cba43a2a387ae7cd60fd │ │ │ │ ├── e8 │ │ │ │ │ └── ea32a11d30ee703f6f661ae7c2376f4ab84d38 │ │ │ │ └── fd │ │ │ │ │ └── 15a5ad5204356229c60a831d2a8120a43ac901 │ │ │ └── info │ │ │ │ └── exclude │ │ ├── simple-ext.git │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ │ ├── tags │ │ │ │ │ └── tag1 │ │ │ │ └── heads │ │ │ │ │ ├── feature2 │ │ │ │ │ ├── feature3 │ │ │ │ │ └── master │ │ │ ├── description │ │ │ ├── config │ │ │ ├── objects │ │ │ │ ├── 11 │ │ │ │ │ └── a76e3d9a67313dec7ce1230852ab5c86352c5c │ │ │ │ ├── 31 │ │ │ │ │ └── dbcd6de441e671a467ef317146539b7ffabb11 │ │ │ │ ├── 36 │ │ │ │ │ └── 418b4e5665956a90725c9a1b5a8e551c5f3d48 │ │ │ │ ├── 41 │ │ │ │ │ └── 1de5d96ee418c1c55f3e96e6e6e7c06bb95801 │ │ │ │ ├── 60 │ │ │ │ │ └── b1cc1a38d63a4bcaa1e767262bbe23dbf9f5f5 │ │ │ │ ├── 63 │ │ │ │ │ └── a99393d1baff97ccef967af30380659867b139 │ │ │ │ ├── 95 │ │ │ │ │ └── 3256da5612fcd9263590a353bc18c6f224e74f │ │ │ │ ├── 00 │ │ │ │ │ └── fd13e76189f9134b0506b4b8ed3172723b467f │ │ │ │ ├── 09 │ │ │ │ │ └── 0e1034746b2c865f7b0280813dbf4061a700e8 │ │ │ │ ├── 0b │ │ │ │ │ └── 15e8af3d4615b42314216efeae3fff184046a8 │ │ │ │ ├── 9b │ │ │ │ │ └── 75494003deca69527bb64bcaa352e801611dd2 │ │ │ │ ├── a2 │ │ │ │ │ └── 2a5da9119328ea6d693f88861457c07e14ac04 │ │ │ │ ├── c5 │ │ │ │ │ └── b315915742133dbdfbeed0753e481b55c1d364 │ │ │ │ └── df │ │ │ │ │ └── 312890f93ba4d2c694208599b665c4a08afeff │ │ │ └── info │ │ │ │ └── exclude │ │ ├── simple-ext-fork.git │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ │ ├── heads │ │ │ │ │ └── feature2 │ │ │ │ └── tags │ │ │ │ │ ├── abandoned-feature │ │ │ │ │ └── forked-feature-v1 │ │ │ ├── description │ │ │ ├── objects │ │ │ │ ├── 11 │ │ │ │ │ └── a76e3d9a67313dec7ce1230852ab5c86352c5c │ │ │ │ ├── 16 │ │ │ │ │ └── 5506a7408a482f50493434e13fffeb44af893f │ │ │ │ ├── 24 │ │ │ │ │ └── 4386e788c9bc608613e127a329c742450a60e4 │ │ │ │ ├── 32 │ │ │ │ │ └── 7e97d86e941047d809dba58f2804740c6c30cf │ │ │ │ ├── 36 │ │ │ │ │ └── 418b4e5665956a90725c9a1b5a8e551c5f3d48 │ │ │ │ ├── 41 │ │ │ │ │ └── 1de5d96ee418c1c55f3e96e6e6e7c06bb95801 │ │ │ │ ├── 56 │ │ │ │ │ └── 175e017ad38bf3d33d74b6bd7c74624b28466a │ │ │ │ ├── 67 │ │ │ │ │ └── 136e5ab4d5c1c65d10c8048763b96b0e53c1d6 │ │ │ │ ├── 88 │ │ │ │ │ └── cf20868e0cc445f5642a480ed034c71e0d7e9f │ │ │ │ ├── 00 │ │ │ │ │ └── fd13e76189f9134b0506b4b8ed3172723b467f │ │ │ │ ├── 0b │ │ │ │ │ ├── 15e8af3d4615b42314216efeae3fff184046a8 │ │ │ │ │ └── 67df4e7e8e6e1c6e401542738b352d18744677 │ │ │ │ ├── 3d │ │ │ │ │ ├── 7099c35404ae6c8640ce263b38bef06e98cc26 │ │ │ │ │ └── ec1fdf8e2f5edba28148c5db2fe8d7a842360b │ │ │ │ ├── 4d │ │ │ │ │ └── 837135915ed93eed6fff6b439f284ce317296f │ │ │ │ ├── 5f │ │ │ │ │ └── 1d4786d12e52d7ab28d2f2f1118c1059a9f1ae │ │ │ │ ├── 7b │ │ │ │ │ └── 0bd630ac13865735a1dff3437a137d8ab50663 │ │ │ │ ├── 8d │ │ │ │ │ └── 2b3b35126224c975d23f109aa1e3cbac452989 │ │ │ │ ├── 9b │ │ │ │ │ └── 75494003deca69527bb64bcaa352e801611dd2 │ │ │ │ ├── a2 │ │ │ │ │ └── 2a5da9119328ea6d693f88861457c07e14ac04 │ │ │ │ ├── a4 │ │ │ │ │ └── 2fe9144f5707bc1e9515ce1b44681f7aba6f95 │ │ │ │ ├── b9 │ │ │ │ │ └── 3737be3ea6b19f6255983748a0a0f4d622f936 │ │ │ │ ├── c5 │ │ │ │ │ ├── 32bc8fde96fa63103a52057f0baffcc9f00c6b │ │ │ │ │ └── b315915742133dbdfbeed0753e481b55c1d364 │ │ │ │ └── f2 │ │ │ │ │ └── 68d4e56d067da9bd1d85e55bdc40a8bd2b0bca │ │ │ ├── info │ │ │ │ └── exclude │ │ │ ├── packed-refs │ │ │ └── config │ │ └── error │ │ │ └── readme.txt │ ├── requirements.txt │ ├── .gitignore │ ├── .coveragerc │ ├── README.md │ ├── Makefile │ ├── test_unit_repository.py │ ├── test_sys_repository_git.py │ └── test_unit_externals_status.py ├── manic │ ├── __init__.py │ ├── global_constants.py │ ├── repository_factory.py │ ├── repository.py │ ├── externals_status.py │ └── repository_svn.py ├── .gitignore ├── .dir_locals.el ├── .github │ ├── ISSUE_TEMPLATE.md │ └── PULL_REQUEST_TEMPLATE.md ├── .travis.yml ├── checkout_externals ├── README_FIRST ├── LICENSE.txt └── README.md ├── img └── NORESM-logo.png ├── .github └── ISSUE_TEMPLATE │ ├── general-issue.md │ ├── config.yml │ ├── documentation.md │ ├── feature_request.md │ └── bug_report.md ├── .gitignore ├── .readthedocs.yaml ├── Externals_continuous_development.cfg ├── Externals.cfg ├── LICENSE-CESM.txt ├── LICENSE.txt ├── README.md ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md └── Copyright-CESM.txt /cime_config/README.md: -------------------------------------------------------------------------------- 1 | # cime_config 2 | -------------------------------------------------------------------------------- /manage_externals/test/doc/.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | 3 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/default/user_nl_cam: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/default/user_nl_cice: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/default/user_nl_clm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/default/user_nl_mosart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/default/user_nl_pop: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/default/user_nl_rtm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio/include_user_mods: -------------------------------------------------------------------------------- 1 | ../default 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultiomi/include_user_mods: -------------------------------------------------------------------------------- 1 | ../defaultio 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/test_coupling/include_user_mods: -------------------------------------------------------------------------------- 1 | ../../defaultio 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/trilinos/user_nl_cism: -------------------------------------------------------------------------------- 1 | which_ho_sparse = 4 2 | 3 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio_noclminterp/include_user_mods: -------------------------------------------------------------------------------- 1 | ../defaultio 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultiomi/shell_commands: -------------------------------------------------------------------------------- 1 | ./xmlchange NTASKS_OCN=144 2 | -------------------------------------------------------------------------------- /img/NORESM-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/img/NORESM-logo.png -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/trilinos/include_user_mods: -------------------------------------------------------------------------------- 1 | ../apply_to_multiinstance 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/trilinos/shell_commands: -------------------------------------------------------------------------------- 1 | ./xmlchange CISM_USE_TRILINOS=TRUE 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/refs/tags/tag1: -------------------------------------------------------------------------------- 1 | 11a76e3d9a67313dec7ce1230852ab5c86352c5c 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/oneway/README: -------------------------------------------------------------------------------- 1 | This set of testmods turns off two-way coupling 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/oneway/shell_commands: -------------------------------------------------------------------------------- 1 | ./xmlchange GLC_TWO_WAY_COUPLING=FALSE 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio/user_nl_cam: -------------------------------------------------------------------------------- 1 | nhtfrq = -24 2 | mfilt = 1 3 | ndens = 1 4 | -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | 715b8f3e4afe1802a178e1d603af404ba45d59de 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/refs/heads/feature2: -------------------------------------------------------------------------------- 1 | 36418b4e5665956a90725c9a1b5a8e551c5f3d48 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/refs/heads/feature3: -------------------------------------------------------------------------------- 1 | 090e1034746b2c865f7b0280813dbf4061a700e8 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | 9b75494003deca69527bb64bcaa352e801611dd2 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cesm2dev01/include_user_mods: -------------------------------------------------------------------------------- 1 | ../../../usermods_dirs/b1850_cism 2 | ../default -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | 6fc379457ecb4e576a13c7610ae1fa73f845ee6a 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/refs/heads/feature2: -------------------------------------------------------------------------------- 1 | f268d4e56d067da9bd1d85e55bdc40a8bd2b0bca 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/refs/heads/new-feature: -------------------------------------------------------------------------------- 1 | 9580ecc12f16334ce44e42287d5d46f927bb7b75 2 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cesm2dev01io/include_user_mods: -------------------------------------------------------------------------------- 1 | ../../../usermods_dirs/b1850_cism 2 | ../defaultio 3 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/refs/tags/abandoned-feature: -------------------------------------------------------------------------------- 1 | a42fe9144f5707bc1e9515ce1b44681f7aba6f95 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/refs/tags/forked-feature-v1: -------------------------------------------------------------------------------- 1 | 8d2b3b35126224c975d23f109aa1e3cbac452989 2 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_DECK/SourceMods/src.cam/preprocessorDefinitions.h: -------------------------------------------------------------------------------- 1 | #undef AEROCOM 2 | #define AEROFFL 3 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_xaer/SourceMods/src.cam/preprocessorDefinitions.h: -------------------------------------------------------------------------------- 1 | #define AEROCOM 2 | #define AEROFFL 3 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_hifreq/SourceMods/src.cam/preprocessorDefinitions.h: -------------------------------------------------------------------------------- 1 | #undef AEROCOM 2 | #define AEROFFL 3 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM/SourceMods/src.cam/preprocessorDefinitions.h: -------------------------------------------------------------------------------- 1 | #undef AEROCOM 2 | #define AEROFFL 3 | -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_hifreq_xaer/SourceMods/src.cam/preprocessorDefinitions.h: -------------------------------------------------------------------------------- 1 | #define AEROCOM 2 | #define AEROFFL 3 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM_ism/SourceMods/src.cam/preprocessorDefinitions.h: -------------------------------------------------------------------------------- 1 | #undef AEROCOM 2 | #define AEROFFL 3 | -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /manage_externals/test/requirements.txt: -------------------------------------------------------------------------------- 1 | pylint>=1.7.0 2 | autopep8>=1.3.0 3 | coverage>=4.4.0 4 | coveralls>=1.2.0 5 | sphinx>=1.6.0 6 | -------------------------------------------------------------------------------- /manage_externals/test/repos/error/readme.txt: -------------------------------------------------------------------------------- 1 | Invalid or corrupted git repository (.git dir exists, but is empty) for error 2 | testing. 3 | 4 | -------------------------------------------------------------------------------- /manage_externals/test/.gitignore: -------------------------------------------------------------------------------- 1 | # virtual environments 2 | env_python* 3 | 4 | # python code coverage tool output 5 | .coverage 6 | htmlcov 7 | 8 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio/user_nl_clm: -------------------------------------------------------------------------------- 1 | hist_dov2xy = .true. 2 | hist_ndens = 1 3 | hist_nhtfrq =-24 4 | hist_mfilt = 1 5 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/README: -------------------------------------------------------------------------------- 1 | Directories here can be included in a case via the --user-mods-dir 2 | argument to create_newcase, or via the CPL_USER_MODS XML variable. 3 | -------------------------------------------------------------------------------- /manage_externals/test/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | omit = test_unit_*.py 4 | test_sys_*.py 5 | /usr/* 6 | .local/* 7 | */site-packages/* -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = true 5 | ignorecase = true 6 | precomposeunicode = true 7 | -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = true 5 | ignorecase = true 6 | precomposeunicode = true 7 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = true 5 | ignorecase = true 6 | precomposeunicode = true 7 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio_min/README: -------------------------------------------------------------------------------- 1 | This testmods directory is a minimal version of defaultio, which 2 | contains only the bare minimum of mods needed to get tests to pass. 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/general-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: General issue 3 | about: Used for general issues, not covered by other templates. 4 | title: '' 5 | labels: '' 6 | 7 | --- 8 | 9 | 10 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/test_coupling/README: -------------------------------------------------------------------------------- 1 | The purpose of this testmod directory is to enable CISM's dynamics on 2 | the short (multi-day) time scales typical of fully-active tests. 3 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/maxthroughputb/user_nl_cam: -------------------------------------------------------------------------------- 1 | ! Users should add all user specific namelist changes below in the form of 2 | ! namelist_var = new_namelist_value 3 | npr_yz= 64,18,18,64 4 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio/user_nl_pop: -------------------------------------------------------------------------------- 1 | & tavg_nml 2 | ltavg_ignore_extra_streams = .true. 3 | n_tavg_streams = 1 4 | tavg_freq_opt = 'nday' 5 | tavg_file_freq_opt = 'nday' 6 | / 7 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio/user_nl_cism: -------------------------------------------------------------------------------- 1 | 2 | ! This is needed to give CISM history output in the (typically short) 3 | ! tests that are done with this testmod directory 4 | history_option = 'coupler' 5 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/test_coupling/shell_commands: -------------------------------------------------------------------------------- 1 | # Since we're doing a daily mass balance time step in CISM, we can't use the default GLC_AVG_PERIOD of yearly 2 | ./xmlchange GLC_AVG_PERIOD=glc_coupling_period 3 | -------------------------------------------------------------------------------- /manage_externals/manic/__init__.py: -------------------------------------------------------------------------------- 1 | """Public API for the manage_externals library 2 | """ 3 | 4 | from manic import checkout 5 | from manic.utils import printlog 6 | 7 | __all__ = [ 8 | 'checkout', 'printlog', 9 | ] 10 | -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/objects/41/1de5d96ee418c1c55f3e96e6e6e7c06bb95801: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/container.git/objects/41/1de5d96ee418c1c55f3e96e6e6e7c06bb95801 -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/objects/71/5b8f3e4afe1802a178e1d603af404ba45d59de: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/container.git/objects/71/5b8f3e4afe1802a178e1d603af404ba45d59de -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/objects/b0/f87705e2b9601cb831878f3d51efa78b910d7b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/container.git/objects/b0/f87705e2b9601cb831878f3d51efa78b910d7b -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/objects/f9/e08370a737e941de6f6492e3f427c2ef4c1a03: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/container.git/objects/f9/e08370a737e941de6f6492e3f427c2ef4c1a03 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/00/fd13e76189f9134b0506b4b8ed3172723b467f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/00/fd13e76189f9134b0506b4b8ed3172723b467f -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/09/0e1034746b2c865f7b0280813dbf4061a700e8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/09/0e1034746b2c865f7b0280813dbf4061a700e8 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/0b/15e8af3d4615b42314216efeae3fff184046a8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/0b/15e8af3d4615b42314216efeae3fff184046a8 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/11/a76e3d9a67313dec7ce1230852ab5c86352c5c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/11/a76e3d9a67313dec7ce1230852ab5c86352c5c -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/31/dbcd6de441e671a467ef317146539b7ffabb11: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/31/dbcd6de441e671a467ef317146539b7ffabb11 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/36/418b4e5665956a90725c9a1b5a8e551c5f3d48: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/36/418b4e5665956a90725c9a1b5a8e551c5f3d48 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/41/1de5d96ee418c1c55f3e96e6e6e7c06bb95801: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/41/1de5d96ee418c1c55f3e96e6e6e7c06bb95801 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/60/b1cc1a38d63a4bcaa1e767262bbe23dbf9f5f5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/60/b1cc1a38d63a4bcaa1e767262bbe23dbf9f5f5 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/63/a99393d1baff97ccef967af30380659867b139: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/63/a99393d1baff97ccef967af30380659867b139 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/95/3256da5612fcd9263590a353bc18c6f224e74f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/95/3256da5612fcd9263590a353bc18c6f224e74f -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/9b/75494003deca69527bb64bcaa352e801611dd2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/9b/75494003deca69527bb64bcaa352e801611dd2 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/a2/2a5da9119328ea6d693f88861457c07e14ac04: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/a2/2a5da9119328ea6d693f88861457c07e14ac04 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/c5/b315915742133dbdfbeed0753e481b55c1d364: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/c5/b315915742133dbdfbeed0753e481b55c1d364 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/objects/df/312890f93ba4d2c694208599b665c4a08afeff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext.git/objects/df/312890f93ba4d2c694208599b665c4a08afeff -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/00/437ac2000d5f06fb8a572a01a5bbdae98b17cb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/00/437ac2000d5f06fb8a572a01a5bbdae98b17cb -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/01/97458f2dbe5fcd6bc44fa46983be0a30282379: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/01/97458f2dbe5fcd6bc44fa46983be0a30282379 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/06/ea30b03ffa2f8574705f8b9583f7ca7e2dccf7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/06/ea30b03ffa2f8574705f8b9583f7ca7e2dccf7 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/14/368b701616a8c53820b610414a4b9a07540cf6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/14/368b701616a8c53820b610414a4b9a07540cf6 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/15/2b57e1cf23721cd17ff681cb9276e3fb9fc091: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/15/2b57e1cf23721cd17ff681cb9276e3fb9fc091 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/1f/01fa46c17b1f38b37e6259f6e9d041bda3144f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/1f/01fa46c17b1f38b37e6259f6e9d041bda3144f -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/37/f0e70b609adc90f4c09ee21d82ed1d79c81d69: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/37/f0e70b609adc90f4c09ee21d82ed1d79c81d69 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/38/9a2b876b8965d3c91a3db8d28a483eaf019d5c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/38/9a2b876b8965d3c91a3db8d28a483eaf019d5c -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/41/1de5d96ee418c1c55f3e96e6e6e7c06bb95801: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/41/1de5d96ee418c1c55f3e96e6e6e7c06bb95801 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/6e/9f4baa6e94a0af4e094836c2eb55ccedef5fc4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/6e/9f4baa6e94a0af4e094836c2eb55ccedef5fc4 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/6f/c379457ecb4e576a13c7610ae1fa73f845ee6a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/6f/c379457ecb4e576a13c7610ae1fa73f845ee6a -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/93/a159deb9175bfeb2820a0006ddd92d78131332: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/93/a159deb9175bfeb2820a0006ddd92d78131332 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/95/80ecc12f16334ce44e42287d5d46f927bb7b75: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/95/80ecc12f16334ce44e42287d5d46f927bb7b75 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/a9/288dcd8a719a1f4ed3cba43a2a387ae7cd60fd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/a9/288dcd8a719a1f4ed3cba43a2a387ae7cd60fd -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/e8/ea32a11d30ee703f6f661ae7c2376f4ab84d38: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/e8/ea32a11d30ee703f6f661ae7c2376f4ab84d38 -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/objects/fd/15a5ad5204356229c60a831d2a8120a43ac901: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/mixed-cont-ext.git/objects/fd/15a5ad5204356229c60a831d2a8120a43ac901 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/00/fd13e76189f9134b0506b4b8ed3172723b467f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/00/fd13e76189f9134b0506b4b8ed3172723b467f -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/0b/15e8af3d4615b42314216efeae3fff184046a8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/0b/15e8af3d4615b42314216efeae3fff184046a8 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/0b/67df4e7e8e6e1c6e401542738b352d18744677: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/0b/67df4e7e8e6e1c6e401542738b352d18744677 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/11/a76e3d9a67313dec7ce1230852ab5c86352c5c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/11/a76e3d9a67313dec7ce1230852ab5c86352c5c -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/16/5506a7408a482f50493434e13fffeb44af893f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/16/5506a7408a482f50493434e13fffeb44af893f -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/24/4386e788c9bc608613e127a329c742450a60e4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/24/4386e788c9bc608613e127a329c742450a60e4 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/32/7e97d86e941047d809dba58f2804740c6c30cf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/32/7e97d86e941047d809dba58f2804740c6c30cf -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/36/418b4e5665956a90725c9a1b5a8e551c5f3d48: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/36/418b4e5665956a90725c9a1b5a8e551c5f3d48 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/3d/7099c35404ae6c8640ce263b38bef06e98cc26: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/3d/7099c35404ae6c8640ce263b38bef06e98cc26 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/3d/ec1fdf8e2f5edba28148c5db2fe8d7a842360b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/3d/ec1fdf8e2f5edba28148c5db2fe8d7a842360b -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/41/1de5d96ee418c1c55f3e96e6e6e7c06bb95801: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/41/1de5d96ee418c1c55f3e96e6e6e7c06bb95801 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/4d/837135915ed93eed6fff6b439f284ce317296f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/4d/837135915ed93eed6fff6b439f284ce317296f -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/56/175e017ad38bf3d33d74b6bd7c74624b28466a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/56/175e017ad38bf3d33d74b6bd7c74624b28466a -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/5f/1d4786d12e52d7ab28d2f2f1118c1059a9f1ae: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/5f/1d4786d12e52d7ab28d2f2f1118c1059a9f1ae -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/67/136e5ab4d5c1c65d10c8048763b96b0e53c1d6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/67/136e5ab4d5c1c65d10c8048763b96b0e53c1d6 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/7b/0bd630ac13865735a1dff3437a137d8ab50663: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/7b/0bd630ac13865735a1dff3437a137d8ab50663 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/88/cf20868e0cc445f5642a480ed034c71e0d7e9f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/88/cf20868e0cc445f5642a480ed034c71e0d7e9f -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/8d/2b3b35126224c975d23f109aa1e3cbac452989: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/8d/2b3b35126224c975d23f109aa1e3cbac452989 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/9b/75494003deca69527bb64bcaa352e801611dd2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/9b/75494003deca69527bb64bcaa352e801611dd2 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/a2/2a5da9119328ea6d693f88861457c07e14ac04: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/a2/2a5da9119328ea6d693f88861457c07e14ac04 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/a4/2fe9144f5707bc1e9515ce1b44681f7aba6f95: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/a4/2fe9144f5707bc1e9515ce1b44681f7aba6f95 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/b9/3737be3ea6b19f6255983748a0a0f4d622f936: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/b9/3737be3ea6b19f6255983748a0a0f4d622f936 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/c5/32bc8fde96fa63103a52057f0baffcc9f00c6b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/c5/32bc8fde96fa63103a52057f0baffcc9f00c6b -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/c5/b315915742133dbdfbeed0753e481b55c1d364: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/c5/b315915742133dbdfbeed0753e481b55c1d364 -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/objects/f2/68d4e56d067da9bd1d85e55bdc40a8bd2b0bca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NorESMhub/NorESM/HEAD/manage_externals/test/repos/simple-ext-fork.git/objects/f2/68d4e56d067da9bd1d85e55bdc40a8bd2b0bca -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/test_coupling/user_nl_cism: -------------------------------------------------------------------------------- 1 | 2 | ! This option changes the ice sheet dynamics time step to 1 day rather than 1 year 3 | ! Thus, the ice sheet dynamics can be exercised in a few-day run 4 | test_coupling = .true. 5 | -------------------------------------------------------------------------------- /manage_externals/.gitignore: -------------------------------------------------------------------------------- 1 | # directories that are checked out by the tool 2 | cime/ 3 | cime_config/ 4 | components/ 5 | 6 | # generated local files 7 | *.log 8 | 9 | # editor files 10 | *~ 11 | *.bak 12 | 13 | # generated python files 14 | *.pyc 15 | -------------------------------------------------------------------------------- /manage_externals/test/repos/container.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /manage_externals/test/repos/mixed-cont-ext.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /manage_externals/.dir_locals.el: -------------------------------------------------------------------------------- 1 | ; -*- mode: Lisp -*- 2 | 3 | ((python-mode 4 | . ( 5 | ;; fill the paragraph to 80 columns when using M-q 6 | (fill-column . 80) 7 | 8 | ;; Use 4 spaces to indent in Python 9 | (python-indent-offset . 4) 10 | (indent-tabs-mode . nil) 11 | ))) 12 | 13 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: NorESM documentation FAQ 4 | url: https://noresm-docs.readthedocs.io/en/latest/faq/faq.html 5 | about: FAQ page for NorESM 6 | - name: NorESM home page 7 | url: https://www.noresm.org 8 | about: Latest news about NorESM 9 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM_ism/SourceMods/src.cism/source_cism/README: -------------------------------------------------------------------------------- 1 | Put source mods for the source_cism library in this subdirectory. 2 | This includes any files from $COMP_ROOT_DIR_GLC/source_cism. Anything 3 | else (e.g., mods to source_glc or drivers) goes in the src.cism 4 | directory, NOT in this subdirectory. -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/packed-refs: -------------------------------------------------------------------------------- 1 | # pack-refs with: peeled fully-peeled sorted 2 | 36418b4e5665956a90725c9a1b5a8e551c5f3d48 refs/heads/feature2 3 | 9b75494003deca69527bb64bcaa352e801611dd2 refs/heads/master 4 | 11a76e3d9a67313dec7ce1230852ab5c86352c5c refs/tags/tag1 5 | ^9b75494003deca69527bb64bcaa352e801611dd2 6 | -------------------------------------------------------------------------------- /manage_externals/test/repos/simple-ext-fork.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = true 5 | ignorecase = true 6 | precomposeunicode = true 7 | [remote "origin"] 8 | url = /Users/andreb/projects/ncar/git-conversion/checkout-model-dev/cesm-demo-externals/manage_externals/test/repos/simple-ext.git 9 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/maxthroughputfw/shell_commands: -------------------------------------------------------------------------------- 1 | # copy the spmd_mod.F90 2 | # This performance test is only expected to work on yellowstone 3 | cp /glade/u/home/jedwards/b1850/SourceMods/src.cam/* SourceMods/src.cam 4 | ./xmlchange NTASKS=2048 5 | ./xmlchange NTHRDS=4 6 | ./xmlchange --append CAM_CONFIG_OPTS="-pcols 8" 7 | 8 | 9 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/trilinos/README: -------------------------------------------------------------------------------- 1 | This testmods directory tests the use of the trilinos solver. 2 | 3 | Note: We also want to allow the case where cism is built using 4 | CISM_USE_TRILINOS=TRUE, but trilinos isn't actually chosen at runtime. However, 5 | for now I don't feel it's worth actually having a test of that combination. 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # managed directories that are checked out by the externals tool 2 | cime/ 3 | components/ 4 | libraries/ 5 | 6 | # generated local files 7 | *.log 8 | 9 | # editor files 10 | *~ 11 | *.bak 12 | .*.sw* 13 | 14 | # generated python files 15 | *.pyc 16 | 17 | # ignore for the merge to master and orphaning of the gh-pages branch 18 | doc/build/ 19 | doc/_build/ 20 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio_noclminterp/shell_commands: -------------------------------------------------------------------------------- 1 | # Remove any settings of use_init_interp and init_interp_method from CLM_NAMELIST_OPTS 2 | # (see README for rationale) 3 | clm_namelist_orig=`./xmlquery --value CLM_NAMELIST_OPTS` 4 | clm_namelist_new=`echo $clm_namelist_orig | sed -e 's/use_init_interp *= *[^ ]*//' -e 's/init_interp_method *= *[^ ]*//'` 5 | ./xmlchange CLM_NAMELIST_OPTS="$clm_namelist_new" 6 | -------------------------------------------------------------------------------- /manage_externals/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Summary of Issue: 2 | ### Expected behavior and actual behavior: 3 | ### Steps to reproduce the problem (should include model description file(s) or link to publi c repository): 4 | ### What is the changeset ID of the code, and the machine you are using: 5 | ### have you modified the code? If so, it must be committed and available for testing: 6 | ### Screen output or log file showing the error message and context: 7 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/nhistr227/user_nl_cice: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! Note - that it does not matter what namelist group the namelist_var belongs to 5 | !---------------------------------------------------------------------------------- 6 | 7 | r_snw = 1.5 8 | dt_mlt = 1.0 9 | rsnw_mlt = 1500. 10 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/n1850r227/user_nl_cice: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! Note - that it does not matter what namelist group the namelist_var belongs to 5 | !---------------------------------------------------------------------------------- 6 | 7 | !r_snw = 1.5 8 | !dt_mlt = 1.0 9 | !rsnw_mlt = 1500. 10 | -------------------------------------------------------------------------------- /manage_externals/manic/global_constants.py: -------------------------------------------------------------------------------- 1 | """Globals shared across modules 2 | """ 3 | 4 | from __future__ import absolute_import 5 | from __future__ import unicode_literals 6 | from __future__ import print_function 7 | 8 | import pprint 9 | 10 | EMPTY_STR = '' 11 | LOCAL_PATH_INDICATOR = '.' 12 | VERSION_SEPERATOR = '.' 13 | LOG_FILE_NAME = 'manage_externals.log' 14 | PPRINTER = pprint.PrettyPrinter(indent=4) 15 | 16 | VERBOSITY_DEFAULT = 0 17 | VERBOSITY_VERBOSE = 1 18 | VERBOSITY_DUMP = 2 19 | -------------------------------------------------------------------------------- /manage_externals/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | [ 50 character, one line summary ] 2 | 3 | [ Description of the changes in this commit. It should be enough 4 | information for someone not following this development to understand. 5 | Lines should be wrapped at about 72 characters. ] 6 | 7 | User interface changes?: [ No/Yes ] 8 | [ If yes, describe what changed, and steps taken to ensure backward compatibilty ] 9 | 10 | Fixes: [Github issue #s] And brief description of each issue. 11 | 12 | Testing: 13 | test removed: 14 | unit tests: 15 | system tests: 16 | manual testing: 17 | 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation 3 | about: Suggest changes in the documentation. 4 | title: '' 5 | labels: Documentation 6 | 7 | --- 8 | 9 | **Describe a problem and/or suggest an improvement** 10 | - Something incorrect or unclear in the documentation? 11 | - Something should be added to the documentation? 12 | - Something should be removed from the documentation? 13 | - Something should be re-structured in the documentation? 14 | - Suggest a Q&A for the FAQ? 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM_ism/SourceMods/src.cism/README: -------------------------------------------------------------------------------- 1 | Put source mods for the cism library in this directory. 2 | 3 | WARNING: SourceMods are not kept under version control, and can easily 4 | become out of date if changes are made to the source code on which they 5 | are based. We only recommend using SourceMods for small, short-term 6 | changes that just apply to one or two cases. For larger or longer-term 7 | changes, including gradual, incremental changes towards a final 8 | solution, we highly recommend making changes in the main source tree, 9 | leveraging version control (git or svn). 10 | -------------------------------------------------------------------------------- /manage_externals/test/doc/index.rst: -------------------------------------------------------------------------------- 1 | .. Manage Externals documentation master file, created by 2 | sphinx-quickstart on Wed Nov 29 10:53:25 2017. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to Manage Externals's documentation! 7 | ============================================ 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | :caption: Contents: 12 | 13 | 14 | develop.rst 15 | testing.rst 16 | 17 | Indices and tables 18 | ================== 19 | 20 | * :ref:`genindex` 21 | * :ref:`modindex` 22 | * :ref:`search` 23 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio_min/user_nl_pop: -------------------------------------------------------------------------------- 1 | ! The changes here are needed in order to get restart tests to pass: Without these 2 | ! changes, POP outputs a 'once' file at the start of the run, and this causes a mismatch 3 | ! between the base and restart runs (because different files exist in each of these 4 | ! runs). The changes below do more than just disabling the 'once' file, but since there 5 | ! doesn't seem to be an easy way to just disable the 'once' file, we're using these more 6 | ! substantial changes. 7 | 8 | & tavg_nml 9 | ltavg_ignore_extra_streams = .true. 10 | n_tavg_streams = 1 11 | / 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: good-to-have 6 | 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. 11 | 12 | **Describe the solution you would like to see** 13 | A clear and concise description of what you want to happen. 14 | - Would you be able to work on this solution yourself? 15 | - How can the NorESM development team assist you? 16 | 17 | **Additional context** 18 | Add any other context or screenshots about the feature request here. 19 | -------------------------------------------------------------------------------- /manage_externals/test/doc/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = ManageExternals 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio/user_nl_rtm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! NOTE: namelist variable rtm_tstep CAN ONLY be changed by modifying the value 5 | ! of the xml variable ROF_NCPL in env_run.xml 6 | ! NOTE: if the xml variable RTM_MODE in env_run.xml is set to 'NULL', then 7 | ! then rtm will set rtm_present to .false. - and will ignore everything else 8 | !---------------------------------------------------------------------------------- 9 | rtmhist_ndens = 1 10 | rtmhist_nhtfrq =-24 11 | rtmhist_mfilt = 1 12 | 13 | 14 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio/user_nl_mosart: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! NOTE: namelist variable rtm_tstep CAN ONLY be changed by modifying the value 5 | ! of the xml variable ROF_NCPL in env_run.xml 6 | ! NOTE: if the xml variable RTM_MODE in env_run.xml is set to 'NULL', then 7 | ! then rtm will set rtm_present to .false. - and will ignore everything else 8 | !---------------------------------------------------------------------------------- 9 | rtmhist_ndens = 1 10 | rtmhist_nhtfrq =-24 11 | rtmhist_mfilt = 1 12 | 13 | 14 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/cism/test_coupling/user_nl_clm: -------------------------------------------------------------------------------- 1 | 2 | ! This is needed to tell CLM to allow the non-annual-boundary glacier changes that arise 3 | ! with this testmod. 4 | for_testing_allow_non_annual_changes = .true. 5 | 6 | ! When we have daily rather than annual glacier dynamics (as we do in this testmod, due 7 | ! to having test_coupling in user_nl_cism), CLM applies the dynbal adjustments in a 8 | ! single time step rather than spreading them throughout the year. This can cause 9 | ! sensible heat fluxes of thousands of W m-2, which causes CAM's PBL scheme to blow up. 10 | ! So force these fluxes to zero for this testmod; this breaks water and energy 11 | ! conservation in CLM, but should allow the test to pass. 12 | for_testing_zero_dynbal_fluxes = .true. 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | 7 | --- 8 | 9 | **Describe the bug** 10 | Please provide a clear and concise description of what the bug is. 11 | - NorESM version: 12 | - HPC platform: 13 | - Compiler (if applicable): 14 | - Compset (if applicable): 15 | - Resolution (if applicable): 16 | - Error message (if applicable): 17 | 18 | **To Reproduce** 19 | Steps to reproduce the behavior: 20 | 1. 21 | 2. 22 | 3. 23 | 24 | **Expected behavior** 25 | A clear and concise description of what you expected to happen. 26 | 27 | **Screenshots** 28 | If applicable, add screenshots to help explain your problem. 29 | 30 | **Additional context** 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/n1850r227/user_nl_mosart: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! NOTE: namelist variable rtm_tstep CAN ONLY be changed by modifying the value 5 | ! of the xml variable ROF_NCPL in env_run.xml 6 | ! NOTE: if the xml variable ROF GRID in env_build.xml is set to 'null', then 7 | ! the RTM build-namelist will set do_rtm to .false. - and will ignore 8 | ! any change below 9 | !---------------------------------------------------------------------------------- 10 | 11 | finidat_rtm = '$DIN_LOC_ROOT/cesm2_init/b.e20.B1850.f09_g17.pi_control.all.215/0040-01-01-00000/b.e20.B1850.f09_g17.pi_control.all.215.mosart.r.0040-01-01-00000.nc' 12 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Set the version of Python and other tools you might need 9 | build: 10 | os: ubuntu-22.04 11 | tools: 12 | python: "3.11" 13 | # You can also specify other tool versions: 14 | # nodejs: "19" 15 | # rust: "1.64" 16 | # golang: "1.19" 17 | 18 | # Build documentation in the doc/ directory with Sphinx 19 | sphinx: 20 | configuration: docs/conf.py 21 | 22 | # If using Sphinx, optionally build your docs in additional formats such as PDF 23 | # formats: 24 | # - pdf 25 | 26 | # Optionally declare the Python requirements required to build your docs 27 | python: 28 | install: 29 | - requirements: docs/requirements.txt 30 | 31 | # Add submodules 32 | submodules: 33 | include: 34 | - docs 35 | -------------------------------------------------------------------------------- /manage_externals/.travis.yml: -------------------------------------------------------------------------------- 1 | # NOTE(bja, 2017-11) travis-ci dosen't support python language builds 2 | # on mac os. As a work around, we use built-in python on linux, and 3 | # declare osx a 'generic' language, and create our own python env. 4 | 5 | language: python 6 | os: linux 7 | python: 8 | - "2.7" 9 | - "3.4" 10 | - "3.5" 11 | - "3.6" 12 | matrix: 13 | include: 14 | - os: osx 15 | language: generic 16 | before_install: 17 | # NOTE(bja, 2017-11) update is slow, 2.7.12 installed by default, good enough! 18 | # - brew update 19 | # - brew outdated python2 || brew upgrade python2 20 | - pip install virtualenv 21 | - virtualenv env -p python2 22 | - source env/bin/activate 23 | install: 24 | - pip install -r test/requirements.txt 25 | before_script: 26 | - git --version 27 | script: 28 | - cd test; make test 29 | - cd test; make lint 30 | after_success: 31 | - cd test; make coverage 32 | - cd test; coveralls 33 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/nhistr227/user_nl_cpl: -------------------------------------------------------------------------------- 1 | !------------------------------------------------------------------------ 2 | ! Users should ONLY USE user_nl_cpl to change namelists variables 3 | ! for namelist variables in drv_in (except for the ones below) and 4 | ! any keyword/values in seq_maps.rc 5 | ! Users should add ALL user specific namelist and seq_maps.rc changes below 6 | ! using the following syntax 7 | ! namelist_var = new_namelist_value 8 | ! or 9 | ! mapname = new_map_name 10 | ! For example to change the default value of ocn2atm_fmapname to 'foo' use 11 | ! ocn2atm_fmapname = 'foo' 12 | ! 13 | ! Note that some namelist variables MAY NOT be changed in user_nl_cpl - 14 | ! they are defined in a $CASEROOT xml file and must be changed with 15 | ! xmlchange. 16 | ! 17 | ! For example, rather than set username to 'foo' in user_nl_cpl, call 18 | ! ./xmlchange USER=foo 19 | !------------------------------------------------------------------------ 20 | flux_scheme = 1 21 | alb_cosz_avg=.true. 22 | / 23 | -------------------------------------------------------------------------------- /manage_externals/manic/repository_factory.py: -------------------------------------------------------------------------------- 1 | """Factory for creating and initializing the appropriate repository class 2 | """ 3 | 4 | from __future__ import absolute_import 5 | from __future__ import unicode_literals 6 | from __future__ import print_function 7 | 8 | from .repository_git import GitRepository 9 | from .repository_svn import SvnRepository 10 | from .externals_description import ExternalsDescription 11 | from .utils import fatal_error 12 | 13 | 14 | def create_repository(component_name, repo_info): 15 | """Determine what type of repository we have, i.e. git or svn, and 16 | create the appropriate object. 17 | 18 | """ 19 | protocol = repo_info[ExternalsDescription.PROTOCOL].lower() 20 | if protocol == 'git': 21 | repo = GitRepository(component_name, repo_info) 22 | elif protocol == 'svn': 23 | repo = SvnRepository(component_name, repo_info) 24 | elif protocol == 'externals_only': 25 | repo = None 26 | else: 27 | msg = 'Unknown repo protocol "{0}"'.format(protocol) 28 | fatal_error(msg) 29 | return repo 30 | -------------------------------------------------------------------------------- /manage_externals/checkout_externals: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """Main driver wrapper around the manic/checkout utility. 4 | 5 | Tool to assemble external respositories represented in an externals 6 | description file. 7 | 8 | """ 9 | from __future__ import absolute_import 10 | from __future__ import unicode_literals 11 | from __future__ import print_function 12 | 13 | import sys 14 | import traceback 15 | 16 | import manic 17 | 18 | if sys.hexversion < 0x02070000: 19 | print(70 * '*') 20 | print('ERROR: {0} requires python >= 2.7.x. '.format(sys.argv[0])) 21 | print('It appears that you are running python {0}'.format( 22 | '.'.join(str(x) for x in sys.version_info[0:3]))) 23 | print(70 * '*') 24 | sys.exit(1) 25 | 26 | 27 | if __name__ == '__main__': 28 | ARGS = manic.checkout.commandline_arguments() 29 | try: 30 | RET_STATUS, _ = manic.checkout.main(ARGS) 31 | sys.exit(RET_STATUS) 32 | except Exception as error: # pylint: disable=broad-except 33 | manic.printlog(str(error)) 34 | if ARGS.backtrace: 35 | traceback.print_exc() 36 | sys.exit(1) 37 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/maxthroughputb/shell_commands: -------------------------------------------------------------------------------- 1 | # copy the spmd_mod.F90 2 | # This performance test is only expected to work on yellowstone 3 | cp /glade/u/home/jedwards/b1850/SourceMods/src.cam/* SourceMods/src.cam 4 | NTASKS_ATM=1920 5 | NTASKS_CPL=608 6 | NTASKS_LND=1184 7 | NTASKS_ICE=608 8 | NTASKS_WAV=128 9 | NTASKS_OCN=192 10 | NTHRDS=2 11 | 12 | ROOTPE_WAV=$(($NTASKS_LND + $NTASKS_ICE)) 13 | #ROOTPE_CPL=$(($ROOTPE_WAV + $NTASKS_WAV)) 14 | ROOTPE_CPL=$NTASKS_LND 15 | COST_PES=$(($NTHRDS*($NTASKS_ATM + $NTASKS_OCN))) 16 | ROOTPE_OCN=$(($NTASKS_ATM)) 17 | 18 | ./xmlchange MAX_MPITASKS_PER_NODE=16 19 | ./xmlchange MAX_TASKS_PER_NODE=16 20 | ./xmlchange NTASKS_ATM=$NTASKS_ATM 21 | ./xmlchange NTASKS_CPL=$NTASKS_CPL 22 | ./xmlchange NTASKS_GLC=$NTASKS_ATM 23 | ./xmlchange NTASKS_LND=$NTASKS_LND 24 | ./xmlchange NTASKS_ROF=$NTASKS_LND 25 | ./xmlchange NTASKS_ICE=$NTASKS_ICE 26 | ./xmlchange NTASKS_WAV=$NTASKS_WAV 27 | ./xmlchange NTASKS_OCN=$NTASKS_OCN 28 | ./xmlchange ROOTPE_OCN=$ROOTPE_OCN 29 | ./xmlchange ROOTPE_ICE=$NTASKS_LND 30 | ./xmlchange ROOTPE_WAV=$ROOTPE_WAV 31 | ./xmlchange ROOTPE_CPL=$ROOTPE_CPL 32 | ./xmlchange NTHRDS=$NTHRDS 33 | 34 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/n1850r227/user_nl_cpl: -------------------------------------------------------------------------------- 1 | !------------------------------------------------------------------------ 2 | ! Users should ONLY USE user_nl_cpl to change namelists variables 3 | ! for namelist variables in drv_in (except for the ones below) and 4 | ! any keyword/values in seq_maps.rc 5 | ! Users should add ALL user specific namelist and seq_maps.rc changes below 6 | ! using the following syntax 7 | ! namelist_var = new_namelist_value 8 | ! or 9 | ! mapname = new_map_name 10 | ! For example to change the default value of ocn2atm_fmapname to 'foo' use 11 | ! ocn2atm_fmapname = 'foo' 12 | ! 13 | ! Note that some namelist variables MAY NOT be changed in user_nl_cpl - 14 | ! they are defined in a $CASEROOT xml file and must be changed with 15 | ! xmlchange. 16 | ! 17 | ! For example, rather than set username to 'foo' in user_nl_cpl, call 18 | ! ./xmlchange USER=foo 19 | !------------------------------------------------------------------------ 20 | ! +djlo 21 | !histaux_a2x3hr=.true. 22 | !histaux_a2x1hri=.true. 23 | !histaux_a2x1hr=.true. 24 | !histaux_a2x24hr=.true. 25 | ! 26 | ! -djlo 27 | !orb_iyear = 1850 28 | !orb_iyear_align = 1850 29 | !flux_scheme = 1 !modify in env_run.xml ocn_flux_scheme 30 | !alb_cosz_avg=.true. !modify in env_run.xml cosz_avg 31 | / 32 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio_noclminterp/README: -------------------------------------------------------------------------------- 1 | This testmod is designed for ERI tests of compset-grid combinations that 2 | set CLM's use_init_interp = .true. by default (which is done because 3 | this is needed for compatibility with the hybrid refcase used for that 4 | compset-grid combination). The problem with this setting is that, in the 5 | branch portion of the ERI test, CLM dies with an error message if 6 | use_init_interp is true: 7 | 8 | ERROR: Can only set use_init_interp if finidat is set 9 | 10 | (because finidat is NOT set in a branch run). 11 | 12 | Currently, ERI tests do a startup run for the ref1 case, so we don't 13 | actually need the use_init_interp setting that we would normally need 14 | for this compset-grid combination. So it's safe to simply turn off 15 | use_init_interp for all of the cases in this ERI test. 16 | 17 | Note that we cannot turn off use_init_interp via user_nl_clm, because 18 | CLM_NAMELIST_OPTS takes precedence over user_nl_clm. We could append 19 | 'use_init_interp=.false.' to CLM_NAMELIST_OPTS, but that would still 20 | leave the problem of init_interp_method: if that is set at all when 21 | use_init_interp=.false., then we get an error during build-namelist. So 22 | we need to remove the init_interp_method setting entirely; once we are 23 | going to the trouble of doing that, we might as well just remove 24 | use_init_interp, too. 25 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_DECK/user_nl_cam: -------------------------------------------------------------------------------- 1 | nhtfrq = 0, -24, -6, -3, -1, 1, -24,-120,-240 2 | 3 | mfilt = 1, 5, 20, 40, 120, 240, 365, 73, 365 4 | 5 | ndens = 2, 2, 2, 2, 2, 2, 1, 1, 1 6 | 7 | fincl1 = 'SST','TAUX','TAUY','TAUBLJX','TAUBLJY','BTAUNET','PRECC','PRECL','PRECT','FREQZM','PCONVB','PCONVT','PRECCDZM','Z700','Z500','Z200','Z300','Z100','Z050','U200','U850','V200','V850','T200','T500', 'T700','T1000','OMEGA500','OMEGA850','VTHzm','WTHzm','UVzm','UWzm','Uzm','Vzm','THzm','Wzm','dUzm','dVzm','dUazm','dVazm','dUfzm','U','V','T','Q','Z3','dU','dV','dUa','dVa','dUf','EFLX','PTTEND','IETEND_DME', 'PTTEND_DME','TFIX','EFIX','EP','QFLX','MEANPTOP','MEANTTOP','MEANTAU','TCLDAREA','RHREFHT','TREFMXAV','TREFMNAV','ozone','O3','TROP_P','TROP_T','TROP_Z','VT100' 8 | 9 | 10 | fincl2 = 'ABSVIS:A', 'ACTNL:A', 'ACTREL:A', 'AOD_VIS:A', 'cb_BC:A', 'cb_DMS:A', 'cb_DUST:A', 'cb_OM:A', 'cb_SALT:A', 'cb_SO2:A', 'cb_SULFATE:A', 11 | 'CDNUMC:A', 'CLDICE:A', 'CLDLIQ:A', 'CLDTOT:A', 'CLOUD:A', 'CMFMC:A', 'CMFMCDZM:A', 'DAYFOC:A', 'FCTL:A', 'FLDS:A', 'FLDSC:A', 'FLNR:A', 'FLNS:A', 'FLNSC:A', 12 | 'FLNT:A', 'FLNTC:A', 'FLUT:A', 'FLUTC:A', 'FSDS:A', 'FSDSC:A', 'FSNR:A', 'FSNS:A', 'FSNSC:A', 'FSNTOA:A', 'FSNTOAC:A', 'ICEFRAC:A' , 'LHFLX:A', 'MASS:A', 'OMEGA:A', 13 | 'OMEGA500:A', 'PBLH:A', 'PDELDRY:A', 'PRECC:A', 'PRECT:A', 'PS:A', 'PSL:A', 'Q:A', 'QREFHT:A', 'QSNOW:A', 'RHREFHT:A', 'SHFLX:A', 14 | 'SOLIN:A', 'SOLLD:A', 'SOLSD:A', 'SST:A' ,'T:A', 'T500:A', 'T700:A', 'T850:A', 'TAUBLJX:A', 'TAUBLJY:A', 'TAUGWX:A', 'TAUGWY:A', 'TAUX:A', 'TAUY:A', 15 | 'TGCLDIWP:A', 'TGCLDLWP:A', 'TMQ:A', 'TREFHT:A', 'TREFHTMN:M', 'TREFHTMX:X', 'TS:A', 'TSMN:M', 'TSMX:X', 'U10:A', 'UTGWORO:A', 16 | 'Z500:A' 17 | 18 | 19 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM_ism/user_nl_cam: -------------------------------------------------------------------------------- 1 | history_aerosol=.true. 2 | 3 | nhtfrq = 0, -24, -6, -3, -1, 1, -24,-120,-240 4 | 5 | mfilt = 1, 5, 20, 40, 120, 240, 365, 73, 365 6 | 7 | ndens = 2, 2, 2, 2, 2, 2, 1, 1, 1 8 | 9 | fincl1 = 'SST','TAUX','TAUY','TAUBLJX','TAUBLJY','BTAUNET','PRECC','PRECL','PRECT','FREQZM','PCONVB','PCONVT','PRECCDZM','Z700','Z500','Z200','Z300','Z100','Z050','U200','U850','V200','V850','T200','T500', 'T700','T1000','OMEGA500','OMEGA850','VTHzm','WTHzm','UVzm','UWzm','Uzm','Vzm','THzm','Wzm','dUzm','dVzm','dUazm','dVazm','dUfzm','U','V','T','Q','Z3','dU','dV','dUa','dVa','dUf','EFLX','PTTEND','IETEND_DME', 'PTTEND_DME','TFIX','EFIX','EP','QFLX','MEANPTOP','MEANTTOP','MEANTAU','TCLDAREA','RHREFHT','TREFMXAV','TREFMNAV','ozone','O3','TROP_P','TROP_T','TROP_Z','VT100' 10 | 11 | 12 | fincl2 = 'ABSVIS:A', 'ACTNL:A', 'ACTREL:A', 'AOD_VIS:A', 'cb_BC:A', 'cb_DMS:A', 'cb_DUST:A', 'cb_OM:A', 'cb_SALT:A', 'cb_SO2:A', 'cb_SULFATE:A', 13 | 'CDNUMC:A', 'CLDICE:A', 'CLDLIQ:A', 'CLDTOT:A', 'CLOUD:A', 'CMFMC:A', 'CMFMCDZM:A', 'DAYFOC:A', 'FCTL:A', 'FLDS:A', 'FLDSC:A', 'FLNR:A', 'FLNS:A', 'FLNSC:A', 14 | 'FLNT:A', 'FLNTC:A', 'FLUT:A', 'FLUTC:A', 'FSDS:A', 'FSDSC:A', 'FSNR:A', 'FSNS:A', 'FSNSC:A', 'FSNTOA:A', 'FSNTOAC:A', 'ICEFRAC:A' , 'LHFLX:A', 'MASS:A', 'OMEGA:A', 15 | 'OMEGA500:A', 'PBLH:A', 'PDELDRY:A', 'PRECC:A', 'PRECT:A', 'PS:A', 'PSL:A', 'Q:A', 'QREFHT:A', 'QSNOW:A', 'RHREFHT:A', 'SHFLX:A', 16 | 'SOLIN:A', 'SOLLD:A', 'SOLSD:A', 'SST:A' ,'T:A', 'T500:A', 'T700:A', 'T850:A', 'TAUBLJX:A', 'TAUBLJY:A', 'TAUGWX:A', 'TAUGWY:A', 'TAUX:A', 'TAUY:A', 17 | 'TGCLDIWP:A', 'TGCLDLWP:A', 'TMQ:A', 'TREFHT:A', 'TREFHTMN:M', 'TREFHTMX:X', 'TS:A', 'TSMN:M', 'TSMX:X', 'U10:A', 'UTGWORO:A', 18 | 'Z500:A' 19 | 20 | 21 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM/user_nl_cam: -------------------------------------------------------------------------------- 1 | 2 | history_aerosol=.true. 3 | 4 | nhtfrq = 0, -24, -6, -3, -1, 1, -24,-120,-240 5 | 6 | mfilt = 1, 5, 20, 40, 120, 240, 365, 73, 365 7 | 8 | ndens = 2, 2, 2, 2, 2, 2, 1, 1, 1 9 | 10 | fincl1 = 'SST','TAUX','TAUY','TAUBLJX','TAUBLJY','BTAUNET','PRECC','PRECL','PRECT','FREQZM','PCONVB','PCONVT','PRECCDZM','Z700','Z500','Z200','Z300','Z100','Z050','U200','U850','V200','V850','T200','T500', 'T700','T1000','OMEGA500','OMEGA850','VTHzm','WTHzm','UVzm','UWzm','Uzm','Vzm','THzm','Wzm','dUzm','dVzm','dUazm','dVazm','dUfzm','U','V','T','Q','Z3','dU','dV','dUa','dVa','dUf','EFLX','PTTEND','IETEND_DME', 'PTTEND_DME','TFIX','EFIX','EP','QFLX','MEANPTOP','MEANTTOP','MEANTAU','TCLDAREA','RHREFHT','TREFMXAV','TREFMNAV','ozone','O3','TROP_P','TROP_T','TROP_Z','VT100' 11 | 12 | 13 | fincl2 = 'ABSVIS:A', 'ACTNL:A', 'ACTREL:A', 'AOD_VIS:A', 'cb_BC:A', 'cb_DMS:A', 'cb_DUST:A', 'cb_OM:A', 'cb_SALT:A', 'cb_SO2:A', 'cb_SULFATE:A', 14 | 'CDNUMC:A', 'CLDICE:A', 'CLDLIQ:A', 'CLDTOT:A', 'CLOUD:A', 'CMFMC:A', 'CMFMCDZM:A', 'DAYFOC:A', 'FCTL:A', 'FLDS:A', 'FLDSC:A', 'FLNR:A', 'FLNS:A', 'FLNSC:A', 15 | 'FLNT:A', 'FLNTC:A', 'FLUT:A', 'FLUTC:A', 'FSDS:A', 'FSDSC:A', 'FSNR:A', 'FSNS:A', 'FSNSC:A', 'FSNTOA:A', 'FSNTOAC:A', 'ICEFRAC:A' , 'LHFLX:A', 'MASS:A', 'OMEGA:A', 16 | 'OMEGA500:A', 'PBLH:A', 'PDELDRY:A', 'PRECC:A', 'PRECT:A', 'PS:A', 'PSL:A', 'Q:A', 'QREFHT:A', 'QSNOW:A', 'RHREFHT:A', 'SHFLX:A', 17 | 'SOLIN:A', 'SOLLD:A', 'SOLSD:A', 'SST:A' ,'T:A', 'T500:A', 'T700:A', 'T850:A', 'TAUBLJX:A', 'TAUBLJY:A', 'TAUGWX:A', 'TAUGWY:A', 'TAUX:A', 'TAUY:A', 18 | 'TGCLDIWP:A', 'TGCLDLWP:A', 'TMQ:A', 'TREFHT:A', 'TREFHTMN:M', 'TREFHTMX:X', 'TS:A', 'TSMN:M', 'TSMX:X', 'U10:A', 'UTGWORO:A', 19 | 'Z500:A' 20 | 21 | 22 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_xaer/user_nl_cam: -------------------------------------------------------------------------------- 1 | 2 | history_aerosol=.true. 3 | 4 | nhtfrq = 0, -24, -6, -3, -1, 1, -24,-120,-240 5 | 6 | mfilt = 1, 5, 20, 40, 120, 240, 365, 73, 365 7 | 8 | ndens = 2, 2, 2, 2, 2, 2, 1, 1, 1 9 | 10 | 11 | fincl1 = 'SST','TAUX','TAUY','TAUBLJX','TAUBLJY','BTAUNET','PRECC','PRECL','PRECT','FREQZM','PCONVB','PCONVT','PRECCDZM','Z700','Z500','Z200','Z300','Z100','Z050','U200','U850','V200','V850','T200','T500', 'T700','T1000','OMEGA500','OMEGA850','VTHzm','WTHzm','UVzm','UWzm','Uzm','Vzm','THzm','Wzm','dUzm','dVzm','dUazm','dVazm','dUfzm','U','V','T','Q','Z3','dU','dV','dUa','dVa','dUf','EFLX','PTTEND','IETEND_DME', 'PTTEND_DME','TFIX','EFIX','EP','QFLX','MEANPTOP','MEANTTOP','MEANTAU','TCLDAREA','RHREFHT','TREFMXAV','TREFMNAV','ozone','O3','TROP_P','TROP_T','TROP_Z','VT100' 12 | 13 | 14 | fincl2 = 'ABSVIS:A', 'ACTNL:A', 'ACTREL:A', 'AOD_VIS:A', 'cb_BC:A', 'cb_DMS:A', 'cb_DUST:A', 'cb_OM:A', 'cb_SALT:A', 'cb_SO2:A', 'cb_SULFATE:A', 15 | 'CDNUMC:A', 'CLDICE:A', 'CLDLIQ:A', 'CLDTOT:A', 'CLOUD:A', 'CMFMC:A', 'CMFMCDZM:A', 'DAYFOC:A', 'FCTL:A', 'FLDS:A', 'FLDSC:A', 'FLNR:A', 'FLNS:A', 'FLNSC:A', 16 | 'FLNT:A', 'FLNTC:A', 'FLUT:A', 'FLUTC:A', 'FSDS:A', 'FSDSC:A', 'FSNR:A', 'FSNS:A', 'FSNSC:A', 'FSNTOA:A', 'FSNTOAC:A', 'ICEFRAC:A' , 'LHFLX:A', 'MASS:A', 'OMEGA:A', 17 | 'OMEGA500:A', 'PBLH:A', 'PDELDRY:A', 'PRECC:A', 'PRECT:A', 'PS:A', 'PSL:A', 'Q:A', 'QREFHT:A', 'QSNOW:A', 'RHREFHT:A', 'SHFLX:A', 18 | 'SOLIN:A', 'SOLLD:A', 'SOLSD:A', 'SST:A' ,'T:A', 'T500:A', 'T700:A', 'T850:A', 'TAUBLJX:A', 'TAUBLJY:A', 'TAUGWX:A', 'TAUGWY:A', 'TAUX:A', 'TAUY:A', 19 | 'TGCLDIWP:A', 'TGCLDLWP:A', 'TMQ:A', 'TREFHT:A', 'TREFHTMN:M', 'TREFHTMX:X', 'TS:A', 'TSMN:M', 'TSMX:X', 'U10:A', 'UTGWORO:A', 20 | 'Z500:A' 21 | 22 | 23 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/nhistr227/user_nl_clm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! 5 | ! EXCEPTIONS: 6 | ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting 7 | ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting 8 | ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting 9 | ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting 10 | ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting 11 | ! Set irrigate by the CLM_BLDNML_OPTS -irrig .true. setting 12 | ! Set co2_ppmv with CCSM_CO2_PPMV option 13 | ! Set dtime with L_NCPL option 14 | ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options 15 | ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases 16 | ! (includes $inst_string for multi-ensemble cases) 17 | ! or with CLM_FORCE_COLDSTART to do a cold start 18 | ! or set it with an explicit filename here. 19 | ! Set maxpatch_glcmec with GLC_NEC option 20 | ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable 21 | !---------------------------------------------------------------------------------- 22 | 23 | paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm5_params.c171017.nc' 24 | reset_snow=.false. 25 | ndep_taxmode = 'cycle' 26 | ndep_varlist = 'NDEP_month' 27 | stream_fldfilename_ndep = '$DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_hist_simyr1850_0.9x1.25_CMIP6alpha01_c170330.nc' 28 | stream_year_first_ndep = 1850 29 | stream_year_last_ndep = 1850 30 | reseed_dead_plants=.false. 31 | use_init_interp = .true. 32 | / 33 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_DECK/user_nl_clm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! 5 | ! EXCEPTIONS: 6 | ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting 7 | ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting 8 | ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting 9 | ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting 10 | ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting 11 | ! Set irrigate by the CLM_BLDNML_OPTS -irrig .true. setting 12 | ! Set co2_ppmv with CCSM_CO2_PPMV option 13 | ! Set dtime with L_NCPL option 14 | ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options 15 | ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases 16 | ! (includes $inst_string for multi-ensemble cases) 17 | ! or with CLM_FORCE_COLDSTART to do a cold start 18 | ! or set it with an explicit filename here. 19 | ! Set maxpatch_glcmec with GLC_NEC option 20 | ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable 21 | !---------------------------------------------------------------------------------- 22 | 23 | 24 | hist_nhtfrq = 0, -24, -6, -3 25 | 26 | hist_mfilt = 1, 5, 20, 40 27 | 28 | hist_fincl1 = 'FERT_TO_SMINN','NFIX_TO_SMINN','LITFIRE','LITR1C_TO_SOIL1C','LITR2C_TO_SOIL1C','LITR3C_TO_SOIL2C','M_LEAFC_TO_LITTER','M_FROOTC_TO_LITTER','M_LIVESTEMC_TO_LITTER','M_DEADSTEMC_TO_LITTER','M_LIVECROOTC_TO_LITTER','M_DEADCROOTC_TO_LITTER' 29 | 30 | hist_fincl2 = 'QRUNOFF', 'SOILLIQ', 'SOILICE', 'SOILWATER_10CM', 'TSA', 'TSL', 'GPP', 'AR', 'HR' 31 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_xaer/user_nl_clm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! 5 | ! EXCEPTIONS: 6 | ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting 7 | ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting 8 | ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting 9 | ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting 10 | ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting 11 | ! Set irrigate by the CLM_BLDNML_OPTS -irrig .true. setting 12 | ! Set co2_ppmv with CCSM_CO2_PPMV option 13 | ! Set dtime with L_NCPL option 14 | ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options 15 | ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases 16 | ! (includes $inst_string for multi-ensemble cases) 17 | ! or with CLM_FORCE_COLDSTART to do a cold start 18 | ! or set it with an explicit filename here. 19 | ! Set maxpatch_glcmec with GLC_NEC option 20 | ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable 21 | !---------------------------------------------------------------------------------- 22 | 23 | 24 | hist_nhtfrq = 0, -24, -6, -3 25 | 26 | hist_mfilt = 1, 5, 20, 40 27 | 28 | hist_fincl1 = 'FERT_TO_SMINN','NFIX_TO_SMINN','LITFIRE','LITR1C_TO_SOIL1C','LITR2C_TO_SOIL1C','LITR3C_TO_SOIL2C','M_LEAFC_TO_LITTER','M_FROOTC_TO_LITTER','M_LIVESTEMC_TO_LITTER','M_DEADSTEMC_TO_LITTER','M_LIVECROOTC_TO_LITTER','M_DEADCROOTC_TO_LITTER' 29 | 30 | hist_fincl2 = 'QRUNOFF', 'SOILLIQ', 'SOILICE', 'SOILWATER_10CM', 'TSA', 'TSL', 'GPP', 'AR', 'HR' 31 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM/user_nl_clm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! 5 | ! EXCEPTIONS: 6 | ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting 7 | ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting 8 | ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting 9 | ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting 10 | ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting 11 | ! Set irrigate by the CLM_BLDNML_OPTS -irrig .true. setting 12 | ! Set co2_ppmv with CCSM_CO2_PPMV option 13 | ! Set dtime with L_NCPL option 14 | ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options 15 | ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases 16 | ! (includes $inst_string for multi-ensemble cases) 17 | ! or with CLM_FORCE_COLDSTART to do a cold start 18 | ! or set it with an explicit filename here. 19 | ! Set maxpatch_glcmec with GLC_NEC option 20 | ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable 21 | !---------------------------------------------------------------------------------- 22 | 23 | 24 | hist_nhtfrq = 0, -24, -6, -3 25 | 26 | hist_mfilt = 1, 5, 20, 40 27 | 28 | hist_fincl1 = 'FERT_TO_SMINN','NFIX_TO_SMINN','LITFIRE','LITR1C_TO_SOIL1C','LITR2C_TO_SOIL1C','LITR3C_TO_SOIL2C','M_LEAFC_TO_LITTER','M_FROOTC_TO_LITTER','M_LIVESTEMC_TO_LITTER','M_DEADSTEMC_TO_LITTER','M_LIVECROOTC_TO_LITTER','M_DEADCROOTC_TO_LITTER' 29 | 30 | hist_fincl2 = 'QRUNOFF', 'SOILLIQ', 'SOILICE', 'SOILWATER_10CM', 'TSA', 'TSL', 'GPP', 'AR', 'HR' 31 | -------------------------------------------------------------------------------- /manage_externals/README_FIRST: -------------------------------------------------------------------------------- 1 | CESM is comprised of a number of different components that are 2 | developed and managed independently. Each component may have 3 | additional 'external' dependancies and optional parts that are also 4 | developed and managed independently. 5 | 6 | The checkout_externals.py tool manages retreiving and updating the 7 | components and their externals so you have a complete set of source 8 | files for the model. 9 | 10 | checkout_externals.py relies on a model description file that 11 | describes what components are needed, where to find them and where to 12 | put them in the source tree. The default file is called "CESM.xml" 13 | regardless of whether you are checking out CESM or a standalone 14 | component. 15 | 16 | checkout_externals requires access to git and svn repositories that 17 | require authentication. checkout_externals may pass through 18 | authentication requests, but it will not cache them for you. For the 19 | best and most robust user experience, you should have svn and git 20 | working without password authentication. See: 21 | 22 | https://help.github.com/articles/connecting-to-github-with-ssh/ 23 | 24 | ?svn ref? 25 | 26 | NOTE: checkout_externals.py *MUST* be run from the root of the source 27 | tree it is managing. For example, if you cloned CLM with: 28 | 29 | $ git clone git@github.com/ncar/clm clm-dev 30 | 31 | Then the root of the source tree is /path/to/cesm-dev. If you obtained 32 | CLM via an svn checkout of CESM and you need to checkout the CLM 33 | externals, then the root of the source tree for CLM is: 34 | 35 | /path/to/cesm-dev/components/clm 36 | 37 | The root of the source tree will be referred to as ${SRC_ROOT} below. 38 | 39 | To get started quickly, checkout all required components from the 40 | default model description file: 41 | 42 | $ cd ${SRC_ROOT} 43 | $ ./checkout_cesm/checkout_externals.py 44 | 45 | For additional information about using checkout model, please see: 46 | 47 | ${SRC_ROOT}/checkout_cesm/README 48 | 49 | or run: 50 | 51 | $ cd ${SRC_ROOT} 52 | $ ./checkout_cesm/checkout_externals.py --help 53 | 54 | 55 | -------------------------------------------------------------------------------- /Externals_continuous_development.cfg: -------------------------------------------------------------------------------- 1 | [cam] 2 | branch = cam_cesm2_1_rel_05-Nor 3 | protocol = git 4 | repo_url = https://github.com/NorESMhub/CAM 5 | local_path = components/cam 6 | required = True 7 | 8 | [cice] 9 | branch = cice5_20181109-Nor 10 | protocol = git 11 | repo_url = https://github.com/NorESMHub/CESM_CICE5 12 | local_path = components/cice 13 | required = True 14 | 15 | [cime] 16 | branch = cime5.6.10_cesm2_1_rel_06-Nor 17 | protocol = git 18 | repo_url = https://github.com/NorESMhub/cime 19 | local_path = cime 20 | required = True 21 | 22 | [cism] 23 | branch = wrapper_noresm2 24 | protocol = git 25 | repo_url = https://github.com/NorESMhub/cism-wrapper 26 | local_path = components/cism 27 | externals = Externals_CISM.cfg 28 | required = False 29 | 30 | [clm] 31 | branch = release-clm5.0.14-Nor 32 | protocol = git 33 | repo_url = https://github.com/NorESMhub/ctsm 34 | local_path = components/clm 35 | externals = Externals_CLM.cfg 36 | required = True 37 | 38 | [mosart] 39 | branch = release-cesm2.0.03-Nor 40 | protocol = git 41 | repo_url = https://github.com/NorESMhub/mosart 42 | local_path = components/mosart 43 | required = True 44 | 45 | [pop] 46 | tag = pop2_cesm2_1_rel_n01 47 | protocol = svn 48 | repo_url = https://svn-ccsm-models.cgd.ucar.edu/pop2/release_tags 49 | local_path = components/pop 50 | externals = Externals_POP.cfg 51 | required = False 52 | 53 | [blom] 54 | branch = release-1.3 55 | protocol = git 56 | repo_url = https://github.com/NorESMhub/BLOM 57 | local_path = components/blom 58 | externals = Externals_BLOM.cfg 59 | required = True 60 | 61 | [rtm] 62 | tag = release-cesm2.0.02 63 | protocol = git 64 | repo_url = https://github.com/ESCOMP/rtm 65 | local_path = components/rtm 66 | required = False 67 | 68 | [ww3] 69 | tag = ww3_cesm2_1_rel_01 70 | protocol = svn 71 | repo_url = https://svn-ccsm-models.cgd.ucar.edu/ww3/release_tags 72 | local_path = components/ww3 73 | required = False 74 | 75 | [norcpm] 76 | tag = main 77 | protocol = git 78 | repo_url = git@github.com:NorESMhub/norcpm.git 79 | local_path = norcpm 80 | required = False 81 | 82 | [externals_description] 83 | schema_version = 1.0.0 84 | -------------------------------------------------------------------------------- /Externals.cfg: -------------------------------------------------------------------------------- 1 | [cam] 2 | tag = cam_cesm2_1_rel_05-Nor_v1.0.5 3 | protocol = git 4 | repo_url = https://github.com/NorESMhub/CAM 5 | local_path = components/cam 6 | required = True 7 | 8 | [cice] 9 | tag = cice5_20181109-Nor_v1.0.3 10 | protocol = git 11 | repo_url = https://github.com/NorESMHub/CESM_CICE5 12 | local_path = components/cice 13 | required = True 14 | 15 | [cime] 16 | tag = cime5.6.10_cesm2_1_rel_06-Nor_v1.0.6 17 | protocol = git 18 | repo_url = https://github.com/NorESMhub/cime 19 | local_path = cime 20 | required = True 21 | 22 | [cism] 23 | tag = wrapper_noresm2.0.6_v0 24 | protocol = git 25 | repo_url = https://github.com/NorESMhub/cism-wrapper 26 | local_path = components/cism 27 | externals = Externals_CISM.cfg 28 | required = False 29 | 30 | [clm] 31 | tag = release-clm5.0.14-Nor_v1.0.4 32 | protocol = git 33 | repo_url = https://github.com/NorESMhub/ctsm 34 | local_path = components/clm 35 | externals = Externals_CLM.cfg 36 | required = True 37 | 38 | [mosart] 39 | tag = release-cesm2.0.03-Nor_v1.0.0 40 | protocol = git 41 | repo_url = https://github.com/NorESMhub/mosart 42 | local_path = components/mosart 43 | required = True 44 | 45 | [pop] 46 | tag = pop2_cesm2_1_rel_n01 47 | protocol = svn 48 | repo_url = https://svn-ccsm-models.cgd.ucar.edu/pop2/release_tags 49 | local_path = components/pop 50 | externals = Externals_POP.cfg 51 | required = False 52 | 53 | [blom] 54 | tag = v1.3.0 55 | protocol = git 56 | repo_url = https://github.com/NorESMhub/BLOM 57 | local_path = components/blom 58 | externals = Externals_BLOM.cfg 59 | required = True 60 | 61 | [rtm] 62 | tag = release-cesm2.0.02 63 | protocol = git 64 | repo_url = https://github.com/ESCOMP/rtm 65 | local_path = components/rtm 66 | required = False 67 | 68 | [ww3] 69 | tag = ww3_cesm2_1_rel_01 70 | protocol = svn 71 | repo_url = https://svn-ccsm-models.cgd.ucar.edu/ww3/release_tags 72 | local_path = components/ww3 73 | required = False 74 | 75 | [norcpm] 76 | tag = cime5.6.10_cesm2_1_rel_06-Nor_v1.0.5 77 | protocol = git 78 | repo_url = git@github.com:NorESMhub/norcpm.git 79 | local_path = norcpm 80 | required = False 81 | 82 | [externals_description] 83 | schema_version = 1.0.0 84 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/n1850r227/user_nl_clm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! 5 | ! EXCEPTIONS: 6 | ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting 7 | ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting 8 | ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting 9 | ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting 10 | ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting 11 | ! Set irrigate by the CLM_BLDNML_OPTS -irrig .true. setting 12 | ! Set co2_ppmv with CCSM_CO2_PPMV option 13 | ! Set dtime with L_NCPL option 14 | ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options 15 | ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases 16 | ! (includes $inst_string for multi-ensemble cases) 17 | ! or with CLM_FORCE_COLDSTART to do a cold start 18 | ! or set it with an explicit filename here. 19 | ! Set maxpatch_glcmec with GLC_NEC option 20 | ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable 21 | !---------------------------------------------------------------------------------- 22 | 23 | !init_interp_fill_missing_with_natveg = .true. 24 | !paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm5_params.c171017.nc' 25 | !finidat ='$DIN_LOC_ROOT/cesm2_init/b.e20.B1850.f09_g17.pi_control.all.215/0040-01-01-00000/b.e20.B1850.f09_g17.pi_control.all.215.clm2.r.0040-01-01-00000.nc' 26 | !reset_snow=.false. 27 | !use_init_interp=.true. 28 | !ndep_taxmode = 'cycle' 29 | !ndep_varlist = 'NDEP_month' 30 | !stream_fldfilename_ndep = '$DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_hist_simyr1850_0.9x1.25_CMIP6alpha01_c170330.nc' 31 | !reseed_dead_plants=.false. 32 | !use_init_interp = .true. 33 | / 34 | -------------------------------------------------------------------------------- /LICENSE-CESM.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, University Corporation for Atmospheric Research (UCAR) 2 | All rights reserved. 3 | 4 | Developed by: 5 | University Corporation for Atmospheric Research - National Center for Atmospheric Research 6 | https://www2.cesm.ucar.edu/working-groups/sewg 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the "Software"), 10 | to deal with the Software without restriction, including without limitation 11 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 | and/or sell copies of the Software, and to permit persons to whom 13 | the Software is furnished to do so, subject to the following conditions: 14 | 15 | - Redistributions of source code must retain the above copyright notice, 16 | this list of conditions and the following disclaimers. 17 | - Redistributions in binary form must reproduce the above copyright notice, 18 | this list of conditions and the following disclaimers in the documentation 19 | and/or other materials provided with the distribution. 20 | - Neither the names of [Name of Development Group, UCAR], 21 | nor the names of its contributors may be used to endorse or promote 22 | products derived from this Software without specific prior written permission. 23 | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 28 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 | POSSIBILITY OF SUCH DAMAGE. 35 | -------------------------------------------------------------------------------- /manage_externals/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017-2018, University Corporation for Atmospheric Research (UCAR) 2 | All rights reserved. 3 | 4 | Developed by: 5 | University Corporation for Atmospheric Research - National Center for Atmospheric Research 6 | https://www2.cesm.ucar.edu/working-groups/sewg 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the "Software"), 10 | to deal with the Software without restriction, including without limitation 11 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 | and/or sell copies of the Software, and to permit persons to whom 13 | the Software is furnished to do so, subject to the following conditions: 14 | 15 | - Redistributions of source code must retain the above copyright notice, 16 | this list of conditions and the following disclaimers. 17 | - Redistributions in binary form must reproduce the above copyright notice, 18 | this list of conditions and the following disclaimers in the documentation 19 | and/or other materials provided with the distribution. 20 | - Neither the names of [Name of Development Group, UCAR], 21 | nor the names of its contributors may be used to endorse or promote 22 | products derived from this Software without specific prior written permission. 23 | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 28 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 | POSSIBILITY OF SUCH DAMAGE. 35 | -------------------------------------------------------------------------------- /manage_externals/test/README.md: -------------------------------------------------------------------------------- 1 | # Testing for checkout_externals 2 | 3 | NOTE: Python2 is the supported runtime environment. Python3 compatibility is 4 | in progress, complicated by the different proposed input methods 5 | (yaml, xml, cfg/ini, json) and their different handling of strings 6 | (unicode vs byte) in python2. Full python3 compatibility will be 7 | possible once the number of possible input formats has been narrowed. 8 | 9 | ## Setup development environment 10 | 11 | Development environments should be setup for python2 and python3: 12 | 13 | ```SH 14 | cd checkout_externals/test 15 | make python=python2 env 16 | make python=python3 env 17 | ``` 18 | 19 | ## Unit tests 20 | 21 | Tests should be run for both python2 and python3. It is recommended 22 | that you have seperate terminal windows open python2 and python3 23 | testing to avoid errors activating and deactivating environments. 24 | 25 | ```SH 26 | cd checkout_externals/test 27 | . env_python2/bin/activate 28 | make utest 29 | deactivate 30 | ``` 31 | 32 | ```SH 33 | cd checkout_externals/test 34 | . env_python2/bin/activate 35 | make utest 36 | deactivate 37 | ``` 38 | 39 | ## System tests 40 | 41 | Not yet implemented. 42 | 43 | ## Static analysis 44 | 45 | checkout_externals is difficult to test thoroughly because it relies 46 | on git and svn, and svn requires a live network connection and 47 | repository. Static analysis will help catch bugs in code paths that 48 | are not being executed, but it requires conforming to community 49 | standards and best practices. autopep8 and pylint should be run 50 | regularly for automatic code formatting and linting. 51 | 52 | ```SH 53 | cd checkout_externals/test 54 | . env_python2/bin/activate 55 | make lint 56 | deactivate 57 | ``` 58 | 59 | The canonical formatting for the code is whatever autopep8 60 | generates. All issues identified by pylint should be addressed. 61 | 62 | 63 | ## Code coverage 64 | 65 | All changes to the code should include maintaining existing tests and 66 | writing new tests for new or changed functionality. To ensure test 67 | coverage, run the code coverage tool: 68 | 69 | ```SH 70 | cd checkout_externals/test 71 | . env_python2/bin/activate 72 | make coverage 73 | open -a Firefox.app htmlcov/index.html 74 | deactivate 75 | ``` 76 | 77 | 78 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_hifreq/user_nl_clm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! 5 | ! EXCEPTIONS: 6 | ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting 7 | ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting 8 | ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting 9 | ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting 10 | ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting 11 | ! Set irrigate by the CLM_BLDNML_OPTS -irrig .true. setting 12 | ! Set co2_ppmv with CCSM_CO2_PPMV option 13 | ! Set dtime with L_NCPL option 14 | ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options 15 | ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases 16 | ! (includes $inst_string for multi-ensemble cases) 17 | ! or with CLM_FORCE_COLDSTART to do a cold start 18 | ! or set it with an explicit filename here. 19 | ! Set maxpatch_glcmec with GLC_NEC option 20 | ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable 21 | !---------------------------------------------------------------------------------- 22 | 23 | 24 | hist_nhtfrq = 0, -24, -3,-8760 25 | 26 | hist_mfilt = 12, 365, 2920,1 27 | 28 | hist_fincl1 = 'FERT_TO_SMINN','NFIX_TO_SMINN','LITFIRE','LITR1C_TO_SOIL1C','LITR2C_TO_SOIL1C','LITR3C_TO_SOIL2C','M_LEAFC_TO_LITTER','M_FROOTC_TO_LITTER','M_LIVESTEMC_TO_LITTER','M_DEADSTEMC_TO_LITTER','M_LIVECROOTC_TO_LITTER','M_DEADCROOTC_TO_LITTER' 29 | 30 | hist_fincl2 = 'ALT','H2OCAN','H2OSFC','QVEGE','QVEGT','QSOIL','QSNOEVAP','QRUNOFF','QOVER','QDRAI','QINTR','QCHARGE','RAM1','SOILLIQ','SOILICE','SOILWATER_10CM','SNOFSRVD','SNOFSRVI','SNOFSRND','SNOFSRNI','SNOFSDSVD','SNOFSDSVI','SNOFSDSND','SNOFSDSNI','TLAI','TG','TSA','TSOI','TV','TOTSOILLIQ','TOTSOILICE','TWS','VOLR','ZWT' 31 | 32 | 33 | hist_fincl3 = 'QRUNOFF', 'SOILLIQ', 'SOILICE', 'SOILWATER_10CM', 'TSA', 'TSL', 'GPP', 'AR', 'HR' 34 | 35 | 36 | hist_fincl4 = 'TOTVEGC','TOTSOMC','TOTLITC' 37 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_hifreq_xaer/user_nl_clm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! 5 | ! EXCEPTIONS: 6 | ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting 7 | ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting 8 | ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting 9 | ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting 10 | ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting 11 | ! Set irrigate by the CLM_BLDNML_OPTS -irrig .true. setting 12 | ! Set co2_ppmv with CCSM_CO2_PPMV option 13 | ! Set dtime with L_NCPL option 14 | ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options 15 | ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases 16 | ! (includes $inst_string for multi-ensemble cases) 17 | ! or with CLM_FORCE_COLDSTART to do a cold start 18 | ! or set it with an explicit filename here. 19 | ! Set maxpatch_glcmec with GLC_NEC option 20 | ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable 21 | !---------------------------------------------------------------------------------- 22 | 23 | 24 | hist_nhtfrq = 0, -24, -3,-8760 25 | 26 | hist_mfilt = 12, 365, 2920,1 27 | 28 | hist_fincl1 = 'FERT_TO_SMINN','NFIX_TO_SMINN','LITFIRE','LITR1C_TO_SOIL1C','LITR2C_TO_SOIL1C','LITR3C_TO_SOIL2C','M_LEAFC_TO_LITTER','M_FROOTC_TO_LITTER','M_LIVESTEMC_TO_LITTER','M_DEADSTEMC_TO_LITTER','M_LIVECROOTC_TO_LITTER','M_DEADCROOTC_TO_LITTER' 29 | 30 | hist_fincl2 = 'ALT','H2OCAN','H2OSFC','QVEGE','QVEGT','QSOIL','QSNOEVAP','QRUNOFF','QOVER','QDRAI','QINTR','QCHARGE','RAM1','SOILLIQ','SOILICE','SOILWATER_10CM','SNOFSRVD','SNOFSRVI','SNOFSRND','SNOFSRNI','SNOFSDSVD','SNOFSDSVI','SNOFSDSND','SNOFSDSNI','TLAI','TG','TSA','TSOI','TV','TOTSOILLIQ','TOTSOILICE','TWS','VOLR','ZWT' 31 | 32 | 33 | hist_fincl3 = 'QRUNOFF', 'SOILLIQ', 'SOILICE', 'SOILWATER_10CM', 'TSA', 'TSL', 'GPP', 'AR', 'HR' 34 | 35 | 36 | hist_fincl4 = 'TOTVEGC','TOTSOMC','TOTLITC' 37 | -------------------------------------------------------------------------------- /cime_config/testmods_dirs/allactive/defaultio/user_nl_cice: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Have commented out the following due to known problems on restart 3 | ! f_albice = 'dxxxx' 4 | ! f_albsno = 'dxxxx' 5 | ! f_albpnd = 'dxxxx' 6 | !---------------------------------------------------------------------------------- 7 | histfreq = 'd','x','x','x','x' 8 | histfreq_n = 1,1,1,1,1 9 | f_hi = 'dxxxx' 10 | f_hs = 'dxxxx' 11 | f_Tsfc = 'dxxxx' 12 | f_aice = 'dxxxx' 13 | f_uvel = 'dxxxx' 14 | f_vvel = 'dxxxx' 15 | f_fswdn = 'dxxxx' 16 | f_flwdn = 'dxxxx' 17 | f_snow = 'dxxxx' 18 | f_snow_ai = 'dxxxx' 19 | f_rain = 'dxxxx' 20 | f_rain_ai = 'dxxxx' 21 | f_faero_atm = 'dxxxx' 22 | f_faero_ocn = 'dxxxx' 23 | f_sst = 'dxxxx' 24 | f_sss = 'dxxxx' 25 | f_uocn = 'dxxxx' 26 | f_vocn = 'dxxxx' 27 | f_frzmlt = 'dxxxx' 28 | f_fswfac = 'dxxxx' 29 | f_fswabs = 'dxxxx' 30 | f_fswabs_ai = 'dxxxx' 31 | f_alidr = 'dxxxx' 32 | f_alidf = 'dxxxx' 33 | f_alvdr = 'dxxxx' 34 | f_alvdf = 'dxxxx' 35 | f_coszen = 'dxxxx' 36 | f_flat = 'dxxxx' 37 | f_flat_ai = 'dxxxx' 38 | f_fsens = 'dxxxx' 39 | f_fsens_ai = 'dxxxx' 40 | f_flwup = 'dxxxx' 41 | f_flwup_ai = 'dxxxx' 42 | f_evap = 'dxxxx' 43 | f_evap_ai = 'dxxxx' 44 | f_Tair = 'dxxxx' 45 | f_Tref = 'dxxxx' 46 | f_Qref = 'dxxxx' 47 | f_congel = 'dxxxx' 48 | f_frazil = 'dxxxx' 49 | f_snoice = 'dxxxx' 50 | f_meltt = 'dxxxx' 51 | f_melts = 'dxxxx' 52 | f_meltb = 'dxxxx' 53 | f_meltl = 'dxxxx' 54 | f_fresh = 'dxxxx' 55 | f_fresh_ai = 'dxxxx' 56 | f_fsalt = 'dxxxx' 57 | f_fsalt_ai = 'dxxxx' 58 | f_fhocn = 'dxxxx' 59 | f_fhocn_ai = 'dxxxx' 60 | f_fswthru = 'dxxxx' 61 | f_fswthru_ai = 'dxxxx' 62 | f_strairx = 'dxxxx' 63 | f_strairy = 'dxxxx' 64 | f_strtltx = 'dxxxx' 65 | f_strtlty = 'dxxxx' 66 | f_strcorx = 'dxxxx' 67 | f_strcory = 'dxxxx' 68 | f_strocnx = 'dxxxx' 69 | f_strocny = 'dxxxx' 70 | f_strintx = 'dxxxx' 71 | f_strinty = 'dxxxx' 72 | f_strength = 'dxxxx' 73 | f_opening = 'dxxxx' 74 | f_divu = 'dxxxx' 75 | f_shear = 'dxxxx' 76 | f_sig1 = 'dxxxx' 77 | f_sig2 = 'dxxxx' 78 | f_dvidtt = 'dxxxx' 79 | f_dvidtd = 'dxxxx' 80 | f_daidtt = 'dxxxx' 81 | f_daidtd = 'dxxxx' 82 | f_dardg1dt = 'dxxxx' 83 | f_dardg2dt = 'dxxxx' 84 | f_dvirdgdt = 'dxxxx' 85 | f_iage = 'dxxxx' 86 | f_ardg = 'dxxxx' 87 | f_vrdg = 'dxxxx' 88 | f_alvl = 'dxxxx' 89 | f_vlvl = 'dxxxx' 90 | f_FY = 'dxxxx' 91 | f_aisnap = 'dxxxx' 92 | f_hisnap = 'dxxxx' 93 | f_aicen = 'dxxxx' 94 | f_vicen = 'dxxxx' 95 | f_trsig = 'dxxxx' 96 | f_icepresent = 'dxxxx' 97 | f_fsurf_ai = 'dxxxx' 98 | f_fcondtop_ai = 'dxxxx' 99 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2020 The NorESM developers group 2 | 3 | The NorESM developers group is currently affiliated to the following 4 | Institutions: 5 | 1. University of Bergen, Geophysical Institute, Bergen. 6 | 2. NORCE Norwegian Research Centre, Climate, Bergen. 7 | 3. Nansen Environmental and Remote Sensing Centre, Bergen. 8 | 4. Norwegian Meteorological Institute, Oslo. 9 | 5. University of Oslo, Meteorology and Oceanography Section, Department of 10 | Geosciences, Oslo. 11 | 6. Norwegian Institute for Air Research, Kjeller. 12 | 7. Center for International Climate and Environmental Research, Oslo 13 | 14 | The Norwegian Earth System Model (NorESM) is based on the Community Earth System 15 | Model (CESM) and the above copyright covers all software that is part of NorESM 16 | and is not part of CESM. The CESM copyright notice and license are found in 17 | files Copyright-CESM.txt and LICENSE-CESM.txt, respectively. 18 | 19 | The following NorESM specific components have copyright and license that 20 | deviates from this document and must be obeyed when using, modifying or sharing: 21 | 1. BLOM; Copyright: source code authors; License: GNU Lesser General Public 22 | License version 3. 23 | 24 | 25 | Redistribution and use in source and binary forms, with or without 26 | modification, are permitted provided that the following conditions are met: 27 | 28 | 1. Redistributions of source code must retain the above copyright notice, this 29 | list of conditions and the following disclaimer. 30 | 31 | 2. Redistributions in binary form must reproduce the above copyright notice, 32 | this list of conditions and the following disclaimer in the documentation 33 | and/or other materials provided with the distribution. 34 | 35 | 3. Neither the name of the copyright holder nor the names of its contributors 36 | may be used to endorse or promote products derived from this software without 37 | specific prior written permission. 38 | 39 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 40 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 41 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 42 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 43 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 44 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 45 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 46 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 47 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | -------------------------------------------------------------------------------- /manage_externals/manic/repository.py: -------------------------------------------------------------------------------- 1 | """Base class representation of a repository 2 | """ 3 | 4 | from .externals_description import ExternalsDescription 5 | from .utils import fatal_error 6 | from .global_constants import EMPTY_STR 7 | 8 | 9 | class Repository(object): 10 | """ 11 | Class to represent and operate on a repository description. 12 | """ 13 | 14 | def __init__(self, component_name, repo): 15 | """ 16 | Parse repo externals description 17 | """ 18 | self._name = component_name 19 | self._protocol = repo[ExternalsDescription.PROTOCOL] 20 | self._tag = repo[ExternalsDescription.TAG] 21 | self._branch = repo[ExternalsDescription.BRANCH] 22 | self._hash = repo[ExternalsDescription.HASH] 23 | self._url = repo[ExternalsDescription.REPO_URL] 24 | 25 | if self._url is EMPTY_STR: 26 | fatal_error('repo must have a URL') 27 | 28 | if ((self._tag is EMPTY_STR) and (self._branch is EMPTY_STR) and 29 | (self._hash is EMPTY_STR)): 30 | fatal_error('{0} repo must have a branch, tag or hash element') 31 | 32 | ref_count = 0 33 | if self._tag is not EMPTY_STR: 34 | ref_count += 1 35 | if self._branch is not EMPTY_STR: 36 | ref_count += 1 37 | if self._hash is not EMPTY_STR: 38 | ref_count += 1 39 | if ref_count != 1: 40 | fatal_error('repo {0} must have exactly one of ' 41 | 'tag, branch or hash.'.format(self._name)) 42 | 43 | def checkout(self, base_dir_path, repo_dir_name, verbosity): # pylint: disable=unused-argument 44 | """ 45 | If the repo destination directory exists, ensure it is correct (from 46 | correct URL, correct branch or tag), and possibly update the source. 47 | If the repo destination directory does not exist, checkout the correce 48 | branch or tag. 49 | """ 50 | msg = ('DEV_ERROR: checkout method must be implemented in all ' 51 | 'repository classes! {0}'.format(self.__class__.__name__)) 52 | fatal_error(msg) 53 | 54 | def status(self, stat, repo_dir_path): # pylint: disable=unused-argument 55 | """Report the status of the repo 56 | 57 | """ 58 | msg = ('DEV_ERROR: status method must be implemented in all ' 59 | 'repository classes! {0}'.format(self.__class__.__name__)) 60 | fatal_error(msg) 61 | 62 | def url(self): 63 | """Public access of repo url. 64 | """ 65 | return self._url 66 | 67 | def tag(self): 68 | """Public access of repo tag 69 | """ 70 | return self._tag 71 | 72 | def branch(self): 73 | """Public access of repo branch. 74 | """ 75 | return self._branch 76 | 77 | def hash(self): 78 | """Public access of repo hash. 79 | """ 80 | return self._hash 81 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM_ism/user_nl_clm: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------------- 2 | ! Users should add all user specific namelist changes below in the form of 3 | ! namelist_var = new_namelist_value 4 | ! 5 | ! EXCEPTIONS: 6 | ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting 7 | ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting 8 | ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting 9 | ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting 10 | ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting 11 | ! Set irrigate by the CLM_BLDNML_OPTS -irrig .true. setting 12 | ! Set co2_ppmv with CCSM_CO2_PPMV option 13 | ! Set dtime with L_NCPL option 14 | ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options 15 | ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases 16 | ! (includes $inst_string for multi-ensemble cases) 17 | ! or with CLM_FORCE_COLDSTART to do a cold start 18 | ! or set it with an explicit filename here. 19 | ! Set maxpatch_glcmec with GLC_NEC option 20 | ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable 21 | !---------------------------------------------------------------------------------- 22 | !glacier_region_rain_to_snow_behavior = 'converted_to_snow','converted_to_snow','runs_off','converted_to_snow' !does not work in this version of CLM 23 | glcmec_downscale_longwave = .false. 24 | !!reset_dynbal_baselines = .false. !does not exist in this version of CLM 25 | 26 | 27 | hist_nhtfrq = 0, -24, 0, -8760 28 | hist_mfilt = 1, 5, 1, 1 29 | 30 | hist_fincl1 = 'FERT_TO_SMINN','NFIX_TO_SMINN','LITFIRE','LITR1C_TO_SOIL1C','LITR2C_TO_SOIL1C','LITR3C_TO_SOIL2C','M_LEAFC_TO_LITTER','M_FROOTC_TO_LITTER','M_LIVESTEMC_TO_LITTER','M_DEADSTEMC_TO_LITTER','M_LIVECROOTC_TO_LITTER','M_DEADCROOTC_TO_LITTER','FIRA', 'FIRE_ICE', 'FSH_ICE', 'EFLX_LH_TOT_ICE', 'QSNOMELT_ICE', 'QSNOFRZ_ICE', 'QSOIL_ICE', 'QICE', 'QICE_MELT', 'FSA', 'FSR_ICE', 'TOPO_COL_ICE', 'FSDS', 'FLDS', 'LWdown', 'RAIN_ICE', 'SNOW_ICE', 'TSA_ICE', 'TG_ICE', 'H2OSNO_ICE', 'ICE_MODEL_FRACTION' 31 | 32 | hist_fincl2 = 'QRUNOFF', 'SOILLIQ', 'SOILICE', 'SOILWATER_10CM', 'TSA', 'TSL', 'GPP', 'AR', 'HR' 33 | 34 | 35 | hist_fincl3 = 'FIRA', 'FIRE', 'FSH', 'EFLX_LH_TOT', 'QSNOMELT', 'QSNOFRZ', 'QSOIL', 'QICE', 'QICE_MELT', 'FSA', 'FSR', 'TOPO_COL', 'FSDS', 'FLDS', 'LWdown', 'RAIN', 'SNOW', 'TSA', 'TG', 'H2OSNO' 36 | 37 | hist_fincl4 = 'PCT_LANDUNIT', 'PCT_NAT_PFT', 'FSNO_ICE', 'PCT_CFT', 'PCT_LANDUNIT', 'PCT_NAT_PFT', 'PCT_GLC_MEC', 'EFLX_DYNBAL', 'QFLX_LIQ_DYNBAL', 'QFLX_ICE_DYNBAL' 38 | 39 | hist_dov2xy = .true., .true., .false., .true. 40 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/nhistr227/user_nl_cam: -------------------------------------------------------------------------------- 1 | ! Users should add all user specific namelist changes below in the form of 2 | ! namelist_var = new_namelist_value 3 | 4 | clubb_do_liqsupersat = .false. 5 | dust_emis_fact = 0.70D0 6 | 7 | clubb_gamma_coef = 0.308 8 | micro_mg_berg_eff_factor = 1.0 9 | zmconv_ke = 5.0E-6 10 | micro_mg_dcs = 500.D-6 11 | micro_do_sb_physics = .false. 12 | 13 | &dyn_fv 14 | fv_am_correction = .true. 15 | fv_am_fixer = .true. 16 | fv_am_fix_lbl = .true. 17 | fv_am_diag = .true. 18 | / 19 | &diagnostics 20 | do_circulation_diags = .true. 21 | / 22 | &phys_ctl_nl 23 | dme_energy_adjust = .true. 24 | / 25 | &zmconv_nl 26 | zmconv_num_cin = 1 27 | / 28 | 29 | &chem_inparm 30 | ext_frc_specifier = 'H2O -> $DIN_LOC_ROOT/atm/cam/chem/emis/elev/H2O_emission_CH4_oxidationx2_elev_1850-2100_CCMI_RCP6_0_c160219.nc', 31 | 'SO2 -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_SO2_all_vertical_1849-2015_0.9x1.25_version20171122.nc', 32 | 'SO4_PR -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_SO4_PR_all_vertical_1849-2015_0.9x1.25_version20171122.nc', 33 | 'BC_N -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_BC_N_all_vertical_1849-2015_0.9x1.25_version20171122.nc', 34 | 'BC_AX -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_BC_AX_all_vertical_1849-2015_0.9x1.25_version20171122.nc', 35 | 'BC_NI -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_BC_NI_all_vertical_1849-2015_0.9x1.25_version20171122.nc', 36 | 'OM_NI -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_OM_NI_all_vertical_1849-2015_0.9x1.25_version20171122.nc', 37 | srf_emis_specifier = 'BC_N -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_BC_N_all_surface_1849-2015_0.9x1.25_version20171122.nc', 38 | 'BC_AX -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_BC_AX_all_surface_1849-2015_0.9x1.25_version20171122.nc', 39 | 'OM_NI -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_OM_NI_all_surface_1849-2015_0.9x1.25_version20171122.nc', 40 | 'SO2 -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_SO2_all_surface_1849-2015_0.9x1.25_version20171122.nc', 41 | 'SO4_PR -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171122/emissions-cmip6_SO4_PR_all_surface_1849-2015_0.9x1.25_version20171122.nc' 42 | 43 | / 44 | &zmconv_nl 45 | zmconv_c0_lnd = 0.0300D0 46 | zmconv_c0_ocn = 0.0300D0 47 | / 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![NorESM logo](img/NORESM-logo.png) 2 | 3 | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3905091.svg)](https://doi.org/10.5281/zenodo.3905091) 4 | 5 | [![Documentation Status](https://readthedocs.org/projects/noresm-docs/badge/?version=latest)](https://noresm-docs.readthedocs.io/en/latest/?badge=latest) 6 | 7 | # Norwegian Earth System Model (NorESM) 8 | 9 | The Norwegian Earth System Model (NorESM) has been developed since 2007 and has been an important tool for Norwegian climate researchers in the study of the past, present and future climate. NorESM has also contributed to climate simulation that has been used in research assessed in the IPCC’s fifth main report. 10 | 11 | Visit the [NorESM home page](https://www.noresm.org/) to learn more about the NorESM model system, model data products and related projects. 12 | 13 | 14 | # NorESM documentation 15 | 16 | - [NorESM-1 documentation](https://noresm-docs.readthedocs.io/en/noresm1) 17 | - [NorESM-2.0 documentation](https://noresm-docs.readthedocs.io/en/noresm2/) 18 | - [Latest NorESM documentation](https://noresm-docs.readthedocs.io/en/latest) list of documentation pages for all NorESM versions 19 | 20 | 21 | # Branches in NorESM 22 | 23 | This repository has the following NorESM branches: 24 | 25 | * **master** - combines and contains recent developments, based on the latest release (at this stage NorESM2.0.2) 26 | 27 | * **noresm2_3_develop** - development branch for upcoming NorESM2.3 version 28 | 29 | * **noresm2.2** - contain updates from CESM2.2. Only few compsets work technically at the moment (e.g. coupled compsets do not work), and no results have been verified yet. This branch should not be used for scientific studies. 30 | 31 | * **release-noresm2.0.2_keyClim** - NorESM2 version for KeyClim project experiments (started from tag release-noresm2.0.2) 32 | 33 | * **noresm_landsites** - NorESM2 version for site-level simulations over land, specifically working with [NorESM Land Sites Platform](https://github.com/NorESMhub/noresm-land-sites-platform) 34 | 35 | * **noresm2_1_develop** - includes a few bug fixes along with numerous code improvements from the NorESM2.0 release (see [NorESM2.1 documentation](https://noresm-docs.readthedocs.io/en/noresm2.1/) for further details). 36 | 37 | * **noresm2** - contains NorESM2.0.X documentation, code and configurations as used for most NorESM2-LM and NorESM2-MM CMIP6 simulations. See documentation for a [detailed description of the NorESM2.0.X releases](https://noresm-docs.readthedocs.io/en/noresm2/access/releases_noresm20.html). 38 | 39 | * **noresm1** - contains a copy of old wiki NorESM1 documentation, refering to https://github.com/metno/noresm NorESM1 code, and incompletely to the development code under https://github.com/metno/noresm-dev (restricted access), used in 2019 for CMIP6 simulations 40 | 41 | 42 | # Low-key discussion forum 43 | 44 | If you have questions or you can’t find the solution to a problem in the FAQs or in other parts of the documentation, please post question(s) here: 45 | https://github.com/NorESMhub/NorESM/discussions 46 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_hifreq/user_nl_cam: -------------------------------------------------------------------------------- 1 | 2 | 3 | nhtfrq = 0, -24, -6, -6, -3, -3 , -1, 1, -24 4 | 5 | mfilt = 1, 73, 292, 292, 584, 584, 584, 240, 365 6 | 7 | ndens = 2, 2, 2, 2, 2, 2, 2, 1, 1 8 | 9 | fincl1 = 'SST','TAUX','TAUY','TAUBLJX','TAUBLJY','BTAUNET','PRECC','PRECL','PRECT','FREQZM','PCONVB','PCONVT','PRECCDZM','Z700','Z500','Z200','Z300','Z100','Z050','U200','U850','V200','V850','T200','T500', 'T700','T1000','OMEGA500','OMEGA850','VTHzm','WTHzm','UVzm','UWzm','Uzm','Vzm','THzm','Wzm','dUzm','dVzm','dUazm','dVazm','dUfzm','U','V','T','Q','Z3','dU','dV','dUa','dVa','dUf','EFLX','PTTEND','IETEND_DME', 'PTTEND_DME','TFIX','EFIX','EP','QFLX','MEANPTOP','MEANTTOP','MEANTAU','TCLDAREA', 10 | 'RHREFHT','TREFMXAV','TREFMNAV','ozone','O3','TROP_P','TROP_T','TROP_Z','VT100' 11 | 12 | 13 | fincl2 = 'ABSVIS ','ACTNL:A', 'ACTREL:A', 'AOD_VIS:A', 'cb_BC:A', 'cb_DMS:A', 'cb_DUST:A', 'cb_OM:A', 'cb_SALT:A', 'cb_SO2:A', 'cb_SULFATE:A','CDNUMC:A', 'CLDICE:A', 'CLDLIQ:A', 'CLDTOT:A', 'CLOUD:A', 'CMFMC:A', 'CMFMCDZM:A', 'DAYFOC:A', 'FCTL:A', 'FLDS:A', 'FLDSC:A', 'FLNR:A', 'FLNS:A', 'FLNSC:A','FLNT:A', 'FLNTC:A', 'FLUT:A', 'FLUTC:A', 'FSDS:A', 'FSDSC:A', 'FSNR:A', 'FSNS:A', 'FSNSC:A', 'FSNTOA:A', 'FSNTOAC:A', 'ICEFRAC:A' ,'LHFLX:A', 'MASS:A', 'OMEGA:A','OMEGA500:A', 'PBLH:A', 'PDELDRY:A', 'PRECC:A', 'PRECT:A', 'PS:A', 'PSL:A', 'Q:A', 'QREFHT:A', 'QSNOW:A', 'RELHUM:A', 'RHREFHT:A', 'SHFLX:A', 'SOLIN:A', 'SOLLD:A', 'SOLSD:A','SST:A', 'T:A', 'T500:A', 'T700:A', 'T850:A', 'TAUBLJX:A', 'TAUBLJY:A', 'TAUGWX:A', 'TAUGWY:A', 'TAUX:A', 'TAUY:A', 'TGCLDIWP:A', 'TGCLDLWP:A', 'TMQ:A', 'TREFHT:A', 'TREFHTMN:M', 'TREFHTMX:X', 'TS:A', 'TSMN:M', 'TSMX:X', 'U:A', 'U10:A', 'UTGWORO:A','V:A', 'Z3:A', 'Z500:A','PRECL:A','FREQZM:A','PCONVB:A','PCONVT:A','PRECCDZM:A','Z700:A','Z200:A', 'Z300:A','Z100:A','Z050:A','U200:A','U850:A','V200:A','V850:A','T200:A','T1000:A','OMEGA850:A','VTHzm:A','WTHzm:A','UVzm:A','UWzm:A','Uzm:A','Vzm:A','THzm:A','Wzm:A','dUzm:A','dVzm:A','dUazm:A','dVazm:A','dUfzm:A','EFLX:A','TFIX:A','EFIX:A', 14 | 'TOT_CLD_VISTAU:A','PBLHMX:X','PBLHMN:M','UA010:A','Z010:A','Z1000:A' 15 | 16 | fincl3 ='CLOUD:A','PBLH:A','RHREFHT:A','PRECT:A','PRECC:A','PRECL:A','PSL:A','U10:A','TREFHT:A','OMEGA:A','UBOT:A','VBOT:A','Z1000:A','Q:A','OMEGA:A','TS:A','SST:A','ICEFRAC:A','PRECCDZM:A','PRECSH:A','PRECTMX:X' 17 | 18 | fincl4= 'CLDICE:I','CLDLIQ:I','TOT_CLD_VISTAU:I','Q:I','QREFHT:I','Q850:I','PSL:I','U10:I','SNOWHLND:I','SNOWHICE:I','QRAIN:I','QSNOW:I', 'PS:I','PHIS:I','T:I','TREFHT:I','TS:I','T850:I','U:I','UBOT:I','V:I','VBOT:I','Z3:I','ZM_ORG:I','CMFMC:I','CMFMCDZM:I','FREQSH:I','FREQZM:I','PCONVB:I','PCONVT:I','Z700:I','Z500:I','Z200:I','Z300:I','Z100:I','Z050:I','U200:I','U850:I','V200:I','V850:I','T200:I','T500:I','T700:I','T1000:I','OMEGA500:I','OMEGA850:I','PTTEND:I','LHFLX:I','SHFLX:I','EFLX:I' 19 | 20 | 21 | fincl5='PRECC:A','PRECL:A','PRECT:A','LHFLX:A','SHFLX:A','FLDS:A', 'FLDSC:A', 'FLNR:A', 'FLNS:A', 'FLNSC:A','FLNT:A', 'FLNTC:A', 'FLUT:A', 'FLUTC:A', 'FSDS:A', 'FSDSC:A', 'FSNR:A', 'FSNS:A', 'FSNSC:A', 'FSNTOA:A', 'FSNTOAC:A', 'LWCF','SWCF:A','CLDTOT:A','SOLLD:A','SOLSD:A', 22 | 'PRECSC:A','PRECSL:A' 23 | 24 | fincl6='UBOT:I','VBOT:I','TREFHT:I','QREFHT:I','TS:I','SST:I','PS:I','ICEFRAC:I', 25 | 'U10:I' 26 | 27 | 28 | do_circulation_diags = .true. 29 | 30 | 31 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_keyCLIM_ism/user_nl_cism: -------------------------------------------------------------------------------- 1 | !----------------------------------------------------------------------- 2 | ! Users should ONLY USE user_nl_cism to change namelist variables for 3 | ! any of the namelists in cism_in and the namelist-like sections in 4 | ! cism.config. 5 | ! 6 | ! Users should add ALL user specific namelist changes below using the 7 | ! following syntax: 8 | ! 9 | ! namelist_var = new_namelist_value 10 | ! 11 | ! Note that there is no distinction between variables that will appear 12 | ! in cism_in and those that will appear in cism.config: simply add a new 13 | ! variable setting here, and it will be added to the appropriate place 14 | ! in cism_in or cism.config. 15 | ! 16 | ! For example to change the value of evolution to 0, add the following 17 | ! below: 18 | ! 19 | ! evolution = 0 20 | !----------------------------------------------------------------------- 21 | 22 | cesm_history_vars = 'smb artm thk usurf topg uvel vvel temp bmlt bwat beta_internal floating_mask grounded_mask bpmp acab_applied bmlt_applied calving_rate iareaf iareag imass imass_above_flotation total_smb_flux total_bmb_flux total_calving_flux total_gl_flux ice_sheet_mask ice_cap_mask acab beta velnorm btemp bpmp' 23 | 24 | global_bc = 0 25 | 26 | ![options] 27 | dycore = 2 28 | flow_law = 2 29 | evolution = 3 30 | temperature = 1 31 | temp_init = 4 32 | marine_margin = 1 33 | calving_domain = 1 34 | calving_init = 1 35 | limit_marine_cliffs = .true. 36 | basal_mass_balance = 1 37 | gthf = 1 38 | artm_input_function = 0 39 | bmlt_float = 0 40 | dm_dt_diag = 1 41 | 42 | ![parameters] 43 | flow_factor = 1. 44 | flow_factor_float = 1. 45 | ice_limit = 1. 46 | thck_gradient_ramp = 100. 47 | marine_limit = -200 48 | geothermal = -5.e-2 49 | max_slope = 0.10 50 | rhoi = 917. 51 | rhoo = 1026. 52 | grav = 9.80616 53 | shci = 2117.27 54 | lhci = 3.337e5 55 | trpt = 273.16 56 | pmp_offset = 5. 57 | effecpress_delta = 0.02 58 | beta_grounded_min = 100. 59 | beta_powerlaw_umax = 5000. 60 | p_ocean_penetration = 0. 61 | cliff_timescale = 0.0 62 | taumax_cliff = 1.e6 63 | powerlaw_c = 2.e4 64 | powerlaw_m = 3.0 65 | powerlaw_c_max = 1.0e5 66 | powerlaw_c_min = 10. 67 | inversion_babc_timescale = 500. 68 | inversion_babc_thck_scale = 100. 69 | inversion_babc_smoothing_timescale = 2000. 70 | inversion_thck_flotation_buffer = 2.0 71 | inversion_thck_threshold = 5.0 72 | inversion_wean_powerlaw_c_tstart = 999999. 73 | inversion_wean_powerlaw_c_tend = 999999. 74 | inversion_wean_powerlaw_c_timescale = 1000. 75 | 76 | ![ho_options] 77 | compute_blocks = 0 78 | which_ho_cp_inversion = 2 79 | which_ho_babc = 9 80 | which_ho_bwat = 0 81 | which_ho_effecpress = 3 82 | which_ho_efvs = 2 83 | which_ho_thermal_timestep = 0 84 | which_ho_resid = 4 85 | which_ho_sparse = 3 86 | which_ho_nonlinear = 1 87 | which_ho_gradient = 0 88 | which_ho_gradient_margin = 1 89 | which_ho_assemble_beta = 1 90 | which_ho_assemble_bfric = 1 91 | which_ho_assemble_taud = 1 92 | which_ho_approx = 4 93 | which_ho_precond = 4 94 | which_ho_calving_front = 0 95 | which_ho_ground = 2 96 | which_ho_flotation_function = 3 97 | glissade_maxiter = 100 98 | 99 | !block_inception = .true. 100 | !remove_ice_caps = .true. 101 | !force_retreat = .true. 102 | -------------------------------------------------------------------------------- /manage_externals/test/Makefile: -------------------------------------------------------------------------------- 1 | python = not-set 2 | verbose = not-set 3 | debug = not-set 4 | 5 | ifneq ($(python), not-set) 6 | PYTHON=$(python) 7 | else 8 | PYTHON=python 9 | endif 10 | 11 | # we need the python path to point one level up to access the package 12 | # and executables 13 | PYPATH=PYTHONPATH=..: 14 | 15 | # common args for running tests 16 | TEST_ARGS=-m unittest discover 17 | 18 | ifeq ($(debug), not-set) 19 | ifeq ($(verbose), not-set) 20 | # summary only output 21 | TEST_ARGS+=--buffer 22 | else 23 | # show individual test summary 24 | TEST_ARGS+=--buffer --verbose 25 | endif 26 | else 27 | # show detailed test output 28 | TEST_ARGS+=--verbose 29 | endif 30 | 31 | 32 | # auto reformat the code 33 | AUTOPEP8=autopep8 34 | AUTOPEP8_ARGS=--aggressive --in-place 35 | 36 | # run lint 37 | PYLINT=pylint 38 | PYLINT_ARGS=-j 2 --rcfile=.pylint.rc 39 | 40 | # code coverage 41 | COVERAGE=coverage 42 | COVERAGE_ARGS=--rcfile=.coveragerc 43 | 44 | # source files 45 | SRC = \ 46 | ../checkout_externals \ 47 | ../manic/*.py 48 | 49 | CHECKOUT_EXE = ../checkout_externals 50 | 51 | TEST_DIR = . 52 | 53 | README = ../README.md 54 | 55 | # 56 | # testing 57 | # 58 | .PHONY : utest 59 | utest : FORCE 60 | $(PYPATH) $(PYTHON) $(TEST_ARGS) --pattern 'test_unit_*.py' 61 | 62 | .PHONY : stest 63 | stest : FORCE 64 | $(PYPATH) $(PYTHON) $(TEST_ARGS) --pattern 'test_sys_*.py' 65 | 66 | .PHONY : test 67 | test : utest stest 68 | 69 | # 70 | # documentation 71 | # 72 | .PHONY : readme 73 | readme : $(CHECKOUT_EXE) 74 | printf "%s\n\n" "-- AUTOMATICALLY GENERATED FILE. DO NOT EDIT --" > $(README) 75 | printf "%s" '[![Build Status](https://travis-ci.org/ESMCI/manage_externals.svg?branch=master)](https://travis-ci.org/ESMCI/manage_externals)' >> $(README) 76 | printf "%s" '[![Coverage Status](https://coveralls.io/repos/github/ESMCI/manage_externals/badge.svg?branch=master)](https://coveralls.io/github/ESMCI/manage_externals?branch=master)' >> $(README) 77 | printf "\n%s\n" '```' >> $(README) 78 | $(CHECKOUT_EXE) --help >> $(README) 79 | 80 | # 81 | # coding standards 82 | # 83 | .PHONY : style 84 | style : FORCE 85 | $(AUTOPEP8) $(AUTOPEP8_ARGS) --recursive $(SRC) $(TEST_DIR)/test_*.py 86 | 87 | .PHONY : lint 88 | lint : FORCE 89 | $(PYLINT) $(PYLINT_ARGS) $(SRC) $(TEST_DIR)/test_*.py 90 | 91 | .PHONY : stylint 92 | stylint : style lint 93 | 94 | .PHONY : coverage 95 | # Need to use a single coverage run with a single pattern rather than 96 | # using two separate commands with separate patterns for test_unit_*.py 97 | # and test_sys_*.py: The latter clobbers some results from the first 98 | # run, even if we use the --append flag to 'coverage run'. 99 | coverage : FORCE 100 | $(PYPATH) $(COVERAGE) erase 101 | $(PYPATH) $(COVERAGE) run $(COVERAGE_ARGS) $(TEST_ARGS) --pattern 'test_*.py' 102 | $(PYPATH) $(COVERAGE) html 103 | 104 | # 105 | # virtual environment creation 106 | # 107 | .PHONY : env 108 | env : FORCE 109 | $(PYPATH) virtualenv --python $(PYTHON) $@_$(PYTHON) 110 | . $@_$(PYTHON)/bin/activate; pip install -r requirements.txt 111 | 112 | # 113 | # utilites 114 | # 115 | .PHONY : clean 116 | clean : FORCE 117 | -rm -rf *~ *.pyc tmp fake htmlcov 118 | 119 | .PHONY : clobber 120 | clobber : clean 121 | -rm -rf env_* 122 | 123 | FORCE : 124 | 125 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/cmip6_noresm_hifreq_xaer/user_nl_cam: -------------------------------------------------------------------------------- 1 | 2 | history_aerosol=.true. 3 | 4 | nhtfrq = 0, -24, -6, -6, -3, -3 , -1, 1, -24 5 | 6 | mfilt = 1, 73, 292, 292, 584, 584, 584, 240, 365 7 | 8 | ndens = 2, 2, 2, 2, 2, 2, 2, 1, 1 9 | 10 | fincl1 = 'SST','TAUX','TAUY','TAUBLJX','TAUBLJY','BTAUNET','PRECC','PRECL','PRECT','FREQZM','PCONVB','PCONVT','PRECCDZM','Z700','Z500','Z200','Z300','Z100','Z050','U200','U850','V200','V850','T200','T500', 'T700','T1000','OMEGA500','OMEGA850','VTHzm','WTHzm','UVzm','UWzm','Uzm','Vzm','THzm','Wzm','dUzm','dVzm','dUazm','dVazm','dUfzm','U','V','T','Q','Z3','dU','dV','dUa','dVa','dUf','EFLX','PTTEND','IETEND_DME', 'PTTEND_DME','TFIX','EFIX','EP','QFLX','MEANPTOP','MEANTTOP','MEANTAU','TCLDAREA', 11 | 'RHREFHT','TREFMXAV','TREFMNAV','ozone','O3','TROP_P','TROP_T','TROP_Z','VT100' 12 | 13 | 14 | fincl2 = 'ABSVIS ','ACTNL:A', 'ACTREL:A', 'AOD_VIS:A', 'cb_BC:A', 'cb_DMS:A', 'cb_DUST:A', 'cb_OM:A', 'cb_SALT:A', 'cb_SO2:A', 'cb_SULFATE:A','CDNUMC:A', 'CLDICE:A', 'CLDLIQ:A', 'CLDTOT:A', 'CLOUD:A', 'CMFMC:A', 'CMFMCDZM:A', 'DAYFOC:A', 'FCTL:A', 'FLDS:A', 'FLDSC:A', 'FLNR:A', 'FLNS:A', 'FLNSC:A','FLNT:A', 'FLNTC:A', 'FLUT:A', 'FLUTC:A', 'FSDS:A', 'FSDSC:A', 'FSNR:A', 'FSNS:A', 'FSNSC:A', 'FSNTOA:A', 'FSNTOAC:A', 'ICEFRAC:A' ,'LHFLX:A', 'MASS:A', 'OMEGA:A','OMEGA500:A', 'PBLH:A', 'PDELDRY:A', 'PRECC:A', 'PRECT:A', 'PS:A', 'PSL:A', 'Q:A', 'QREFHT:A', 'QSNOW:A', 'RELHUM:A', 'RHREFHT:A', 'SHFLX:A', 'SOLIN:A', 'SOLLD:A', 'SOLSD:A','SST:A', 'T:A', 'T500:A', 'T700:A', 'T850:A', 'TAUBLJX:A', 'TAUBLJY:A', 'TAUGWX:A', 'TAUGWY:A', 'TAUX:A', 'TAUY:A', 'TGCLDIWP:A', 'TGCLDLWP:A', 'TMQ:A', 'TREFHT:A', 'TREFHTMN:M', 'TREFHTMX:X', 'TS:A', 'TSMN:M', 'TSMX:X', 'U:A', 'U10:A', 'UTGWORO:A','V:A', 'Z3:A', 'Z500:A','PRECL:A','FREQZM:A','PCONVB:A','PCONVT:A','PRECCDZM:A','Z700:A','Z200:A', 'Z300:A','Z100:A','Z050:A','U200:A','U850:A','V200:A','V850:A','T200:A','T1000:A','OMEGA850:A','VTHzm:A','WTHzm:A','UVzm:A','UWzm:A','Uzm:A','Vzm:A','THzm:A','Wzm:A','dUzm:A','dVzm:A','dUazm:A','dVazm:A','dUfzm:A','EFLX:A','TFIX:A','EFIX:A', 15 | 'TOT_CLD_VISTAU:A','PBLHMX:X','PBLHMN:M','DOD550:A','UA010:A','Z010:A','Z1000:A' 16 | 17 | fincl3 ='CLOUD:A','PBLH:A','RHREFHT:A','PRECT:A','PRECC:A','PRECL:A','PSL:A','U10:A','TREFHT:A','OMEGA:A','UBOT:A','VBOT:A','Z1000:A','Q:A','OMEGA:A','TS:A','SST:A','ICEFRAC:A','PRECCDZM:A','PRECSH:A','PRECTMX:X','BS550AER:A' 18 | 19 | fincl4= 'CLDICE:I','CLDLIQ:I','TOT_CLD_VISTAU:I','Q:I','QREFHT:I','Q850:I','PSL:I','U10:I','SNOWHLND:I','SNOWHICE:I','QRAIN:I','QSNOW:I', 'PS:I','PHIS:I','T:I','TREFHT:I','TS:I','T850:I','U:I','UBOT:I','V:I','VBOT:I','Z3:I','ZM_ORG:I','CMFMC:I','CMFMCDZM:I','FREQSH:I','FREQZM:I','PCONVB:I','PCONVT:I','Z700:I','Z500:I','Z200:I','Z300:I','Z100:I','Z050:I','U200:I','U850:I','V200:I','V850:I','T200:I','T500:I','T700:I','T1000:I','OMEGA500:I','OMEGA850:I','PTTEND:I','LHFLX:I','SHFLX:I','EFLX:I', 20 | 'EC550AER:I' 21 | 22 | 23 | fincl5='PRECC:A','PRECL:A','PRECT:A','LHFLX:A','SHFLX:A','FLDS:A', 'FLDSC:A', 'FLNR:A', 'FLNS:A', 'FLNSC:A','FLNT:A', 'FLNTC:A', 'FLUT:A', 'FLUTC:A', 'FSDS:A', 'FSDSC:A', 'FSNR:A', 'FSNS:A', 'FSNSC:A', 'FSNTOA:A', 'FSNTOAC:A', 'LWCF','SWCF:A','CLDTOT:A','SOLLD:A','SOLSD:A', 24 | 'PRECSC:A','PRECSL:A' 25 | 26 | fincl6='UBOT:I','VBOT:I','TREFHT:I','QREFHT:I','TS:I','SST:I','PS:I','ICEFRAC:I', 27 | 'U10:I' 28 | 29 | fincl7='PS:A','TREFHT:A','MMRPM2P5_SRF:A' 30 | 31 | 32 | do_circulation_diags = .true. 33 | 34 | 35 | -------------------------------------------------------------------------------- /cime_config/usermods_dirs/n1850r227/user_nl_cam: -------------------------------------------------------------------------------- 1 | ! Users should add all user specific namelist changes below in the form of 2 | ! namelist_var = new_namelist_value 3 | 4 | !tracer_cnst_datapath = '$DIN_LOC_ROOT/atm/cam/ozone' 5 | !tracer_cnst_file = 'tracer_cnst_CAM6chem_piControl_cycle_3D_monthly_c170901.nc' 6 | !tracer_cnst_filelist = '' 7 | !clubb_do_liqsupersat = .false. 8 | !dust_emis_fact = 0.70D0 9 | 10 | !clubb_gamma_coef = 0.308 11 | !micro_mg_berg_eff_factor = 1.0 12 | !zmconv_ke = 5.0E-6 13 | !micro_mg_dcs = 500.D-6 14 | !micro_do_sb_physics = .false. 15 | 16 | !&dyn_fv 17 | ! fv_am_correction = .true. 18 | ! fv_am_fixer = .true. 19 | ! fv_am_fix_lbl = .true. 20 | ! fv_am_diag = .true. 21 | !/ 22 | !&diagnostics 23 | ! do_circulation_diags = .true. 24 | !/ 25 | !&phys_ctl_nl 26 | ! dme_energy_adjust = .true. 27 | !/ 28 | !&zmconv_nl 29 | ! zmconv_num_cin = 1 30 | !/ 31 | ! 32 | !&chem_inparm 33 | ! ext_frc_specifier = 'H2O -> $DIN_LOC_ROOT/atm/cam/chem/emis/elev/H2O_emission_CH4_oxidationx2_elev_3DmonthlyL70_1850climo295_c180426.nc', 34 | ! 'SO2 -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_SO2_all_vertical_1850-1850_0.9x1.25_version20171007.nc', 35 | ! 'SO4_PR -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_SO4_PR_all_vertical_1850-1850_0.9x1.25_version20171007.nc', 36 | ! 'BC_N -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_BC_N_all_vertical_1850-1850_0.9x1.25_version20171007.nc', 37 | ! 'BC_AX -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_BC_AX_all_vertical_1850-1850_0.9x1.25_version20171007.nc', 38 | ! 'BC_NI -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_BC_NI_all_vertical_1850-1850_0.9x1.25_version20171007.nc', 39 | ! 'OM_NI -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_OM_NI_all_vertical_1850-1850_0.9x1.25_version20171007.nc', 40 | ! srf_emis_specifier = 'BC_N -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_BC_N_all_surface_1850-1850_0.9x1.25_version20171007.nc', 41 | ! 'BC_AX -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_BC_AX_all_surface_1850-1850_0.9x1.25_version20171007.nc', 42 | ! 'OM_NI -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_OM_NI_all_surface_1850-1850_0.9x1.25_version20171007.nc', 43 | ! 'SO2 -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_SO2_all_surface_1850-1850_0.9x1.25_version20171007.nc', 44 | ! 'SO4_PR -> $DIN_LOC_ROOT/atm/cam/chem/emis/CMIP6_emissions_1750_2015_240717_CAM5.3_Oslo_version20171007/emissions-cmip6_SO4_PR_all_surface_1850-1850_0.9x1.25_version20171007.nc' 45 | !/ 46 | !&chem_surfvals_nl 47 | ! ch4vmr = 791e-9 48 | ! co2vmr = 284.7e-6 49 | ! f11vmr = 12.48e-12 50 | ! f12vmr = 0.0 51 | ! flbc_list = ' ' 52 | ! n2ovmr = 275.68e-9 53 | !/ 54 | !&solar_inparm 55 | ! solar_irrad_data_file = '$DIN_LOC_ROOT/atm/cam/solar/SolarForcingCMIP6piControl_c160921.nc' 56 | ! solar_data_type = 'FIXED' 57 | ! solar_data_ymd = 18500101 58 | ! solar_htng_spctrl_scl = .true. 59 | !/ 60 | !&prescribed_ozone_nl 61 | ! prescribed_ozone_cycle_yr = 1850 62 | ! prescribed_ozone_datapath = '$DIN_LOC_ROOT/atm/cam/ozone' 63 | ! prescribed_ozone_file = 'ozone_strataero_CAM6chem_piControl_zm_monthly_c170901.nc' 64 | ! prescribed_ozone_name = 'O3' 65 | ! prescribed_ozone_type = 'CYCLICAL' 66 | !/ 67 | !&zmconv_nl 68 | ! zmconv_c0_lnd = 0.0300D0 69 | ! zmconv_c0_ocn = 0.0300D0 70 | !/ 71 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to NorESM 2 | We welcome contributions to the NorESM model, including bug reports and fixes, contributions for code improvements, and suggestions for feature enhancements or inclusion of new features. Below we have listed some guidelines, but use your best judgment, and feel free to propose changes to this document in a pull request. 3 | 4 | ## What should I know before I get started? 5 | The NorESM model is made up of several model components, each contained within separate repositories under [NorESMhub](https://github.com/NorESMhub). Some of these components are actively developed by members of the NorESM team while others are inherited from the [CESM](https://www.cesm.ucar.edu/) system. When you initially consider contributing to NorESM, you might be unsure about which of those repositories implements the functionality you want to change or report a bug for. The NorESM team will help you with that through an issue discussion. 6 | 7 | A short presentation introducing the NorESM github repository, the issue and pull request systems, and the forking workflow: 8 | https://github.com/NorESMhub/INES_workshop_2020/blob/gh-pages/files/Torsvik_gitcollaborate.pdf 9 | 10 | # How to contribute 11 | We recommend that you open a new [discussion item](https://github.com/NorESMhub/NorESM/issues) if you have questions about code contribution, or an [issue](https://github.com/NorESMhub/NorESM/issues) to discuss specific changes or additions you want to include. This is done by selecting **New issue** in the top right corner of the issues page, and selecting one of the suggested issue types in the following menu. Through the issue discussion, you can work with the NorESM developers to implement the code changes in the correct repository and in the correct branch. 12 | 13 | # Who can contribute 14 | Everybody with a github account can fork the repository, change a file and create a pull request, suggesting a change to the code or the documentation. The changes will, upon being merged by a member with write access, be visible to all. If you wish to have more access rights to any of the NorESMhub repositories, write to the NorESM team via email to noresm-ncc(at)met.no . 15 | 16 | ## Reporting bugs 17 | Please, ensure that the bug was not already reported by searching on https://github.com/NorESMhub/NorESM/issues 18 | 19 | If you find bugs, strange output or something puzzling, please raise an issue. No issue is too big nor too small. If you wrote code that fixes the bug, please see the description below. 20 | 21 | ## Suggesting Enhancements 22 | If you want to submit an enhancement suggestion for NorESM, including completely new features, minor improvements to existing functionality or bug fixes, please read the [NorESM documentation on how to contribute](https://noresm-docs.readthedocs.io/en/noresm2/contribute/contribute.html): 23 | You need to: 24 | - Setup your personal NorESM fork in GitHub to put your developments 25 | - Keep up to date with the NorESMhub. 26 | - Once your changes or additions are sufficiently advanced you can form a pull request from your fork to the relevant NorESM branch including a clear description of what you've done. 27 | - Please assign reviewers who will do additional testing of your code and bring the changes to NorESM. 28 | 29 | If your pull request causes conflicts which you are not able to resolve, please ask one of the NorESMhub maintainers for help. 30 | 31 | If you introduce code changes or new features into NorESM, these need to be documented. Please remember to [update the documentation](https://github.com/NorESMhub/NorESM/blob/master/doc/README.md) as well. 32 | 33 | ## Do you have questions about the source code? 34 | We recommend that you subscribe to the NorESM user mailing list: https://www.noresm.org/mailman/listinfo/users_noresm.org 35 | where you can ask any question about how to use the NorESM model. You can also raise an issue. 36 | 37 | ### NorESM2.0 user guide 38 | https://noresm-docs.readthedocs.io/en/noresm2/index.html 39 | 40 | ### NorESM home page 41 | https://www.noresm.org/ 42 | -------------------------------------------------------------------------------- /manage_externals/test/doc/testing.rst: -------------------------------------------------------------------------------- 1 | Testing 2 | ======= 3 | 4 | The manage_externals package has an automated test suite. All pull 5 | requests are expected to pass 100% of the automated tests, as well as 6 | be pep8 and lint 'clean' and maintain approximately constant (at a 7 | minimum) level of code coverage. 8 | 9 | Quick Start 10 | ----------- 11 | 12 | Do nothing approach 13 | ~~~~~~~~~~~~~~~~~~~ 14 | 15 | When you create a pull request on GitHub, Travis-CI continuous 16 | integration testing will run the test suite in both python2 and 17 | python3. Test results, lint results, and code coverage results are 18 | available online. 19 | 20 | Do something approach 21 | ~~~~~~~~~~~~~~~~~~~~~ 22 | 23 | In the test directory, run: 24 | 25 | .. code-block:: shell 26 | 27 | make env 28 | make lint 29 | make test 30 | make coverage 31 | 32 | 33 | Automated Testing 34 | ----------------- 35 | 36 | The manage_externals manic library and executables are developed to be 37 | python2 and python3 compatible using only the standard library. The 38 | test suites meet the same requirements. But additional tools are 39 | required to provide lint and code coverage metrics and generate 40 | documentation. The requirements are maintained in the requirements.txt 41 | file, and can be automatically installed into an isolated environment 42 | via Makefile. 43 | 44 | Bootstrap requirements: 45 | 46 | * python2 - version 2.7.x or later 47 | 48 | * python3 - version 3.6 tested other versions may work 49 | 50 | * pip and virtualenv for python2 and python3 51 | 52 | Note: all make rules can be of the form ``make python=pythonX rule`` 53 | or ``make rule`` depending if you want to use the default system 54 | python or specify a specific version. 55 | 56 | The Makefile in the test directory has the following rules: 57 | 58 | * ``make python=pythonX env`` - create a python virtual environment 59 | for python2 or python3 and install all required packages. These 60 | packages are required to run lint or coverage. 61 | 62 | * ``make style`` - runs autopep8 63 | 64 | * ``make lint`` - runs autopep8 and pylint 65 | 66 | * ``make test`` - run the full test suite 67 | 68 | * ``make utest`` - run jus the unit tests 69 | 70 | * ``make stest`` - run jus the system integration tests 71 | 72 | * ``make coverage`` - run the full test suite through the code 73 | coverage tool and generate an html report. 74 | 75 | * ``make readme`` - automatically generate the README files. 76 | 77 | * ``make clean`` - remove editor and pyc files 78 | 79 | * ``make clobber`` - remove all generated test files, including 80 | virtual environments, coverage reports, and temporary test 81 | repository directories. 82 | 83 | Unit Tests 84 | ---------- 85 | 86 | Unit tests are probably not 'true unit tests' for the pedantic, but 87 | are pragmatic unit tests. They cover small practicle code blocks: 88 | functions, class methods, and groups of functions and class methods. 89 | 90 | System Integration Tests 91 | ------------------------ 92 | 93 | NOTE(bja, 2017-11) The systems integration tests currently do not include svn repositories. 94 | 95 | The manage_externals package is extremely tedious and error prone to test manually. 96 | 97 | Combinations that must be tested to ensure basic functionality are: 98 | 99 | * container repository pulling in simple externals 100 | 101 | * container repository pulling in mixed externals with sub-externals. 102 | 103 | * mixed repository acting as a container, pulling in simple externals and sub-externals 104 | 105 | Automatic system tests are handled the same way manual testing is done: 106 | 107 | * clone a test repository 108 | 109 | * create an externals description file for the test 110 | 111 | * run the executable with the desired args 112 | 113 | * check the results 114 | 115 | * potentially modify the repo (checkout a different branch) 116 | 117 | * rerun and test 118 | 119 | * etc 120 | 121 | The automated system stores small test repositories in the main repo 122 | by adding them as bare repositories. These repos are cloned via a 123 | subprocess call to git and manipulated during the tests. 124 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | _The Contributor Code of Conduct is for participants in our software projects and community._ 3 | 4 | ## Our Pledge 5 | We, as contributors, creators, stewards, and maintainers (participants), of the Norwegian Earth System Model (NorESM) pledge to make participation in our software, system or hardware project and community a safe, productive, welcoming and inclusive experience for everyone. 6 | All participants are required to abide by this Code of Conduct. 7 | This includes respectful treatment of everyone regardless of age, body size, disability, ethnicity, gender identity or expression, level of experience, nationality, political affiliation, veteran status, pregnancy, genetic information, physical appearance, race, religion, or sexual orientation, as well as any other personal characteristic. 8 | 9 | ## Our Standards 10 | Examples of behaviors that contribute to a positive environment include: 11 | 12 | * All participants are treated with respect and consideration, valuing a diversity of views and opinions 13 | * Be considerate, respectful, and collaborative 14 | * Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism 15 | * Acknowledging the contributions of others 16 | * Avoid personal attacks directed toward other participants 17 | * Be mindful of your surroundings and of your fellow participants 18 | * Respect the rules and policies of the project and venue 19 | 20 | Examples of unacceptable behavior include, but are not limited to: 21 | 22 | * Harassment, intimidation, or discrimination in any form 23 | * Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested 24 | * Unwelcome sexual attention or advances 25 | * Personal attacks directed at other guests, members, participants, etc. 26 | * Publishing others' private information without explicit permission 27 | * Alarming, intimidating, threatening, or hostile comments or conduct 28 | * Inappropriate use of nudity and/or sexual images 29 | * Threatening or stalking anyone, including a participant 30 | * Other conduct which could reasonably be considered inappropriate in a professional setting 31 | 32 | ## Scope 33 | This Code of Conduct applies to all spaces managed by the Project whether they be physical, online or face-to-face. 34 | This includes project code, code repository, associated web pages, documentation, mailing lists, project websites and wiki pages, issue tracker, meetings, telecons, events, project social media accounts, and any other forums created by the project team which the community uses for communication. 35 | In addition, violations of this Code of Conduct outside these spaces may affect a person's ability to participate within them. 36 | Representation of a project may be further defined and clarified by project maintainers. 37 | 38 | ## Community Responsibilities 39 | Everyone in the community is empowered to respond to people who are showing unacceptable behavior. 40 | They can talk to them privately or publicly. 41 | Anyone requested to stop unacceptable behavior is expected to comply immediately. 42 | If the behavior continues concerns may be brought to the project administrators or to any other party listed in the [Reporting](#reporting) section below. 43 | 44 | ## Project Administrator Responsibilities 45 | Project administrators are responsible for clarifying the standards of acceptable behavior and are encouraged to model appropriate behavior and provide support when people in the community point out inappropriate behavior. 46 | Project administrator(s) are normally the ones that would be tasked to carry out the actions in the [Consequences](#consequences) section below. 47 | 48 | ## Reporting 49 | Instances of unacceptable behavior can be brought to the attention of a chosen representative of the NCC consortium, who may take any action as outlined in the [Consequences](#consequences) section below. 50 | However, making a report to a representative of the NCC consortium is not considered an 'official report' to any of the NCC consortium members. 51 | 52 | Complaints will be held as confidential as practicable under the circumstances, and retaliation against a person who initiates a complaint or an inquiry about inappropriate behavior will not be tolerated. 53 | 54 | ## Consequences 55 | Upon receipt of a complaint, the chosen representative of the NCC consortium may initiate action deemed necessary and appropriate under the circumstances. 56 | Such action can include things such as: contacting the involved NCC consortium member organisations, removing, editing, or rejecting comments, commits, code, wiki edits, email, issues, and other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently any contributor for other behaviors that are deemed inappropriate, threatening, offensive, or harmful. 57 | 58 | ## Attribution 59 | This Code of Conduct was originally adapted from the [Contributor Covenant](http://contributor-covenant.org/version/1/4), version 1.4. 60 | -------------------------------------------------------------------------------- /Copyright-CESM.txt: -------------------------------------------------------------------------------- 1 | CESM2 Copyright and Terms of Use 2 | 3 | Copyright (c) 2018, University Corporation for Atmospheric Research 4 | (UCAR) All rights reserved. 5 | 6 | The Community Earth System Model (CESM) was developed primarily in 7 | cooperation with the National Science Foundation, the Department of 8 | Energy, the National Aeronautics and Space Administration, and the 9 | University Corporation for Atmospheric Research National Center for 10 | Atmospheric Research. 11 | 12 | THIS SOFTWARE IS PROVIDED BY UCAR AND ANY CONTRIBUTORS "AS IS" AND ANY 13 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UCAR OR ANY CONTRIBUTORS BE 16 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 17 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 18 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 19 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 20 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 21 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 22 | THE POSSIBILITY OF SUCH DAMAGE. 23 | 24 | The following components are copyrighted and may only be used, modified, 25 | or redistributed under the terms indicated below. 26 | 27 | Code Institution Copyright Terms of Use/Disclaimer 28 | ---- ----------- --------- ----------------------- 29 | AER RRTMG Atmospheric Copyright AER RRTMG Copyright 30 | and 2002-2010, 31 | Environmental Atmospheric 32 | Research, Inc. and 33 | Environmental 34 | Research, Inc. 35 | 36 | Common University Corporation Copyright 2017, CIME License 37 | Infrastructure for Atmospheric University 38 | for Modeling Research (UCAR) and DOE Corporation for 39 | the Earth BER E3SM project team Atmospheric 40 | (CIME) members, including Research (UCAR); 41 | those at SNL and ANL Copyright 2017, 42 | Sandia 43 | Corporation; 44 | Copyright 2017, 45 | UChicago Argonne, 46 | LLC 47 | 48 | ESMF University of Copyright University of Illinois/NCSA Open Source License 49 | Illinois/NCSA 2002-2009, 50 | University of 51 | Illinois/NCSA 52 | Open Source 53 | License 54 | 55 | Functionally UCAR/NCAR, UC Berkeley Copyright 2017, FATES License 56 | Assembled and DOE University 57 | Terrestrial Corporation for 58 | Ecosystem Atmospheric 59 | Simulator Research (UCAR), 60 | (FATES) the U.S. 61 | Department of 62 | Energy, and the 63 | University of 64 | California 65 | 66 | CISM Community NCAR/LANL/ORNL/SNL/ Copyright GNU Lesser General Public License v. 3 67 | Ice Sheet LBNL/NYU/U. Bristol/ 2004-2018, CISM is free software: you can redistribute it 68 | Model U. Edinburgh/ GNU Lesser and/or modify it under the terms of the GNU 69 | U. Montana/U. Swansea General Public Lesser General Public License as published by the 70 | License v. 3 Free Software Foundation, either version 3 of the 71 | License, or (at your option) any later version. 72 | 73 | Inf_NaN Lahey Copyright(c) Copies of this source code, or standalone compiled 74 | _Detection Computer 2003, Lahey files derived from this source may not be sold 75 | module Systems, Inc. Computer without permission from Lahey Computers Systems. 76 | Systems, Inc. All or part of this module may be freely incorporated 77 | into executable programs which are offered for sale. 78 | Otherwise, distribution of all or part of this file is 79 | permitted, provided this copyright notice and header 80 | are included. 81 | 82 | International N/A Copyright 2003, ISCCP Simulator Software 83 | Satellite 2010, Steve 84 | Cloud Klein and Mark 85 | Climatology Webb 86 | Project 87 | (ISCCP) 88 | 89 | MCT Argonne Copyright 2011, MCT Copyright 90 | National University of 91 | Laboratory Chicago 92 | 93 | Parallel Ocean Los Alamos National Copyright 2015, Los Alamos National Security, LLC 94 | Program (POP2) Laboratory Los Alamos 95 | National 96 | Security, LLC 97 | 98 | The Los Alamos Los Alamos National Copyright 2017, Los Alamos National Security, LLC 99 | Sea Ice Model Laboratory Los Alamos 100 | (CICE) National 101 | Security, LLC 102 | 103 | Spherical Los Alamos National Copyright 2015, Los Alamos National Security, LLC 104 | Coordinate Laboratory Los Alamos 105 | Remapping and National 106 | Interpolation Security, LLC 107 | Package (SCRIP) 108 | 109 | XML/Lite Wadsack-Allen Copyright 2001, The documentation for the Perl XML-Lite 110 | Digital Group 2010 module is no longer available on-line. 111 | Wadsack-Allen 112 | Digital Group 113 | 114 | For more details on the copyrights of the above components, see 115 | http://www.cesm.ucar.edu/models/cesm2/copyright.html 116 | 117 | There may be other third party tools and libraries that are integrated 118 | into CESM, and they may have their own copyright notices and terms. 119 | -------------------------------------------------------------------------------- /manage_externals/test/doc/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Manage Externals documentation build configuration file, created by 4 | # sphinx-quickstart on Wed Nov 29 10:53:25 2017. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | # If extensions (or modules to document with autodoc) are in another directory, 16 | # add these directories to sys.path here. If the directory is relative to the 17 | # documentation root, use os.path.abspath to make it absolute, like shown here. 18 | # 19 | # import os 20 | # import sys 21 | # sys.path.insert(0, os.path.abspath('.')) 22 | 23 | 24 | # -- General configuration ------------------------------------------------ 25 | 26 | # If your documentation needs a minimal Sphinx version, state it here. 27 | # 28 | # needs_sphinx = '1.0' 29 | 30 | # Add any Sphinx extension module names here, as strings. They can be 31 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 32 | # ones. 33 | extensions = ['sphinx.ext.autodoc', 34 | 'sphinx.ext.todo', 35 | 'sphinx.ext.coverage', 36 | 'sphinx.ext.viewcode', 37 | 'sphinx.ext.githubpages'] 38 | 39 | # Add any paths that contain templates here, relative to this directory. 40 | templates_path = ['_templates'] 41 | 42 | # The suffix(es) of source filenames. 43 | # You can specify multiple suffix as a list of string: 44 | # 45 | # source_suffix = ['.rst', '.md'] 46 | source_suffix = '.rst' 47 | 48 | # The master toctree document. 49 | master_doc = 'index' 50 | 51 | # General information about the project. 52 | project = u'Manage Externals' 53 | copyright = u'2017, CSEG at NCAR' 54 | author = u'CSEG at NCAR' 55 | 56 | # The version info for the project you're documenting, acts as replacement for 57 | # |version| and |release|, also used in various other places throughout the 58 | # built documents. 59 | # 60 | # The short X.Y version. 61 | version = u'1.0.0' 62 | # The full version, including alpha/beta/rc tags. 63 | release = u'1.0.0' 64 | 65 | # The language for content autogenerated by Sphinx. Refer to documentation 66 | # for a list of supported languages. 67 | # 68 | # This is also used if you do content translation via gettext catalogs. 69 | # Usually you set "language" from the command line for these cases. 70 | language = None 71 | 72 | # List of patterns, relative to source directory, that match files and 73 | # directories to ignore when looking for source files. 74 | # This patterns also effect to html_static_path and html_extra_path 75 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 76 | 77 | # The name of the Pygments (syntax highlighting) style to use. 78 | pygments_style = 'sphinx' 79 | 80 | # If true, `todo` and `todoList` produce output, else they produce nothing. 81 | todo_include_todos = True 82 | 83 | 84 | # -- Options for HTML output ---------------------------------------------- 85 | 86 | # The theme to use for HTML and HTML Help pages. See the documentation for 87 | # a list of builtin themes. 88 | # 89 | html_theme = 'alabaster' 90 | 91 | # Theme options are theme-specific and customize the look and feel of a theme 92 | # further. For a list of options available for each theme, see the 93 | # documentation. 94 | # 95 | # html_theme_options = {} 96 | 97 | # Add any paths that contain custom static files (such as style sheets) here, 98 | # relative to this directory. They are copied after the builtin static files, 99 | # so a file named "default.css" will overwrite the builtin "default.css". 100 | html_static_path = ['_static'] 101 | 102 | # Custom sidebar templates, must be a dictionary that maps document names 103 | # to template names. 104 | # 105 | # This is required for the alabaster theme 106 | # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars 107 | html_sidebars = { 108 | '**': [ 109 | 'relations.html', # needs 'show_related': True theme option to display 110 | 'searchbox.html', 111 | ] 112 | } 113 | 114 | 115 | # -- Options for HTMLHelp output ------------------------------------------ 116 | 117 | # Output file base name for HTML help builder. 118 | htmlhelp_basename = 'ManageExternalsdoc' 119 | 120 | 121 | # -- Options for LaTeX output --------------------------------------------- 122 | 123 | latex_elements = { 124 | # The paper size ('letterpaper' or 'a4paper'). 125 | # 126 | # 'papersize': 'letterpaper', 127 | 128 | # The font size ('10pt', '11pt' or '12pt'). 129 | # 130 | # 'pointsize': '10pt', 131 | 132 | # Additional stuff for the LaTeX preamble. 133 | # 134 | # 'preamble': '', 135 | 136 | # Latex figure (float) alignment 137 | # 138 | # 'figure_align': 'htbp', 139 | } 140 | 141 | # Grouping the document tree into LaTeX files. List of tuples 142 | # (source start file, target name, title, 143 | # author, documentclass [howto, manual, or own class]). 144 | latex_documents = [ 145 | (master_doc, 'ManageExternals.tex', u'Manage Externals Documentation', 146 | u'CSEG at NCAR', 'manual'), 147 | ] 148 | 149 | 150 | # -- Options for manual page output --------------------------------------- 151 | 152 | # One entry per manual page. List of tuples 153 | # (source start file, name, description, authors, manual section). 154 | man_pages = [ 155 | (master_doc, 'manageexternals', u'Manage Externals Documentation', 156 | [author], 1) 157 | ] 158 | 159 | 160 | # -- Options for Texinfo output ------------------------------------------- 161 | 162 | # Grouping the document tree into Texinfo files. List of tuples 163 | # (source start file, target name, title, author, 164 | # dir menu entry, description, category) 165 | texinfo_documents = [ 166 | (master_doc, 'ManageExternals', u'Manage Externals Documentation', 167 | author, 'ManageExternals', 'One line description of project.', 168 | 'Miscellaneous'), 169 | ] 170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /manage_externals/manic/externals_status.py: -------------------------------------------------------------------------------- 1 | """ExternalStatus 2 | 3 | Class to store status and state information about repositories and 4 | create a string representation. 5 | 6 | """ 7 | from __future__ import absolute_import 8 | from __future__ import unicode_literals 9 | from __future__ import print_function 10 | 11 | from .global_constants import EMPTY_STR 12 | from .utils import printlog, indent_string 13 | from .global_constants import VERBOSITY_VERBOSE, VERBOSITY_DUMP 14 | 15 | 16 | class ExternalStatus(object): 17 | """Class to represent the status of a given source repository or tree. 18 | 19 | Individual repositories determine their own status in the 20 | Repository objects. This object is just resposible for storing the 21 | information and passing it up to a higher level for reporting or 22 | global decisions. 23 | 24 | There are two states of concern: 25 | 26 | * If the repository is in-sync with the externals description file. 27 | 28 | * If the repostiory working copy is clean and there are no pending 29 | transactions (e.g. add, remove, rename, untracked files). 30 | 31 | """ 32 | DEFAULT = '-' 33 | UNKNOWN = '?' 34 | EMPTY = 'e' 35 | MODEL_MODIFIED = 's' # a.k.a. out-of-sync 36 | DIRTY = 'M' 37 | 38 | STATUS_OK = ' ' 39 | STATUS_ERROR = '!' 40 | 41 | # source types 42 | OPTIONAL = 'o' 43 | STANDALONE = 's' 44 | MANAGED = ' ' 45 | 46 | def __init__(self): 47 | self.sync_state = self.DEFAULT 48 | self.clean_state = self.DEFAULT 49 | self.source_type = self.DEFAULT 50 | self.path = EMPTY_STR 51 | self.current_version = EMPTY_STR 52 | self.expected_version = EMPTY_STR 53 | self.status_output = EMPTY_STR 54 | 55 | def log_status_message(self, verbosity): 56 | """Write status message to the screen and log file 57 | """ 58 | self._default_status_message() 59 | if verbosity >= VERBOSITY_VERBOSE: 60 | self._verbose_status_message() 61 | if verbosity >= VERBOSITY_DUMP: 62 | self._dump_status_message() 63 | 64 | def _default_status_message(self): 65 | """Return the default terse status message string 66 | """ 67 | msg = '{sync}{clean}{src_type} {path}'.format( 68 | sync=self.sync_state, clean=self.clean_state, 69 | src_type=self.source_type, path=self.path) 70 | printlog(msg) 71 | 72 | def _verbose_status_message(self): 73 | """Return the verbose status message string 74 | """ 75 | clean_str = self.DEFAULT 76 | if self.clean_state == self.STATUS_OK: 77 | clean_str = 'clean sandbox' 78 | elif self.clean_state == self.DIRTY: 79 | clean_str = 'modified sandbox' 80 | 81 | sync_str = 'on {0}'.format(self.current_version) 82 | if self.sync_state != self.STATUS_OK: 83 | sync_str = '{current} --> {expected}'.format( 84 | current=self.current_version, expected=self.expected_version) 85 | msg = ' {clean}, {sync}'.format(clean=clean_str, sync=sync_str) 86 | printlog(msg) 87 | 88 | def _dump_status_message(self): 89 | """Return the dump status message string 90 | """ 91 | msg = indent_string(self.status_output, 12) 92 | printlog(msg) 93 | 94 | def safe_to_update(self): 95 | """Report if it is safe to update a repository. Safe is defined as: 96 | 97 | * If a repository is empty, it is safe to update. 98 | 99 | * If a repository exists and has a clean working copy state 100 | with no pending transactions. 101 | 102 | """ 103 | safe_to_update = False 104 | repo_exists = self.exists() 105 | if not repo_exists: 106 | safe_to_update = True 107 | else: 108 | # If the repo exists, it must be in ok or modified 109 | # sync_state. Any other sync_state at this point 110 | # represents a logic error that should have been handled 111 | # before now! 112 | sync_safe = ((self.sync_state == ExternalStatus.STATUS_OK) or 113 | (self.sync_state == ExternalStatus.MODEL_MODIFIED)) 114 | if sync_safe: 115 | # The clean_state must be STATUS_OK to update. Otherwise we 116 | # are dirty or there was a missed error previously. 117 | if self.clean_state == ExternalStatus.STATUS_OK: 118 | safe_to_update = True 119 | return safe_to_update 120 | 121 | def exists(self): 122 | """Determine if the repo exists. This is indicated by: 123 | 124 | * sync_state is not EMPTY 125 | 126 | * if the sync_state is empty, then the valid states for 127 | clean_state are default, empty or unknown. Anything else 128 | and there was probably an internal logic error. 129 | 130 | NOTE(bja, 2017-10) For the moment we are considering a 131 | sync_state of default or unknown to require user intervention, 132 | but we may want to relax this convention. This is probably a 133 | result of a network error or internal logic error but more 134 | testing is needed. 135 | 136 | """ 137 | is_empty = (self.sync_state == ExternalStatus.EMPTY) 138 | clean_valid = ((self.clean_state == ExternalStatus.DEFAULT) or 139 | (self.clean_state == ExternalStatus.EMPTY) or 140 | (self.clean_state == ExternalStatus.UNKNOWN)) 141 | 142 | if is_empty and clean_valid: 143 | exists = False 144 | else: 145 | exists = True 146 | return exists 147 | 148 | 149 | def check_safe_to_update_repos(tree_status): 150 | """Check if *ALL* repositories are in a safe state to update. We don't 151 | want to do a partial update of the repositories then die, leaving 152 | the model in an inconsistent state. 153 | 154 | Note: if there is an update to do, the repositories will by 155 | definiation be out of synce with the externals description, so we 156 | can't use that as criteria for updating. 157 | 158 | """ 159 | safe_to_update = True 160 | for comp in tree_status: 161 | stat = tree_status[comp] 162 | safe_to_update &= stat.safe_to_update() 163 | 164 | return safe_to_update 165 | -------------------------------------------------------------------------------- /manage_externals/test/test_unit_repository.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """Unit test driver for checkout_externals 4 | 5 | Note: this script assume the path to the checkout_externals.py module is 6 | already in the python path. 7 | 8 | """ 9 | 10 | from __future__ import absolute_import 11 | from __future__ import unicode_literals 12 | from __future__ import print_function 13 | 14 | import unittest 15 | 16 | from manic.repository_factory import create_repository 17 | from manic.repository_git import GitRepository 18 | from manic.repository_svn import SvnRepository 19 | from manic.repository import Repository 20 | from manic.externals_description import ExternalsDescription 21 | from manic.global_constants import EMPTY_STR 22 | 23 | 24 | class TestCreateRepositoryDict(unittest.TestCase): 25 | """Test the create_repository functionality to ensure it returns the 26 | propper type of repository and errors for unknown repository 27 | types. 28 | 29 | """ 30 | 31 | def setUp(self): 32 | """Common data needed for all tests in this class 33 | """ 34 | self._name = 'test_name' 35 | self._repo = {ExternalsDescription.PROTOCOL: None, 36 | ExternalsDescription.REPO_URL: 'junk_root', 37 | ExternalsDescription.TAG: 'junk_tag', 38 | ExternalsDescription.BRANCH: EMPTY_STR, 39 | ExternalsDescription.HASH: EMPTY_STR, } 40 | 41 | def test_create_repo_git(self): 42 | """Verify that several possible names for the 'git' protocol 43 | create git repository objects. 44 | 45 | """ 46 | protocols = ['git', 'GIT', 'Git', ] 47 | for protocol in protocols: 48 | self._repo[ExternalsDescription.PROTOCOL] = protocol 49 | repo = create_repository(self._name, self._repo) 50 | self.assertIsInstance(repo, GitRepository) 51 | 52 | def test_create_repo_svn(self): 53 | """Verify that several possible names for the 'svn' protocol 54 | create svn repository objects. 55 | """ 56 | protocols = ['svn', 'SVN', 'Svn', ] 57 | for protocol in protocols: 58 | self._repo[ExternalsDescription.PROTOCOL] = protocol 59 | repo = create_repository(self._name, self._repo) 60 | self.assertIsInstance(repo, SvnRepository) 61 | 62 | def test_create_repo_externals_only(self): 63 | """Verify that an externals only repo returns None. 64 | """ 65 | protocols = ['externals_only', ] 66 | for protocol in protocols: 67 | self._repo[ExternalsDescription.PROTOCOL] = protocol 68 | repo = create_repository(self._name, self._repo) 69 | self.assertEqual(None, repo) 70 | 71 | def test_create_repo_unsupported(self): 72 | """Verify that an unsupported protocol generates a runtime error. 73 | """ 74 | protocols = ['not_a_supported_protocol', ] 75 | for protocol in protocols: 76 | self._repo[ExternalsDescription.PROTOCOL] = protocol 77 | with self.assertRaises(RuntimeError): 78 | create_repository(self._name, self._repo) 79 | 80 | 81 | class TestRepository(unittest.TestCase): 82 | """Test the externals description processing used to create the Repository 83 | base class shared by protocol specific repository classes. 84 | 85 | """ 86 | 87 | def test_tag(self): 88 | """Test creation of a repository object with a tag 89 | """ 90 | name = 'test_repo' 91 | protocol = 'test_protocol' 92 | url = 'test_url' 93 | tag = 'test_tag' 94 | repo_info = {ExternalsDescription.PROTOCOL: protocol, 95 | ExternalsDescription.REPO_URL: url, 96 | ExternalsDescription.TAG: tag, 97 | ExternalsDescription.BRANCH: EMPTY_STR, 98 | ExternalsDescription.HASH: EMPTY_STR, } 99 | repo = Repository(name, repo_info) 100 | print(repo.__dict__) 101 | self.assertEqual(repo.tag(), tag) 102 | self.assertEqual(repo.url(), url) 103 | 104 | def test_branch(self): 105 | """Test creation of a repository object with a branch 106 | """ 107 | name = 'test_repo' 108 | protocol = 'test_protocol' 109 | url = 'test_url' 110 | branch = 'test_branch' 111 | repo_info = {ExternalsDescription.PROTOCOL: protocol, 112 | ExternalsDescription.REPO_URL: url, 113 | ExternalsDescription.BRANCH: branch, 114 | ExternalsDescription.TAG: EMPTY_STR, 115 | ExternalsDescription.HASH: EMPTY_STR, } 116 | repo = Repository(name, repo_info) 117 | print(repo.__dict__) 118 | self.assertEqual(repo.branch(), branch) 119 | self.assertEqual(repo.url(), url) 120 | 121 | def test_hash(self): 122 | """Test creation of a repository object with a hash 123 | """ 124 | name = 'test_repo' 125 | protocol = 'test_protocol' 126 | url = 'test_url' 127 | ref = 'deadc0de' 128 | repo_info = {ExternalsDescription.PROTOCOL: protocol, 129 | ExternalsDescription.REPO_URL: url, 130 | ExternalsDescription.BRANCH: EMPTY_STR, 131 | ExternalsDescription.TAG: EMPTY_STR, 132 | ExternalsDescription.HASH: ref, } 133 | repo = Repository(name, repo_info) 134 | print(repo.__dict__) 135 | self.assertEqual(repo.hash(), ref) 136 | self.assertEqual(repo.url(), url) 137 | 138 | def test_tag_branch(self): 139 | """Test creation of a repository object with a tag and branch raises a 140 | runtimer error. 141 | 142 | """ 143 | name = 'test_repo' 144 | protocol = 'test_protocol' 145 | url = 'test_url' 146 | branch = 'test_branch' 147 | tag = 'test_tag' 148 | ref = EMPTY_STR 149 | repo_info = {ExternalsDescription.PROTOCOL: protocol, 150 | ExternalsDescription.REPO_URL: url, 151 | ExternalsDescription.BRANCH: branch, 152 | ExternalsDescription.TAG: tag, 153 | ExternalsDescription.HASH: ref, } 154 | with self.assertRaises(RuntimeError): 155 | Repository(name, repo_info) 156 | 157 | def test_tag_branch_hash(self): 158 | """Test creation of a repository object with a tag, branch and hash raises a 159 | runtimer error. 160 | 161 | """ 162 | name = 'test_repo' 163 | protocol = 'test_protocol' 164 | url = 'test_url' 165 | branch = 'test_branch' 166 | tag = 'test_tag' 167 | ref = 'deadc0de' 168 | repo_info = {ExternalsDescription.PROTOCOL: protocol, 169 | ExternalsDescription.REPO_URL: url, 170 | ExternalsDescription.BRANCH: branch, 171 | ExternalsDescription.TAG: tag, 172 | ExternalsDescription.HASH: ref, } 173 | with self.assertRaises(RuntimeError): 174 | Repository(name, repo_info) 175 | 176 | def test_no_tag_no_branch(self): 177 | """Test creation of a repository object without a tag or branch raises a 178 | runtimer error. 179 | 180 | """ 181 | name = 'test_repo' 182 | protocol = 'test_protocol' 183 | url = 'test_url' 184 | branch = EMPTY_STR 185 | tag = EMPTY_STR 186 | ref = EMPTY_STR 187 | repo_info = {ExternalsDescription.PROTOCOL: protocol, 188 | ExternalsDescription.REPO_URL: url, 189 | ExternalsDescription.BRANCH: branch, 190 | ExternalsDescription.TAG: tag, 191 | ExternalsDescription.HASH: ref, } 192 | with self.assertRaises(RuntimeError): 193 | Repository(name, repo_info) 194 | 195 | 196 | if __name__ == '__main__': 197 | unittest.main() 198 | -------------------------------------------------------------------------------- /manage_externals/test/doc/develop.rst: -------------------------------------------------------------------------------- 1 | Developer Guidelines 2 | ==================== 3 | 4 | The manage externals utilities are a light weight replacement for svn 5 | externals that will work with git repositories pulling in a mixture of 6 | git and svn dependencies. 7 | 8 | Given an externals description and a working copy: 9 | 10 | * *checkout_externals* attempts to make the working copy agree with the 11 | externals description 12 | 13 | * *generate_externals* attempts to make the externals description agree 14 | with the working copy. 15 | 16 | For these operations utilities should: 17 | 18 | * operate consistently across git and svn 19 | 20 | * operate simply with minimal user complexity 21 | 22 | * robustly across a wide range of repository states 23 | 24 | * provide explicit error messages when a problem occurs 25 | 26 | * leave the working copy in a valid state 27 | 28 | The utilities in manage externals are **NOT** generic wrappers around 29 | revision control operations or a replacement for common tasks. Users 30 | are expected to: 31 | 32 | * create branches prior to starting development 33 | 34 | * add remotes and push changes 35 | 36 | * create tags 37 | 38 | * delete branches 39 | 40 | These types of tasks are often highly workflow dependent, e.g. branch 41 | naming conventions may vary between repositories, have the potential 42 | to destroy user data, introduce significant code complexit and 'edge 43 | cases' that are extremely difficult to detect and test, and often 44 | require subtle decision making, especially if a problem occurs. 45 | 46 | Users who want to automate these types are encouraged to create their 47 | own tools. The externals description files are explicitly versioned 48 | and the internal APIs are intended to be stable for these purposes. 49 | 50 | Core Design Principles 51 | ----------------------- 52 | 53 | 1. Users can, and are actively encouraged to, modify the externals 54 | directories using revision control outside of manage_externals 55 | tools. You can't make any assumptions about the state of the 56 | working copy. Examples: adding a remote, creating a branch, 57 | switching to a branch, deleting the directory entirely. 58 | 59 | 2. Give that the user can do anything, the manage externals library 60 | can not preserve state between calls. The only information it can 61 | rely on is what it expectes based on the content of the externals 62 | description file, and what the actual state of the directory tree 63 | is. 64 | 65 | 3. Do *not* do anything that will possibly destroy user data! 66 | 67 | a. Do not remove files from the file system. We are operating on 68 | user supplied input. If you don't call 'rm', you can't 69 | accidentally remove the user's data. Thinking of calling 70 | ``shutil.rmtree(user_input)``? What if the user accidentally 71 | specified user_input such that it resolves to their home 72 | directory.... Yeah. Don't go there. 73 | 74 | b. Rely on git and svn to do their job as much as possible. Don't 75 | duplicate functionality. Examples: 76 | 77 | i. We require the working copies to be 'clean' as reported by 78 | ``git status`` and ``svn status``. What if there are misc 79 | editor files floating around that prevent an update? Use the 80 | git and svn ignore functionality so they are not 81 | reported. Don't try to remove them from manage_externals or 82 | determine if they are 'safe' to ignore. 83 | 84 | ii. Do not use '--force'. Ever. This is a sign you are doing 85 | something dangerous, it may not be what the user 86 | wants. Remember, they are encouraged to modify their repo. 87 | 88 | 4. There are often multiple ways to obtain a particular piece of 89 | information from git. Scraping screen output is brittle and 90 | generally not considered a stable API across different versions of 91 | git. Given a choice between: 92 | 93 | a. a lower level git 'plumbing' command that processes a 94 | specific request and returns a sucess/failure status. 95 | 96 | b. high level git command that produces a bunch of output 97 | that must be processed. 98 | 99 | We always prefer the former. It almost always involves 100 | writing and maintaining less code and is more likely to be 101 | stable. 102 | 103 | 5. Backward compatibility is critical. We have *nested* 104 | repositories. They are trivially easy to change versions. They may 105 | have very different versions of the top level manage_externals. The 106 | ability to read and work with old model description files is 107 | critical to avoid problems for users. We also have automated tools 108 | (testdb) that must generate and read external description 109 | files. Backward compatibility will make staging changes vastly 110 | simpler. 111 | 112 | Model Users 113 | ----------- 114 | 115 | Consider the needs of the following model userswhen developing manage_externals: 116 | 117 | * Users who will checkout the code once, and never change versions. 118 | 119 | * Users who will checkout the code once, then work for several years, 120 | never updating. before trying to update or request integration. 121 | 122 | * Users develope code but do not use revision control beyond the 123 | initial checkout. If they have modified or untracked files in the 124 | repo, they may be irreplacable. Don't destroy user data. 125 | 126 | * Intermediate users who are working with multiple repos or branches 127 | on a regular basis. They may only use manage_externals weekly or 128 | monthly. Keep the user interface and documentation simple and 129 | explicit. The more command line options they have to remember or 130 | look up, the more frustrated they git. 131 | 132 | * Software engineers who use the tools multiple times a day. It should 133 | get out of their way. 134 | 135 | User Interface 136 | -------------- 137 | 138 | Basic operation for the most standard use cases should be kept as 139 | simple as possible. Many users will only rarely run the manage 140 | utilities. Even advanced users don't like reading a lot of help 141 | documentation or struggling to remember commands and piece together 142 | what they need to run. Having many command line options, even if not 143 | needed, is exteremly frustrating and overwhelming for most users. A few 144 | simple, explicitly named commands are better than a single command 145 | with many options. 146 | 147 | How will users get help if something goes wrong? This is a custom, 148 | one-off solution. Searching the internet for manage_externals, will 149 | only return the user doc for this project at best. There isn't likely 150 | to be a stackoverflow question or blog post where someone else already 151 | answered a user's question. And very few people outside this community 152 | will be able to provide help if something goes wrong. The sooner we 153 | kick users out of these utilities and into standard version control 154 | tools, the better off they are going to be if they run into a problem. 155 | 156 | Repositories 157 | ------------ 158 | 159 | There are three basic types of repositories that must be considered: 160 | 161 | * container repositories - repositories that are always top level 162 | repositories, and have a group of externals that must be managed. 163 | 164 | * simple repositories - repositories that are externals to another 165 | repository, and do not have any of their own externals that will be 166 | managed. 167 | 168 | * mixed use repositories - repositories that can act as a top level 169 | container repository or as an external to a top level 170 | container. They may also have their own sub-externals that are 171 | required. They may have different externals needs depening on 172 | whether they are top level or not. 173 | 174 | Repositories must be able to checkout and switch to both branches and 175 | tags. 176 | 177 | Development 178 | =========== 179 | 180 | The functionality to manage externals is broken into a library of core 181 | functionality and applications built with the library. 182 | 183 | The core library is called 'manic', pseduo-homophone of (man)age 184 | (ex)ternals that is: short, pronounceable and spell-checkable. It is 185 | also no more or less meaningful to an unfamiliar user than a random 186 | jumble of letters forming an acronym. 187 | 188 | The core architecture of manic is: 189 | 190 | * externals description - an abstract description on an external, 191 | including of how to obtain it, where to obtain it, where it goes in 192 | the working tree. 193 | 194 | * externals - the software object representing an external. 195 | 196 | * source trees - collection of externals 197 | 198 | * repository wrappers - object oriented wrappers around repository 199 | operations. So the higher level management of the soure tree and 200 | external does not have to be concerned with how a particular 201 | external is obtained and managed. 202 | 203 | -------------------------------------------------------------------------------- /manage_externals/test/test_sys_repository_git.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """Tests of some of the functionality in repository_git.py that actually 4 | interacts with git repositories. 5 | 6 | We're calling these "system" tests because we expect them to be a lot 7 | slower than most of the unit tests. 8 | 9 | """ 10 | 11 | from __future__ import absolute_import 12 | from __future__ import unicode_literals 13 | from __future__ import print_function 14 | 15 | import os 16 | import shutil 17 | import tempfile 18 | import unittest 19 | 20 | from manic.repository_git import GitRepository 21 | from manic.externals_description import ExternalsDescription 22 | from manic.externals_description import ExternalsDescriptionDict 23 | from manic.utils import execute_subprocess 24 | 25 | # NOTE(wjs, 2018-04-09) I find a mix of camel case and underscores to be 26 | # more readable for unit test names, so I'm disabling pylint's naming 27 | # convention check 28 | # pylint: disable=C0103 29 | 30 | # Allow access to protected members 31 | # pylint: disable=W0212 32 | 33 | 34 | class GitTestCase(unittest.TestCase): 35 | """Adds some git-specific unit test functionality on top of TestCase""" 36 | 37 | def assertIsHash(self, maybe_hash): 38 | """Assert that the string given by maybe_hash really does look 39 | like a git hash. 40 | """ 41 | 42 | # Ensure it is non-empty 43 | self.assertTrue(maybe_hash, msg="maybe_hash is empty") 44 | 45 | # Ensure it has a single string 46 | self.assertEqual(1, len(maybe_hash.split()), 47 | msg="maybe_hash has multiple strings: {}".format(maybe_hash)) 48 | 49 | # Ensure that the only characters in the string are ones allowed 50 | # in hashes 51 | allowed_chars_set = set('0123456789abcdef') 52 | self.assertTrue(set(maybe_hash) <= allowed_chars_set, 53 | msg="maybe_hash has non-hash characters: {}".format(maybe_hash)) 54 | 55 | 56 | class TestGitTestCase(GitTestCase): 57 | """Tests GitTestCase""" 58 | 59 | def test_assertIsHash_true(self): 60 | """Ensure that assertIsHash passes for something that looks 61 | like a hash""" 62 | self.assertIsHash('abc123') 63 | 64 | def test_assertIsHash_empty(self): 65 | """Ensure that assertIsHash raises an AssertionError for an 66 | empty string""" 67 | with self.assertRaises(AssertionError): 68 | self.assertIsHash('') 69 | 70 | def test_assertIsHash_multipleStrings(self): 71 | """Ensure that assertIsHash raises an AssertionError when 72 | given multiple strings""" 73 | with self.assertRaises(AssertionError): 74 | self.assertIsHash('abc123 def456') 75 | 76 | def test_assertIsHash_badChar(self): 77 | """Ensure that assertIsHash raises an AssertionError when given a 78 | string that has a character that doesn't belong in a hash 79 | """ 80 | with self.assertRaises(AssertionError): 81 | self.assertIsHash('abc123g') 82 | 83 | 84 | class TestGitRepositoryGitCommands(GitTestCase): 85 | """Test some git commands in RepositoryGit 86 | 87 | It's silly that we need to create a repository in order to test 88 | these git commands. Much or all of the git functionality that is 89 | currently in repository_git.py should eventually be moved to a 90 | separate module that is solely responsible for wrapping git 91 | commands; that would allow us to test it independently of this 92 | repository class. 93 | """ 94 | 95 | # ======================================================================== 96 | # Test helper functions 97 | # ======================================================================== 98 | 99 | def setUp(self): 100 | # directory we want to return to after the test system and 101 | # checkout_externals are done cd'ing all over the place. 102 | self._return_dir = os.getcwd() 103 | 104 | self._tmpdir = tempfile.mkdtemp() 105 | os.chdir(self._tmpdir) 106 | 107 | self._name = 'component' 108 | rdata = {ExternalsDescription.PROTOCOL: 'git', 109 | ExternalsDescription.REPO_URL: 110 | '/path/to/local/repo', 111 | ExternalsDescription.TAG: 112 | 'tag1', 113 | } 114 | 115 | data = {self._name: 116 | { 117 | ExternalsDescription.REQUIRED: False, 118 | ExternalsDescription.PATH: 'junk', 119 | ExternalsDescription.EXTERNALS: '', 120 | ExternalsDescription.REPO: rdata, 121 | }, 122 | } 123 | model = ExternalsDescriptionDict(data) 124 | repo = model[self._name][ExternalsDescription.REPO] 125 | self._repo = GitRepository('test', repo) 126 | 127 | def tearDown(self): 128 | # return to our common starting point 129 | os.chdir(self._return_dir) 130 | 131 | shutil.rmtree(self._tmpdir, ignore_errors=True) 132 | 133 | @staticmethod 134 | def make_git_repo(): 135 | """Turn the current directory into an empty git repository""" 136 | execute_subprocess(['git', 'init']) 137 | 138 | @staticmethod 139 | def add_git_commit(): 140 | """Add a git commit in the current directory""" 141 | with open('README', 'a') as myfile: 142 | myfile.write('more info') 143 | execute_subprocess(['git', 'add', 'README']) 144 | execute_subprocess(['git', 'commit', '-m', 'my commit message']) 145 | 146 | @staticmethod 147 | def checkout_git_branch(branchname): 148 | """Checkout a new branch in the current directory""" 149 | execute_subprocess(['git', 'checkout', '-b', branchname]) 150 | 151 | @staticmethod 152 | def make_git_tag(tagname): 153 | """Make a lightweight tag at the current commit""" 154 | execute_subprocess(['git', 'tag', '-m', 'making a tag', tagname]) 155 | 156 | @staticmethod 157 | def checkout_ref(refname): 158 | """Checkout the given refname in the current directory""" 159 | execute_subprocess(['git', 'checkout', refname]) 160 | 161 | # ======================================================================== 162 | # Begin actual tests 163 | # ======================================================================== 164 | 165 | def test_currentHash_returnsHash(self): 166 | """Ensure that the _git_current_hash function returns a hash""" 167 | self.make_git_repo() 168 | self.add_git_commit() 169 | hash_found, myhash = self._repo._git_current_hash() 170 | self.assertTrue(hash_found) 171 | self.assertIsHash(myhash) 172 | 173 | def test_currentHash_outsideGitRepo(self): 174 | """Ensure that the _git_current_hash function returns False when 175 | outside a git repository""" 176 | hash_found, myhash = self._repo._git_current_hash() 177 | self.assertFalse(hash_found) 178 | self.assertEqual('', myhash) 179 | 180 | def test_currentBranch_onBranch(self): 181 | """Ensure that the _git_current_branch function returns the name 182 | of the branch""" 183 | self.make_git_repo() 184 | self.add_git_commit() 185 | self.checkout_git_branch('foo') 186 | branch_found, mybranch = self._repo._git_current_branch() 187 | self.assertTrue(branch_found) 188 | self.assertEqual('foo', mybranch) 189 | 190 | def test_currentBranch_notOnBranch(self): 191 | """Ensure that the _git_current_branch function returns False 192 | when not on a branch""" 193 | self.make_git_repo() 194 | self.add_git_commit() 195 | self.make_git_tag('mytag') 196 | self.checkout_ref('mytag') 197 | branch_found, mybranch = self._repo._git_current_branch() 198 | self.assertFalse(branch_found) 199 | self.assertEqual('', mybranch) 200 | 201 | def test_currentBranch_outsideGitRepo(self): 202 | """Ensure that the _git_current_branch function returns False 203 | when outside a git repository""" 204 | branch_found, mybranch = self._repo._git_current_branch() 205 | self.assertFalse(branch_found) 206 | self.assertEqual('', mybranch) 207 | 208 | def test_currentTag_onTag(self): 209 | """Ensure that the _git_current_tag function returns the name of 210 | the tag""" 211 | self.make_git_repo() 212 | self.add_git_commit() 213 | self.make_git_tag('some_tag') 214 | tag_found, mytag = self._repo._git_current_tag() 215 | self.assertTrue(tag_found) 216 | self.assertEqual('some_tag', mytag) 217 | 218 | def test_currentTag_notOnTag(self): 219 | """Ensure tha the _git_current_tag function returns False when 220 | not on a tag""" 221 | self.make_git_repo() 222 | self.add_git_commit() 223 | self.make_git_tag('some_tag') 224 | self.add_git_commit() 225 | tag_found, mytag = self._repo._git_current_tag() 226 | self.assertFalse(tag_found) 227 | self.assertEqual('', mytag) 228 | 229 | def test_currentTag_outsideGitRepo(self): 230 | """Ensure that the _git_current_tag function returns False when 231 | outside a git repository""" 232 | tag_found, mytag = self._repo._git_current_tag() 233 | self.assertFalse(tag_found) 234 | self.assertEqual('', mytag) 235 | 236 | 237 | if __name__ == '__main__': 238 | unittest.main() 239 | -------------------------------------------------------------------------------- /manage_externals/README.md: -------------------------------------------------------------------------------- 1 | -- AUTOMATICALLY GENERATED FILE. DO NOT EDIT -- 2 | 3 | [![Build Status](https://travis-ci.org/ESMCI/manage_externals.svg?branch=master)](https://travis-ci.org/ESMCI/manage_externals)[![Coverage Status](https://coveralls.io/repos/github/ESMCI/manage_externals/badge.svg?branch=master)](https://coveralls.io/github/ESMCI/manage_externals?branch=master) 4 | ``` 5 | usage: checkout_externals [-h] [-e [EXTERNALS]] [-o] [-S] [-v] [--backtrace] 6 | [-d] [--no-logging] 7 | 8 | checkout_externals manages checking out groups of externals from revision 9 | control based on a externals description file. By default only the 10 | required externals are checkout out. 11 | 12 | Operations performed by manage_externals utilities are explicit and 13 | data driven. checkout_externals will always make the working copy *exactly* 14 | match what is in the externals file when modifying the working copy of 15 | a repository. 16 | 17 | If checkout_externals isn't doing what you expected, double check the contents 18 | of the externals description file. 19 | 20 | Running checkout_externals without the '--status' option will always attempt to 21 | synchronize the working copy to exactly match the externals description. 22 | 23 | optional arguments: 24 | -h, --help show this help message and exit 25 | -e [EXTERNALS], --externals [EXTERNALS] 26 | The externals description filename. Default: 27 | Externals.cfg. 28 | -o, --optional By default only the required externals are checked 29 | out. This flag will also checkout the optional 30 | externals. 31 | -S, --status Output status of the repositories managed by 32 | checkout_externals. By default only summary 33 | information is provided. Use verbose output to see 34 | details. 35 | -v, --verbose Output additional information to the screen and log 36 | file. This flag can be used up to two times, 37 | increasing the verbosity level each time. 38 | --backtrace DEVELOPER: show exception backtraces as extra 39 | debugging output 40 | -d, --debug DEVELOPER: output additional debugging information to 41 | the screen and log file. 42 | --no-logging DEVELOPER: disable logging. 43 | 44 | ``` 45 | NOTE: checkout_externals *MUST* be run from the root of the source tree it 46 | is managing. For example, if you cloned a repository with: 47 | 48 | $ git clone git@github.com/{SOME_ORG}/some-project some-project-dev 49 | 50 | Then the root of the source tree is /path/to/some-project-dev. If you 51 | obtained a sub-project via a checkout of another project: 52 | 53 | $ git clone git@github.com/{SOME_ORG}/some-project some-project-dev 54 | 55 | and you need to checkout the sub-project externals, then the root of the 56 | source tree is /path/to/some-project-dev. Do *NOT* run checkout_externals 57 | from within /path/to/some-project-dev/sub-project 58 | 59 | The root of the source tree will be referred to as `${SRC_ROOT}` below. 60 | 61 | # Supported workflows 62 | 63 | * Checkout all required components from the default externals 64 | description file: 65 | 66 | $ cd ${SRC_ROOT} 67 | $ ./manage_externals/checkout_externals 68 | 69 | * To update all required components to the current values in the 70 | externals description file, re-run checkout_externals: 71 | 72 | $ cd ${SRC_ROOT} 73 | $ ./manage_externals/checkout_externals 74 | 75 | If there are *any* modifications to *any* working copy according 76 | to the git or svn 'status' command, checkout_externals 77 | will not update any external repositories. Modifications 78 | include: modified files, added files, removed files, or missing 79 | files. 80 | 81 | To avoid this safety check, edit the externals description file 82 | and comment out the modified external block. 83 | 84 | * Checkout all required components from a user specified externals 85 | description file: 86 | 87 | $ cd ${SRC_ROOT} 88 | $ ./manage_externals/checkout_externals --excernals my-externals.cfg 89 | 90 | * Status summary of the repositories managed by checkout_externals: 91 | 92 | $ cd ${SRC_ROOT} 93 | $ ./manage_externals/checkout_externals --status 94 | 95 | ./cime 96 | s ./components/cism 97 | ./components/mosart 98 | e-o ./components/rtm 99 | M ./src/fates 100 | e-o ./tools/PTCLM 101 | 102 | where: 103 | * column one indicates the status of the repository in relation 104 | to the externals description file. 105 | * column two indicates whether the working copy has modified files. 106 | * column three shows how the repository is managed, optional or required 107 | 108 | Column one will be one of these values: 109 | * s : out-of-sync : repository is checked out at a different commit 110 | compared with the externals description 111 | * e : empty : directory does not exist - checkout_externals has not been run 112 | * ? : unknown : directory exists but .git or .svn directories are missing 113 | 114 | Column two will be one of these values: 115 | * M : Modified : modified, added, deleted or missing files 116 | * : blank / space : clean 117 | * - : dash : no meaningful state, for empty repositories 118 | 119 | Column three will be one of these values: 120 | * o : optional : optionally repository 121 | * : blank / space : required repository 122 | 123 | * Detailed git or svn status of the repositories managed by checkout_externals: 124 | 125 | $ cd ${SRC_ROOT} 126 | $ ./manage_externals/checkout_externals --status --verbose 127 | 128 | # Externals description file 129 | 130 | The externals description contains a list of the external 131 | repositories that are used and their version control locations. The 132 | file format is the standard ini/cfg configuration file format. Each 133 | external is defined by a section containing the component name in 134 | square brackets: 135 | 136 | * name (string) : component name, e.g. [cime], [cism], etc. 137 | 138 | Each section has the following keyword-value pairs: 139 | 140 | * required (boolean) : whether the component is a required checkout, 141 | 'true' or 'false'. 142 | 143 | * local_path (string) : component path *relative* to where 144 | checkout_externals is called. 145 | 146 | * protoctol (string) : version control protocol that is used to 147 | manage the component. Valid values are 'git', 'svn', 148 | 'externals_only'. 149 | 150 | Switching an external between different protocols is not 151 | supported, e.g. from svn to git. To switch protocols, you need to 152 | manually move the old working copy to a new location. 153 | 154 | Note: 'externals_only' will only process the external's own 155 | external description file without trying to manage a repository 156 | for the component. This is used for retreiving externals for 157 | standalone components like cam and clm. If the source root of the 158 | externals_only component is the same as the main source root, then 159 | the local path must be set to '.', the unix current working 160 | directory, e. g. 'local_path = .' 161 | 162 | * repo_url (string) : URL for the repository location, examples: 163 | * https://svn-ccsm-models.cgd.ucar.edu/glc 164 | * git@github.com:esmci/cime.git 165 | * /path/to/local/repository 166 | * . 167 | 168 | NOTE: To operate on only the local clone and and ignore remote 169 | repositories, set the url to '.' (the unix current path), 170 | i.e. 'repo_url = .' . This can be used to checkout a local branch 171 | instead of the upstream branch. 172 | 173 | If a repo url is determined to be a local path (not a network url) 174 | then user expansion, e.g. ~/, and environment variable expansion, 175 | e.g. $HOME or $REPO_ROOT, will be performed. 176 | 177 | Relative paths are difficult to get correct, especially for mixed 178 | use repos. It is advised that local paths expand to absolute paths. 179 | If relative paths are used, they should be relative to one level 180 | above local_path. If local path is 'src/foo', the the relative url 181 | should be relative to 'src'. 182 | 183 | * tag (string) : tag to checkout 184 | 185 | * hash (string) : the git hash to checkout. Only applies to git 186 | repositories. 187 | 188 | * branch (string) : branch to checkout from the specified 189 | repository. Specifying a branch on a remote repository means that 190 | checkout_externals will checkout the version of the branch in the remote, 191 | not the the version in the local repository (if it exists). 192 | 193 | Note: one and only one of tag, branch hash must be supplied. 194 | 195 | * externals (string) : used to make manage_externals aware of 196 | sub-externals required by an external. This is a relative path to 197 | the external's root directory. For example, the main externals 198 | description has an external checkout out at 'src/useful_library'. 199 | useful_library requires additional externals to be complete. 200 | Those additional externals are managed from the source root by the 201 | externals description file pointed 'useful_library/sub-xternals.cfg', 202 | Then the main 'externals' field in the top level repo should point to 203 | 'sub-externals.cfg'. 204 | 205 | * Lines begining with '#' or ';' are comments and will be ignored. 206 | 207 | # Obtaining this tool, reporting issues, etc. 208 | 209 | The master repository for manage_externals is 210 | https://github.com/ESMCI/manage_externals. Any issues with this tool 211 | should be reported there. 212 | -------------------------------------------------------------------------------- /manage_externals/manic/repository_svn.py: -------------------------------------------------------------------------------- 1 | """Class for interacting with svn repositories 2 | """ 3 | 4 | from __future__ import absolute_import 5 | from __future__ import unicode_literals 6 | from __future__ import print_function 7 | 8 | import os 9 | import re 10 | import xml.etree.ElementTree as ET 11 | 12 | from .global_constants import EMPTY_STR, VERBOSITY_VERBOSE 13 | from .repository import Repository 14 | from .externals_status import ExternalStatus 15 | from .utils import fatal_error, indent_string, printlog 16 | from .utils import execute_subprocess 17 | 18 | 19 | class SvnRepository(Repository): 20 | """ 21 | Class to represent and operate on a repository description. 22 | 23 | For testing purpose, all system calls to svn should: 24 | 25 | * be isolated in separate functions with no application logic 26 | * of the form: 27 | - cmd = ['svn', ...] 28 | - value = execute_subprocess(cmd, output_to_caller={T|F}, 29 | status_to_caller={T|F}) 30 | - return value 31 | * be static methods (not rely on self) 32 | * name as _svn_subcommand_args(user_args) 33 | 34 | This convention allows easy unit testing of the repository logic 35 | by mocking the specific calls to return predefined results. 36 | 37 | """ 38 | RE_URLLINE = re.compile(r'^URL:') 39 | 40 | def __init__(self, component_name, repo): 41 | """ 42 | Parse repo (a XML element). 43 | """ 44 | Repository.__init__(self, component_name, repo) 45 | if self._branch: 46 | self._url = os.path.join(self._url, self._branch) 47 | elif self._tag: 48 | self._url = os.path.join(self._url, self._tag) 49 | else: 50 | msg = "DEV_ERROR in svn repository. Shouldn't be here!" 51 | fatal_error(msg) 52 | 53 | # ---------------------------------------------------------------- 54 | # 55 | # Public API, defined by Repository 56 | # 57 | # ---------------------------------------------------------------- 58 | def checkout(self, base_dir_path, repo_dir_name, verbosity): 59 | """Checkout or update the working copy 60 | 61 | If the repo destination directory exists, switch the sandbox to 62 | match the externals description. 63 | 64 | If the repo destination directory does not exist, checkout the 65 | correct branch or tag. 66 | 67 | """ 68 | repo_dir_path = os.path.join(base_dir_path, repo_dir_name) 69 | if os.path.exists(repo_dir_path): 70 | cwd = os.getcwd() 71 | os.chdir(repo_dir_path) 72 | self._svn_switch(self._url, verbosity) 73 | # svn switch can lead to a conflict state, but it gives a 74 | # return code of 0. So now we need to make sure that we're 75 | # in a clean (non-conflict) state. 76 | self._abort_if_dirty(repo_dir_path, 77 | "Expected clean state following switch") 78 | os.chdir(cwd) 79 | else: 80 | self._svn_checkout(self._url, repo_dir_path, verbosity) 81 | 82 | def status(self, stat, repo_dir_path): 83 | """ 84 | Check and report the status of the repository 85 | """ 86 | self._check_sync(stat, repo_dir_path) 87 | if os.path.exists(repo_dir_path): 88 | self._status_summary(stat, repo_dir_path) 89 | 90 | # ---------------------------------------------------------------- 91 | # 92 | # Internal work functions 93 | # 94 | # ---------------------------------------------------------------- 95 | def _check_sync(self, stat, repo_dir_path): 96 | """Check to see if repository directory exists and is at the expected 97 | url. Return: status object 98 | 99 | """ 100 | if not os.path.exists(repo_dir_path): 101 | # NOTE(bja, 2017-10) this state should have been handled by 102 | # the source object and we never get here! 103 | stat.sync_state = ExternalStatus.STATUS_ERROR 104 | else: 105 | svn_output = self._svn_info(repo_dir_path) 106 | if not svn_output: 107 | # directory exists, but info returned nothing. .svn 108 | # directory removed or incomplete checkout? 109 | stat.sync_state = ExternalStatus.UNKNOWN 110 | else: 111 | stat.sync_state, stat.current_version = \ 112 | self._check_url(svn_output, self._url) 113 | stat.expected_version = '/'.join(self._url.split('/')[3:]) 114 | 115 | def _abort_if_dirty(self, repo_dir_path, message): 116 | """Check if the repo is in a dirty state; if so, abort with a 117 | helpful message. 118 | 119 | """ 120 | 121 | stat = ExternalStatus() 122 | self._status_summary(stat, repo_dir_path) 123 | if stat.clean_state != ExternalStatus.STATUS_OK: 124 | status = self._svn_status_verbose(repo_dir_path) 125 | status = indent_string(status, 4) 126 | errmsg = """In directory 127 | {cwd} 128 | 129 | svn status now shows: 130 | {status} 131 | 132 | ERROR: {message} 133 | 134 | One possible cause of this problem is that there may have been untracked 135 | files in your working directory that had the same name as tracked files 136 | in the new revision. 137 | 138 | To recover: Clean up the above directory (resolving conflicts, etc.), 139 | then rerun checkout_externals. 140 | """.format(cwd=repo_dir_path, 141 | message=message, 142 | status=status) 143 | 144 | fatal_error(errmsg) 145 | 146 | @staticmethod 147 | def _check_url(svn_output, expected_url): 148 | """Determine the svn url from svn info output and return whether it 149 | matches the expected value. 150 | 151 | """ 152 | url = None 153 | for line in svn_output.splitlines(): 154 | if SvnRepository.RE_URLLINE.match(line): 155 | url = line.split(': ')[1].strip() 156 | break 157 | if not url: 158 | status = ExternalStatus.UNKNOWN 159 | elif url == expected_url: 160 | status = ExternalStatus.STATUS_OK 161 | else: 162 | status = ExternalStatus.MODEL_MODIFIED 163 | 164 | if url: 165 | current_version = '/'.join(url.split('/')[3:]) 166 | else: 167 | current_version = EMPTY_STR 168 | 169 | return status, current_version 170 | 171 | def _status_summary(self, stat, repo_dir_path): 172 | """Report whether the svn repository is in-sync with the model 173 | description and whether the sandbox is clean or dirty. 174 | 175 | """ 176 | svn_output = self._svn_status_xml(repo_dir_path) 177 | is_dirty = self.xml_status_is_dirty(svn_output) 178 | if is_dirty: 179 | stat.clean_state = ExternalStatus.DIRTY 180 | else: 181 | stat.clean_state = ExternalStatus.STATUS_OK 182 | 183 | # Now save the verbose status output incase the user wants to 184 | # see it. 185 | stat.status_output = self._svn_status_verbose(repo_dir_path) 186 | 187 | @staticmethod 188 | def xml_status_is_dirty(svn_output): 189 | """Parse svn status xml output and determine if the working copy is 190 | clean or dirty. Dirty is defined as: 191 | 192 | * modified files 193 | * added files 194 | * deleted files 195 | * missing files 196 | 197 | Unversioned files do not affect the clean/dirty status. 198 | 199 | 'external' is also an acceptable state 200 | 201 | """ 202 | # pylint: disable=invalid-name 203 | SVN_EXTERNAL = 'external' 204 | SVN_UNVERSIONED = 'unversioned' 205 | # pylint: enable=invalid-name 206 | 207 | is_dirty = False 208 | try: 209 | xml_status = ET.fromstring(svn_output) 210 | except BaseException: 211 | fatal_error( 212 | "SVN returned invalid XML message {}".format(svn_output)) 213 | xml_target = xml_status.find('./target') 214 | entries = xml_target.findall('./entry') 215 | for entry in entries: 216 | status = entry.find('./wc-status') 217 | item = status.get('item') 218 | if item == SVN_EXTERNAL: 219 | continue 220 | if item == SVN_UNVERSIONED: 221 | continue 222 | else: 223 | is_dirty = True 224 | break 225 | return is_dirty 226 | 227 | # ---------------------------------------------------------------- 228 | # 229 | # system call to svn for information gathering 230 | # 231 | # ---------------------------------------------------------------- 232 | @staticmethod 233 | def _svn_info(repo_dir_path): 234 | """Return results of svn info command 235 | """ 236 | cmd = ['svn', 'info', repo_dir_path] 237 | output = execute_subprocess(cmd, output_to_caller=True) 238 | return output 239 | 240 | @staticmethod 241 | def _svn_status_verbose(repo_dir_path): 242 | """capture the full svn status output 243 | """ 244 | cmd = ['svn', 'status', repo_dir_path] 245 | svn_output = execute_subprocess(cmd, output_to_caller=True) 246 | return svn_output 247 | 248 | @staticmethod 249 | def _svn_status_xml(repo_dir_path): 250 | """ 251 | Get status of the subversion sandbox in repo_dir 252 | """ 253 | cmd = ['svn', 'status', '--xml', repo_dir_path] 254 | svn_output = execute_subprocess(cmd, output_to_caller=True) 255 | return svn_output 256 | 257 | # ---------------------------------------------------------------- 258 | # 259 | # system call to svn for sideffects modifying the working tree 260 | # 261 | # ---------------------------------------------------------------- 262 | @staticmethod 263 | def _svn_checkout(url, repo_dir_path, verbosity): 264 | """ 265 | Checkout a subversion repository (repo_url) to checkout_dir. 266 | """ 267 | cmd = ['svn', 'checkout', '--quiet', url, repo_dir_path] 268 | if verbosity >= VERBOSITY_VERBOSE: 269 | printlog(' {0}'.format(' '.join(cmd))) 270 | execute_subprocess(cmd) 271 | 272 | @staticmethod 273 | def _svn_switch(url, verbosity): 274 | """ 275 | Switch branches for in an svn sandbox 276 | """ 277 | cmd = ['svn', 'switch', '--quiet', url] 278 | if verbosity >= VERBOSITY_VERBOSE: 279 | printlog(' {0}'.format(' '.join(cmd))) 280 | execute_subprocess(cmd) 281 | -------------------------------------------------------------------------------- /manage_externals/test/test_unit_externals_status.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """Unit test driver for the manic external status reporting module. 4 | 5 | Note: this script assumes the path to the manic package is already in 6 | the python path. 7 | 8 | """ 9 | 10 | from __future__ import absolute_import 11 | from __future__ import unicode_literals 12 | from __future__ import print_function 13 | 14 | import unittest 15 | 16 | from manic.externals_status import ExternalStatus 17 | 18 | 19 | class TestStatusObject(unittest.TestCase): 20 | """Verify that the Status object behaives as expected. 21 | """ 22 | 23 | def test_exists_empty_all(self): 24 | """If the repository sync-state is empty (doesn't exist), and there is no 25 | clean state, then it is considered not to exist. 26 | 27 | """ 28 | stat = ExternalStatus() 29 | stat.sync_state = ExternalStatus.EMPTY 30 | stat.clean_state = ExternalStatus.DEFAULT 31 | exists = stat.exists() 32 | self.assertFalse(exists) 33 | 34 | stat.clean_state = ExternalStatus.EMPTY 35 | exists = stat.exists() 36 | self.assertFalse(exists) 37 | 38 | stat.clean_state = ExternalStatus.UNKNOWN 39 | exists = stat.exists() 40 | self.assertFalse(exists) 41 | 42 | # this state represtens an internal logic error in how the 43 | # repo status was determined. 44 | stat.clean_state = ExternalStatus.STATUS_OK 45 | exists = stat.exists() 46 | self.assertTrue(exists) 47 | 48 | # this state represtens an internal logic error in how the 49 | # repo status was determined. 50 | stat.clean_state = ExternalStatus.DIRTY 51 | exists = stat.exists() 52 | self.assertTrue(exists) 53 | 54 | def test_exists_default_all(self): 55 | """If the repository sync-state is default, then it is considered to exist 56 | regardless of clean state. 57 | 58 | """ 59 | stat = ExternalStatus() 60 | stat.sync_state = ExternalStatus.DEFAULT 61 | stat.clean_state = ExternalStatus.DEFAULT 62 | exists = stat.exists() 63 | self.assertTrue(exists) 64 | 65 | stat.clean_state = ExternalStatus.EMPTY 66 | exists = stat.exists() 67 | self.assertTrue(exists) 68 | 69 | stat.clean_state = ExternalStatus.UNKNOWN 70 | exists = stat.exists() 71 | self.assertTrue(exists) 72 | 73 | stat.clean_state = ExternalStatus.STATUS_OK 74 | exists = stat.exists() 75 | self.assertTrue(exists) 76 | 77 | stat.clean_state = ExternalStatus.DIRTY 78 | exists = stat.exists() 79 | self.assertTrue(exists) 80 | 81 | def test_exists_unknown_all(self): 82 | """If the repository sync-state is unknown, then it is considered to exist 83 | regardless of clean state. 84 | 85 | """ 86 | stat = ExternalStatus() 87 | stat.sync_state = ExternalStatus.UNKNOWN 88 | stat.clean_state = ExternalStatus.DEFAULT 89 | exists = stat.exists() 90 | self.assertTrue(exists) 91 | 92 | stat.clean_state = ExternalStatus.EMPTY 93 | exists = stat.exists() 94 | self.assertTrue(exists) 95 | 96 | stat.clean_state = ExternalStatus.UNKNOWN 97 | exists = stat.exists() 98 | self.assertTrue(exists) 99 | 100 | stat.clean_state = ExternalStatus.STATUS_OK 101 | exists = stat.exists() 102 | self.assertTrue(exists) 103 | 104 | stat.clean_state = ExternalStatus.DIRTY 105 | exists = stat.exists() 106 | self.assertTrue(exists) 107 | 108 | def test_exists_modified_all(self): 109 | """If the repository sync-state is modified, then it is considered to exist 110 | regardless of clean state. 111 | 112 | """ 113 | stat = ExternalStatus() 114 | stat.sync_state = ExternalStatus.MODEL_MODIFIED 115 | stat.clean_state = ExternalStatus.DEFAULT 116 | exists = stat.exists() 117 | self.assertTrue(exists) 118 | 119 | stat.clean_state = ExternalStatus.EMPTY 120 | exists = stat.exists() 121 | self.assertTrue(exists) 122 | 123 | stat.clean_state = ExternalStatus.UNKNOWN 124 | exists = stat.exists() 125 | self.assertTrue(exists) 126 | 127 | stat.clean_state = ExternalStatus.STATUS_OK 128 | exists = stat.exists() 129 | self.assertTrue(exists) 130 | 131 | stat.clean_state = ExternalStatus.DIRTY 132 | exists = stat.exists() 133 | self.assertTrue(exists) 134 | 135 | def test_exists_ok_all(self): 136 | """If the repository sync-state is ok, then it is considered to exist 137 | regardless of clean state. 138 | 139 | """ 140 | stat = ExternalStatus() 141 | stat.sync_state = ExternalStatus.STATUS_OK 142 | stat.clean_state = ExternalStatus.DEFAULT 143 | exists = stat.exists() 144 | self.assertTrue(exists) 145 | 146 | stat.clean_state = ExternalStatus.EMPTY 147 | exists = stat.exists() 148 | self.assertTrue(exists) 149 | 150 | stat.clean_state = ExternalStatus.UNKNOWN 151 | exists = stat.exists() 152 | self.assertTrue(exists) 153 | 154 | stat.clean_state = ExternalStatus.STATUS_OK 155 | exists = stat.exists() 156 | self.assertTrue(exists) 157 | 158 | stat.clean_state = ExternalStatus.DIRTY 159 | exists = stat.exists() 160 | self.assertTrue(exists) 161 | 162 | def test_update_ok_all(self): 163 | """If the repository in-sync is ok, then it is safe to 164 | update only if clean state is ok 165 | 166 | """ 167 | stat = ExternalStatus() 168 | stat.sync_state = ExternalStatus.STATUS_OK 169 | stat.clean_state = ExternalStatus.DEFAULT 170 | safe_to_update = stat.safe_to_update() 171 | self.assertFalse(safe_to_update) 172 | 173 | stat.clean_state = ExternalStatus.EMPTY 174 | safe_to_update = stat.safe_to_update() 175 | self.assertFalse(safe_to_update) 176 | 177 | stat.clean_state = ExternalStatus.UNKNOWN 178 | safe_to_update = stat.safe_to_update() 179 | self.assertFalse(safe_to_update) 180 | 181 | stat.clean_state = ExternalStatus.STATUS_OK 182 | safe_to_update = stat.safe_to_update() 183 | self.assertTrue(safe_to_update) 184 | 185 | stat.clean_state = ExternalStatus.DIRTY 186 | safe_to_update = stat.safe_to_update() 187 | self.assertFalse(safe_to_update) 188 | 189 | def test_update_modified_all(self): 190 | """If the repository in-sync is modified, then it is safe to 191 | update only if clean state is ok 192 | 193 | """ 194 | stat = ExternalStatus() 195 | stat.sync_state = ExternalStatus.MODEL_MODIFIED 196 | stat.clean_state = ExternalStatus.DEFAULT 197 | safe_to_update = stat.safe_to_update() 198 | self.assertFalse(safe_to_update) 199 | 200 | stat.clean_state = ExternalStatus.EMPTY 201 | safe_to_update = stat.safe_to_update() 202 | self.assertFalse(safe_to_update) 203 | 204 | stat.clean_state = ExternalStatus.UNKNOWN 205 | safe_to_update = stat.safe_to_update() 206 | self.assertFalse(safe_to_update) 207 | 208 | stat.clean_state = ExternalStatus.STATUS_OK 209 | safe_to_update = stat.safe_to_update() 210 | self.assertTrue(safe_to_update) 211 | 212 | stat.clean_state = ExternalStatus.DIRTY 213 | safe_to_update = stat.safe_to_update() 214 | self.assertFalse(safe_to_update) 215 | 216 | def test_update_unknown_all(self): 217 | """If the repository in-sync is unknown, then it is not safe to 218 | update, regardless of the clean state. 219 | 220 | """ 221 | stat = ExternalStatus() 222 | stat.sync_state = ExternalStatus.UNKNOWN 223 | stat.clean_state = ExternalStatus.DEFAULT 224 | safe_to_update = stat.safe_to_update() 225 | self.assertFalse(safe_to_update) 226 | 227 | stat.clean_state = ExternalStatus.EMPTY 228 | safe_to_update = stat.safe_to_update() 229 | self.assertFalse(safe_to_update) 230 | 231 | stat.clean_state = ExternalStatus.UNKNOWN 232 | safe_to_update = stat.safe_to_update() 233 | self.assertFalse(safe_to_update) 234 | 235 | stat.clean_state = ExternalStatus.STATUS_OK 236 | safe_to_update = stat.safe_to_update() 237 | self.assertFalse(safe_to_update) 238 | 239 | stat.clean_state = ExternalStatus.DIRTY 240 | safe_to_update = stat.safe_to_update() 241 | self.assertFalse(safe_to_update) 242 | 243 | def test_update_default_all(self): 244 | """If the repository in-sync is default, then it is not safe to 245 | update, regardless of the clean state. 246 | 247 | """ 248 | stat = ExternalStatus() 249 | stat.sync_state = ExternalStatus.UNKNOWN 250 | stat.clean_state = ExternalStatus.DEFAULT 251 | safe_to_update = stat.safe_to_update() 252 | self.assertFalse(safe_to_update) 253 | 254 | stat.clean_state = ExternalStatus.EMPTY 255 | safe_to_update = stat.safe_to_update() 256 | self.assertFalse(safe_to_update) 257 | 258 | stat.clean_state = ExternalStatus.UNKNOWN 259 | safe_to_update = stat.safe_to_update() 260 | self.assertFalse(safe_to_update) 261 | 262 | stat.clean_state = ExternalStatus.STATUS_OK 263 | safe_to_update = stat.safe_to_update() 264 | self.assertFalse(safe_to_update) 265 | 266 | stat.clean_state = ExternalStatus.DIRTY 267 | safe_to_update = stat.safe_to_update() 268 | self.assertFalse(safe_to_update) 269 | 270 | def test_update_empty_all(self): 271 | """If the repository in-sync is empty, then it is not safe to 272 | update, regardless of the clean state. 273 | 274 | """ 275 | stat = ExternalStatus() 276 | stat.sync_state = ExternalStatus.UNKNOWN 277 | stat.clean_state = ExternalStatus.DEFAULT 278 | safe_to_update = stat.safe_to_update() 279 | self.assertFalse(safe_to_update) 280 | 281 | stat.clean_state = ExternalStatus.EMPTY 282 | safe_to_update = stat.safe_to_update() 283 | self.assertFalse(safe_to_update) 284 | 285 | stat.clean_state = ExternalStatus.UNKNOWN 286 | safe_to_update = stat.safe_to_update() 287 | self.assertFalse(safe_to_update) 288 | 289 | stat.clean_state = ExternalStatus.STATUS_OK 290 | safe_to_update = stat.safe_to_update() 291 | self.assertFalse(safe_to_update) 292 | 293 | stat.clean_state = ExternalStatus.DIRTY 294 | safe_to_update = stat.safe_to_update() 295 | self.assertFalse(safe_to_update) 296 | 297 | 298 | if __name__ == '__main__': 299 | unittest.main() 300 | --------------------------------------------------------------------------------