source: CONFIG/LMDZORINCA/tags/LMDZORINCA_v2/EXP_LOI/COMP/inca.driver @ 1634

Last change on this file since 1634 was 1634, checked in by acosce, 10 years ago

Now value of config_inca (physiq.def) is write by inca.driver (change copy of physiq.def in lmdz.card)

  • Property svn:executable set to *
File size: 2.0 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"
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"
16    return $RET
17}
18function INCA_sed_complete
19{
20    IGCM_debug_PushStack "LMDZ_sed"
21
22    sed -e "s/^${2}\ *=.*/${2}= ${3}/" ${1} > ${1}.tmp
23    RET=$?
24    echo "LMDZ_sed : ${1} ${2} ${3}"
25    \mv ${1}.tmp ${1}
26
27    IGCM_debug_PopStack "LMDZ_sed"
28    return $RET
29}
30
31#-----------------------------------------------------------------
32function CHM_Initialize
33{
34    IGCM_debug_PushStack "CHM_Initialize"
35
36    RESOL_CHM=$( echo $RESOL_ATM | awk "-FD" '{print $2}' )
37    echo 'resol chimie', $RESOL_CHM
38    echo "INCA Tag : LMDZ-INCA" ${config_UserChoices_TagName}
39
40    [ -f ${SUBMIT_DIR}/../.chimie ] && eval $(grep CHEM ${SUBMIT_DIR}/../.chimie) 
41    INCA_sed_replace ${SUBMIT_DIR}/config.card \${CHEM} ${CHEM}
42
43    IGCM_debug_PopStack "CHM_Initialize"
44}
45
46#-----------------------------------------------------------------
47function CHM_Update
48{
49    IGCM_debug_PushStack "CHM_Update"
50
51    case ${CHEM} in
52        AER)
53        INCA_sed_complete physiq.def config_inca aero
54        ;;
55        NMHC) 
56        INCA_sed_complete physiq.def config_inca chem
57        ;;
58        NMHC_AER)
59        INCA_sed_complete physiq.def config_inca aero
60        ;;
61        CH4)
62        INCA_sed_complete physiq.def config_inca chem
63        ;;
64        CH4_AER)
65        INCA_sed_complete physiq.def config_inca aero
66        ;;
67        GES)
68        INCA_sed_complete physiq.def config_inca chem
69        esac
70
71    IGCM_debug_PopStack "CHM_Update"
72}
73
74#-----------------------------------------------------------------
75function CHM_Finalize
76{
77    IGCM_debug_PushStack "CHM_Finalize"
78
79    echo FINALIZE CHM !!!
80#
81#    IGCM_sys_Mkdir ${R_OUT_EXE}
82#    cd ${MODIPSL}
83#    tar cf src_${config_UserChoices_JobName}.tar  modeles
84#    IGCM_sys_Mv src_${config_UserChoices_JobName}.tar ${R_OUT_EXE}/.
85#    cd -
86#
87
88    IGCM_debug_PopStack "CHM_Finalize"
89}
Note: See TracBrowser for help on using the repository browser.