Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nemo/nemo
  • sparonuz/nemo
  • hatfield/nemo
  • extdevs/nemo
4 results
Show changes
Commits on Source (1188)
Showing
with 641 additions and 354 deletions
# configurations & testcases
# configurations, testcases & tools
*/work_cfgs.txt
cfgs/work_cfgs.txt
cfgs/*/BLD
cfgs/*/EXP00
cfgs/*/WORK
cfgs/*/NEMOFILES
cfgs/*/AGRIFLIB
cfgs/*_ST
tests/work_cfgs.txt
tests/*/BLD
tests/*/EXP00
tests/*/WORK
tests/*/NEMOFILES
tests/*/AGRIFLIB
tests/*_ST
tools/*/BLD
tools/*/*.exe
tools/tools.txt
# mk
mk/arch*
mk/cpp.*
mk/full_key_list.txt
# arch
arch/arch-auto.fcm
# sette param files
sette/param*
#----------#
# SETTE CI #
#----------#
workflow:
name: "SETTE : $NEMO_HPC $NEMO_COMPILER $NEMO_COMPILATION - $NEMO_CONFIG cfg(s) - $SETTE_TEST test(s)"
rules:
- if: $CI_PIPELINE_SOURCE == 'web'
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_COMMIT_TITLE =~ /(?i).*\[ci\].*/
- if: $CI_PIPELINE_SOURCE == 'schedule'
include:
# PIPELINE VARIABLES
- local: '.gitlab-ci/.VAR-SELECT.yml'
# SETTE TESTS
- local: '.gitlab-ci/.TEST-VAR.yml'
- local: '.gitlab-ci/.TEST-ALL.yml'
rules:
- if: $SETTE_TEST == "ALL"
- local: '.gitlab-ci/.TEST-RESTART.yml'
rules:
- if: $SETTE_TEST == "RESTART"
- local: '.gitlab-ci/.TEST-REPRO.yml'
rules:
- if: $SETTE_TEST == "REPRO"
- local: '.gitlab-ci/.TEST-CORRUPT.yml'
rules:
- if: $SETTE_TEST == "CORRUPT"
- local: '.gitlab-ci/.TEST-PHYOPTS.yml'
rules:
- if: $SETTE_TEST == "PHYOPTS"
# NEMO CONFIGURATIONS
- local: '.gitlab-ci/.CFG-ALL.yml'
rules:
- if: $NEMO_CONFIG == "ALL"
- local: '.gitlab-ci/.CFG-SELECT.yml'
rules:
- if: $NEMO_CONFIG != "ALL"
# HPC
- local: '.gitlab-ci/.HPC-MERCATOR.yml'
# YAML ANCHORS
.cache: &cache_CFG
key: ${CONFIG}_${CI_COMMIT_SHORT_SHA}_${CI_PIPELINE_ID}
paths:
- $CI_PROJECT_DIR/{cfgs,tests}/${CONFIG}_ST/EXP*
- $CI_PROJECT_DIR/{cfgs,tests}/${CONFIG}_ST/BLD/bin
- $CI_PROJECT_DIR/{cfgs,tests}/${CONFIG}_ST/cpp_${CONFIG}_ST.fcm
.loop: &loop
matrix:
- CONFIG: !reference [.config, variables, CONFIG]
.artifact_run: &artifact_run
paths:
- sette/$LOG_FILE
- cfgs/${CONFIG}_ST/*/sette.*.out
- cfgs/${CONFIG}_ST/*/sette.*.err
- cfgs/${CONFIG}_ST/*/ocean.output*
- tests/${CONFIG}_ST/*/sette.*.out
- tests/${CONFIG}_ST/*/sette.*.err
- tests/${CONFIG}_ST/*/ocean.output*
when: always
expire_in: 1 week
.artifact_rpt: &artifact_rpt
paths: ['sette/$LOG_FILE']
when: always
expire_in: 1 week
stages:
- compile
- run
- check
- report
before_script:
# the following commands will be executed at the beginning of each job
# they are needed to copy param.cfg to SETTE directory and to load the modules
- declare -A HOST_NAME=( ["aa"]="ECMWF" ["ab"]="ECMWF" ["ac"]="ECMWF" ["ad"]="ECMWF" ["lir"]="LIR"
["belenoslogin"]="MF" ["irene"]="IR" ["jean-zay"]="JZ" )
# modules should be loaded using .env files in NEMO arch directory
- SETTE_MOD=${HOST_NAME[${HOSTNAME//[-,.,0-9]*}]}_SETTE_MOD
- if [ -n "${!SETTE_MOD}" ]; then
if [ -d ${HOME}/modules ]; then module use ${HOME}/modules; fi;
module purge || true;
module load ${!SETTE_MOD};
fi
- set +x # debug prints
# copy SETTE local param.cfg file
- SETTE_CFG=${HOST_NAME[${HOSTNAME//[-,.,0-9]*}]}_SETTE_CFG
- cp -aLv ${!SETTE_CFG} sette/param.cfg
- git config core.filemode false # ignore git(lab) symlinks permissions changes when pushing then pulling cache ("old mode 100755 -> new mode 100644")
- SETTE_OPT="-u -w" # no user interaction + wait for jobs to end options
- if [[ ${NEMO_COMPILATION} == "debug" ]]; then SETTE_OPT="${SETTE_OPT} -b"; fi
# JOBS
# sette_cmp : compile reference configurations / testcases
# sette_run : run reference configurations / testcases
# sette_rpt : check reference configurations / testcases results
sette_cmp:
stage: compile
parallel: # Parallelisation across the selected configuration(s)
<<: *loop
rules: # Restriction to the configurations relevant for the selected test(s)
- if: ($CONFIG =~ $PATTERN || $NEMO_CONFIG =~ $PATTERN)
cache:
<<: *cache_CFG
policy: push
tags:
- $NEMO_HPC
script:
- cd sette
- ./sette.sh ${SETTE_OPT} -n "${CONFIG}" -x "COMPILE" | tee -a sette_cmp_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${NEMO_HPC}.log
artifacts:
paths:
- sette/sette_cmp_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${NEMO_HPC}.log
when: always
expire_in: 30 days
sette_run:RESTART:
stage: run
needs: # Dependency on the compilation of the configurations relevant for the 'RESTART' test
- job: sette_cmp
parallel:
matrix:
- CONFIG: !reference [.restart, variables, CONFIG]
parallel: # Parallelisation across the selected configuration(s)
<<: *loop
rules: # Dependency on the 'RESTART'-test selection, and restriction to the configurations relevant for the 'RESTART' test
- if: $SETTE_TEST =~ /ALL|RESTART/ && ($CONFIG =~ $PATTERN_RESTART || $NEMO_CONFIG =~ $PATTERN_RESTART)
dependencies: [] # No retrieval of previous artefacts
cache:
<<: *cache_CFG
policy: pull
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'RESTART'
LOG_FILE: 'sette_run_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette.sh ${SETTE_OPT} -n "${CONFIG}" -x "${TEST_TYPE}" | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_run
sette_run:REPRO:
stage: run
needs:
- job: sette_cmp
parallel:
matrix:
- CONFIG: !reference [.repro, variables, CONFIG]
dependencies: [] # do not retrieve previous artifacts
rules:
- if: $SETTE_TEST =~ /ALL|REPRO/ && ($CONFIG =~ $PATTERN_REPRO || $NEMO_CONFIG =~ $PATTERN_REPRO)
parallel:
<<: *loop
cache:
<<: *cache_CFG
policy: pull
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'REPRO'
LOG_FILE: 'sette_run_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette.sh ${SETTE_OPT} -n "${CONFIG}" -x "${TEST_TYPE}" | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_run
sette_run:CORRUPT:
stage: run
needs:
- job: sette_cmp
parallel:
matrix:
- CONFIG: !reference [.corrupt, variables, CONFIG]
dependencies: [] # do not retrieve previous artifacts
rules:
- if: $SETTE_TEST =~ /ALL|CORRUPT/ && ($CONFIG =~ $PATTERN_CORRUPT || $NEMO_CONFIG =~ $PATTERN_CORRUPT)
parallel:
<<: *loop
cache:
<<: *cache_CFG
policy: pull
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'CORRUPT'
LOG_FILE: 'sette_run_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette.sh ${SETTE_OPT} -n "${CONFIG}" -x "${TEST_TYPE}" | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_run
sette_run:PHYOPTS:
stage: run
needs:
- job: sette_cmp
parallel:
matrix:
- CONFIG: !reference [.phyopts, variables, CONFIG]
dependencies: [] # do not retrieve previous artifacts
rules:
- if: $SETTE_TEST =~ /ALL|PHYOPTS/ && ($CONFIG =~ $PATTERN_PHYOPTS || $NEMO_CONFIG =~ $PATTERN_PHYOPTS)
parallel:
<<: *loop
cache:
<<: *cache_CFG
policy: pull
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'PHYOPTS'
LOG_FILE: 'sette_run_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette.sh ${SETTE_OPT} -n "${CONFIG}" -x "${TEST_TYPE}" | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_run
sette_rpt:RESTART:
stage: check
needs: # Dependency on the completion of the test runs relevant for the 'RESTART' test
- job: sette_run:RESTART
parallel:
matrix:
- CONFIG: !reference [.restart, variables, CONFIG]
parallel: # Parallelisation across the selected configuration(s)
<<: *loop
rules: # Dependency on the 'RESTART'-test selection, and restriction to the configurations relevant for the 'RESTART' test
- if: $SETTE_TEST =~ /ALL|RESTART/ && ($CONFIG =~ $PATTERN_RESTART || $NEMO_CONFIG =~ $PATTERN_RESTART)
when: delayed
start_in: 5 seconds
dependencies: [] # No retrieval of previous artefacts
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'RESTART'
LOG_FILE: 'sette_rpt_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette_rpt.sh ${SETTE_OPT/" -w"} -n "${CONFIG}" -x "${TEST_TYPE}" -s ${CI_COMMIT_SHORT_SHA} | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_rpt
sette_rpt:REPRO:
stage: check
needs:
- job: sette_run:REPRO
parallel:
matrix:
- CONFIG: !reference [.repro, variables, CONFIG]
dependencies: [] # do not retrieve previous artifacts
rules:
- if: $SETTE_TEST =~ /ALL|REPRO/ && ($CONFIG =~ $PATTERN_REPRO || $NEMO_CONFIG =~ $PATTERN_REPRO)
when: delayed
start_in: 5 seconds
parallel:
<<: *loop
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'REPRO'
LOG_FILE: 'sette_rpt_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette_rpt.sh ${SETTE_OPT/" -w"} -n "${CONFIG}" -x "${TEST_TYPE}" -s ${CI_COMMIT_SHORT_SHA} | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_rpt
sette_rpt:CORRUPT:
stage: check
needs:
- job: sette_run:CORRUPT
parallel:
matrix:
- CONFIG: !reference [.corrupt, variables, CONFIG]
dependencies: [] # do not retrieve previous artifacts
rules:
- if: $SETTE_TEST =~ /ALL|CORRUPT/ && ($CONFIG =~ $PATTERN_CORRUPT || $NEMO_CONFIG =~ $PATTERN_CORRUPT)
when: delayed
start_in: 5 seconds
parallel:
<<: *loop
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'CORRUPT'
LOG_FILE: 'sette_rpt_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette_rpt.sh ${SETTE_OPT/" -w"} -n "${CONFIG}" -x "${TEST_TYPE}" -s ${CI_COMMIT_SHORT_SHA} | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_rpt
sette_rpt:PHYOPTS:
stage: check
needs:
- job: sette_run:PHYOPTS
parallel:
matrix:
- CONFIG: !reference [.phyopts, variables, CONFIG]
dependencies: [] # do not retrieve previous artifacts
rules:
- if: $SETTE_TEST =~ /ALL|PHYOPTS/ && ($CONFIG =~ $PATTERN_PHYOPTS || $NEMO_CONFIG =~ $PATTERN_PHYOPTS)
when: delayed
start_in: 5 seconds
parallel:
<<: *loop
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'PHYOPTS'
LOG_FILE: 'sette_rpt_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette_rpt.sh ${SETTE_OPT/" -w"} -n "${CONFIG}" -x "${TEST_TYPE}" -s ${CI_COMMIT_SHORT_SHA} | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_rpt
sette_rpt:COMPARE:
stage: check
needs:
- job: sette_run:RESTART
parallel:
matrix:
- CONFIG: !reference [.restart, variables, CONFIG]
dependencies: [] # do not retrieve previous artifacts
rules:
- if: $NEMO_REFSHA != "" && ($CONFIG =~ $PATTERN_RESTART || $NEMO_CONFIG =~ $PATTERN_RESTART)
when: delayed
start_in: 5 seconds
parallel:
<<: *loop
tags:
- $NEMO_HPC
variables:
TEST_TYPE: 'COMPARE'
LOG_FILE: 'sette_rpt_${TEST_TYPE}_${CONFIG}_${NEMO_HPC}_${CI_COMMIT_SHORT_SHA}.log'
GIT_STRATEGY: none
script:
- cd sette
- ./sette_rpt.sh ${SETTE_OPT/" -w"} -n "${CONFIG}" -x "${TEST_TYPE}" -s ${CI_COMMIT_SHORT_SHA} ${NEMO_REFSHA:+-S ${NEMO_REFSHA}} | tee -a ${LOG_FILE}
artifacts:
<<: *artifact_rpt
sette_rpt:FULL:
stage: report
dependencies: [] # do not retrieve previous artifacts
rules:
- if: $SETTE_TEST == "ALL" && $NEMO_CONFIG == "ALL"
tags:
- $NEMO_HPC
script:
- cd sette
- ./sette_rpt.sh ${SETTE_OPT/" -w"} -s ${CI_COMMIT_SHORT_SHA} > sette_rpt.log
artifacts:
expose_as: 'SETTE report'
paths: ['sette/sette_rpt.log']
when: always
expire_in: 30 days
# CONFIG variable is used in '.config' template to define configurations parallel loops.
# It contains the full list of nemo configurations and testcases by default.
.config:
variables:
CONFIG: [ORCA2_ICE_PISCES,ORCA2_OFF_PISCES,AMM12,AGRIF_DEMO,WED025,GYRE_PISCES,GYRE_GO,ORCA2_SAS_ICE,ORCA2_ICE_OBS,C1D_PAPA,
SWG,ICE_AGRIF,OVERFLOW,LOCK_EXCHANGE,VORTEX,ISOMIP+,IWAVE]
\ No newline at end of file
# CONFIG variable is used in '.config' template to define parallel loops and in '.test' templates to define jobs dependencies.
# If a specific configuration is selected manually, CONFIG is set here.
.config:
variables:
CONFIG: [$NEMO_CONFIG]
.restart:
variables:
CONFIG: [$NEMO_CONFIG]
.repro:
variables:
CONFIG: [$NEMO_CONFIG]
.corrupt:
variables:
CONFIG: [$NEMO_CONFIG]
.phyopts:
variables:
CONFIG: [$NEMO_CONFIG]
\ No newline at end of file
# SETTE 'param.cfg' file path for each HPC
variables:
# METEO-FRANCE BELENOS (INTEL2018+INTELMPI)
MF_SETTE_CFG: "/home/ext/mr/smer/samsong/SRC/NEMO/main/sette/param_${NEMO_COMPILER}.ci"
# ECMWF AA/B/C/D (GCC13+OPENMPI & INTEL2021+OPENMPI)
ECMWF_SETTE_CFG: "/home/ar0s/SRC/NEMO/main/sette/param_${NEMO_COMPILER}.ci"
# MERCATOR LIR (GCC14+OPENMPI)
LIR_SETTE_CFG: "/home/gsamson/SRC/NEMO/main/sette/param_${NEMO_COMPILER}.ci"
\ No newline at end of file
variables:
#PATTERN: '$PATTERN_ALL'
PATTERN: '/ORCA2_ICE_PISCES|ORCA2_OFF_PISCES|AMM12|AGRIF_DEMO|WED025|GYRE_PISCES|GYRE_GO|ORCA2_SAS_ICE|ORCA2_ICE_OBS|C1D_PAPA|SWG|ICE_AGRIF|OVERFLOW|LOCK_EXCHANGE|VORTEX|ISOMIP+|IWAVE/'
\ No newline at end of file
variables:
#PATTERN: $PATTERN_CORRUPT
PATTERN: '/AGRIF_DEMO/'
\ No newline at end of file
variables:
#PATTERN: $PATTERN_PHYOPTS
PATTERN: '/OVERFLOW|LOCK_EXCHANGE/'
\ No newline at end of file
variables:
#PATTERN: $PATTERN_REPRO
PATTERN: '/ORCA2_ICE_PISCES|ORCA2_OFF_PISCES|AMM12|AGRIF_DEMO|WED025|GYRE_PISCES|GYRE_GO|ORCA2_SAS_ICE|ORCA2_ICE_OBS|SWG|ICE_AGRIF|VORTEX|ISOMIP+/'
\ No newline at end of file
variables:
#PATTERN: $PATTERN_RESTART
PATTERN: '/ORCA2_ICE_PISCES|ORCA2_OFF_PISCES|AMM12|AGRIF_DEMO|WED025|GYRE_PISCES|GYRE_GO|ORCA2_SAS_ICE|ORCA2_ICE_OBS|C1D_PAPA|SWG|ICE_AGRIF|OVERFLOW|LOCK_EXCHANGE|VORTEX|ISOMIP+|IWAVE/'
\ No newline at end of file
# Regex patterns for each sette test to define jobs rules.
# https://docs.gitlab.com/ci/jobs/job_rules/#store-a-regular-expression-in-a-variable
variables:
PATTERN_RESTART: '/ORCA2_ICE_PISCES|ORCA2_OFF_PISCES|AMM12|AGRIF_DEMO|WED025|GYRE_PISCES|GYRE_GO|ORCA2_SAS_ICE|ORCA2_ICE_OBS|C1D_PAPA|SWG|ICE_AGRIF|OVERFLOW|LOCK_EXCHANGE|VORTEX|ISOMIP+|IWAVE/'
PATTERN_REPRO: '/ORCA2_ICE_PISCES|ORCA2_OFF_PISCES|AMM12|AGRIF_DEMO|WED025|GYRE_PISCES|GYRE_GO|ORCA2_SAS_ICE|ORCA2_ICE_OBS|SWG|ICE_AGRIF|VORTEX|ISOMIP+/'
PATTERN_CORRUPT: '/AGRIF_DEMO/'
PATTERN_PHYOPTS: '/OVERFLOW|LOCK_EXCHANGE/'
# List of configurations for each type of tests to manage job dependencies.
# It will be overwritten in '.CFG-SELECT.yml' if a specific configuration is selected manually.
# https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
.restart:
variables:
CONFIG: [ORCA2_ICE_PISCES,ORCA2_OFF_PISCES,AMM12,AGRIF_DEMO,WED025,GYRE_PISCES,GYRE_GO,ORCA2_SAS_ICE,ORCA2_ICE_OBS,C1D_PAPA,SWG,ICE_AGRIF,OVERFLOW,LOCK_EXCHANGE,VORTEX,ISOMIP+,IWAVE]
.repro:
variables:
CONFIG: [ORCA2_ICE_PISCES,ORCA2_OFF_PISCES,AMM12,AGRIF_DEMO,WED025,GYRE_PISCES,GYRE_GO,ORCA2_SAS_ICE,ORCA2_ICE_OBS,SWG,ICE_AGRIF,VORTEX,ISOMIP+]
.corrupt:
variables:
CONFIG: [AGRIF_DEMO]
.phyopts:
variables:
CONFIG: [OVERFLOW,LOCK_EXCHANGE]
# pipelines variables that can be defined manually from https://forge.nemo-ocean.eu/nemo/nemo/-/pipelines/new
variables:
NEMO_HPC:
# must correspond to runners tags
description: "Nemo HPC"
value: "ecmwf"
options:
- "ecmwf"
NEMO_COMPILER:
description: "Nemo Fortran compiler"
value: "default"
options:
- "default"
- "intel"
- "gcc"
NEMO_COMPILATION:
description: "Nemo compilation mode"
value: "debug"
options:
- "debug"
- "normal"
NEMO_CONFIG:
description: "Nemo configuration(s)/testcase(s)"
value: "ALL"
options:
- "ALL"
SETTE_TEST:
description: "Sette test(s) to be executed"
value: ""
options:
- ""
- "ALL"
- "RESTART"
- "REPRO"
- "CORRUPT"
- "PHYOPTS"
- "TRANSFORM"
- "COMPARE"
NEMO_REFSHA:
description: "Nemo short SHA (8 digits) for results comparison (optional)"
value: ""
options:
- ""
#### Context
_Please provide informations on how to reproduce the bug:_
- [x] Branches impacted: current release and/or main
- [x] Reference configuration/test case (chosen or used as template) ~AMM ~gyre ~orca ~papa or engines involved ~ABL ~NST ~OFF ~TOP ~SAO ~SAS ~"SI³" ~SWE
- [x] Computing architecture: compiler, MPI & NetCDF libs (name and version)
- [x] Dependencies: ~AGRIF ~BFM ~CICE ~OASIS ~XIOS (with known branch and hash/revision/version), ...
- [ ] _Any other relevant information_
#### Analysis
_Please give your thoughts on the issue._
#### Fix
_Please share your proven solution or your recommendation on how to proceed._
---
_You can_
- :clipboard: _Copy code blocks_ (\`\`\`fortran ...\`\`\`) _or diff outputs_ (\`\`\`diff ...\`\`\`)
- :paperclip: _Include files_
- :link: _Add external links._
:warning: _Please remove all unnecessary lines in this description, like the one you are reading in italic, before creating the issue._ :warning:
#### Context
_Please provide informations on how to set the modelling environment_
- [ ] Reference configuration/test case (to add, chosen or used as template)
- [x] Modifications of versioned files: Fortran routines (`*.[Ffh]90`), namelists (`namelist\_*cfg`), outputs settings (`*.xml`), ...
- [ ] Additional dependencies
- [ ] New datasets
- [ ] _Any other relevant information_
#### Proposal
_Please share your ideas or your wishes about modelling improvements for the NEMO model._
_In particular, express if you are willing to contribute personally to the implementation of this feature in NEMO._
---
_You can_
- :clipboard: _Copy code blocks_ (\`\`\`fortran ...\`\`\`) _or diff outputs_ (\`\`\`diff ...\`\`\`)
- :paperclip: _Include files_
- :link: _Add external links._
:warning: _Please remove all unnecessary lines in this description, like the one you are reading in italic, before creating the issue._ :warning:
#### Development description
_Describe the goal and the methodology._
_Add reference documents or publications if relevant._
#### Code implementation
_Describe flow chart of the changes in the code._
_List the Fortran modules and subroutines to be created/edited/deleted._
_Detailed list of new variables to be defined (including namelists), give for each the chosen name and description wrt coding rules._
#### Documentation updates
_Using previous parts, define the main changes to be done in the ~doc (manuals, guide, web pages, ...)._
#### Tests
Once the development is done, the PI should complete the tests section below and after ask the reviewers to start their review.
This part should contain the detailed results of ~SETTE tests (restartability and reproducibility for each of the reference configuration) and detailed results of restartability and reproducibility when the option is activated on specified configurations used for this test.
**Regular checks**
- [ ] Can this change be shown to produce expected impact (option activated)?
- [ ] Can this change be shown to have a null impact (option not activated)?
- [ ] Results of the required bit comparability tests been run: are there no differences when activating the development?
- [ ] If some differences appear, is reason for the change valid/understood?
- [ ] If some differences appear, is the impact as expected on model configurations?
- [ ] Is this change expected to preserve all diagnostics?
- [ ] If no, is reason for the change valid/understood?
- [ ] Are there significant changes in run time/memory?
#### Review
A successful review is needed to schedule the merge of this development into the future NEMO release during next Merge Party (usually in November).
**Assessments**
- [ ] Is the proposed methodology now implemented?
- [ ] Are the code changes in agreement with the flowchart defined at preview step?
- [ ] Are the code changes in agreement with list of routines and variables as proposed at preview step?
- [ ] If, not, are the discrepancies acceptable?
- [ ] Is the in-line documentation accurate and sufficient?
- [ ] Do the code changes comply with NEMO coding standards?
- [ ] Is the development documented with sufficient details for others to understand the impact of the change?
- [ ] Is the project ~doc (manual, guide, web, ...) now updated or completed following the proposed summary in preview section?
*******
Changes
*******
.. todo::
List the main additions of the the new release
************
Contributing
************
.. todo::
.. contents::
:local:
Sending feedbacks
=================
| Sending feedbacks is a useful way to contribute to NEMO efficency and reliability. Before doing so,
please check here :forge:`search <search on the developement platform>` in wiki, tickets, forum and online
documentation if the subject has already been discussed. You can either contribute to an existing
discussion, or
| Create an entry for the discussion online, according to your needs
- You have a question: create a topic in the appropriate :forge:`discussion <forum>`
- You would like to raise and issue: open a new ticket of the right type depending of its severity
- "Unavoidable" :forge:`newticket?type=Bug <bug>`
- "Workable" :forge:`newticket?type=Defect <defect>`
Please follow the guidelines and try to be as specific as possible in the ticket description.
New development
===============
You have build a development relevant for NEMO shared reference: an addition of the source code,
a full fork of the reference, ...
You may want to share it with the community (see Hack below) or to propose it for implementation in the future
NEMO release (see Proposal / Task below).
The proposals for developments to be included in the shared NEMO reference are first examined by NEMO Developers
Committee / Scientific Advisory Board.
The implementation of a new development requires some additionnal work from the intial developer.
These tasks will need to be scheduled with NEMO System Team.
Hack
----
You only would like to inform NEMO community about your developments.
You can promote your work on NEMO forum gathering the contributions fromof the community by creating
a specific topic here :forge:`discussion/forum/5 <dedicated forum>`
Proposal / Task
---------------
| Your development is quite small, and you would only like to offer it as a possible enhancement. Please suggest it
as an enhancement here :forge:`newticket?type=Enhancement <enhancement>` . It will be taken in account, if
feasible, by NEMO System Team. To ease the process, it is suggested, rather than attaching the modified
routines to the ticket, to highlight the proposed changes by adding to the ticket the output of ``svn diff``
or ``svn patch`` from your working copy.
| Your development seems relevant for addition into the future release of NEMO shared reference.
Implementing it into NEMO shared reference following the usual quality control will require some additionnal work
from you and also from the NEMO System Team in charge of NEMO development. In order to evaluate the work,
your suggestion should be send as a proposed enhancement here :forge:`newticket?type=Enhancement <enhancement>`
including description of the development, its implementation, and the existing validations.
The proposed enhancement will be examined by NEMO Developers Committee / Scientific Advisory Board.
Once approved by the Committee, the assicated development task can be scheduled in NEMO development work plan,
and tasks distributed between you as initial developer and PI of this development action, and the NEMO System Team.
Once sucessful (meeting the usual quality control steps) this action will allow the merge of these developments with
other developments of the year, building the future NEMO.
*******************
Build the framework
*******************
.. todo::
TBD
.. contents::
:local:
Prerequisites
=============
| The NEMO source code is written in *Fortran 95* and
some of its prerequisite tools and libraries are already included in the download.
| It contains the AGRIF_ preprocessing program ``conv``; the FCM_ build system and
the IOIPSL_ library for parts of the output.
System dependencies
-------------------
In the first place the other requirements should be provided natively by your system or
can be installed from the official repositories of your Unix-like distribution:
- *Perl* interpreter
- *Fortran* compiler (``ifort``, ``gfortran``, ``pgfortran``, ...),
- *Message Passing Interface (MPI)* implementation (e.g. |OpenMPI|_ or |MPICH|_).
- |NetCDF|_ library with its underlying |HDF|_
**NEMO, by default, takes advantage of some MPI features introduced into the MPI-3 standard.**
.. hint::
The MPI implementation is not strictly essential
since it is possible to compile and run NEMO on a single processor.
However most realistic configurations will require the parallel capabilities of NEMO and
these use the MPI standard.
.. note::
On older systems, that do not support MPI-3 features,
the ``key_mpi2`` preprocessor key should be used at compile time.
This will limit MPI features to those defined within the MPI-2 standard
(but will lose some performance benefits).
.. |OpenMPI| replace:: *OpenMPI*
.. _OpenMPI: https://www.open-mpi.org
.. |MPICH| replace:: *MPICH*
.. _MPICH: https://www.mpich.org
.. |NetCDF| replace:: *Network Common Data Form (NetCDF)*
.. _NetCDF: https://www.unidata.ucar.edu
.. |HDF| replace:: *Hierarchical Data Form (HDF)*
.. _HDF: https://www.hdfgroup.org
Specifics for NetCDF and HDF
----------------------------
NetCDF and HDF versions from official repositories may have not been compiled with MPI support.
However access to all the options available with the XIOS IO-server will require
the parallelism of these libraries.
| **To satisfy these requirements, it is common to have to compile from source
in this order HDF (C library) then NetCDF (C and Fortran libraries)**
| It is also necessary to compile these libraries with the same version of the MPI implementation that
both NEMO and XIOS (see below) have been compiled and linked with.
.. hint::
| It is difficult to define the options for the compilation as
they differ from one architecture to another according to
the hardware used and the software installed.
| The following is provided without any warranty
.. code-block:: console
$ ./configure [--{enable-fortran,disable-shared,enable-parallel}] ...
It is recommended to build the tests ``--enable-parallel-tests`` and run them with ``make check``
Particular versions of these libraries may have their own restrictions.
State the following requirements for netCDF-4 support:
.. caution::
| When building NetCDF-C library versions older than 4.4.1, use only HDF5 1.8.x versions.
| Combining older NetCDF-C versions with newer HDF5 1.10 versions will create superblock 3 files
that are not readable by lots of older software.
Extract and install XIOS
========================
With the sole exception of running NEMO in mono-processor mode
(in which case output options are limited to those supported by the ``IOIPSL`` library),
diagnostic outputs from NEMO are handled by the third party ``XIOS`` library.
It can be used in two different modes:
:*attached*: Every NEMO process also acts as a XIOS server
:*detached*: Every NEMO process runs as a XIOS client.
Output is collected and collated by external, stand-alone XIOS server processors.
Instructions on how to install XIOS can be found on its :xios:`wiki<>`.
.. hint::
It is recommended to use XIOS 2.5 release.
This version should be more stable (in terms of future code changes) than the XIOS trunk.
It is also the one used by the NEMO system team when testing all developments and new releases.
This particular version has its own branch and can be checked out with:
.. code:: console
$ svn co https://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5
Download and install the NEMO code
==================================
Checkout the NEMO sources
-------------------------
.. code:: console
$ svn co https://forge.ipsl.jussieu.fr/nemo/svn/NEMO/trunk
Description of 1\ :sup:`st` level tree structure
------------------------------------------------
+---------------+----------------------------------------+
| :file:`arch` | Compilation settings |
+---------------+----------------------------------------+
| :file:`cfgs` | :doc:`Reference configurations <cfgs>` |
+---------------+----------------------------------------+
| :file:`doc` | :doc:`Documentation <doc>` |
+---------------+----------------------------------------+
| :file:`ext` | Dependencies included |
| | (``AGRIF``, ``FCM`` & ``IOIPSL``) |
+---------------+----------------------------------------+
| :file:`mk` | Compilation scripts |
+---------------+----------------------------------------+
| :file:`src` | :doc:`Modelling routines <src>` |
+---------------+----------------------------------------+
| :file:`tests` | :doc:`Test cases <tests>` |
| | (unsupported) |
+---------------+----------------------------------------+
| :file:`tools` | :doc:`Utilities <tools>` |
| | to {pre,post}process data |
+---------------+----------------------------------------+
Setup your architecture configuration file
------------------------------------------
All compiler options in NEMO are controlled using files in :file:`./arch/arch-'my_arch'.fcm` where
``my_arch`` is the name of the computing architecture
(generally following the pattern ``HPCC-compiler`` or ``OS-compiler``).
It is recommended to copy and rename an configuration file from an architecture similar to your owns.
You will need to set appropriate values for all of the variables in the file.
In particular the FCM variables:
``%NCDF_HOME``; ``%HDF5_HOME`` and ``%XIOS_HOME`` should be set to
the installation directories used for XIOS installation
.. code-block:: sh
%NCDF_HOME /usr/local/path/to/netcdf
%HDF5_HOME /usr/local/path/to/hdf5
%XIOS_HOME /home/$( whoami )/path/to/xios-2.5
%OASIS_HOME /home/$( whoami )/path/to/oasis
Create and compile a new configuration
======================================
The main script to {re}compile and create executable is called :file:`makenemo` located at
the root of the working copy.
It is used to identify the routines you need from the source code, to build the makefile and run it.
As an example, compile a :file:`MY_GYRE` configuration from GYRE with 'my_arch':
.. code-block:: sh
./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE'
Then at the end of the configuration compilation,
:file:`MY_GYRE` directory will have the following structure.
+------------+----------------------------------------------------------------------------+
| Directory | Purpose |
+============+============================================================================+
| ``BLD`` | BuiLD folder: target executable, headers, libs, preprocessed routines, ... |
+------------+----------------------------------------------------------------------------+
| ``EXP00`` | Run folder: link to executable, namelists, ``*.xml`` and IOs |
+------------+----------------------------------------------------------------------------+
| ``EXPREF`` | Files under version control only for :doc:`official configurations <cfgs>` |
+------------+----------------------------------------------------------------------------+
| ``MY_SRC`` | New routines or modified copies of NEMO sources |
+------------+----------------------------------------------------------------------------+
| ``WORK`` | Links to all raw routines from :file:`./src` considered |
+------------+----------------------------------------------------------------------------+
After successful execution of :file:`makenemo` command,
the executable called `nemo` is available in the :file:`EXP00` directory
More :file:`makenemo` options
-----------------------------
``makenemo`` has several other options that can control which source files are selected and
the operation of the build process itself.
.. literalinclude:: ../../../makenemo
:language: text
:lines: 119-143
:caption: Output of ``makenemo -h``
These options can be useful for maintaining several code versions with only minor differences but
they should be used sparingly.
Note however the ``-j`` option which should be used more routinely to speed up the build process.
For example:
.. code-block:: sh
./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE' -j 8
will compile up to 8 processes simultaneously.
Default behaviour
-----------------
At the first use,
you need the ``-m`` option to specify the architecture configuration file
(compiler and its options, routines and libraries to include),
then for next compilation, it is assumed you will be using the same compiler.
If the ``-n`` option is not specified the last compiled configuration will be used.
Tools used during the process
-----------------------------
* :file:`functions.sh`: bash functions used by ``makenemo``, for instance to create the WORK directory
* :file:`cfg.txt` : text list of configurations and source directories
* :file:`bld.cfg` : FCM rules for compilation
Examples
--------
.. literalinclude:: ../../../makenemo
:language: text
:lines: 146-153
Running the model
=================
Once :file:`makenemo` has run successfully,
the ``nemo`` executable is available in :file:`./cfgs/MY_CONFIG/EXP00`.
For the reference configurations, the :file:`EXP00` folder also contains the initial input files
(namelists, ``*.xml`` files for the IOs, ...).
If the configuration needs other input files, they have to be placed here.
.. code-block:: sh
cd 'MY_CONFIG'/EXP00
mpirun -n $NPROCS ./nemo # $NPROCS is the number of processes
# mpirun is your MPI wrapper
Viewing and changing list of active CPP keys
============================================
For a given configuration (here called ``MY_CONFIG``),
the list of active CPP keys can be found in :file:`./cfgs/'MYCONFIG'/cpp_MY_CONFIG.fcm`
This text file can be edited by hand or with :file:`makenemo` to change the list of active CPP keys.
Once changed, one needs to recompile ``nemo`` in order for this change to be taken in account.
Note that most NEMO configurations will need to specify the following CPP keys:
``key_xios`` for IOs. MPI parallelism is activated by default. Use ``key_mpi_off`` to compile without MPI.