source: CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER/inca.driver @ 2349

Last change on this file since 2349 was 2349, checked in by acosce, 8 years ago

Add inca.driver and inca.def in LMDZORINCA_v6 config

File size: 3.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_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}
18#-----------------------------------------------------------------
19function CHM_Initialize
20{
21    IGCM_debug_PushStack "CHM_Initialize"
22
23    RESOL_CHM=$( echo $RESOL | awk "-Fx" '{print $2}' | awk "-FD" '{print $2}')
24
25    [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x19
26    RESOL_CHM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' | awk "-F-" '{print $1}')
27    echo 'resol chimie', $RESOL_CHM
28
29    [ -f ${SUBMIT_DIR}/../.chimie ] && eval $(grep CHEM ${SUBMIT_DIR}/../.chimie) 
30    INCA_sed_replace ${SUBMIT_DIR}/config.card \${CHEM} ${CHEM}
31    echo "INCA Tag : LMDZ-INCA" ${config_UserChoices_TagName}
32
33    IGCM_debug_PopStack "CHM_Initialize"
34}
35
36#-----------------------------------------------------------------
37function CHM_Update
38{
39    IGCM_debug_PushStack "CHM_Update"
40
41    case ${CHEM} in
42        AER)
43        IGCM_comp_modifyDefFile nonblocker run.def config_inca aero
44        ;;
45        NMHC) 
46        IGCM_comp_modifyDefFile nonblocker run.def config_inca chem
47        ;;
48        NMHC_AER)
49        IGCM_comp_modifyDefFile nonblocker run.def config_inca aero
50        ;;
51        CH4)
52        IGCM_comp_modifyDefFile nonblocker run.def config_inca chem
53        ;;
54        CH4_AER)
55        IGCM_comp_modifyDefFile nonblocker run.def config_inca aero
56        ;;
57        GES)
58        IGCM_comp_modifyDefFile nonblocker run.def config_inca chem
59        esac
60
61    # inca.def : Activate reading of 10m wind in files if climatological=n in inca.card
62    if [ ! X${inca_UserChoices_climatological} = X ] ; then
63        IGCM_comp_modifyDefFile blocker inca.def climatological  ${inca_UserChoices_climatological}
64    else
65        IGCM_comp_modifyDefFile blocker inca.def climatological  n
66    fi
67
68    # inca.def : choose write frequency for inca_avgr in inca.card
69    if [ ! X${inca_UserChoices_freq_write_chem} = X ] ; then
70        IGCM_comp_modifyDefFile blocker inca.def freq_write_chem  ${inca_UserChoices_freq_write_chem}
71    else
72        IGCM_comp_modifyDefFile blocker inca.def  freq_write_chem  86400
73    fi
74
75    #inca.def : choose aerosol effect with feedback variable
76    if [ ! X${inca_UserChoices_feedb} = X ] ; then
77        IGCM_comp_modifyDefFile blocker inca.def  feedb  ${inca_UserChoices_feedb}
78    else
79        IGCM_comp_modifyDefFile blocker inca.def feedb  0
80    fi
81   
82
83    IGCM_debug_PopStack "CHM_Update"
84}
85
86#-----------------------------------------------------------------
87function CHM_Finalize
88{
89    IGCM_debug_PushStack "CHM_Finalize"
90
91    echo FINALIZE CHM !!!
92#
93#    IGCM_sys_Mkdir ${R_OUT_EXE}
94#    cd ${MODIPSL}
95#    tar cf src_${config_UserChoices_JobName}.tar  modeles
96#    IGCM_sys_Mv src_${config_UserChoices_JobName}.tar ${R_OUT_EXE}/.
97#    cd -
98#
99
100    IGCM_debug_PopStack "CHM_Finalize"
101}
Note: See TracBrowser for help on using the repository browser.