Skip to content

Commit a89c91c

Browse files
committed
Try macros in terminal
1 parent 7f52ac0 commit a89c91c

2 files changed

Lines changed: 31 additions & 21 deletions

File tree

docs/includes/payu.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,45 +115,46 @@ Then, you can get the chosen configuration using `payu clone`.
115115
<!--end:get-config-payu-->
116116

117117
<!--start:payu-clone-example-->
118-
For example, if you want to do a sensitivity experiment about diffusivity in ACCESS-OM2 using the configuration `release-1deg_jra55_ryf`. You decide the following:
118+
For example, if you want to do a sensitivity experiment in {{model}} using the configuration {{config_example}}. You decide the following:
119119

120-
- `<repository>` and `<branch>`: base your experiment off the branch, `release-1deg_jra55_ryf`, from the repository, `https://github.com/ACCESS-NRI/access-om2-configs`
121-
- `<configurations-directory>`: store all your ACCESS-OM2 configurations under `~/access-om2/`
122-
- `<local-branch>`: name your branch `diffuse_test1`
123-
- `<control-directory>`: store the configurations for this research project under `diffuse_exps-1deg_jra55_ryf`
120+
- `<repository>` and `<branch>`: base your experiment off the branch, {{config_example}}, from the repository, {{github_configs}}
121+
- `<configurations-directory>`: store all your {{model}} configurations under `~/{{model}}/`
122+
- `<local-branch>`: name your branch `expt1`. For a real case, a more explicit name is recommended.
123+
- `<control-directory>`: store the configurations for this research project under `my-project-expts`. For a real case, a more explicit name is recommended.
124124

125125
To get the configuration as chosen, run:
126126

