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.
list_avail_rev.sh in NEMO/branches/2019/fix_sette_ticket2239 – NEMO

source: NEMO/branches/2019/fix_sette_ticket2239/list_avail_rev.sh @ 10713

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

changes related to Simon comments (ticket #2239)

  • Property svn:executable set to *
File size: 1.5 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  . ./param.cfg
30
31  mach=${COMPILER}
32  NEMO_VALID=${NEMO_VALIDATION_DIR}
33 
34 # list of all revision available
35 DIRLST='';for dir in `find NEMO_VALIDATION -maxdepth 3 -mindepth 3` ; do REV=`basename $dir`; DIRLST="$DIRLST $REV"; done
36 DIRLST=`echo $DIRLST | grep -o -E '\w+' | sort -u -r `
37
38 # start checking
39 echo ""
40 printf " List of all avail. rev. is : "
41 for dir in `echo $DIRLST`; do printf "%5s  " $dir ; done
42 printf "\n"
43# printf "%27s %${nrev}s" "" $DIRLST
44 echo ""
45 echo "   !---- check revision available for each configuration ----!   "
46 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
47 do
48    DIR=${NEMO_VALIDATION_DIR}/${CONFIG}/${COMPILER}
49    lst_rev $DIR $CONFIG $DIRLST
50 done
51 printf "\n"
52 printf "\n"
53#
54exit
Note: See TracBrowser for help on using the repository browser.