From 2031fb5912d70293011ae57080cd1031dba105cd Mon Sep 17 00:00:00 2001 From: David <36640545+daianzhuo@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:17:01 +0100 Subject: [PATCH 1/2] Update create-a-case.rst with how to use SourceMods Emphasised two points on how to use SourceMods to modify a case. 1. The name of the xmlchange shell file should be shell_commands 2. SourceMods changes do not need to have the same strucutre as the component source codes --- doc/source/users_guide/create-a-case.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/users_guide/create-a-case.rst b/doc/source/users_guide/create-a-case.rst index 71b39b5cbd8..4089be063c8 100644 --- a/doc/source/users_guide/create-a-case.rst +++ b/doc/source/users_guide/create-a-case.rst @@ -207,6 +207,12 @@ As an example, the directory could contain the following files: :: > shell_commands (this would contain ./xmlchange commands) > SourceMods/src.cam/dyncomp.F90 +It is important to note that the file containing the **xmlchange** +commands must be named ``shell_commands`` in order for it to be recognised +and run upon case creation. + +The structure of the component directories do not need to be the same as in the component source code. As an example, should the user want to modify the ``src/dynamics/eul/dyncomp.F90`` file within the CAM source code, the modified file should be put into the ``SourceMods/src.cam`` directly. There is no need to mimic the source code structure, such as ``SourceMods/src.cam/dynamics/eul``. + When the user calls **create_newcase** with the ``--user-mods-dir`` pointing to the full pathname of the directory containing these changes, then the ``CASEROOT`` will be created with these changes applied. From 08d33b3f790b4604a8d91d7ba683756773f6c242 Mon Sep 17 00:00:00 2001 From: David <36640545+daianzhuo@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:24:18 +0100 Subject: [PATCH 2/2] Wrap lines in create-a-case.rst --- doc/source/users_guide/create-a-case.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/source/users_guide/create-a-case.rst b/doc/source/users_guide/create-a-case.rst index 4089be063c8..c9257da19a6 100644 --- a/doc/source/users_guide/create-a-case.rst +++ b/doc/source/users_guide/create-a-case.rst @@ -211,7 +211,12 @@ It is important to note that the file containing the **xmlchange** commands must be named ``shell_commands`` in order for it to be recognised and run upon case creation. -The structure of the component directories do not need to be the same as in the component source code. As an example, should the user want to modify the ``src/dynamics/eul/dyncomp.F90`` file within the CAM source code, the modified file should be put into the ``SourceMods/src.cam`` directly. There is no need to mimic the source code structure, such as ``SourceMods/src.cam/dynamics/eul``. +The structure of the component directories do not need to be the +same as in the component source code. As an example, should the user +want to modify the ``src/dynamics/eul/dyncomp.F90`` file within the +CAM source code, the modified file should be put into the directory +``SourceMods/src.cam`` directly. There is no need to mimic the source +code structure, such as ``SourceMods/src.cam/dynamics/eul``. When the user calls **create_newcase** with the ``--user-mods-dir`` pointing to the full pathname of the directory containing these changes, then the ``CASEROOT`` will be