[2349] | 1 | #!/bin/ksh |
---|
| 2 | |
---|
| 3 | #D- Driver du script pour INCA |
---|
| 4 | #----------------------------------------------------------------- |
---|
| 5 | function INCA_sed_replace |
---|
| 6 | { |
---|
| 7 | IGCM_debug_PushStack "INCA_sed_replace" |
---|
| 8 | |
---|
| 9 | sed -e "s/${2}/${3}/" ${1} > ${1}.tmp |
---|
| 10 | RET=$? |
---|
| 11 | echo "INCA_sed : ${1} ${2} ${3}" |
---|
| 12 | \mv ${1}.tmp ${1} |
---|
| 13 | |
---|
| 14 | IGCM_debug_PopStack "INCA_sed_replace" |
---|
| 15 | return $RET |
---|
| 16 | } |
---|
| 17 | #----------------------------------------------------------------- |
---|
| 18 | function CHM_Initialize |
---|
| 19 | { |
---|
| 20 | IGCM_debug_PushStack "CHM_Initialize" |
---|
| 21 | |
---|
| 22 | RESOL_CHM=$( echo $RESOL | awk "-Fx" '{print $2}' | awk "-FD" '{print $2}') |
---|
| 23 | |
---|
| 24 | [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x19 |
---|
| 25 | RESOL_CHM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' | awk "-F-" '{print $1}') |
---|
| 26 | echo 'resol chimie', $RESOL_CHM |
---|
| 27 | |
---|
| 28 | [ -f ${SUBMIT_DIR}/../.chimie ] && eval $(grep CHEM ${SUBMIT_DIR}/../.chimie) |
---|
| 29 | INCA_sed_replace ${SUBMIT_DIR}/config.card \${CHEM} ${CHEM} |
---|
| 30 | echo "INCA Tag : LMDZ-INCA" ${config_UserChoices_TagName} |
---|
| 31 | |
---|
[2696] | 32 | ##- LMDZ physics version |
---|
| 33 | ## Read LMDZ_Physics option in lmdz.card, if not present take default value AP (old physics) |
---|
| 34 | if [ ! X${lmdz_UserChoices_LMDZ_Physics} = X ] ; then |
---|
| 35 | LMDZ_Physics=${lmdz_UserChoices_LMDZ_Physics} |
---|
| 36 | else |
---|
| 37 | LMDZ_Physics=AP |
---|
| 38 | fi |
---|
| 39 | echo LMDZ physics version : ${LMDZ_Physics} |
---|
| 40 | |
---|
[3302] | 41 | enable1=.FALSE. |
---|
| 42 | enable2=.FALSE. |
---|
| 43 | |
---|
[3278] | 44 | for frequency in ${config_CHM_WriteFrequency} ; do |
---|
[3302] | 45 | case ${frequency} in |
---|
| 46 | 1D|1d) enable1=.TRUE. ;; |
---|
| 47 | esac |
---|
| 48 | case ${frequency} in |
---|
| 49 | 1M|1m) enable2=.TRUE. ;; |
---|
| 50 | esac |
---|
[3159] | 51 | done |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | |
---|
[2349] | 55 | IGCM_debug_PopStack "CHM_Initialize" |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | #----------------------------------------------------------------- |
---|
| 59 | function CHM_Update |
---|
| 60 | { |
---|
| 61 | IGCM_debug_PushStack "CHM_Update" |
---|
| 62 | |
---|
[3302] | 63 | |
---|
| 64 | |
---|
[2349] | 65 | case ${CHEM} in |
---|
| 66 | AER) |
---|
[3302] | 67 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml forcage1 enabled ${enable1} |
---|
| 68 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml forcage2 enabled ${enable2} |
---|
| 69 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml aero1 enabled ${enable1} |
---|
| 70 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml aero2 enabled ${enable2} |
---|
| 71 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml chemistry1 enabled ${enable1} |
---|
| 72 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml chemistry2 enabled ${enable2} |
---|
| 73 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} |
---|
| 74 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} |
---|
| 75 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} |
---|
| 76 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} |
---|
| 77 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml dvel1 enabled ${enable1} |
---|
| 78 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml dvel2 enabled ${enable2} |
---|
| 79 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml washout1 enabled ${enable1} |
---|
| 80 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml washout2 enabled ${enable2} |
---|
| 81 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml reacflux1 enabled ${enable1} |
---|
| 82 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml reacflux2 enabled ${enable2} |
---|
| 83 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml invariants1 enabled ${enable1} |
---|
| 84 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml invariants2 enabled ${enable2} |
---|
[3161] | 85 | |
---|
[2696] | 86 | if [ X${LMDZ_Physics} = X"AP" ] ; then |
---|
| 87 | IGCM_comp_modifyDefFile nonblocker run.def config_inca aero |
---|
| 88 | else |
---|
| 89 | IGCM_comp_modifyDefFile nonblocker run.def config_inca aeNP |
---|
| 90 | fi |
---|
[2349] | 91 | ;; |
---|
[2705] | 92 | DUSS) |
---|
[3302] | 93 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml forcage1 enabled ${enable1} |
---|
| 94 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml aero1 enabled ${enable1} |
---|
| 95 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} |
---|
| 96 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} |
---|
| 97 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml vegetation1 enabled ${enable1} |
---|
| 98 | |
---|
| 99 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml forcage2 enabled ${enable2} |
---|
| 100 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml aero2 enabled ${enable2} |
---|
| 101 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} |
---|
| 102 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} |
---|
| 103 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml vegetation2 enabled ${enable2} |
---|
| 104 | |
---|
[2696] | 105 | if [ X${LMDZ_Physics} = X"AP" ] ; then |
---|
| 106 | IGCM_comp_modifyDefFile nonblocker run.def config_inca aero |
---|
| 107 | else |
---|
| 108 | IGCM_comp_modifyDefFile nonblocker run.def config_inca aeNP |
---|
| 109 | fi |
---|
[2442] | 110 | ;; |
---|
[2349] | 111 | NMHC) |
---|
[3302] | 112 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml reacflux1 enabled ${enable1} |
---|
| 113 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} |
---|
| 114 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} |
---|
| 115 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml chemistry1 enabled ${enable1} |
---|
| 116 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml dvel1 enabled ${enable1} |
---|
| 117 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml washout1 enabled ${enable1} |
---|
| 118 | |
---|
| 119 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml reacflux2 enabled ${enable2} |
---|
| 120 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} |
---|
| 121 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} |
---|
| 122 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml chemistry2 enabled ${enable2} |
---|
| 123 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml dvel2 enabled ${enable2} |
---|
| 124 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml washout2 enabled ${enable2} |
---|
| 125 | |
---|
[3161] | 126 | IGCM_comp_modifyDefFile nonblocker run.def config_inca chem |
---|
| 127 | ;; |
---|
[2349] | 128 | NMHC_AER) |
---|
[3302] | 129 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml forcage1 enabled ${enable1} |
---|
| 130 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml aero1 enabled ${enable1} |
---|
| 131 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} |
---|
| 132 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml chemistry1 enabled ${enable1} |
---|
| 133 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} |
---|
| 134 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml dvel1 enabled ${enable1} |
---|
| 135 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml phtrate1 enabled ${enable1} |
---|
| 136 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml washout1 enabled ${enable1} |
---|
| 137 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml reacflux1 enabled ${enable1} |
---|
| 138 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml vegetation1 enabled ${enable1} |
---|
| 139 | |
---|
| 140 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml forcage2 enabled ${enable2} |
---|
| 141 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml aero2 enabled ${enable2} |
---|
| 142 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} |
---|
| 143 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml chemistry2 enabled ${enable2} |
---|
| 144 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} |
---|
| 145 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml dvel2 enabled ${enable2} |
---|
| 146 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml phtrate2 enabled ${enable2} |
---|
| 147 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml washout2 enabled ${enable2} |
---|
| 148 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml reacflux2 enabled ${enable2} |
---|
| 149 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml vegetation2 enabled ${enable2} |
---|
| 150 | |
---|
[2696] | 151 | if [ X${LMDZ_Physics} = X"AP" ] ; then |
---|
| 152 | IGCM_comp_modifyDefFile nonblocker run.def config_inca aero |
---|
| 153 | else |
---|
| 154 | IGCM_comp_modifyDefFile nonblocker run.def config_inca aeNP |
---|
| 155 | fi |
---|
[2349] | 156 | ;; |
---|
[3182] | 157 | |
---|
| 158 | NMHC_AER_S) |
---|
[3302] | 159 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml forcage1 enabled ${enable1} |
---|
| 160 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml aero1 enabled ${enable1} |
---|
| 161 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml species1 enabled ${enable1} |
---|
| 162 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml chemistry1 enabled ${enable1} |
---|
| 163 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} |
---|
| 164 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml dvel1 enabled ${enable1} |
---|
[3317] | 165 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml phtrate1 enabled ${enable1} |
---|
[3302] | 166 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml washout1 enabled ${enable1} |
---|
| 167 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml reacflux1 enabled ${enable1} |
---|
| 168 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml vegetation1 enabled ${enable1} |
---|
[3182] | 169 | |
---|
[3302] | 170 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml forcage2 enabled ${enable2} |
---|
| 171 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml aero2 enabled ${enable2} |
---|
| 172 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml species2 enabled ${enable2} |
---|
| 173 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml chemistry2 enabled ${enable2} |
---|
| 174 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} |
---|
[3317] | 175 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml phtrate2 enabled ${enable2} |
---|
[3302] | 176 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml dvel2 enabled ${enable2} |
---|
| 177 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml washout2 enabled ${enable2} |
---|
| 178 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml reacflux2 enabled ${enable2} |
---|
| 179 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml vegetation2 enabled ${enable2} |
---|
| 180 | |
---|
[3182] | 181 | if [ X${LMDZ_Physics} = X"AP" ] ; then |
---|
| 182 | IGCM_comp_modifyDefFile nonblocker run.def config_inca aero |
---|
| 183 | else |
---|
| 184 | IGCM_comp_modifyDefFile nonblocker run.def config_inca aeNP |
---|
| 185 | fi |
---|
| 186 | ;; |
---|
[2349] | 187 | GES) |
---|
[3302] | 188 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_daily.xml emissions1 enabled ${enable1} |
---|
| 189 | |
---|
| 190 | IGCM_comp_modifyXmlFile nonblocker file_def_inca_monthly.xml emissions2 enabled ${enable2} |
---|
| 191 | |
---|
[3161] | 192 | IGCM_comp_modifyDefFile nonblocker run.def config_inca chem |
---|
[2349] | 193 | esac |
---|
| 194 | |
---|
[3159] | 195 | |
---|
[2547] | 196 | # inca.def : Activate reading of 10m wind in files if LMDZ_10m_winds=n in inca.card |
---|
| 197 | if [ ! X${inca_UserChoices_LMDZ_10m_winds} = X ] ; then |
---|
| 198 | IGCM_comp_modifyDefFile nonblocker inca.def LMDZ_10m_winds ${inca_UserChoices_LMDZ_10m_winds} |
---|
[2349] | 199 | else |
---|
[2547] | 200 | IGCM_comp_modifyDefFile nonblocker inca.def LMDZ_10m_winds n |
---|
[2349] | 201 | fi |
---|
| 202 | |
---|
[3319] | 203 | if [ X${inca_UserChoices_10m_winds_method} = X ] ; then |
---|
| 204 | IGCM_comp_modifyDefFile nonblocker inca.def 10m_winds_method threshold |
---|
| 205 | else |
---|
| 206 | IGCM_comp_modifyDefFile nonblocker inca.def 10m_winds_method ${inca_UserChoices_10m_winds_method} |
---|
| 207 | fi |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | if [ ! X${inca_UserChoices_wind_parameter} = X ] ; then |
---|
| 211 | if [ X${inca_UserChoices_10m_winds_method} = Xthreshold ] ; then |
---|
| 212 | IGCM_comp_modifyDefFile nonblocker inca.def tref ${inca_UserChoices_wind_parameter} |
---|
| 213 | IGCM_comp_modifyDefFile nonblocker inca.def kref DEFAULT |
---|
| 214 | else |
---|
| 215 | IGCM_comp_modifyDefFile nonblocker inca.def kref ${inca_UserChoices_wind_parameter} |
---|
| 216 | IGCM_comp_modifyDefFile nonblocker inca.def tref DEFAULT |
---|
| 217 | fi |
---|
| 218 | else |
---|
| 219 | IGCM_comp_modifyDefFile nonblocker inca.def kref DEFAULT |
---|
| 220 | IGCM_comp_modifyDefFile nonblocker inca.def tref DEFAULT |
---|
| 221 | fi |
---|
| 222 | |
---|
[3457] | 223 | if [ X${inca_UserChoices_seasalt_corr} = X ] ; then |
---|
| 224 | IGCM_comp_modifyDefFile nonblocker inca.def ss_corr DEFAULT |
---|
| 225 | else |
---|
| 226 | IGCM_comp_modifyDefFile nonblocker inca.def ss_corr ${inca_UserChoices_seasalt_corr} |
---|
| 227 | fi |
---|
[3319] | 228 | |
---|
[3457] | 229 | |
---|
| 230 | |
---|
[2349] | 231 | # inca.def : choose write frequency for inca_avgr in inca.card |
---|
| 232 | if [ ! X${inca_UserChoices_freq_write_chem} = X ] ; then |
---|
[2399] | 233 | IGCM_comp_modifyDefFile nonblocker inca.def freq_write_chem ${inca_UserChoices_freq_write_chem} |
---|
[2349] | 234 | else |
---|
[2399] | 235 | IGCM_comp_modifyDefFile nonblocker inca.def freq_write_chem 86400 |
---|
[2349] | 236 | fi |
---|
| 237 | |
---|
| 238 | #inca.def : choose aerosol effect with feedback variable |
---|
| 239 | if [ ! X${inca_UserChoices_feedb} = X ] ; then |
---|
[2399] | 240 | IGCM_comp_modifyDefFile nonblocker inca.def feedb ${inca_UserChoices_feedb} |
---|
[2349] | 241 | else |
---|
[2399] | 242 | IGCM_comp_modifyDefFile nonblocker inca.def feedb 0 |
---|
[2349] | 243 | fi |
---|
| 244 | |
---|
[2735] | 245 | #inca.def : choose coupled model with orchidee |
---|
| 246 | if [ ! X${inca_UserChoices_CoupOrchInca} = X ]; then |
---|
| 247 | IGCM_comp_modifyDefFile nonblocker inca.def CoupOrchInca ${inca_UserChoices_CoupOrchInca} |
---|
| 248 | else |
---|
| 249 | IGCM_comp_modifyDefFile nonblocker inca.def CoupOrchInca n |
---|
| 250 | fi |
---|
[2724] | 251 | |
---|
| 252 | #inca.def : choose sedimentation schema |
---|
| 253 | if [ ! X${inca_UserChoices_multilayer_sedim} = X ]; then |
---|
| 254 | IGCM_comp_modifyDefFile nonblocker inca.def multilayer_sediment ${inca_UserChoices_multilayer_sedim} |
---|
| 255 | else |
---|
| 256 | IGCM_comp_modifyDefFile nonblocker inca.def multilayer_sediment y |
---|
| 257 | fi |
---|
| 258 | |
---|
[3061] | 259 | #inca.def : choose calcul interactif des diagnostiques flux chimique ou non |
---|
| 260 | if [ ! X${inca_UserChoices_calcul_flux} = X ]; then |
---|
| 261 | IGCM_comp_modifyDefFile nonblocker inca.def calcul_flux ${inca_UserChoices_calcul_flux} |
---|
| 262 | else |
---|
| 263 | IGCM_comp_modifyDefFile nonblocker inca.def calcul_flux n |
---|
| 264 | fi |
---|
| 265 | |
---|
[3244] | 266 | #inca.def : choose aircraft emission |
---|
| 267 | if [ ! X${inca_UserChoices_flag_plane} = X ]; then |
---|
| 268 | IGCM_comp_modifyDefFile nonblocker inca.def flag_plane ${inca_UserChoices_flag_plane} |
---|
| 269 | else |
---|
| 270 | IGCM_comp_modifyDefFile nonblocker inca.def flag_plane 0 |
---|
| 271 | fi |
---|
| 272 | |
---|
[3315] | 273 | #inca.def : choose time interpolation for sflx.nc |
---|
| 274 | if [ ! X${inca_UserChoices_emi_interp_time} = X ]; then |
---|
| 275 | IGCM_comp_modifyDefFile nonblocker inca.def emi_interp_time ${inca_UserChoices_emi_interp_time} |
---|
| 276 | else |
---|
| 277 | IGCM_comp_modifyDefFile nonblocker inca.def emi_interp_time 1 |
---|
| 278 | fi |
---|
[3244] | 279 | |
---|
[2399] | 280 | #inca.def : choose output library |
---|
[2370] | 281 | if [ X${inca_UserChoices_XIOS} = Xy ] ; then |
---|
[2399] | 282 | IGCM_comp_modifyDefFile nonblocker inca.def XIOS_INCA_OK y |
---|
[2370] | 283 | else |
---|
[2399] | 284 | IGCM_comp_modifyDefFile nonblocker inca.def XIOS_INCA_OK n |
---|
[2370] | 285 | fi |
---|
| 286 | |
---|
[2399] | 287 | if [ X${inca_UserChoices_IOIPSL} = Xy ] ; then |
---|
| 288 | IGCM_comp_modifyDefFile nonblocker inca.def IOIPSL_INCA_OK y |
---|
| 289 | else |
---|
| 290 | IGCM_comp_modifyDefFile nonblocker inca.def IOIPSL_INCA_OK n |
---|
| 291 | fi |
---|
[2370] | 292 | |
---|
[2399] | 293 | |
---|
[2454] | 294 | |
---|
[2478] | 295 | |
---|
[2366] | 296 | if [ X${inca_UserChoices_XIOS} = Xy ] ; then |
---|
| 297 | # Add include of INCA context in iodef.xml |
---|
| 298 | # In iodef.xml add on next line after "COMPONENT CONTEXT" |
---|
| 299 | # <context id="inca" src="./context_inca.xml"/> |
---|
| 300 | echo '<context id="inca" src="./context_inca.xml"/>' > add.tmp |
---|
| 301 | cp iodef.xml iodef.xml.tmp |
---|
| 302 | sed -e "/COMPONENT CONTEXT/r add.tmp" \ |
---|
| 303 | iodef.xml.tmp > iodef.xml |
---|
| 304 | rm iodef.xml.tmp add.tmp |
---|
| 305 | fi |
---|
[2349] | 306 | |
---|
[3061] | 307 | # Add LongName as global attribute in XIOS output files (if LongName is not empty) |
---|
[2833] | 308 | if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then |
---|
| 309 | listfile=$(ls file_def*inca.xml) |
---|
| 310 | echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp |
---|
| 311 | for file in ${listfile} |
---|
| 312 | do |
---|
| 313 | cp ${file} ${file}.tmp |
---|
| 314 | sed -e "/<file id/r add.tmp" \ |
---|
| 315 | ${file}.tmp > ${file} |
---|
| 316 | rm ${file}.tmp |
---|
| 317 | done |
---|
| 318 | rm add.tmp |
---|
| 319 | fi |
---|
| 320 | |
---|
[2349] | 321 | IGCM_debug_PopStack "CHM_Update" |
---|
| 322 | } |
---|
| 323 | |
---|
| 324 | #----------------------------------------------------------------- |
---|
| 325 | function CHM_Finalize |
---|
| 326 | { |
---|
| 327 | IGCM_debug_PushStack "CHM_Finalize" |
---|
| 328 | |
---|
| 329 | echo FINALIZE CHM !!! |
---|
| 330 | # |
---|
| 331 | # IGCM_sys_Mkdir ${R_OUT_EXE} |
---|
| 332 | # cd ${MODIPSL} |
---|
| 333 | # tar cf src_${config_UserChoices_JobName}.tar modeles |
---|
| 334 | # IGCM_sys_Mv src_${config_UserChoices_JobName}.tar ${R_OUT_EXE}/. |
---|
| 335 | # cd - |
---|
| 336 | # |
---|
| 337 | |
---|
| 338 | IGCM_debug_PopStack "CHM_Finalize" |
---|
| 339 | } |
---|