Changeset 1950
- Timestamp:
- Jun 20, 2018, 4:10:30 PM (7 years ago)
- Location:
- trunk/LMDZ.TITAN
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/README
r1947 r1950 1475 1475 Important to have correct altitudes in the chemistry 1476 1476 Can be activated with eff_gz flag in callphys.def 1477 1478 == 20/06/18 == JVO 1479 Optimization for chemistry firstcall C routine disso.c 1480 -> Row-major-friendly declaration and nesting of loops for huge array krpd 1481 -> ~factor 4 for this routine who was ~ 1/2 of firstcall -> ~ gain ~5% total run-time for standard runs -
trunk/LMDZ.TITAN/libf/chimtitan/disso.c
r1672 r1950 7 7 #include "titan.h" 8 8 9 void disso_( double KRPD[][ NLRT][RDISS+1][15], int *NLAT )9 void disso_( double KRPD[][15][NLRT][RDISS+1], int *NLAT ) 10 10 { 11 11 static double sH2[62] = { /* incertain en dessous de 70 et en dessus de 85... */ … … 200 200 201 201 for( lat = 0; lat <= (*NLAT)-1; lat++ ) /* Old array is set equal to 0. */ 202 for( j = 0; j <= NLRT-1; j++ )203 for( i = 0; i <= RDISS; i++ )204 for( s = 0; s <= 14; s++ )205 KRPD[lat][ j][i][s] = 0.0e0;202 for( s = 0; s <= 14; s++ ) 203 for( j = 0; j <= NLRT-1; j++ ) 204 for( i = 0; i <= RDISS; i++ ) 205 KRPD[lat][s][j][i] = 0.0e0; 206 206 207 207 for( i = 0; i <= 13; i++ ) sCH4[i] = 0.0e0; … … 259 259 { 260 260 f = flux[j][s] * sol[l] / ( 9.5e0 * 9.5e0 ); /* !! # de reac de 0 a RDISS-1 !! */ 261 if( i == 220 ) KRPD[lat][ j][1][s] += 4.4e-17 * f; /* CH3 -> 1CH2 + H */262 KRPD[lat][ j][ 0][s] += sH2[l] * f * 1.00; /* H2 -> H + H */263 KRPD[lat][ j][ 7][s] += sC2H4[l] * f * 0.51; /* C2H4 -> C2H2 + H2 */264 KRPD[lat][ j][ 8][s] += sC2H4[l] * f * 0.49; /* C2H4 -> C2H2 + 2H */265 KRPD[lat][ j][15][s] += sCH2CCH2[l]* f * 0.89; /* CH2CCH2 -> C3H3 + H Jackson 91 */266 KRPD[lat][ j][16][s] += sCH2CCH2[l]* f * 0.11; /* CH2CCH2 -> C3H2 + H2 Jackson 91 */267 KRPD[lat][ j][17][s] += sCH3C2H[l] * f * 0.89; /* CH3C2H -> C3H3 + H Jackson 91 */268 KRPD[lat][ j][18][s] += sCH3C2H[l] * f * 0.11; /* CH3C2H -> C3H2 + H2 Jackson 91 */269 KRPD[lat][ j][19][s] += sC3H6[l] * f * 0.33; /* C3H6 -> CH2CCH2 + H2 */270 KRPD[lat][ j][20][s] += sC3H6[l] * f * 0.17; /* C3H6 -> CH3CCH + H2 */271 KRPD[lat][ j][21][s] += sC3H6[l] * f * 0.03; /* C3H6 -> C2H4 + 3CH2 */272 KRPD[lat][ j][22][s] += sC3H6[l] * f * 0.35; /* C3H6 -> C2H3 + CH3 */273 KRPD[lat][ j][23][s] += sC3H6[l] * f * 0.05; /* C3H6 -> C2H2 + CH4 */274 KRPD[lat][ j][32][s] += sC4H4[l] * f * 0.80; /* C4H4 -> C4H2 + H2 Gladstone 96 */275 KRPD[lat][ j][33][s] += sC4H4[l] * f * 0.20; /* C4H4 -> C2H2 + C2H2 Gladstone 96 */276 KRPD[lat][ j][34][s] += sC4H6[l] * f * 0.04; /* C4H6 -> C4H4 + H2 */277 KRPD[lat][ j][35][s] += sC4H6[l] * f * 0.27; /* C4H6 -> C2H4 + C2H2 */278 KRPD[lat][ j][36][s] += sC4H6[l] * f * 0.69; /* C4H6 -> CH3 + C3H3 */279 KRPD[lat][ j][45][s] += sC6H6[l] * f * 0.04; /* AC6H6 -> C5H3 (prod...) + CH3 */280 KRPD[lat][ j][46][s] += sC6H6[l] * f * 0.96; /* AC6H6 -> AC6H5 + H */281 KRPD[lat][ j][47][s] += sN2[l] * f; /* N2 -> 2N2d */282 KRPD[lat][ j][48][s] += sHCN[l] * f; /* HCN -> H + CN */283 KRPD[lat][ j][51][s] += sC2N2[l] * f * 0.3; /* C2N2 -> 2CN */284 KRPD[lat][ j][52][s] += sCH3CN[l] * f * 1.0; /* CH3CN -> CH3 + CN */285 KRPD[lat][ j][53][s] += sC2N2[l] * f * 0.3; /* C4N2 -> C3N + CN */261 if( i == 220 ) KRPD[lat][s][j][1] += 4.4e-17 * f; /* CH3 -> 1CH2 + H */ 262 KRPD[lat][s][j][ 0] += sH2[l] * f * 1.00; /* H2 -> H + H */ 263 KRPD[lat][s][j][ 7] += sC2H4[l] * f * 0.51; /* C2H4 -> C2H2 + H2 */ 264 KRPD[lat][s][j][ 8] += sC2H4[l] * f * 0.49; /* C2H4 -> C2H2 + 2H */ 265 KRPD[lat][s][j][15] += sCH2CCH2[l]* f * 0.89; /* CH2CCH2 -> C3H3 + H Jackson 91 */ 266 KRPD[lat][s][j][16] += sCH2CCH2[l]* f * 0.11; /* CH2CCH2 -> C3H2 + H2 Jackson 91 */ 267 KRPD[lat][s][j][17] += sCH3C2H[l] * f * 0.89; /* CH3C2H -> C3H3 + H Jackson 91 */ 268 KRPD[lat][s][j][18] += sCH3C2H[l] * f * 0.11; /* CH3C2H -> C3H2 + H2 Jackson 91 */ 269 KRPD[lat][s][j][19] += sC3H6[l] * f * 0.33; /* C3H6 -> CH2CCH2 + H2 */ 270 KRPD[lat][s][j][20] += sC3H6[l] * f * 0.17; /* C3H6 -> CH3CCH + H2 */ 271 KRPD[lat][s][j][21] += sC3H6[l] * f * 0.03; /* C3H6 -> C2H4 + 3CH2 */ 272 KRPD[lat][s][j][22] += sC3H6[l] * f * 0.35; /* C3H6 -> C2H3 + CH3 */ 273 KRPD[lat][s][j][23] += sC3H6[l] * f * 0.05; /* C3H6 -> C2H2 + CH4 */ 274 KRPD[lat][s][j][32] += sC4H4[l] * f * 0.80; /* C4H4 -> C4H2 + H2 Gladstone 96 */ 275 KRPD[lat][s][j][33] += sC4H4[l] * f * 0.20; /* C4H4 -> C2H2 + C2H2 Gladstone 96 */ 276 KRPD[lat][s][j][34] += sC4H6[l] * f * 0.04; /* C4H6 -> C4H4 + H2 */ 277 KRPD[lat][s][j][35] += sC4H6[l] * f * 0.27; /* C4H6 -> C2H4 + C2H2 */ 278 KRPD[lat][s][j][36] += sC4H6[l] * f * 0.69; /* C4H6 -> CH3 + C3H3 */ 279 KRPD[lat][s][j][45] += sC6H6[l] * f * 0.04; /* AC6H6 -> C5H3 (prod...) + CH3 */ 280 KRPD[lat][s][j][46] += sC6H6[l] * f * 0.96; /* AC6H6 -> AC6H5 + H */ 281 KRPD[lat][s][j][47] += sN2[l] * f; /* N2 -> 2N2d */ 282 KRPD[lat][s][j][48] += sHCN[l] * f; /* HCN -> H + CN */ 283 KRPD[lat][s][j][51] += sC2N2[l] * f * 0.3; /* C2N2 -> 2CN */ 284 KRPD[lat][s][j][52] += sCH3CN[l] * f * 1.0; /* CH3CN -> CH3 + CN */ 285 KRPD[lat][s][j][53] += sC2N2[l] * f * 0.3; /* C4N2 -> C3N + CN */ 286 286 287 287 if( i != 125 ) /* Not Lyman alpha */ 288 288 { 289 KRPD[lat][ j][ 2][s] += sCH4[l] * f; /* CH4 -> 1CH2 + H2 */290 KRPD[lat][ j][ 9][s] += sC2H6[l] * f * 0.56; /* C2H6 -> C2H4 + H2 */291 KRPD[lat][ j][10][s] += sC2H6[l] * f * 0.14; /* C2H6 -> C2H4 + 2H */292 KRPD[lat][ j][11][s] += sC2H6[l] * f * 0.27; /* C2H6 -> C2H2 + 2H2 */293 KRPD[lat][ j][12][s] += sC2H6[l] * f * 0.02; /* C2H6 -> CH4 + 3CH2 */294 KRPD[lat][ j][13][s] += sC2H6[l] * f * 0.01; /* C2H6 -> 2CH3 */295 KRPD[lat][ j][24][s] += sC3H8[l] * f * 0.94; /* C3H8 -> C3H6 + H2 */296 KRPD[lat][ j][27][s] += sC3H8[l] * f * 0.06; /* C3H8 -> C2H4 + CH4 */289 KRPD[lat][s][j][ 2] += sCH4[l] * f; /* CH4 -> 1CH2 + H2 */ 290 KRPD[lat][s][j][ 9] += sC2H6[l] * f * 0.56; /* C2H6 -> C2H4 + H2 */ 291 KRPD[lat][s][j][10] += sC2H6[l] * f * 0.14; /* C2H6 -> C2H4 + 2H */ 292 KRPD[lat][s][j][11] += sC2H6[l] * f * 0.27; /* C2H6 -> C2H2 + 2H2 */ 293 KRPD[lat][s][j][12] += sC2H6[l] * f * 0.02; /* C2H6 -> CH4 + 3CH2 */ 294 KRPD[lat][s][j][13] += sC2H6[l] * f * 0.01; /* C2H6 -> 2CH3 */ 295 KRPD[lat][s][j][24] += sC3H8[l] * f * 0.94; /* C3H8 -> C3H6 + H2 */ 296 KRPD[lat][s][j][27] += sC3H8[l] * f * 0.06; /* C3H8 -> C2H4 + CH4 */ 297 297 } 298 298 else /* Lyman alpha */ 299 299 { 300 KRPD[lat][ j][ 2][s] += sCH4[l] * f * 0.64; /* CH4 -> 1CH2 + H2 */301 KRPD[lat][ j][ 3][s] += sCH4[l] * f * 0.07; /* CH4 -> CH + H2 + H */302 KRPD[lat][ j][ 4][s] += sCH4[l] * f * 0.29; /* CH4 -> CH3 + H */303 KRPD[lat][ j][ 9][s] += sC2H6[l] * f * 0.13; /* C2H6 -> C2H4 + H2 */304 KRPD[lat][ j][10][s] += sC2H6[l] * f * 0.3; /* C2H6 -> C2H4 + 2H */305 KRPD[lat][ j][11][s] += sC2H6[l] * f * 0.25; /* C2H6 -> C2H2 + 2H2 */306 KRPD[lat][ j][12][s] += sC2H6[l] * f * 0.25; /* C2H6 -> CH4 + 3CH2 */307 KRPD[lat][ j][13][s] += sC2H6[l] * f * 0.08; /* C2H6 -> 2CH3 */308 KRPD[lat][ j][24][s] += sC3H8[l] * f * 0.33; /* C3H8 -> C3H6 + H2 */309 KRPD[lat][ j][25][s] += sC3H8[l] * f * 0.09; /* C3H8 -> C2H6 + 3CH2 */310 KRPD[lat][ j][26][s] += sC3H8[l] * f * 0.39; /* C3H8 -> C2H5 + CH3 */311 KRPD[lat][ j][27][s] += sC3H8[l] * f * 0.2; /* C3H8 -> C2H4 + CH4 */300 KRPD[lat][s][j][ 2] += sCH4[l] * f * 0.64; /* CH4 -> 1CH2 + H2 */ 301 KRPD[lat][s][j][ 3] += sCH4[l] * f * 0.07; /* CH4 -> CH + H2 + H */ 302 KRPD[lat][s][j][ 4] += sCH4[l] * f * 0.29; /* CH4 -> CH3 + H */ 303 KRPD[lat][s][j][ 9] += sC2H6[l] * f * 0.13; /* C2H6 -> C2H4 + H2 */ 304 KRPD[lat][s][j][10] += sC2H6[l] * f * 0.3; /* C2H6 -> C2H4 + 2H */ 305 KRPD[lat][s][j][11] += sC2H6[l] * f * 0.25; /* C2H6 -> C2H2 + 2H2 */ 306 KRPD[lat][s][j][12] += sC2H6[l] * f * 0.25; /* C2H6 -> CH4 + 3CH2 */ 307 KRPD[lat][s][j][13] += sC2H6[l] * f * 0.08; /* C2H6 -> 2CH3 */ 308 KRPD[lat][s][j][24] += sC3H8[l] * f * 0.33; /* C3H8 -> C3H6 + H2 */ 309 KRPD[lat][s][j][25] += sC3H8[l] * f * 0.09; /* C3H8 -> C2H6 + 3CH2 */ 310 KRPD[lat][s][j][26] += sC3H8[l] * f * 0.39; /* C3H8 -> C2H5 + CH3 */ 311 KRPD[lat][s][j][27] += sC3H8[l] * f * 0.2; /* C3H8 -> C2H4 + CH4 */ 312 312 } 313 313 if( i < 145 ) /* C4H10: a revoir avec Jackson & Lias, 1974... */ 314 314 { 315 KRPD[lat][ j][37][s] += sC4H10[l]* f * 0.18; /* C4H10 -> C4H8(ieC3H5+CH3)+H2 */316 KRPD[lat][ j][38][s] += sC4H10[l]* f * 0.20; /* C4H10 -> 2 C2H4 + H2 */317 KRPD[lat][ j][39][s] += sC4H10[l]* f * 0.03; /* C4H10 -> C3H6 + CH4 */318 KRPD[lat][ j][40][s] += sC4H10[l]* f * 0.07; /* C4H10 -> C3H6 + CH3 + H */319 KRPD[lat][ j][41][s] += sC4H10[l]* f * 0.00; /* C4H10 -> C2H6 + C2H4 */320 KRPD[lat][ j][42][s] += sC4H10[l]* f * 0.15; /* C4H10 -> C2H6 + C2H2 + H2 */321 KRPD[lat][ j][43][s] += sC4H10[l]* f * 0.27; /* C4H10 -> CH3 + C3H7 */322 KRPD[lat][ j][44][s] += sC4H10[l]* f * 0.10; /* C4H10 -> 2 C2H5 */315 KRPD[lat][s][j][37] += sC4H10[l]* f * 0.18; /* C4H10 -> C4H8(ieC3H5+CH3)+H2 */ 316 KRPD[lat][s][j][38] += sC4H10[l]* f * 0.20; /* C4H10 -> 2 C2H4 + H2 */ 317 KRPD[lat][s][j][39] += sC4H10[l]* f * 0.03; /* C4H10 -> C3H6 + CH4 */ 318 KRPD[lat][s][j][40] += sC4H10[l]* f * 0.07; /* C4H10 -> C3H6 + CH3 + H */ 319 KRPD[lat][s][j][41] += sC4H10[l]* f * 0.00; /* C4H10 -> C2H6 + C2H4 */ 320 KRPD[lat][s][j][42] += sC4H10[l]* f * 0.15; /* C4H10 -> C2H6 + C2H2 + H2 */ 321 KRPD[lat][s][j][43] += sC4H10[l]* f * 0.27; /* C4H10 -> CH3 + C3H7 */ 322 KRPD[lat][s][j][44] += sC4H10[l]* f * 0.10; /* C4H10 -> 2 C2H5 */ 323 323 } 324 324 else 325 325 { 326 KRPD[lat][ j][37][s] += sC4H10[l]* f * 0.41; /* C4H10 -> C4H8(ieC3H5+CH3)+H2 */327 KRPD[lat][ j][38][s] += sC4H10[l]* f * 0.12; /* C4H10 -> 2 C2H4 + H2 */328 KRPD[lat][ j][39][s] += sC4H10[l]* f * 0.01; /* C4H10 -> C3H6 + CH4 */329 KRPD[lat][ j][40][s] += sC4H10[l]* f * 0.07; /* C4H10 -> C3H6 + CH3 + H */330 KRPD[lat][ j][41][s] += sC4H10[l]* f * 0.02; /* C4H10 -> C2H6 + C2H4 */331 KRPD[lat][ j][42][s] += sC4H10[l]* f * 0.06; /* C4H10 -> C2H6 + C2H2 + H2 */332 KRPD[lat][ j][43][s] += sC4H10[l]* f * 0.24; /* C4H10 -> CH3 + C3H7 */333 KRPD[lat][ j][44][s] += sC4H10[l]* f * 0.07; /* C4H10 -> 2 C2H5 */326 KRPD[lat][s][j][37] += sC4H10[l]* f * 0.41; /* C4H10 -> C4H8(ieC3H5+CH3)+H2 */ 327 KRPD[lat][s][j][38] += sC4H10[l]* f * 0.12; /* C4H10 -> 2 C2H4 + H2 */ 328 KRPD[lat][s][j][39] += sC4H10[l]* f * 0.01; /* C4H10 -> C3H6 + CH4 */ 329 KRPD[lat][s][j][40] += sC4H10[l]* f * 0.07; /* C4H10 -> C3H6 + CH3 + H */ 330 KRPD[lat][s][j][41] += sC4H10[l]* f * 0.02; /* C4H10 -> C2H6 + C2H4 */ 331 KRPD[lat][s][j][42] += sC4H10[l]* f * 0.06; /* C4H10 -> C2H6 + C2H2 + H2 */ 332 KRPD[lat][s][j][43] += sC4H10[l]* f * 0.24; /* C4H10 -> CH3 + C3H7 */ 333 KRPD[lat][s][j][44] += sC4H10[l]* f * 0.07; /* C4H10 -> 2 C2H5 */ 334 334 } 335 335 if( i < 150 ) 336 336 { 337 KRPD[lat][ j][ 5][s] += sC2H2[l] * f * 0.3; /* C2H2 -> C2H + H */338 KRPD[lat][ j][ 6][s] += sC2H2[l] * f * 0.1; /* C2H2 -> C2 + H2 */339 KRPD[lat][ j][49][s] += sHC3N[l] * f * 0.3; /* HC3N -> C2H + CN */340 KRPD[lat][ j][50][s] += sHC3N[l] * f * 0.09; /* HC3N -> H + C3N */337 KRPD[lat][s][j][ 5] += sC2H2[l] * f * 0.3; /* C2H2 -> C2H + H */ 338 KRPD[lat][s][j][ 6] += sC2H2[l] * f * 0.1; /* C2H2 -> C2 + H2 */ 339 KRPD[lat][s][j][49] += sHC3N[l] * f * 0.3; /* HC3N -> C2H + CN */ 340 KRPD[lat][s][j][50] += sHC3N[l] * f * 0.09; /* HC3N -> H + C3N */ 341 341 } 342 342 else if( i < 205 ) 343 343 { 344 KRPD[lat][ j][ 5][s] += sC2H2[l] * f * 0.08; /* C2H2 -> C2H + H */345 KRPD[lat][ j][ 6][s] += sC2H2[l] * f * 0.1; /* C2H2 -> C2 + H2 */346 KRPD[lat][ j][49][s] += sHC3N[l] * f * 0.05; /* HC3N -> C2H + CN */347 KRPD[lat][ j][50][s] += sHC3N[l] * f * 0.09; /* HC3N -> H + C3N */344 KRPD[lat][s][j][ 5] += sC2H2[l] * f * 0.08; /* C2H2 -> C2H + H */ 345 KRPD[lat][s][j][ 6] += sC2H2[l] * f * 0.1; /* C2H2 -> C2 + H2 */ 346 KRPD[lat][s][j][49] += sHC3N[l] * f * 0.05; /* HC3N -> C2H + CN */ 347 KRPD[lat][s][j][50] += sHC3N[l] * f * 0.09; /* HC3N -> H + C3N */ 348 348 } 349 349 else if( i < 245 ) 350 350 { 351 KRPD[lat][ j][50][s] += sHC3N[l] * f * 0.09; /* HC3N -> H + C3N */351 KRPD[lat][s][j][50] += sHC3N[l] * f * 0.09; /* HC3N -> H + C3N */ 352 352 } 353 353 if( i < 165 ) 354 354 { 355 KRPD[lat][ j][28][s] += sC4H2[l] * f * 0.2; /* C4H2 -> C4H + H */356 KRPD[lat][ j][29][s] += sC4H2[l] * f * 0.03; /* C4H2 -> 2C2H */357 KRPD[lat][ j][30][s] += sC4H2[l] * f * 0.1; /* C4H2 -> C2H2 + C2 */358 KRPD[lat][ j][31][s] += sC4H2[l] * f * 0.67; /* C4H2 -> C4H2* */355 KRPD[lat][s][j][28] += sC4H2[l] * f * 0.2; /* C4H2 -> C4H + H */ 356 KRPD[lat][s][j][29] += sC4H2[l] * f * 0.03; /* C4H2 -> 2C2H */ 357 KRPD[lat][s][j][30] += sC4H2[l] * f * 0.1; /* C4H2 -> C2H2 + C2 */ 358 KRPD[lat][s][j][31] += sC4H2[l] * f * 0.67; /* C4H2 -> C4H2* */ 359 359 } 360 360 else if( i < 205 ) 361 361 { 362 KRPD[lat][ j][29][s] += sC4H2[l] * f * 0.01; /* C4H2 -> 2C2H */363 KRPD[lat][ j][30][s] += sC4H2[l] * f * 0.06; /* C4H2 -> C2H2 + C2 */364 KRPD[lat][ j][31][s] += sC4H2[l] * f * 0.93; /* C4H2 -> C4H2* */362 KRPD[lat][s][j][29] += sC4H2[l] * f * 0.01; /* C4H2 -> 2C2H */ 363 KRPD[lat][s][j][30] += sC4H2[l] * f * 0.06; /* C4H2 -> C2H2 + C2 */ 364 KRPD[lat][s][j][31] += sC4H2[l] * f * 0.93; /* C4H2 -> C4H2* */ 365 365 } 366 366 else 367 367 { 368 KRPD[lat][ j][31][s] += sC4H2[l] * f * 1.00; /* C4H2 -> C4H2* */369 } 370 if( i < 190 ) KRPD[lat][ j][14][s] += 4.e-17 * f; /* C3H3 -> C3H2 + H */368 KRPD[lat][s][j][31] += sC4H2[l] * f * 1.00; /* C4H2 -> C4H2* */ 369 } 370 if( i < 190 ) KRPD[lat][s][j][14] += 4.e-17 * f; /* C3H3 -> C3H2 + H */ 371 371 } 372 372 } … … 378 378 { 379 379 for( j = 99; j <= NLRT-1; j++ ) /* level 100 = 200 km */ 380 KRPD[lat][ j][RDISS][s] = 1.0e-16;380 KRPD[lat][s][j][RDISS] = 1.0e-16; 381 381 for( j = 49; j <= 98; j++ ) /* level 50 = 100 km */ 382 KRPD[lat][ j][RDISS][s] = 1.0e-17+1.8e-18*(j-49);382 KRPD[lat][s][j][RDISS] = 1.0e-17+1.8e-18*(j-49); 383 383 for( j = 34; j <= 48; j++ ) /* level 35 = 70 km */ 384 KRPD[lat][ j][RDISS][s] = pow(10.,(-23+0.4*(j-34)));384 KRPD[lat][s][j][RDISS] = pow(10.,(-23+0.4*(j-34))); 385 385 for( j = 0; j <= 33; j++ ) 386 KRPD[lat][ j][RDISS][s] = 0.0e0;386 KRPD[lat][s][j][RDISS] = 0.0e0; 387 387 } 388 388 -
trunk/LMDZ.TITAN/libf/chimtitan/titan.h
r1908 r1950 37 37 int (*)[5], int *, int *, int (*)[200][2], int (*)[200]); 38 38 void comp_(char (*)[10], double *, double *, double *, double (*)[NLEV]); 39 void disso_(double (*)[ NLRT][RDISS+1][15], int *);39 void disso_(double (*)[15][NLRT][RDISS+1], int *); 40 40 double omega( double, double, double ); 41 41 void solve( double ***, int, int, int ); -
trunk/LMDZ.TITAN/libf/phytitan/calchim.F90
r1947 r1950 171 171 172 172 ALLOCATE(krate(nlaykim_tot,nr_kim)) 173 ALLOCATE(krpd( 15,nd_kim+1,nlrt_kim,nlat_actfluxes))173 ALLOCATE(krpd(nd_kim+1,nlrt_kim,15,nlat_actfluxes)) 174 174 175 175 ALLOCATE(nom_prod(nkim)) … … 420 420 DO i=1,nd_kim+1 ! nd_kim+1 is dissociation of N2 by GCR 421 421 422 krpddec = ( krpd(i dec+1,i,ialt,klat) * (1.0-factalt) &423 + krpd(i dec+1,i,ialt+1,klat) * factalt ) * (1.0-factlat) &424 + ( krpd(i dec+1,i,ialt,klat+1) * (1.0-factalt) &425 + krpd(i dec+1,i,ialt+1,klat+1) * factalt ) * factlat422 krpddec = ( krpd(i,ialt ,idec+1,klat) * (1.0-factalt) & 423 + krpd(i,ialt+1,idec+1,klat) * factalt ) * (1.0-factlat) & 424 + ( krpd(i,ialt ,idec+1,klat+1) * (1.0-factalt) & 425 + krpd(i,ialt+1,idec+1,klat+1) * factalt ) * factlat 426 426 427 427 if ( factdec.lt.0. ) then 428 krpddecm1 = ( krpd(i dec ,i,ialt,klat) * (1.0-factalt) &429 + krpd(i dec ,i,ialt+1,klat) * factalt ) * (1.0-factlat) &430 + ( krpd(i dec ,i,ialt,klat+1) * (1.0-factalt) &431 + krpd(i dec ,i,ialt+1,klat+1) * factalt ) * factlat428 krpddecm1 = ( krpd(i,ialt ,idec ,klat) * (1.0-factalt) & 429 + krpd(i,ialt+1,idec ,klat) * factalt ) * (1.0-factlat) & 430 + ( krpd(i,ialt ,idec ,klat+1) * (1.0-factalt) & 431 + krpd(i,ialt+1,idec ,klat+1) * factalt ) * factlat 432 432 krate(l,i) = krpddecm1 * abs(factdec) + krpddec * ( 1.0 + factdec) 433 433 else if ( factdec.gt.0. ) then 434 krpddecp1 = ( krpd(i dec+2,i,ialt,klat) * (1.0-factalt) &435 + krpd(i dec+2,i,ialt+1,klat) * factalt ) * (1.0-factlat) &436 + ( krpd(i dec+2,i,ialt,klat+1) * (1.0-factalt) &437 + krpd(i dec+2,i,ialt+1,klat+1) * factalt ) * factlat434 krpddecp1 = ( krpd(i,ialt ,idec+2,klat) * (1.0-factalt) & 435 + krpd(i,ialt+1,idec+2,klat) * factalt ) * (1.0-factlat) & 436 + ( krpd(i,ialt ,idec+2,klat+1) * (1.0-factalt) & 437 + krpd(i,ialt+1,idec+2,klat+1) * factalt ) * factlat 438 438 krate(l,i) = krpddecp1 * factdec + krpddec * ( 1.0 - factdec) 439 439 else if ( factdec.eq.0. ) then
Note: See TracChangeset
for help on using the changeset viewer.