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 NEMO/branches/2019/fix_sette_ticket2239 – NEMO

source: NEMO/branches/2019/fix_sette_ticket2239/sette_list_avail_rev.sh @ 10717

Last change on this file since 10717 was 10717, checked in by mathiot, 5 years ago

change related to discussion with Simon (ticket #2239)

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/bash -f
2# set -vx
3#
4lst_rev () {
5    CFGLST=`ls $1 | sort -u -r ` 
6    CONFIG=$2
7    ALLLST=${@:3}
8    nrevall=`echo $ALLLST | wc -w`
9    nrevcfg=`echo $CFGLST | wc -w`
10    echo ""
11    printf "%-27s : " $CONFIG
12    irev=1
13    irevcfg=1
14    while [[ $irev -le $nrevall ]] ; do
15       rev=`echo $ALLLST | cut -d\  -f ${irev}`
16       #while [[ $irevcfg -le $nrevcfg ]] ; do
17          cfgrev=`echo $CFGLST | cut -d\  -f ${irevcfg}`
18          if [[ $cfgrev -eq $rev ]] ; then
19             printf "%-5s  " $rev
20             irevcfg=$((irevcfg+1))
21          else
22             printf "%-5s  " "*****" 
23          fi
24       #done
25       irev=$((irev+1))
26    done
27}
28
29  SETTE_DIR=$(cd $(dirname "$0"); pwd)
30  MAIN_DIR=$(dirname $SETTE_DIR)
31  . ./param.cfg
32
33  mach=${COMPILER}
34  NEMO_VALID=${NEMO_VALIDATION_DIR}
35 
36 # list of all revision available
37 DIRLST='';for dir in `find ${NEMO_VALID} -maxdepth 3 -mindepth 3 -iname [0-9][0-9][0-9][0-9][0-9]` ; do REV=`basename $dir`; DIRLST="$DIRLST $REV"; done
38 DIRLST=`echo $DIRLST | grep -o -E '\w+' | sort -u -r `
39
40 # start checking
41 echo ""
42 printf " List of all avail. rev. is : "
43 for dir in `echo $DIRLST`; do printf "%5s  " $dir ; done
44 printf "\n"
45# printf "%27s %${nrev}s" "" $DIRLST
46 echo ""
47 echo "   !---- check revision available for each configuration ----!   "
48 for CONFIG in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WOVERFLOW_ST WLOCK_EXCHANGE_ST WVORTEX_ST WICE_AGRIF_ST
49 do
50    DIR=${NEMO_VALIDATION_DIR}/${CONFIG}/${COMPILER}
51    lst_rev $DIR $CONFIG $DIRLST
52 done
53 printf "\n"
54 printf "\n"
55#
56exit
Note: See TracBrowser for help on using the repository browser.