source: CONFIG/LMDZORINCA/branches/LMDZORINCA_BCOV/DRIVER/inca.driver @ 1836

Last change on this file since 1836 was 1836, checked in by acosce, 12 years ago

Add new config for BCOV version of Orchidee and Inca

File size: 2.3 KB
Line 
1#- $Id: inca.driver 119 2007-07-31 13:56:33Z acosce $
2#!/bin/ksh
3
4#D- Driver du script pour INCA
5#-----------------------------------------------------------------
6function INCA_sed_replace
7{
8    IGCM_debug_PushStack "INCA_sed_replace"
9
10    sed -e "s/${2}/${3}/" ${1} > ${1}.tmp
11    RET=$?
12    echo "INCA_sed : ${1} ${2} ${3}"
13    \mv ${1}.tmp ${1}
14
15    IGCM_debug_PopStack "INCA_sed_replace"
16    return $RET
17}
18function INCA_sed_complete
19{
20    IGCM_debug_PushStack "INCA_sed_complete"
21
22    sed -e "s/^${2}\ *=.*/${2}= ${3}/" ${1} > ${1}.tmp
23    RET=$?
24    echo "INCA_sed : ${1} ${2} ${3}"
25    \mv ${1}.tmp ${1}
26
27    IGCM_debug_PopStack "INCA_sed_complete"
28    return $RET
29}
30
31#-----------------------------------------------------------------
32function CHM_Initialize
33{
34    IGCM_debug_PushStack "CHM_Initialize"
35
36    RESOL_CHM=$( echo $RESOL | awk "-Fx" '{print $2}' | awk "-FD" '{print $2}')
37
38    [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x19
39    RESOL_CHM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' | awk "-F-" '{print $1}')
40    echo 'resol chimie', $RESOL_CHM
41
42    [ -f ${SUBMIT_DIR}/../.chimie ] && eval $(grep CHEM ${SUBMIT_DIR}/../.chimie) 
43    INCA_sed_replace ${SUBMIT_DIR}/config.card \${CHEM} ${CHEM}
44    echo "INCA Tag : LMDZ-INCA" ${config_UserChoices_TagName}
45
46    IGCM_debug_PopStack "CHM_Initialize"
47}
48
49#-----------------------------------------------------------------
50function CHM_Update
51{
52    IGCM_debug_PushStack "CHM_Update"
53
54    case ${CHEM} in
55        AER)
56        INCA_sed_complete run.def config_inca aero
57        ;;
58        NMHC) 
59        INCA_sed_complete run.def config_inca chem
60        ;;
61        NMHC_AER)
62        INCA_sed_complete run.def config_inca aero
63        ;;
64        CH4)
65        INCA_sed_complete run.def config_inca chem
66        ;;
67        CH4_AER)
68        INCA_sed_complete run.def config_inca aero
69        ;;
70        GES)
71        INCA_sed_complete run.def config_inca chem
72        esac
73
74    IGCM_debug_PopStack "CHM_Update"
75}
76
77#-----------------------------------------------------------------
78function CHM_Finalize
79{
80    IGCM_debug_PushStack "CHM_Finalize"
81
82    echo FINALIZE CHM !!!
83#
84#    IGCM_sys_Mkdir ${R_OUT_EXE}
85#    cd ${MODIPSL}
86#    tar cf src_${config_UserChoices_JobName}.tar  modeles
87#    IGCM_sys_Mv src_${config_UserChoices_JobName}.tar ${R_OUT_EXE}/.
88#    cd -
89#
90
91    IGCM_debug_PopStack "CHM_Finalize"
92}
Note: See TracBrowser for help on using the repository browser.