New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette_list_avail_rev.sh in utils/CI/sette – NEMO

source: utils/CI/sette/sette_list_avail_rev.sh @ 15159

Last change on this file since 15159 was 15159, checked in by acc, 3 years ago

Some enhancements to SETTE scripts: Added a -N option to sette.sh to set ln_nnogather=.false. (where appropriate) and a -T <TEST_ROOT> option to sette_eval.sh where <TEST_ROOT> is either LONG, SHORT or REPRO (default:LONG). This option determines which set of results to compare between validation sets. In the case of REPRO, the first expanded match will be used for each configuration (e.g. REPRO_4_8)

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/bash -f
2# set -vx
3
4SETTE_DIR=$(cd $(dirname "$0"); pwd)
5MAIN_DIR=$(dirname $SETTE_DIR)
6USE_REF=0
7
8. ./param.cfg
9
10if [ $# -gt 0 ]; then
11  while getopts c:v:Rh option; do
12     case $option in
13        c) COMPILER=$OPTARG;;
14        v) SETTE_SUB_VAL=$OPTARG;;
15        R) USE_REF=1;;
16        h | *) echo ''
17               echo 'sette_list_avail_rev.sh : ' 
18               echo '     list all sette directory and available revisions created with the compiler specified in param.cfg or in the startup file)'
19               echo '-c COMPILER_name :'
20               echo '     list all sette directory and available revisions created with the compiler specified'
21               echo ' -v sub_dir :'
22               echo '     validation sub-directory below NEMO_VALIDATION_DIR'
23               echo ''
24               exit 42;;
25     esac
26  done
27  shift $((OPTIND - 1))
28fi
29if [ ! -z $SETTE_SUB_VAL ] ; then
30 NEMO_VALIDATION_DIR=$NEMO_VALIDATION_DIR/$SETTE_SUB_VAL
31 NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/$SETTE_SUB_VAL
32else
33 NEMO_VALIDATION_DIR=$NEMO_VALIDATION_DIR/MAIN
34 NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/MAIN
35fi
36
37#
38lst_rev () {
39    # get the list of revision available for a configuration
40    # base directory
41    VALSUB=$1
42    # config name
43    CONFIG=$2
44    # list of all revision available
45    ALLLST=${@:3}
46    # display
47    printf "\n %-28s : " $CONFIG
48    for rev in $ALLLST
49    do
50       if [ -d ${VALSUB}/$rev/${CONFIG} ]  ; then
51          printf "%-6s  " $rev
52       else
53          printf "%-5s  " "----- " 
54       fi
55    done
56}
57
58
59  NEMO_VALID=${NEMO_VALIDATION_DIR}/
60  if [ ${USE_REF} == 1 ] ; then
61    NEMO_VALID=${NEMO_VALIDATION_REF}/
62  fi
63 
64 # list of all revision available
65 DIRLIST=`find ${NEMO_VALID}/${COMPILER} -maxdepth 1 -mindepth 1 -type d | sort -u`
66 DIRLIST=`basename -a $DIRLIST`
67
68 # display header
69 echo ""
70 echo " Compiler used is : $COMPILER"
71 echo ""
72 printf " List of all avail. rev. in   :"${NEMO_VALID}"\n"
73 printf "                         is   : "
74 for dir in `echo $DIRLIST`; do printf "%-6s  " $dir ; done
75 printf "\n"
76
77 # start checking configuration revision
78 echo " Availability for each config.: "
79 echo -n " ------------------------------"
80 for CONFIG in GYRE_PISCES ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 WED025 ORCA2_ICE_OBS ORCA2_SAS_ICE AGRIF_DEMO SWG ISOMIP+ OVERFLOW LOCK_EXCHANGE VORTEX ICE_AGRIF
81 do
82    DIR=${NEMO_VALID}/${COMPILER}/
83    lst_rev $DIR $CONFIG $DIRLIST
84 done
85 printf "\n"
86 printf "\n"
87#
88exit
Note: See TracBrowser for help on using the repository browser.