You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/includes/payu.md
+95-75Lines changed: 95 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,27 +48,34 @@ A representation of the data organisation for _payu_ is given in the following d
48
48
As shown in the diagram, the general layout of a _payu_-supported model run consists of two main directories:
49
49
50
50
- The _control_ directory contains the model configuration and is the directory from which the model run is started.
51
-
This directory contains information to manage the simulation and the scientific options that define the algorithms used in the model component or the diagnostics saved by the model component. If a model has only one model component, the files with the scientific options are located directly in the _control_ directory. If the model has several model components, the files are locate inside subfolders of the _control_ directory named according to the submodel's `name` specified in the `config.yaml`[`submodels` section](#submodels). To modify these options please refer to the configurations documentation of the respective model component, found on the [Run a Model][Run a Model] page for your chosen model.
52
-
- The _laboratory_ directory contains all data from _payu_ experiments of the same model. By default, it is `/scratch/$PROJECT/$USER/<model_name>`. `$PROJECT` and `$USER` are environment variables on _Gadi_ that points to your [default project](/getting_started/set_up_nci_account/#change-default-project-on-gadi) and your username respectively.
53
-
See the section on [modifying the PBS resources](#modify-pbs-resources) to learn how to change the _laboratory_ location.
51
+
This directory contains information to manage the simulation and the scientific options that define the algorithms used in the model component or the diagnostics saved by the model component. The simulation is orchestrated from a main `config.yaml` file contained in this directory. The files specific to each model component are either located directly in the _control_ directory if the model has one model component, or in subdirectories if the model has several model components. The `submodels` section of the `config.yaml`file specifies the name of the submodels and of the subdirectories containing the pertinent files. To modify these options please refer to the configurations documentation of the respective model component.
52
+
- The _laboratory_ directory contains all data from _payu_ experiments of the same model. By default, it is `/scratch/$PROJECT/$USER/<model_name>`. `$PROJECT` and `$USER` are environment variables on _Gadi_ that points to your [default project](/getting_started/set_up_nci_account/#change-default-project-on-gadi) and your username respectively. This location can be changed.
53
+
<!--See the section on [modifying the PBS resources](#modify-pbs-resources) to learn how to change the _laboratory_ location. (Should the include be cut to allow adding this sentence and link?)-->
54
54
55
-
On _Gadi_, it is good practice to put experiment _control_ directories in your `$HOME` directory as this is the only filesystem that is actively backed-up. There is a 10GB limit for home directories, but the _control_ directory only contains text files and symlinks, and so uses relatively little space (<1MB). The _laboratory_ directory is on `/scratch` which is optimised for fast reading and writing of large data and where there is adequate space available for large model output.
55
+
!!! tip
56
+
57
+
On _Gadi_, it is good practice to put experiment _control_ directories in your `$HOME` directory as this is the only filesystem that is actively backed-up. There is a 10GB limit for home directories, but the _control_ directory only contains text files and symlinks, and so uses relatively little space (<1MB). The _laboratory_ directory is on `/scratch` which is optimised for fast reading and writing of large data and where there is adequate space available for large model output.
58
+
59
+
If you decide to locate your _control_ directory under `/g/data`, be aware of [some complications](https://forum.access-hive.org.au/t/changing-project-codes-for-payu-control-directories-under-g-data/6566) linked to that choice.
56
60
57
61
Inside the _laboratory_ directory, there are two subdirectories of particular interest:
58
62
59
63
-_work_→ for temporary storage of files needed by the model while it runs. _payu_ creates and removes directories and files in this directory upon successful completion of runs. It is left untouched in case of error to facilitate the identification of the cause of the model failure
60
64
-_archive_→ for storing the output following each successful run. The output, log and restart files are automatically transferred from _work_ to _archive_ upon successful completion of runs.
61
65
62
-
Within each of the _work_ and _archive_ directories, _payu_ automatically creates a unique subdirectory for each experiment. Within each experiment sub-directory, the output and restart subfolders are called `outputXXX` and `restartXXX`, respectively, where _XXX_ is the run number starting from `000`. Model components are further separated into subdirectories within the output and restart directories.
63
-
64
66
The _archive_ and _work_ directories for an experiment are most easily accessed through the symbolic links created in the _control_ directory.
65
67
66
68
!!! warning
67
-
Files on the `/scratch` drive, such as the _laboratory_ directory, might be deleted if not accessed for several days. All experiments which are to be kept should be moved to `/g/data/` by enabling the `sync` step in _payu_. To know more, refer to [Syncing output data](#syncing-output-data-to-long-term-storage).
69
+
Files on the `/scratch` drive, such as the _laboratory_ directory, might be deleted if not accessed for several days. All experiments which are to be kept should be moved to `/g/data/` by enabling the `sync` step in _payu_.
70
+
71
+
##### Output and restart files organisation
72
+
73
+
Within each of the _work_ and _archive_ directories, _payu_ automatically creates a unique subdirectory for each experiment. Within each experiment subdirectory, the output and restart subfolders are called `outputXXX` and `restartXXX`, respectively, where _XXX_ is the run number starting from `000`. Model components are further separated into subdirectories within the output and restart directories.
74
+
75
+
##### Error and output log files
68
76
69
-
### Error and output log files
77
+
**PBS output files**
70
78
71
-
#### PBS output files {: .no-toc }
72
79
When the model fails or completes a run, PBS writes the standard output and error streams to two files inside the _control_ directory: `<jobname>.o<job-ID>` and `<jobname>.e<job-ID>`, respectively.
73
80
74
81
These files usually contain logs about _payu_ tasks, and give an overview of the resources used by the job.<br>
@@ -78,12 +85,13 @@ To move these files to the _archive_ directory, use the following commmand:
78
85
payu sweep
79
86
```
80
87
81
-
#### Model log files {: .no-toc }
88
+
**Model log files**
82
89
83
90
While the model is running, the standard output and error streams are saved to file in the _control_ directory. You can examine the contents of these log files to check on the status of a run as it progresses (or after a failed run has completed).
84
91
85
92
!!! warning
86
93
At the end of a successful run, the model log files are archived to the _archive_ directory and will no longer be found in the _control_ directory. If they remain in the _control_ directory after the PBS job for a run has completed, it means the run has failed.
94
+
87
95
<!--end:about-->
88
96
89
97
## Prerequisites for _payu_
@@ -112,7 +120,7 @@ After joining the _vk83_ project, load the _payu_ module:
112
120
module load payu
113
121
114
122
To check that _payu_ is available, run:
115
-
ø
123
+
116
124
payu --version
117
125
<!--end:access-payu-->
118
126
@@ -295,36 +303,37 @@ _payu_ provides the [`payu status`](https://payu.readthedocs.io/en/stable/usage.
295
303
Example output from `payu status` for a running simulation:
To monitor the current queue time of a queued job, use `payu status --update`.
@@ -361,9 +370,9 @@ To find out more about configuration settings for the `config.yaml` file, refer
361
370
Adjusting the duration of the model run is one of the most common change to apply. However, models follow different ways to adapt the duration of the run. Please refer to the [Run a Model][Run a Model] page of the model of your choice for information<br>
362
371
363
372
373
+
<!--start:payu-restart-choice-->
364
374
### Start the run from a specific restart file {: id='specific-restart'}
365
375
366
-
<!--start:payu-restart-choice-->
367
376
To configure the experiment to start from specific restart files, add a [`restart:` entry](https://payu.readthedocs.io/en/stable/config.html#miscellaneous) to the `config.yaml` file, specifying the path to a folder containing existing restart files.
368
377
Or to do this automatically when setting up an experiment using `payu clone` interactive, give the restart path when prompted: `Do you want to specify a custom restart path?`.
369
378
@@ -374,10 +383,10 @@ Or to do this automatically when setting up an experiment using `payu clone` int
374
383
The restart option used here will only be applied if there is no restart directory in archive, and so does not have to be removed for subsequent submissions. See [Payu docs](https://payu.readthedocs.io/en/stable/config.html#miscellaneous) for further details.
375
384
<!--end:payu-restart-choice-->
376
385
377
-
<!--start:payu-PBS-resources-->
378
-
### Modify PBS resources
386
+
<!--start:payu-compute-storage-project-->
387
+
### Specify the compute project and storage location {: id='compute-storage-choice'}
379
388
380
-
If the model has been altered and needs more time or memory to complete, or needs to be submitted under a different NCI project, you will need to modify the following options in the`config.yaml`:
389
+
If you want to submit an experiment or part of an experiment using a different project for the compute resources or a non-default location for the archive directory, you will need to modify the following entries in `config.yaml`:
381
390
382
391
```yaml
383
392
# If submitting to a different project to your default, uncomment line below
@@ -386,26 +395,34 @@ If the model has been altered and needs more time or memory to complete, or need
386
395
387
396
# Force payu to always find, and save, files in this scratch project directory
388
397
# shortpath: /scratch/PROJECT_CODE
389
-
390
-
queue: normal
391
-
walltime: 3:00:00
392
-
mem: 1000GB
393
-
jobname: 1deg_jra55_ryf
394
398
```
395
399
396
-
These lines can be edited to change the [PBS directives](https://opus.nci.org.au/display/Help/PBS+Directives+Explained) for the [PBS job][PBS job].
397
-
398
400
For example, to run under the {{WG_project}}, uncomment the line beginning with `# project` by deleting the `#` symbol and replace `PROJECT_CODE` with `{{WG_project_code}}`:
399
401
400
402
```yaml
401
403
project: {{WG_project_code}}
402
404
```
403
405
404
-
For model configurations and output to be saved to a `/scratch` storage allocation other than `project` (or your default if `project` is not set) then also set `shortpath` to the desired path.
406
+
For model configurations and output to be saved to a `/scratch` storage location other than `project` (or your default if `project` is not set) then also set `shortpath` to the desired path.
405
407
406
408
!!! warning
407
409
If changing the project providing the compute resources during an experiment, set the `shortpath` field so that it's the same for all runs of an experiment.
408
410
Doing this will make sure the same `/scratch` location is used for the _laboratory_, regardless of which project is used to run the experiment.
411
+
<!--end:payu-compute-storage-project-->
412
+
413
+
<!--start:payu-PBS-resources-->
414
+
### Modify PBS resources
415
+
416
+
If the model has been altered and needs more time or memory to complete, or needs to be submitted under a different NCI project, you will need to modify the following options in the `config.yaml`:
417
+
418
+
```yaml
419
+
queue: normal
420
+
walltime: 3:00:00
421
+
mem: 1000GB
422
+
jobname: 1deg_jra55_ryf
423
+
```
424
+
425
+
These lines can be edited to change the [PBS directives](https://opus.nci.org.au/display/Help/PBS+Directives+Explained) for the [PBS job][PBS job].
409
426
<!--end:payu-PBS-resources-->
410
427
411
428
<!--start:payu-sync-->
@@ -460,7 +477,8 @@ restart_freq: '50YS'
460
477
461
478
The most recent sequential restarts are retained, and only deleted after a permanently archived restart file has been produced.
462
479
463
-
!!! note
480
+
??? note "When `restart_freq` is not a multiplier of the model's restart frequency"
481
+
464
482
If `restart_freq` is not a multiplier of the model's restart frequency, _payu_ will keep the first restart passed `restart_freq`. For example, a model is set to write restart files every 3 years and produces restarts on the following dates:
465
483
466
484
- restart000: 01/01/2000
@@ -486,25 +504,19 @@ For more information, check [_payu_ Configuration Settings documentation](https:
486
504
!!! warning
487
505
The following sections in the `config.yaml` file control configuration options that are rarely modified, and often require a deeper understanding of how the model is structured to be safely changed.
488
506
489
-
#### Model configuration {: .no-toc }
507
+
#### `model` section {: .no-toc }
490
508
491
509
This section tells _payu_ which driver to use for the main `model` configuration and the location of all `input` files that are common to all its model components.
The `name` field, for the model section, is not actually used for the configuration run, so it can be safely ignored. The `name` field is used for submodels (see below).
500
512
501
-
#### Submodels {: .no-toc }
513
+
#### `submodels` section {: .no-toc }
502
514
503
515
Coupled models may deploy the model components as multiple submodels.
504
516
505
-
This section of the _payu_ configuration file specifies the submodels, the configuration options required to execute the model component correctly and the location of all inputs required for this submodel.
517
+
This section of the _payu_ configuration file specifies the submodels, the configuration options required to execute the model component correctly and the location of all inputs required for this submodel. The configuration files specific to each submodel can be found in a `name/` subdirectory of the _control_ directory, where `name` is the value of this field in the `submodel` section of `config.yaml`.
506
518
507
-
#### Runlog {: .no-toc }
519
+
#### `runlog` field {: .no-toc }
508
520
509
521
```yaml
510
522
runlog: true
@@ -516,30 +528,19 @@ When running an experiment, if `runlog` is set to `true`, _payu_ saves a histor
516
528
This should not be changed as it is an essential part of the provenance of an experiment.<br>
517
529
_payu_ updates the manifest files for every run, and relies on `runlog` to save this information in the _git_ history, so there is a record of all inputs, restarts, and executables used in an experiment.
They are used to run scripts or subcommands at various stages of a _payu_ submission:
529
534
530
-
- `error`gets called if the model does not run correctly and exits with an error.
531
-
- `run`gets called after each model run successful execution, but prior to archiving the model output. If using `payu -n` for automatic resubmission, it is run for each submission.
532
-
- `sync`gets called at the start of the sync PBS job. For more information refer to [Syncing output data](#syncing-output-data-to-long-term-storage).
535
+
- `error` field: script is called if the model does not run correctly and exits with an error.
536
+
- `run` field: script is called after each model run successful execution, but prior to archiving the model output. If using `payu -n` for automatic resubmission, it is run for each submission.
537
+
- `sync` field: script is called at the start of the sync PBS job.
533
538
534
539
For more information about specific `userscripts` fields, check the relevant section of [_payu_ Configuration Settings documentation](https://payu.readthedocs.io/en/stable/config.html#postprocessing).
535
540
536
-
#### Postscripts {: .no-toc }
541
+
#### `postscript` option {: .no-toc }
537
542
Postprocessing scripts that run after _payu_ has completed all steps of each run (for example, with `payu run -n 10`, the postscript will run 10 times). Scripts that might alter the output directory, for example, can be run as postscripts. These run in PBS jobs separate from the main model simulation.
The following configuration settings should never require changing:
@@ -550,6 +551,25 @@ qsub_flags: -W umask=027
550
551
```
551
552
<!--end:payu-advance-options-->
552
553
554
+
<!--start:payu-collate-->
555
+
#### Collate {: .no-toc }
556
+
557
+
Rather than outputting a single diagnostic file over the whole model horizontal grid, the ocean component [MOM](/models/model_components/ocean/#modular-ocean-model-mom) typically generates diagnostic outputs as tiles, each of which spans a portion of model grid.
558
+
559
+
The `collate` section in the `config.yaml` file controls the process that combines these smaller files into a single outputfile.
560
+
561
+
```yaml
562
+
# Collation
563
+
collate:
564
+
exe: mppnccombine.spack
565
+
restart: true
566
+
mem: 4GB
567
+
walltime: 1:00:00
568
+
mpi: false
569
+
```
570
+
Restart files are typically tiled in the same way and will also be combined together if the `restart` field is set to`true`.
0 commit comments