Changeset 2326 for trunk/LMDZ.TITAN/libf
- Timestamp:
- May 18, 2020, 4:33:35 PM (5 years ago)
- Location:
- trunk/LMDZ.TITAN/libf
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/chimtitan/chimie.c
r2099 r2326 11 11 { 12 12 int dep,i,j,k,l,lat; 13 double ai,ao, ei,eo,ki,ko,m,ti,to;13 double ai,ao,ar,ei,eo,er,ki,ko,kr,m,ti,to,tr,fc; 14 14 FILE *out; 15 static char reaction[NREAC+1][1 2][10]={15 static char reaction[NREAC+1][16][10]={ 16 16 #include VERCHIM 17 "", "", "", "", "", "","","","","","","" };17 "", "", "", "", "", "","","","","","","","","","","",}; 18 18 19 19 for( i = 0; i <= NC-1; i++ ) … … 38 38 { 39 39 out = fopen( "err.log", "a" ); 40 fprintf( out, "I cannot find %s \n", reaction[i][j]);40 fprintf( out, "I cannot find %s, for %i and %i\n", reaction[i][j],i,j ); 41 41 fclose( out ); 42 42 exit(0); … … 87 87 ei = strtod(reaction[i][10],NULL); 88 88 m = strtod(reaction[i][11],NULL); 89 ar = strtod(reaction[i][12], NULL); 90 tr = strtod(reaction[i][13], NULL); 91 er = strtod(reaction[i][14], NULL); 92 fc = strtod(reaction[i][15], NULL); 89 93 for( j = 0; j <= NLEV-1; j++ ) 90 94 { … … 106 110 } 107 111 } 112 else if( m == 4.0e0 ) /* Type 4 in Vuitton 2018 */ 113 { 114 ki = ai * pow( TEMP[j], ti ) * exp( ei / TEMP[j] ); 115 kr = ar * pow( TEMP[j], tr ) * exp( er / TEMP[j] ); 116 if ( kr > 0.99e0 * ko ) 117 { 118 KRATE[i][j] = ko; 119 } 120 else 121 { 122 KRATE[i][j] = fc * (ko-kr)*ki*NB[j] / ( ko - kr + ki*NB[j] ) + kr; 123 } 124 KRATE[i][j] = KRATE[i][j] * pow( NB[j], 2.0e0 ); 125 } 126 else if( m == 7.0e0 ) /* Tabulated values for H+C2H3 in Vuitton 2018 */ 127 { 128 // This is quick and dirty for now ( above 100 mbar asympotic at 2.44e-10 ) 129 // It's constant in the strato and below -> condensation so threshold at 100K 130 KRATE[i][0] = 6.46e-11; 131 if ( TEMP[j] > 100.0 ) 132 { 133 KRATE[i][j] = 2.44e-10; 134 } 135 else 136 { 137 KRATE[i][j] = 1.0e-10; // To fix this is really dirty 138 } 139 } 108 140 } 109 141 } -
trunk/LMDZ.TITAN/libf/chimtitan/disso.c
r1950 r2326 9 9 void disso_( double KRPD[][15][NLRT][RDISS+1], int *NLAT ) 10 10 { 11 static double sH2[62] = { /* incertain en dessous de 70 et en dessus de 85... */12 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,13 0.000e+00,0.000e+00,0.000e+00,0.000e+00,1.000e-18,5.000e-18,1.000e-17,14 9.000e-18,6.500e-18,1.000e-18,1.000e-19 };15 11 static double sCH4[62] = { 16 12 2.852e-19,7.816e-19,1.534e-18,2.069e-18,2.795e-18,4.088e-18,4.543e-18, … … 19 15 1.800e-17,1.920e-17,1.820e-17,1.840e-17,1.140e-17,2.656e-18,1.256e-19, 20 16 7.988e-22,1.366e-23,6.740e-24 }; 17 static double sCH3[62] = { /* Absorb really little so we can touch this without recomputing flux */ 18 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 19 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 20 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 21 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 22 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 23 0.000e+00,0.000e+00,0.000e+00,0.000e+00,5.000e-18,1.000e-17,5.000e-18, 24 3.700e-17,5.000e-18, 25 }; 21 26 static double sCH3CN[62] = { 22 27 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, … … 68 73 5.000e-18,2.900e-18,2.601e-18,1.037e-18,9.046e-19,6.565e-19,4.672e-19, 69 74 3.047e-19,1.579e-19,5.943e-20,2.261e-20 }; 75 static double sC3H3[62] = { /* Absorb really little so we can touch this without recomputing flux */ 76 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 77 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 78 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 79 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 80 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 81 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, 82 0.000e+00,0.000e+00,0.000e+00,6.000e-18,1.000e-17,9.700e-18,5.000e-18, 83 2.500e-18,1.800e-18,1.100e-18,8.000e-19,6.000e-19,5.000e-19,3.200e-19, 84 2.500e-19,1.800e-19,1.100e-19,5.000e-19,2.000e-18 }; 70 85 static double sC3H6[62] = { 71 86 0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00, … … 254 269 255 270 /* taux de photodissociations */ 256 271 /* JVO 19 - The photodissociation branching ratio below have been updated so make sure you use chimie_2019_43spc_vuitton file as input in titan.h */ 257 272 for( s = 0; s <= 14; s++ ) 258 273 for( j = 0; j <= NLRT-1; j++ ) 259 274 { 260 275 f = flux[j][s] * sol[l] / ( 9.5e0 * 9.5e0 ); /* !! # de reac de 0 a RDISS-1 !! */ 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 */ 276 277 /* Radicals*/ 278 if( (i > 200) && (i <= 240) ) 279 { 280 KRPD[lat][s][j][0] += sCH3[l] * f; /* CH3 -> 1CH2 + H */ 281 } 282 283 if( (i > 230) && (i <= 300) ) 284 { 285 KRPD[lat][s][j][13] += sC3H3[l] * f * 0.97; /* C3H3 -> C3H2 + H */ 286 } 287 288 /* Compounds */ 286 289 287 290 if( i != 125 ) /* Not Lyman alpha */ 288 291 { 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 */ 292 if ( i < 125 ) 293 { 294 KRPD[lat][s][j][ 1] += sCH4[l] * f * 0.17; /* CH4 -> 1CH2 + H2 */ 295 KRPD[lat][s][j][ 2] += sCH4[l] * f * 0.48; /* CH4 -> 3CH2 + H + H */ 296 KRPD[lat][s][j][ 3] += sCH4[l] * f * 0.09; /* CH4 -> CH + H2 + H */ 297 KRPD[lat][s][j][ 4] += sCH4[l] * f * 0.26; /* CH4 -> CH3 + H */ 298 } 299 else 300 { 301 KRPD[lat][s][j][ 1] += sCH4[l] * f * 0.50; /* CH4 -> 1CH2 + H2 */ 302 KRPD[lat][s][j][ 4] += sCH4[l] * f * 0.50; /* CH4 -> CH3 + H */ 303 } 297 304 } 298 305 else /* Lyman alpha */ 299 306 { 300 KRPD[lat][s][j][ 2] += sCH4[l] * f * 0.64; /* CH4 -> 1CH2 + H2 */ 307 KRPD[lat][s][j][ 1] += sCH4[l] * f * 0.48; /* CH4 -> 1CH2 + H2 */ 308 KRPD[lat][s][j][ 2] += sCH4[l] * f * 0.03; /* CH4 -> 3CH2 + H + H */ 301 309 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 } 313 if( i < 145 ) /* C4H10: a revoir avec Jackson & Lias, 1974... */ 314 { 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 */ 310 KRPD[lat][s][j][ 4] += sCH4[l] * f * 0.42; /* CH4 -> CH3 + H */ 311 } 312 313 if( i > 110 ) 314 { 315 KRPD[lat][s][j][ 5] += sC2H2[l] * f ; /* C2H2 -> C2H + H */ 316 } 317 if( i > 120 ) 318 { 319 KRPD[lat][s][j][ 6] += sC2H4[l] * f * 0.50; /* C2H4 -> C2H2 + H2 */ 320 KRPD[lat][s][j][ 7] += sC2H4[l] * f * 0.50; /* C2H4 -> C2H2 + H + H */ 321 KRPD[lat][s][j][17] += sCH3C2H[l] * f * 0.89; /* CH3CCH -> C3H3 + H */ 322 KRPD[lat][s][j][18] += sCH3C2H[l] * f * 0.01; /* CH3CCH -> C3H2 + H2 */ 323 KRPD[lat][s][j][19] += sCH3C2H[l] * f * 0.10; /* CH3CCH -> C2H2 + 1CH2 */ 324 } 325 if( i > 220 ) 326 { 327 KRPD[lat][s][j][14] += sCH2CCH2[l] * f * 0.90; /* CH2CCH2 -> C3H3 + H */ 328 KRPD[lat][s][j][15] += sCH2CCH2[l] * f * 0.10; /* CH2CCH2 -> C3H2 + H2 */ 329 } 330 else if( i > 155 ) 331 { 332 KRPD[lat][s][j][14] += sCH2CCH2[l] * f * 0.89; /* CH2CCH2 -> C3H3 + H */ 333 KRPD[lat][s][j][15] += sCH2CCH2[l] * f * 0.11; /* CH2CCH2 -> C3H2 + H2 */ 334 KRPD[lat][s][j][16] += sCH2CCH2[l] * f * 0.01; /* CH2CCH2 -> C2H2 + 1CH2 */ 335 } 336 else if( i > 125 ) 337 { 338 KRPD[lat][s][j][14] += sCH2CCH2[l] * f * 0.70; /* CH2CCH2 -> C3H3 + H */ 339 KRPD[lat][s][j][15] += sCH2CCH2[l] * f * 0.11; /* CH2CCH2 -> C3H2 + H2 */ 340 KRPD[lat][s][j][16] += sCH2CCH2[l] * f * 0.19; /* CH2CCH2 -> C2H2 + 1CH2 */ 341 } 342 if( i > 140 ) 343 { 344 KRPD[lat][s][j][ 8] += sC2H6[l] * f * 0.56; /* C2H6 -> C2H4 + H2 */ 345 KRPD[lat][s][j][ 9] += sC2H6[l] * f * 0.13; /* C2H6 -> C2H4 + H + H */ 346 KRPD[lat][s][j][10] += sC2H6[l] * f * 0.29; /* C2H6 -> C2H2 + H2 + H2 */ 347 KRPD[lat][s][j][11] += sC2H6[l] * f * 0.02; /* C2H6 -> CH4 + 1CH2 */ 348 KRPD[lat][s][j][20] += sC3H6[l] * f * 0.10; /* C3H6 -> CH2CCH2 + H + H */ 349 KRPD[lat][s][j][21] += sC3H6[l] * f * 0.07; /* C3H6 -> CH3CCH + H + H */ 350 KRPD[lat][s][j][22] += sC3H6[l] * f * 0.03; /* C3H6 -> C2H4 + CH2 */ 351 KRPD[lat][s][j][23] += sC3H6[l] * f * 0.35; /* C3H6 -> C2H3 + CH3 */ 352 KRPD[lat][s][j][24] += sC3H6[l] * f * 0.05; /* C3H6 -> C2H2 + CH4 */ 353 KRPD[lat][s][j][25] += sC3H6[l] * f * 0.40; /* C3H6 -> C3H5 + H */ 354 KRPD[lat][s][j][26] += sC3H8[l] * f * 0.94; /* C3H8 -> C3H6 + H2 */ 355 KRPD[lat][s][j][29] += sC3H8[l] * f * 0.06; /* C3H8 -> C2H4 + CH4 */ 356 if ( i <= 160 ) 357 { 358 KRPD[lat][s][j][41] += sC4H10[l] * f * 0.01; /* C4H10 -> C3H6 + CH4 */ 359 KRPD[lat][s][j][42] += sC4H10[l] * f * 0.04; /* C4H10 -> C3H6 + CH3 + H */ 360 KRPD[lat][s][j][43] += sC4H10[l] * f * 0.12; /* C4H10 -> C2H4 + C2H6 */ 361 KRPD[lat][s][j][44] += sC4H10[l] * f * 0.03; /* C4H10 -> C2H4 + CH3 + CH3 */ 362 KRPD[lat][s][j][45] += sC4H10[l] * f * 0.10; /* C4H10 -> C2H5 + C2H5 */ 363 KRPD[lat][s][j][46] += sC4H10[l] * f * 0.70; /* C4H10 -> prod(C4H8) + H2 */ 364 } 323 365 } 324 366 else 325 367 { 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 } 335 if( i < 150 ) 336 { 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 } 342 else if( i < 205 ) 343 { 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 } 349 else if( i < 245 ) 350 { 351 KRPD[lat][s][j][50] += sHC3N[l] * f * 0.09; /* HC3N -> H + C3N */ 352 } 353 if( i < 165 ) 354 { 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 } 360 else if( i < 205 ) 361 { 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 } 366 else 367 { 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 */ 368 if( i > 110 ) 369 { 370 KRPD[lat][s][j][ 8] += sC2H6[l] * f * 0.14; /* C2H6 -> C2H4 + H2 */ 371 KRPD[lat][s][j][ 9] += sC2H6[l] * f * 0.31; /* C2H6 -> C2H4 + H + H */ 372 KRPD[lat][s][j][10] += sC2H6[l] * f * 0.27; /* C2H6 -> C2H2 + H2 + H2 */ 373 KRPD[lat][s][j][11] += sC2H6[l] * f * 0.22; /* C2H6 -> CH4 + 1CH2 */ 374 KRPD[lat][s][j][12] += sC2H6[l] * f * 0.06; /* C2H6 -> CH3 + CH3 */ 375 } 376 if( i > 115 ) 377 { 378 KRPD[lat][s][j][26] += sC3H8[l] * f * 0.33; /* C3H8 -> C3H6 + H2 */ 379 KRPD[lat][s][j][27] += sC3H8[l] * f * 0.09; /* C3H8 -> C2H6 + 1CH2 */ 380 KRPD[lat][s][j][28] += sC3H8[l] * f * 0.38; /* C3H8 -> C2H5 + CH3 */ 381 KRPD[lat][s][j][29] += sC3H8[l] * f * 0.20; /* C3H8 -> C2H4 + CH4 */ 382 KRPD[lat][s][j][41] += sC4H10[l] * f * 0.05; /* C4H10 -> C3H6 + CH4 */ 383 KRPD[lat][s][j][42] += sC4H10[l] * f * 0.10; /* C4H10 -> C3H6 + CH3 + H */ 384 KRPD[lat][s][j][43] += sC4H10[l] * f * 0.20; /* C4H10 -> C2H4 + C2H6 */ 385 KRPD[lat][s][j][44] += sC4H10[l] * f * 0.10; /* C4H10 -> C2H4 + CH3 + CH3 */ 386 KRPD[lat][s][j][45] += sC4H10[l] * f * 0.15; /* C4H10 -> C2H5 + C2H5 */ 387 KRPD[lat][s][j][46] += sC4H10[l] * f * 0.40; /* C4H10 -> prod(C4H8) + H2 */ 388 } 389 if( i > 125 ) 390 { 391 KRPD[lat][s][j][20] += sC3H6[l] * f * 0.21; /* C3H6 -> CH2CCH2 + H + H */ 392 KRPD[lat][s][j][21] += sC3H6[l] * f * 0.14; /* C3H6 -> CH3CCH + H + H */ 393 KRPD[lat][s][j][22] += sC3H6[l] * f * 0.05; /* C3H6 -> C2H4 + CH2 */ 394 KRPD[lat][s][j][23] += sC3H6[l] * f * 0.25; /* C3H6 -> C2H3 + CH3 */ 395 KRPD[lat][s][j][24] += sC3H6[l] * f * 0.05; /* C3H6 -> C2H2 + CH4 */ 396 KRPD[lat][s][j][25] += sC3H6[l] * f * 0.30; /* C3H6 -> C3H5 + H */ 397 } 398 } 399 if ( i > 205 ) 400 { 401 KRPD[lat][s][j][30] += sC4H2[l] * f * 1.00; /* C4H2 -> C4H + H */ 402 } 403 else if ( i > 180 ) 404 { 405 KRPD[lat][s][j][30] += sC4H2[l] * f * 0.88; /* C4H2 -> C4H + H */ 406 KRPD[lat][s][j][32] += sC4H2[l] * f * 0.12; /* C4H2 -> C2H2 + C2 */ 407 } 408 else if ( i > 150 ) 409 { 410 KRPD[lat][s][j][30] += sC4H2[l] * f * 0.80; /* C4H2 -> C4H + H */ 411 KRPD[lat][s][j][31] += sC4H2[l] * f * 0.01; /* C4H2 -> C2H + C2H */ 412 KRPD[lat][s][j][32] += sC4H2[l] * f * 0.16; /* C4H2 -> C2H2 + C2 */ 413 } 414 else if ( i > 120 ) 415 { 416 KRPD[lat][s][j][30] += sC4H2[l] * f * 0.75; /* C4H2 -> C4H + H */ 417 KRPD[lat][s][j][31] += sC4H2[l] * f * 0.05; /* C4H2 -> C2H + C2H */ 418 KRPD[lat][s][j][32] += sC4H2[l] * f * 0.06; /* C4H2 -> C2H2 + C2 */ 419 } 420 if ( i > 130 ) 421 { 422 KRPD[lat][s][j][33] += sC4H4[l] * f * 0.07; /* C4H4 -> C4H2 + H2 */ 423 KRPD[lat][s][j][34] += sC4H4[l] * f * 0.66; /* C4H4 -> C2H2 + C2H2 */ 424 KRPD[lat][s][j][35] += sC4H4[l] * f * 0.27; /* C4H4 -> C4H3 + H */ 425 } 426 if ( i > 135 ) 427 { 428 KRPD[lat][s][j][36] += sC4H6[l] * f * 0.02; /* C4H6 -> C4H4 + H2 */ 429 KRPD[lat][s][j][37] += sC4H6[l] * f * 0.20; /* C4H6 -> C2H4 + C2H2 */ 430 KRPD[lat][s][j][38] += sC4H6[l] * f * 0.50; /* C4H6 -> CH3 + C3H3 */ 431 KRPD[lat][s][j][39] += sC4H6[l] * f * 0.20; /* C4H6 -> C4H5 + H */ 432 KRPD[lat][s][j][40] += sC4H6[l] * f * 0.08; /* C4H6 -> C2H3 + C2H3 */ 433 KRPD[lat][s][j][47] += sC6H6[l] * f; /* C6H6 -> C6H5 + H */ 434 } 435 436 KRPD[lat][s][j][48] += sN2[l] * f; /* N2 -> 2N ( regroup N2D and N4S ) */ 437 438 if( i > 190 ) 439 { 440 KRPD[lat][s][j][50] += sHC3N[l] * f; /* HC3N -> C2H + CN */ 441 } 442 else if( i > 105 ) 443 { 444 KRPD[lat][s][j][50] += sHC3N[l] * f * 0.43; /* HC3N -> C2H + CN */ 445 KRPD[lat][s][j][51] += sHC3N[l] * f * 0.57; /* HC3N -> C3N + H */ 446 } 447 if( i > 100 ) 448 { 449 KRPD[lat][s][j][49] += sHCN[l] * f; /* HCN -> CN + H */ 450 KRPD[lat][s][j][52] += sC2N2[l] * f; /* NCCN -> CN + CN */ 451 KRPD[lat][s][j][53] += sCH3CN[l] * f; /* CH3CN -> CH3 + CN */ 452 } 453 if( i > 105 ) 454 { 455 KRPD[lat][s][j][54] += sC2N2[l] * f ; /* C4N2 -> C3N + CN !! should be sC4N2[l] !! */ 456 } 371 457 } 372 458 } -
trunk/LMDZ.TITAN/libf/chimtitan/titan.h
r1965 r2326 9 9 #define NLEV (int)(133) /* Nbre de niv verticaux -> Need to be coherent with the vertical grid used !! */ 10 10 #define NLD (int)(40) /* Nbre de niv verticaux faits sans diff -> Need to be coherent with the vertical grid used !! */ 11 //#define NLD (int)(0) /* -> This is for 1D, diffusion on all column */ 11 12 #define NLRT (int)(650) /* Nbre de niv verticaux dans table fmoy - aussi dans common_mod */ 12 13 … … 17 18 18 19 /* DEPEND DE LA VERSION CHIMIE: */ 19 #define VERCHIM "chimie_simpnit_051006_bis" 20 #define NREAC (int)(377) /* nombre de reactions - aussi dans common_mod */ 21 #define RDISS (int)(54) /* nombre de photodiss - aussi dans common_mod */ 22 #define NC (int)(44) /* nb de composes - aussi dans common_mod */ 20 //#define VERCHIM "chimie_simpnit_051006_bis" -> If you want to use this one make sure you use an old version of disso.c 21 //#define NREAC (int)(377) /* nombre de reactions - aussi dans common_mod */ 22 //#define RDISS (int)(54) /* nombre de photodiss - aussi dans common_mod */ 23 //#define NC (int)(44) /* nb de composes - aussi dans common_mod */ 24 //#define ST (int)(NC) /* nb de composes inverses */ 25 //#define NHC (int)(32) /* nb hydrocarbons */ 26 #define VERCHIM "chimie_2019_43spc_vuitton" 27 #define NREAC (int)(330) /* nombre de reactions - aussi dans common_mod */ 28 #define RDISS (int)(55) /* nombre de photodiss - aussi dans common_mod */ 29 #define NC (int)(43) /* nb de composes - aussi dans common_mod */ 23 30 #define ST (int)(NC) /* nb de composes inverses */ 24 #define NHC (int)(3 2) /* nb hydrocarbons */31 #define NHC (int)(31) /* nb hydrocarbons */ 25 32 26 33 #define THETA (double)(0.501) -
trunk/LMDZ.TITAN/libf/phytitan/calc_ysat.F90
r1966 r2326 10 10 ! S. Lebonnois 11 11 ! -> inicondens.F in old Titan, with T,P in planetary average 12 ! J. Vatant d'Ollone (2017) 13 ! -> Adapt to new physics, move to F90 and compute every grid point 12 ! J. Vatant d'Ollone 13 ! -> 2017 : Adapt to new physics, move to F90 and compute every grid point 14 ! -> 2018 : Update saturation profiles from recent litterature ( Vuitton 2019 ) 14 15 ! ============================================================================== 15 16 … … 62 63 else if(trim(cnames(ic)).eq."C2H2") then 63 64 64 ysat(:,:,ic) = 10.0**(6.09748e0-1644.1e0/temp(:,:)+7.42346e0 & 65 * alog10(1.0e3/temp(:,:)) ) / press(:,:)*1013.25e0/760.0 65 ! ysat(:,:,ic) = 10.0**(6.09748e0-1644.1e0/temp(:,:)+7.42346e0 & 66 ! * alog10(1.0e3/temp(:,:)) ) / press(:,:)*1013.25e0/760.0 67 68 ysat(:,:,ic) = 1.E5 * exp(13.4-2536./temp(:,:)) / press(:,:) ! Fray and Schmidt (2009) 66 69 67 70 else if(trim(cnames(ic)).eq."C2H4") then 68 71 69 where (temp(:,:).lt.89.0) 72 where (temp(:,:).lt.89.0) ! not far from Fray and Schmidt, 2009 70 73 ysat(:,:,ic) = 10.0**(1.5477e0 + (1.0e0/temp(:,:) - 0.011e0) & 71 74 * (16537.0e0*(1.0e0/temp(:,:) - 0.011e0) - 1038.1e0)) & 72 75 / press(:,:) * 1.01325e0 / 760.0 73 elsewhere (temp(:,:).lt.104.0) 76 elsewhere (temp(:,:).lt.104.0) ! not far from Fray and Schmidt, 2009 74 77 ysat(:,:,ic) = 10.0**(8.724e0 - 901.6e0/(temp(:,:) - 2.555e0) ) & 75 78 / press(:,:) * 1013.25e0 / 760.0 … … 85 88 86 89 where (temp(:,:).lt.90.) 87 ysat(:,:,ic) = 10.0**(10.01e0-1085.0e0/(temp(:,:)-0.561e0) ) & 88 / press(:,:) * 1013.25e0 / 760.0e0 90 ! ysat(:,:,ic) = 10.0**(10.01e0-1085.0e0/(temp(:,:)-0.561e0) ) & 91 ! / press(:,:) * 1013.25e0 / 760.0e0 92 ysat(:,:,ic) = 1.E5 * exp ( 15.11 - 2207./temp(:,:) - 24110./(temp(:,:)**2) & 93 + 7.744E5/(temp(:,:)**3) - 1.161E7/(temp(:,:)**4) & 94 + 6.763E7/(temp(:,:)**5) ) / press(:,:) ! Fray and Schmidt (2009) 89 95 elsewhere 90 96 ysat(:,:,ic) = 10.0**(5.9366e0 - 1086.17e0/temp(:,:) + 3.83464e0 & … … 135 141 else if(trim(cnames(ic)).eq."AC6H6") then 136 142 137 x = 1.0e0 - temp(:,:) / 562.2e0138 ysat(:,:,ic)= 48.9e3 * exp( ( 1.33213 * x**1.5 - 6.98273 * x &139 - x**3 * (2.62863 + 3.33399 * x**3) ) * 562.2e0/temp(:,:) ) / press(:,:)143 !x = 1.0e0 - temp(:,:) / 562.2e0 144 !ysat(:,:,ic)= 48.9e3 * exp( ( 1.33213 * x**1.5 - 6.98273 * x & 145 ! - x**3 * (2.62863 + 3.33399 * x**3) ) * 562.2e0/temp(:,:) ) / press(:,:) 140 146 147 ysat(:,:,ic) = 1.E5 * exp (17.35-5663./temp(:,:)) / press(:,:) ! Fray and Schmidt (2009) 148 141 149 else if(trim(cnames(ic)).eq."HCN") then 142 150 143 ysat(:,:,ic)= 10.0**(8.6165e0 - 1516.5e0/(temp(:,:) - 26.2e0) ) / press(:,:) * 1013.25e0 / 760.0e0 151 !ysat(:,:,ic)= 10.0**(8.6165e0 - 1516.5e0/(temp(:,:) - 26.2e0) ) / press(:,:) * 1013.25e0 / 760.0e0 152 153 ysat(:,:,ic) = 1.E5 * exp ( 13.93 - 3624./temp(:,:) - 1.325E5/(temp(:,:)**2) & 154 + 6.314E6/(temp(:,:)**3) - 1.128E8/(temp(:,:)**4) ) / press(:,:) ! Fray and Schmidt (2009) 144 155 145 156 else if(trim(cnames(ic)).eq."CH3CN") then -
trunk/LMDZ.TITAN/libf/phytitan/calchim.F90
r2099 r2326 165 165 PRINT*, 'CHIMIE, premier appel' 166 166 167 call check(nlaykim_tot,klev-15,nlrt_kim,nkim) 167 if (ngrid .eq. 1) then ! if 1D no dynamic mixing, we set the kedd in all column 168 call check(nlaykim_tot,0,nlrt_kim,nkim) 169 else 170 call check(nlaykim_tot,klev-15,nlrt_kim,nkim) 171 endif 168 172 169 173 ALLOCATE(r1d(131)) -
trunk/LMDZ.TITAN/libf/phytitan/chem_settings.F90
r1943 r2326 13 13 ! file but not composition fields. The presence of the 14 14 ! 1st field is tested and then we assume there's either 15 ! no one or all of the 44chemistry scheme species.15 ! no one or all of the nkim chemistry scheme species. 16 16 ! 17 17 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 97 97 98 98 ! Load others fields if first one found only as we assume we can't do uncomplete chemistry 99 ! NB : We assume a given order of the 44chemistry species !!100 ! ( H=1, H2=2 ..., C4N2=44) -> cf comchem_h99 ! NB : We assume a given order of the chemistry species !! 100 ! ( H=1, H2=2 ...,) -> cf comchem_h 101 101 102 102 DO iq=2,nkim -
trunk/LMDZ.TITAN/libf/phytitan/comchem_h.F90
r2099 r2326 31 31 32 32 !! Hard-coded number of chemical species for Titan chemistry 33 INTEGER, PARAMETER :: nkim = 4 433 INTEGER, PARAMETER :: nkim = 43 34 34 35 35 !! Hard-coded chemical species for Titan chemistry … … 38 38 "CH4 ", "C2 ", "C2H ", "C2H2 ", "C2H3 ", "C2H4 ", & 39 39 "C2H5 ", "C2H6 ", "C3H3 ", "C3H5 ", "C3H6 ", "C3H7 ", & 40 "C4H ", "C4H3 ", "C4H4 ", "C 4H2s ", "CH2CCH2 ", "CH3CCH", &41 "C 3H8 ", "C4H2 ", "C4H6 ", "C4H10 ", "AC6H6 ", "C3H2", &42 " C4H5 ", "AC6H5 ", "N2 ", "N4S ", "CN ", "HCN", &43 " H2CN ", "CHCN ", "CH2CN ", "CH3CN ", "C3N ", "HC3N ", &44 " NCCN ", "C4N2 "/)40 "C4H ", "C4H3 ", "C4H4 ", "CH2CCH2 ", "CH3CCH ", "C3H8 ", & 41 "C4H2 ", "C4H6 ", "C4H10 ", "AC6H6 ", "C3H2 ", "C4H5 ", & 42 "AC6H5 ", "N2 ", "N4S ", "CN ", "HCN ", "H2CN ", & 43 "CHCN ", "CH2CN ", "CH3CN ", "C3N ", "HC3N ", "NCCN ", & 44 "C4N2 "/) 45 45 !! Hard-coded chemical species for Titan chemistry + "HV" specie for the photochem module. 46 46 CHARACTER(len=10), DIMENSION(nkim+1) :: nomqy_c ! Initialized in calchim with null terminator … … 48 48 REAL, DIMENSION(nkim), PARAMETER :: cmmol = (/ & 49 49 1.01 , 2.0158, 13.02, 14.03, 14.03, 15.03, 16.04 , 24.02, 25.03, 26.04 , 27.05 , & 50 28.05 , 29.06 , 30.07, 39.06, 41.07, 42.08, 43.09 , 49.05, 51.07, 52.08 , 50.06, &51 40.07 , 40.07 , 44.11, 50.06, 54.09, 58.13, 78.1136, 38.05, 53.07, 77.1136, 28.0134, &52 14.01 ,26.02 , 27.04, 28.05, 39.05, 40.04, 41.05 , 50.04, 51.05, 52.04 , 76.1 /)50 28.05 , 29.06 , 30.07, 39.06, 41.07, 42.08, 43.09 , 49.05, 51.07, 52.08 , 40.07 , & 51 40.07 , 44.11, 50.06, 54.09, 58.13, 78.1136, 38.05, 53.07, 77.1136, 28.0134, 14.01 , & 52 26.02 , 27.04, 28.05, 39.05, 40.04, 41.05 , 50.04, 51.05, 52.04 , 76.1 /) 53 53 54 54 !! Hard-coded molar fraction of surface methane … … 86 86 87 87 ! These 3 parameters as well as nkim above, MUST match titan.h in chimtitan !! 88 INTEGER, PARAMETER :: nd_kim = 5 4! Number of photodissociations89 INTEGER, PARAMETER :: nr_kim = 3 77! Number of reactions in chemistry scheme88 INTEGER, PARAMETER :: nd_kim = 55 ! Number of photodissociations 89 INTEGER, PARAMETER :: nr_kim = 330 ! Number of reactions in chemistry scheme 90 90 INTEGER, PARAMETER :: nlrt_kim = 650 ! For the UV rad. transf., 650 levels of 2 km 91 91
Note: See TracChangeset
for help on using the changeset viewer.