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.
trusting.env in branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc – NEMO

source: branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting.env @ 8818

Last change on this file since 8818 was 8818, checked in by nicolasmartin, 6 years ago

Continuation of global refactoring of the tool, set cfg files mime property and modify trusting.env trying to handle default settings

File size: 4.7 KB
Line 
1#!/bin/bash
2
3
4## Defaults
5##--------------------------------------------------------------------------------
6
7[ -z "${TRUST_SVN_BRANCH}" ] && TRUST_SVN_BRANCH='trunk'
8
9## Ref. cfg. unset or empty (mandatory)
10if [[ -z "${TRUST_CFG_REF}" ]]; then
11
12    ## Default cfg from trunk excepting last stable
13    TRUST_CFG_REF='ORCA2_LIM3_PISCES'
14
15    if [[ ${TRUST_SVN_BRANCH} && ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]]; then
16   TRUST_CFG_REF='ORCA2_LIM_PISCES'
17    fi
18
19fi
20
21## Forcing archive unset
22#if [[ ! ${TRUST_IO_FORC_TAR} && ${TRUST_IO_FORC_TAR-_} ]]; then
23
24    ## Forcing directory set
25#    if [ ${TRUST_IO_FORC_PATH} ]; then
26
27   ## Default forcing archive from trunk
28#  TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.7.tar INPUTS_PISCES_v3.6st.tar'
29
30#  [ ${TRUST_CFG_REF} == 'AMM12' ] && TRUST_IO_FORC_TAR='AMM12_v3.7.tar'
31
32#  if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then
33
34#      TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.6.tar'
35
36#      if   [ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then
37#     TRUST_IO_FORC_TAR='INPUTS_ORCA1_LIM3_PISCES_V10.tar'
38#      elif [ ${TRUST_CFG_REF} == 'AMM12'             ]; then
39#     TRUST_IO_FORC_TAR='AMM12_v3.6.tar'
40#      fi
41
42#  fi
43
44#    fi
45
46#fi
47
48
49## Source user & (super)computer configurations
50##--------------------------------------------------------------------------------
51. ./cfg/${TRUST_MAIN_USER}.cfg
52. ./cfg/${TRUST_MAIN_HPCC}.cfg
53
54
55## Checking and export environment variables
56##--------------------------------------------------------------------------------
57
58## Trusting installation
59## ---------------------
60
61[ -z "${TRUST_DIR_WORK}"    ] &&    TRUST_DIR_WORK=${TRUST_MAIN_DIR}/../CONFIG
62[ -z "${TRUST_DIR_SCRATCH}" ] && TRUST_DIR_SCRATCH=${TRUST_MAIN_DIR}
63
64export TRUST_DIR_WORK TRUST_DIR_SCRATCH TRUST_DIR_STORE
65
66
67## Branch checkout (./install_new_branch.sh)
68##------------------------------------------
69
70export TRUST_SVN_REPO='https://forge.ipsl.jussieu.fr/nemo/svn'
71
72export TRUST_SVN_CO=( 'ARCH           CONFIG          NEMO               \
73                       EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    \
74                       TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO \
75                       TRUST                                              ' )
76
77export TRUST_SVN_BRANCH
78
79export TRUST_SVN_NEMOGCM=${TRUST_DIR_WORK}/${TRUST_SVN_BRANCH}/NEMOGCM
80
81
82## NEMO Configuration
83##-------------------
84
85## Ref. cfg. unset or empty (mandatory)
86#if [[ -z "${TRUST_CFG_REF}" ]]; then
87
88    ## Default cfg from trunk excepting last stable
89#    TRUST_CFG_REF='ORCA2_LIM3_PISCES'
90
91#    if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then
92#  TRUST_CFG_REF='ORCA2_LIM_PISCES'
93#    fi
94
95#fi
96
97## Forcing archive unset
98if [[ ! ${TRUST_IO_FORC_TAR} && ${TRUST_IO_FORC_TAR-_} ]]; then
99
100    ## Forcing directory set
101    if [ ${TRUST_IO_FORC_PATH} ]; then
102
103   ## Default forcing archive from trunk
104   TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.7.tar INPUTS_PISCES_v3.6st.tar'
105
106   [ ${TRUST_CFG_REF} == 'AMM12' ] && TRUST_IO_FORC_TAR='AMM12_v3.7.tar'
107
108   if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then
109
110       TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.6.tar'
111
112       if   [ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then
113      TRUST_IO_FORC_TAR='INPUTS_ORCA1_LIM3_PISCES_V10.tar'
114       elif [ ${TRUST_CFG_REF} == 'AMM12'             ]; then
115      TRUST_IO_FORC_TAR='AMM12_v3.6.tar'
116       fi
117
118   fi
119
120    fi
121
122fi
123
124[ -z "${TRUST_CFG_NEW}" ] && TRUST_CFG_NEW=${TRUST_CFG_REF}'_trust'
125
126export TRUST_CFG_NEW TRUST_CFG_REF
127export TRUST_IO_FORC_TAR
128
129export TRUST_CFG_KEY_ADD TRUST_CFG_KEY_DEL
130
131
132## Inputs/Outputs
133## --------------
134
135[ -z "${TRUST_IO_XIOS}" ] && get_out X
136export TRUST_IO_XIOS TRUST_IO_FORC_PATH
137export TRUST_IO_CDO
138
139
140## Compilation & Running
141##----------------------
142
143export TRUST_JOB_ENV
144export TRUST_COMPILE_FORTRAN TRUST_COMPILE_NPROC
145export TRUST_COMPILE_MPI     TRUST_COMPILE_NETCDF
146export TRUST_JOB_SCRIPT TRUST_JOB_SUBMIT
147export TRUST_JOB_STATE  TRUST_JOB_KILL   TRUST_JOB_TIMEOUT
148export TRUST_JOB_INFO   TRUST_JOB_TIME   TRUST_JOB_RAM_P   TRUST_JOB_RAM_V
149
150
151## Trusting test
152##--------------
153
154export TRUST_TEST_NAME=${TRUST_MAIN_USER}'_'${TRUST_MAIN_HPCC}
155export TRUST_TEST_DATE=$( date -u +"%Y%m%d%Z%H%M" )
156
157export TRUST_TEST_SUMMARY=trusting_${TRUST_TEST_DATE}_${TRUST_TEST_NAME}.txt
158export  TRUST_TEST_BACKUP=trusting_${TRUST_TEST_DATE}_${TRUST_TEST_NAME}.tgz
159
160##       TRUST_TEST_DIR unset
161if [[ ! ${TRUST_TEST_DIR}       && ${TRUST_TEST_DIR-_}       ]]; then
162        TRUST_TEST_DIR=${TRUST_DIR_SCRATCH}/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH}/${TRUST_TEST_DATE}
163    export TRUST_TEST_DIR
164fi
165
166## TRUST_TEST_BENCHMARK unset
167if [[ ! ${TRUST_TEST_BENCHMARK} && ${TRUST_TEST_BENCHMARK-_} ]]; then
168    TRUST_TEST_BENCHMARK=${TRUST_DIR_STORE}/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH}
169    export TRUST_TEST_BENCHMARK
170fi
171
172export TRUST_TEST_LOG=${TRUST_DIR_BENCHMARK}/trusting_${TRUST_TEST_NAME}.txt
173
174export TRUST_TEST_MAILING
Note: See TracBrowser for help on using the repository browser.