127127
<terminal-window>
128-
<terminal-line data="input">mkdir -p ~/access-om2/</terminal-line>
129-
<terminal-line data="input">cd ~/access-om2/</terminal-line>
128+
<terminal-line data="input">mkdir -p ~/{{model}}/</terminal-line>
129+
<terminal-line data="input">cd ~/{{model}}/</terminal-line>
130130
<terminal-line data="input">payu clone</terminal-line>
131131
<terminal-line><span class="payu-yellow">Welcome to the Payu Clone Wizard!</span></terminal-line>
132132
<terminal-line><span class="payu-yellow">Press 'Ctrl+C' at any time to exit.</span></terminal-line>
133-
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">Please enter the URL of the repository, or the local path of a configuration you want to clone:</span> (e.g., https://github.com/payu-org/bowl1.git or /path/to/local/experiment; 'Tab' to browse, '/' to enter folder) <span class="payu-dark-yellow"> https://github.com/ACCESS-NRI/access-om2-configs</span></terminal-line>
133+
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">Please enter the URL of the repository, or the local path of a configuration you want to clone:</span> (e.g., https://github.com/payu-org/bowl1.git or /path/to/local/experiment; 'Tab' to browse, '/' to enter folder) <span class="payu-dark-yellow"> {{github_configs}}</span></terminal-line>
134134
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">Do you want to clone the repo based on:</span> <span class="payu-dark-yellow">An existing branch</span></terminal-line>
135-
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">Please enter the name of the branch you want to clone ('Tab' to browse all branches):</span> <span class="payu-dark-yellow">release-1deg_jra55_ryf</span></terminal-line>
136-
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">How would you like to name your local experiment directory?</span> <span class="payu-dark-yellow"> diffuse_exps-1deg_jra55_ryf</span></terminal-line>
135+
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">Please enter the name of the branch you want to clone ('Tab' to browse all branches):</span> <span class="payu-dark-yellow">{{config_example}}</span></terminal-line>
136+
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">How would you like to name your local experiment directory?</span> <span class="payu-dark-yellow"> my-project-expts</span></terminal-line>
137137
<terminal-line><span class="spack-cyan">?</span> <span class="payu red">Is this a new experiment?</span> (If yes, payu will create a new branch.) <span class="payu-dark-yellow">Yes</span></terminal-line>
138-
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">What would you like to name your new branch</span> (Note: this won't be shared to the online repository automatically) <span class="payu-dark-yellow">diffuse_test1-1deg_jra55_ryf</span></terminal-line>
138+
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">What would you like to name your new branch</span> (Note: this won't be shared to the online repository automatically) <span class="payu-dark-yellow">expt1</span></terminal-line>
139139
<terminal-line><span class="spack-cyan">?</span> <span class="payu-red">Do you want to specify a custom restart path? (If no, the default restart/initial conditions will be used.)</span> <span class="payu-dark-yellow">No</span></terminal-line>
140140
<terminal-line><span class="payu-yellow">Running command:</span></terminal-line>
141-
<terminal-line><span class="payu-yellow">\`payu clone -B release-1deg_jra55_ryf -b diffuse_test1-1deg_jra55_ryf https://github.com/ACCESS-NRI/access-om2-configs diffuse_exps-1deg_jra55_ryf\`</span></terminal-line>
142-
<terminal-line>Cloned repository from https://github.com/ACCESS-NRI/access-om2-configs to directory: /home/561/\$USER/payu-control/access-om2/ diffuse_exps-1deg_jra55_ryf</terminal-line>
143-
<terminal-line>Created and checked out new branch: diffuse_test1-1deg_jra55_ryf</terminal-line>
144-
<terminal-line>laboratory path: /scratch/\$PROJECT/\$USER/access-om2</terminal-line>
145-
<terminal-line>binary path: /scratch/\$PROJECT/\$USER/access-om2/bin</terminal-line>
146-
<terminal-line>input path: /scratch/\$PROJECT/\$USER/access-om2/input</terminal-line>
147-
<terminal-line>work path: /scratch/\$PROJECT/\$USER/access-om2/work</terminal-line>
148-
<terminal-line>archive path: /scratch/\$PROJECT/\$USER/access-om2/archive</terminal-line>
141+
<terminal-line><span class="payu-yellow">\`payu clone -B {{config_example}} -b expt1 {{github_configs}} my-project-expts\`</span></terminal-line>
142+
<terminal-line>Cloned repository from {{github_configs}} to directory: /home/561/\$USER/payu-control/{{model}}/my-project-expts</terminal-line>
143+
<terminal-line>Created and checked out new branch: expt1</terminal-line>
144+
<terminal-line>laboratory path: /scratch/\$PROJECT/\$USER/{{model}}</terminal-line>
145+
<terminal-line>binary path: /scratch/\$PROJECT/\$USER/{{model}}/bin</terminal-line>
146+
<terminal-line>input path: /scratch/\$PROJECT/\$USER/{{model}}/input</terminal-line>
147+
<terminal-line>work path: /scratch/\$PROJECT/\$USER/{{model}}/work</terminal-line>
148+
<terminal-line>archive path: /scratch/\$PROJECT/\$USER/{{model}}/archive</terminal-line>
149149
<terminal-line>Updated metadata. Experiment UUID: 14058c5c-d0dd-49dd-841a-cbec42b7391e</terminal-line>
150-
<terminal-line>Added archive symlink to /scratch/\$PROJECT/\$USER/access-om2/archive/diffuse_exps-1deg_jra55_ryf-diffuse_test1-1deg_jra55_ryf-14058c5c</terminal-line>
150+
<terminal-line>Added archive symlink to /scratch/\$PROJECT/\$USER/{{model}}/archive/my-project-expts-expt1-14058c5c</terminal-line>
151151
<terminal-line>To change directory to control directory run:</terminal-line>
152-
<terminal-line> cd diffuse_exps-1deg_jra55_ryf</terminal-line>
152+
<terminal-line> cd my-project-expts</terminal-line>
153153
</terminal-window>
154154

155155
!!! tip
156156
Anyone using a configuration is advised to clone only a single branch (as shown in the example above) and not the entire repository.
157+
<!--end:payu-clone-example-->
157158

158159
### Test the configuration
159160

docs/models/run_a_model/run_access-esm.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{% set model = "ACCESS-ESM1.5" %}
22
{% set github_configs = "https://github.com/ACCESS-NRI/access-esm1.5-configs" %}
33
{% set release_notes = "https://forum.access-hive.org.au/t/access-esm1-5-release-information/2352" %}
4+
{% set config_example = "release-preindustrial+concentrations" %}
45
[PBS job]: https://opus.nci.org.au/display/Help/4.+PBS+Jobs
56
[gadi]: https://opus.nci.org.au/display/Help/0.+Welcome+to+Gadi#id-0.WelcometoGadi-Overview
67
[payu]: https://github.com/payu-org/payu
@@ -88,6 +89,14 @@ Released configurations are tested and supported by ACCESS-NRI, as an adaptation
8889
end="<!--end:get-config-payu-->"
8990
%}
9091

92+
??? abstract "Experiment example"
93+
{%
94+
include-markdown "includes/payu.md"
95+
start="<!--start:payu-clone-example-->"
96+
end="<!--end:payu-clone-example-->"
97+
%}
98+
99+
91100
!!! tip
92101
If you want to restart your experiment from a specific restart point, please refer to [Start the run from a specific restart file](#specific-restart).
93102

0 commit comments

Comments
 (0)