-
Notifications
You must be signed in to change notification settings - Fork 0
/
cacm3_Rates.f90
2610 lines (2097 loc) · 85.9 KB
/
cacm3_Rates.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! The Reaction Rates File
!
! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
! (http://www.cs.vt.edu/~asandu/Software/KPP)
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
! (C) 1995-1997, V. Damian & A. Sandu, CGRER, Univ. Iowa
! (C) 1997-2005, A. Sandu, Michigan Tech, Virginia Tech
! With important contributions from:
! M. Damian, Villanova University, USA
! R. Sander, Max-Planck Institute for Chemistry, Mainz, Germany
!
! File : cacm3_Rates.f90
! Time : Thu Jan 23 11:51:16 2020
! Working directory : /home/dandanwe/boxmox/tmp_cacm3_4449_BOXMOX
! Equation file : cacm3.kpp
! Output root filename : cacm3
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MODULE cacm3_Rates
USE cacm3_Parameters
USE cacm3_Precision, ONLY:dp
!! USE cacm3_Global
! USE cacm3_Util
IMPLICIT NONE
CONTAINS
! Begin Rate Law Functions from KPP_HOME/util/UserRateLaws
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! User-defined Rate Law functions
! Note: the default argument type for rate laws, as read from the equations file, is single precision
! but all the internal calculations are performed in double precision
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!~~~> Arrhenius
! REAL(kind=dp) FUNCTION ARR( A0,B0,C0 )
! REAL A0,B0,C0
! ARR = DBLE(A0) * EXP(-DBLE(B0)/TEMP) * (TEMP/300.0_dp)**DBLE(C0)
! END FUNCTION ARR
! Arrhenius (added by psaide 15-07-2009)
REAL(kind=dp) FUNCTION ARR( A0,B0,C0, TEMP )
REAL(kind=dp) :: TEMP
REAL(kind=dp) A0,B0,C0
ARR = A0 * EXP( -B0 /TEMP ) * (TEMP/300._dp)**C0
END FUNCTION ARR
!~~~> Simplified Arrhenius, with two arguments
!~~~> Note: The argument B0 has a changed sign when compared to ARR
! REAL(kind=dp) FUNCTION ARR2( A0,B0 )
! REAL A0,B0
! ARR2 = DBLE(A0) * EXP( DBLE(B0)/TEMP )
! END FUNCTION ARR2
! CK 20140313 WRF-chem uses different kind of Arrhenius function
! with TEMP as argument...
REAL(kind=dp) FUNCTION ARR2( A0,B0, TEMP )
REAL(kind=dp) :: TEMP
REAL(kind=dp) A0,B0
ARR2 = A0 * EXP( -B0 /TEMP )
END FUNCTION ARR2
! CK 20140313 end
! REAL(kind=dp) FUNCTION EP2(A0,C0,A2,C2,A3,C3)
! REAL A0,C0,A2,C2,A3,C3
! REAL(kind=dp) K0,K2,K3
! K0 = DBLE(A0) * EXP(-DBLE(C0)/TEMP)
! K2 = DBLE(A2) * EXP(-DBLE(C2)/TEMP)
! K3 = DBLE(A3) * EXP(-DBLE(C3)/TEMP)
! K3 = K3*CFACTOR*1.0E6_dp
! EP2 = K0 + K3/(1.0_dp+K3/K2 )
! END FUNCTION EP2
! REAL(kind=dp) FUNCTION EP3(A1,C1,A2,C2)
! REAL A1, C1, A2, C2
! REAL(kind=dp) K1, K2
! K1 = DBLE(A1) * EXP(-DBLE(C1)/TEMP)
! K2 = DBLE(A2) * EXP(-DBLE(C2)/TEMP)
! EP3 = K1 + K2*(1.0E6_dp*CFACTOR)
! END FUNCTION EP3
! EP2 (added by psaide 22-07-2009)
REAL(kind=dp) FUNCTION EP2( A0,C0,A2,C2,A3,C3,TEMP,cair)
REAL(kind=dp) :: TEMP
REAL(kind=dp) :: cair
REAL(kind=dp) A0,C0,A2,C2,A3,C3
REAL(kind=dp) K0,K2,K3
K0 = A0 * EXP(-C0 /TEMP)
K2 = A2 * EXP(-C2 /TEMP)
K3 = A3 * EXP(-C3 /TEMP)
! K3 = K3 * 2.45E13_dp * 1.0E6_dp
K3 = K3 * cair
EP2 = K0 + K3/(1._dp+K3/K2 )
END FUNCTION EP2
! EP3 (added by psaide 15-07-2009)
REAL(kind=dp) FUNCTION EP3(A1,C1,A2,C2,TEMP,cair)
REAL(kind=dp) :: TEMP
REAL(kind=dp) :: cair
REAL(kind=dp) A1, C1, A2, C2
REAL(kind=dp) K1, K2
K1 = A1 * EXP(-C1 /TEMP)
K2 = A2 * EXP(-C2 /TEMP)
! EP3 = K1 + K2*(1.0E6_dp * 2.45E13_dp)
EP3 = K1 + K2*cair
END FUNCTION EP3
! REAL(kind=dp) FUNCTION FALL ( A0,B0,C0,A1,B1,C1,CF)
! REAL A0,B0,C0,A1,B1,C1,CF
! REAL(kind=dp) K0, K1
! K0 = DBLE(A0) * EXP(-DBLE(B0)/TEMP)* (TEMP/300.0_dp)**DBLE(C0)
! K1 = DBLE(A1) * EXP(-DBLE(B1)/TEMP)* (TEMP/300.0_dp)**DBLE(C1)
! K0 = K0*CFACTOR*1.0E6_dp
! K1 = K0/K1
! FALL = (K0/(1.0_dp+K1))* &
! DBLE(CF)**(1.0_dp/(1.0_dp+(LOG10(K1))**2))
! END FUNCTION FALL
! FALL (added by psaide 15-07-2009)
REAL(kind=dp) FUNCTION FALL( A0,B0,C0,A1,B1,C1,CF,TEMP,cair)
INTRINSIC LOG10
REAL(kind=dp) :: TEMP
REAL(kind=dp) :: cair
REAL(kind=dp) A0,B0,C0,A1,B1,C1,CF
REAL(kind=dp) K0, K1
K0 = A0 * EXP(-B0 /TEMP)* (TEMP/300._dp)**C0
K1 = A1 * EXP(-B1 /TEMP)* (TEMP/300._dp)**C1
! K0 = K0 * 2.45E13_dp * 1.0E6_dp
K0 = K0 * cair
K1 = K0/K1
FALL = (K0/(1._dp+K1))*CF**(1._dp/(1._dp+(LOG10(K1))**2))
END FUNCTION FALL
! FALL2 (added by psaide 28-10-2009)
REAL(KIND=dp) FUNCTION F2( A0,B0,C0,A1,B1,C1,CF,CN,TEMP,cair)
INTRINSIC LOG10
REAL(KIND=dp) :: TEMP
REAL(KIND=dp) :: cair
REAL(KIND=dp) A0,B0,C0,A1,B1,C1,CF,CN
REAL(KIND=dp) K0, K1
K0 = A0 * EXP(-B0 /TEMP)* (TEMP/300._dp)**C0
K1 = A1 * EXP(-B1 /TEMP)* (TEMP/300._dp)**C1
! K0 = K0 * 2.45E13_dp * 1.0E6_dp
K0 = K0 * cair
K1 = K0/K1
F2 = (K0/(1._dp+K1))*CF**(1._dp/(1._dp+(LOG10(K1)/CN)**2))
END FUNCTION F2
!---------------------------------------------------------------------------
ELEMENTAL REAL(kind=dp) FUNCTION k_3rd(temp,cair,k0_300K,n,kinf_300K,m,fc)
INTRINSIC LOG10
REAL(kind=dp), INTENT(IN) :: temp ! temperature [K]
REAL(kind=dp), INTENT(IN) :: cair ! air concentration [molecules/cm3]
REAL, INTENT(IN) :: k0_300K ! low pressure limit at 300 K
REAL, INTENT(IN) :: n ! exponent for low pressure limit
REAL, INTENT(IN) :: kinf_300K ! high pressure limit at 300 K
REAL, INTENT(IN) :: m ! exponent for high pressure limit
REAL, INTENT(IN) :: fc ! broadening factor (usually fc=0.6)
REAL(kind=dp) :: zt_help, k0_T, kinf_T, k_ratio
zt_help = 300._dp/temp
k0_T = k0_300K * zt_help**(n) * cair ! k_0 at current T
kinf_T = kinf_300K * zt_help**(m) ! k_inf at current T
k_ratio = k0_T/kinf_T
k_3rd = k0_T/(1._dp+k_ratio)*fc**(1._dp/(1._dp+LOG10(k_ratio)**2))
END FUNCTION k_3rd
!---------------------------------------------------------------------------
ELEMENTAL REAL(kind=dp) FUNCTION k_arr (k_298,tdep,temp)
! Arrhenius function
REAL, INTENT(IN) :: k_298 ! k at T = 298.15K
REAL, INTENT(IN) :: tdep ! temperature dependence
REAL(kind=dp), INTENT(IN) :: temp ! temperature
INTRINSIC EXP
k_arr = k_298 * EXP(tdep*(1._dp/temp-3.3540E-3_dp)) ! 1/298.15=3.3540e-3
END FUNCTION k_arr
! CK 20140313 in the following some more rate functions needed by
! WRF-chem packages
!------------------------------------
! Troe reactions (as in Stockwell et al, 1997)
REAL(kind=dp) FUNCTION TROE(k0_300K,n,kinf_300K,m,temp,cair)
INTRINSIC LOG10
REAL(kind=dp), INTENT(IN) :: temp ! temperature [K]
REAL(kind=dp), INTENT(IN) :: cair ! air concentration [molecules/cm3]
REAL(kind=dp), INTENT(IN) :: k0_300K ! low pressure limit at 300 K
REAL(kind=dp), INTENT(IN) :: n ! exponent for low pressure limit
REAL(kind=dp), INTENT(IN) :: kinf_300K ! high pressure limit at 300 K
REAL(kind=dp), INTENT(IN) :: m ! exponent for high pressure limit
REAL(kind=dp) :: zt_help, k0_T, kinf_T, k_ratio
zt_help = 300._dp/temp
k0_T = k0_300K * zt_help**(n) * cair ! k_0 at current T
kinf_T = kinf_300K * zt_help**(m) ! k_inf at current T
k_ratio = k0_T/kinf_T
TROE = k0_T/(1._dp+k_ratio)*0.6_dp**(1._dp/(1._dp+LOG10(k_ratio)**2))
END FUNCTION TROE
!-------------------------------------------
! Troe equilibrium reactions (as in Stockwell et al, 1997)
REAL(kind=dp) FUNCTION TROEE(A, B, k0_300K,n,kinf_300K,m,temp,cair)
INTRINSIC LOG10
REAL(kind=dp), INTENT(IN) :: temp ! temperature [K]
REAL(kind=dp), INTENT(IN) :: cair ! air concentration [molecules/cm3]
REAL(kind=dp), INTENT(IN) :: k0_300K ! low pressure limit at 300 K
REAL(kind=dp), INTENT(IN) :: n ! exponent for low pressure limit
REAL(kind=dp), INTENT(IN) :: kinf_300K ! high pressure limit at 300 K
REAL(kind=dp), INTENT(IN) :: m ! exponent for high pressure limit
REAL(kind=dp), INTENT(IN) :: A, B
REAL(kind=dp) :: zt_help, k0_T, kinf_T, k_ratio, troe
zt_help = 300._dp/temp
k0_T = k0_300K * zt_help**(n) * cair ! k_0 at current T
kinf_T = kinf_300K * zt_help**(m) ! k_inf at current T
k_ratio = k0_T/kinf_T
troe = k0_T/(1._dp+k_ratio)*0.6_dp**(1._dp/(1._dp+LOG10(k_ratio)**2))
TROEE = A * EXP( - B / temp) * troe
END FUNCTION TROEE
!------------------------
! k=T^2 C exp (-D/T) reactions
REAL(kind=dp) FUNCTION THERMAL_T2(c, d ,temp)
REAL(kind=dp), INTENT(IN) :: temp ! temperature [K]
REAL(kind=dp), INTENT(IN) :: c, d
THERMAL_T2= temp**2._dp * c * EXP(- d / temp)
END FUNCTION THERMAL_T2
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! End of User-defined Rate Law functions
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! End Rate Law Functions from KPP_HOME/util/UserRateLaws
! Begin INLINED Rate Law Functions
REAL*8 FUNCTION AR(A0, B0, C0,TEMP)
use cacm3_Parameters
USE cacm3_Precision, ONLY:dp
! use cacm3_Global
real A0, B0, C0
REAL(KIND=dp) TEMP
AR = DBLE(A0)*(TEMP**DBLE(B0))*EXP(DBLE(C0)/TEMP)*4.4E+17/TEMP/60.
RETURN
END
REAL*8 FUNCTION AR2(A0, B0, C0, D0, E0, TEMP)
use cacm3_Parameters
! use cacm3_Global
REAL(KIND=dp) TEMP
REAL A0, B0, C0, D0, E0
REAL*8 KO, MO, KINF
KO = DBLE(A0)*(300./TEMP)**DBLE(B0)
MO = 7.33853E+21/TEMP
KINF = DBLE(C0)*(300./TEMP)**DBLE(D0)
AR2 = (4.4E+17/TEMP/60.)*KO*MO/(1.0+(KO*MO/KINF)) &
& *DBLE(E0)**(1.0 + &
& (LOG10(KO*MO/KINF))**2)**(-1)
RETURN
END
REAL*8 FUNCTION K10(TEMP)
use cacm3_Parameters
! use cacm3_Global
REAL*8 KO, KINF, MO
REAL(KIND=dp) TEMP
MO = 7.33853E+21/TEMP
KO = 1.0E-3*(300.0/TEMP)**3.5*EXP(-11001.5/TEMP)
KINF = 9.7E+14*(TEMP/300.0)**0.1*EXP(-11082.0/TEMP)
K10 = DBLE(60.0*KO*MO/(1.0+(KO*MO/KINF)) &
& *0.45**(1.0+(LOG10(KO*MO/KINF))**2)**(-1))
K10 = DBLE(K10/60.)
RETURN
END
REAL*8 FUNCTION K22(TEMP)
use cacm3_Parameters
! use cacm3_Global
real*8 KO, KINF, MO
REAL(KIND=dp) TEMP
MO = 7.33853E+21/TEMP
KO = 2.85E-30*(300.0/TEMP)**2.67
KINF = 3.13E-11
K22 = 0.937*(4.4E+17/TEMP)*KO*MO/(1.0+(0.937*KO*MO/KINF)) &
& *(EXP(-1.*TEMP/363.0))**(1.0+ &
& ((LOG10(0.937*KO*MO/KINF)-0.12)/ &
& (0.85-0.67*LOG10(EXP(-1.*TEMP/363.0))))**2)**(-1)
K22 = DBLE(K22/60.)
RETURN
END
REAL*8 FUNCTION K23(TEMP)
use cacm3_Parameters
! use cacm3_Global
REAL*8 K1, K2, K3, MO
REAL(KIND=dp) TEMP
MO = 7.33853E+21/TEMP
K1 = 7.2E-15*EXP(785.1/TEMP)
K2 = 4.1E-16*EXP(1439.4/TEMP)
K3 = 1.9E-33*EXP(724.7/TEMP)
K23 = 4.4E+17/TEMP/60.*(K1 + K3*MO*(1+(K3*MO/K2)))
RETURN
END
REAL*8 FUNCTION K24(TEMP)
use cacm3_Parameters
! use cacm3_Global
REAL*8 K1, K2, MO
REAL(KIND=dp) TEMP
MO = 7.33853E+21/TEMP
K1 = 1.3E-13
K2 = 3.19E-33
K24 = 4.4E+17/TEMP/60.*(K1 + K2*MO)
RETURN
END
REAL*8 FUNCTION K28(TEMP)
use cacm3_Parameters
! use cacm3_Global
REAL*8 KO, KINF, MO
REAL(KIND=dp) TEMP
MO = 7.33853E+21/TEMP
KO = 4.1E-5*EXP(-10649.2/TEMP)
KINF = 5.7E+15*EXP(-11172.6/TEMP)
K28 = 60.0*KO*MO/60./(1.0+(KO*MO/KINF)) &
& *0.5**(1.0+(LOG10(KO*MO/KINF))**2)**(-1)
RETURN
END
REAL*8 FUNCTION K31()
use cacm3_Parameters
! use cacm3_Global
REAL*8 K1, K2, MO
REAL(KIND=dp) TEMP
MO = 7.33853E+21/TEMP
K1 = 2.2E-13*EXP(598.9/TEMP)
K2 = 1.85E-33*EXP(981.4/TEMP)
K31 = 4.4E+17/TEMP/60.*(K1 + K2*MO)
RETURN
END
REAL*8 FUNCTION K32()
use cacm3_Parameters
! use cacm3_Global
REAL*8 K1, K2, MO
REAL(KIND=dp) TEMP
MO = 7.33853E+21/TEMP
K1 = 3.08E-34*EXP(2798.2/TEMP)
K2 = 2.59E-54*EXP(3180.7/TEMP)
K32 = 3.23E+33/TEMP/60./TEMP*(K1 + K2*MO)
RETURN
END
REAL*8 FUNCTION K1302(II,TEMP)
use cacm3_Parameters
include 'user_Parameters.h'
! use cacm3_Global
REAL*8 CF_NC, CF_C, Y298, MO, HF1, CF1, CF2
INTEGER II
REAL(KIND=dp) TEMP
CF_NC = 3.0
CF_C = 0.4
Y298 = CF_A*EXP(CF_B*CF_NC)
MO = 7.33853E+21/TEMP
HF1 = CF_C*(Y298*MO)/(1.0+(Y298*MO/CF_YI298/(TEMP/298.0) &
& **(-1.*CF_MINF)))*CF_F**(1.0+(LOG10(Y298*MO/CF_YI298/ &
& (TEMP/298.0)**(-1.*CF_MINF)))**2)**(-1)
CF1 = HF1/(1.0+HF1)
CF2 = 1.0 - CF1
IF ( II .EQ. 1) THEN
K1302 = DBLE (CF1*2.91E-12*EXP(180.2/TEMP)*4.4E+17/TEMP/60.)
ELSE
K1302 = DBLE (CF2*2.91E-12*EXP(180.2/TEMP)*4.4E+17/TEMP/60.)
END IF
RETURN
END
REAL*8 FUNCTION K1401(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K1401 = DBLE(4.4E+17*TEMP*EXP(E/TEMP)*(4.*A*EXP(B/TEMP) &
& + 2.*CC*EXP(D/TEMP) + 2.*F*EXP(G/TEMP)*EXP(E/TEMP) &
& + CC*EXP(D/TEMP)*EXP(E/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K1402(II,TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
REAL*8 CF_NC, CF_C, Y298, MO, HF1, CF1, CF2
INTEGER II
CF_NC = 8.0
CF_C = 1.0
Y298 = CF_A*EXP(CF_B*CF_NC)
MO = 7.33853E+21/TEMP
HF1 = CF_C*(Y298*MO)/(1.0+(Y298*MO/CF_YI298/(TEMP/298.0) &
& **(-1.*CF_MINF)))*CF_F**(1.0+(LOG10(Y298*MO/CF_YI298/ &
& (TEMP/298.0)**(-1.*CF_MINF)))**2)**(-1)
CF1 = HF1/(1.0 + HF1)
CF2 = 1.0 - CF1
IF (II .EQ. 1) THEN
K1402 = DBLE(1.25E-12*EXP(180.2/TEMP)*4.4E+17/TEMP/60.*CF1)
ELSE
K1402 = DBLE(1.25E-12*EXP(180.2/TEMP)*4.4E+17/TEMP/60.*CF2)
ENDIF
RETURN
END
REAL*8 FUNCTION K1501(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
! REAL*8 A, B, CC, D, E
K1501 = DBLE(4.4E+17*TEMP*EXP(E/TEMP)*(2.*A*EXP(B/TEMP) &
& + 2.*CC*EXP(D/TEMP) + 12.*CC*EXP(D/TEMP)*EXP(E/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K1502(II,TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
REAL*8 CF_NC, CF_C, Y298, MO, HF1, CF1, CF2
INTEGER II
CF_NC = 16.0
CF_C = 1.0
Y298 = CF_A*EXP(CF_B*CF_NC)
MO = 7.33853E+21/TEMP
HF1 = CF_C*(Y298*MO)/(1.0+(Y298*MO/CF_YI298/(TEMP/298.0) &
& **(-1.*CF_MINF)))*CF_F**(1.0+(LOG10(Y298*MO/CF_YI298/ &
& (TEMP/298.0)**(-1.*CF_MINF)))**2)**(-1)
CF1 = HF1/(1.0 + HF1)
CF2 = 1.0 - CF1
IF (II .EQ. 1) THEN
K1502 = DBLE(3.2E-13*EXP(180.2/TEMP)*4.4E17/TEMP/60.*CF1)
ELSE
K1502 = DBLE(3.2E-13*EXP(180.2/TEMP)*4.4E17/TEMP/60.*CF2)
ENDIF
RETURN
END
REAL*8 FUNCTION K2301(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K2301 = DBLE(4.4E+17*TEMP*EXP(E/TEMP)*(L*EXP((-1.*E)/TEMP)/TEMP**2 &
& + 2.*CC*EXP(D/TEMP) + F*EXP(G/TEMP)*EXP(E/TEMP) &
& + 2.*A*EXP(B/TEMP) + 2.*CC*EXP(D/TEMP)*EXP(E/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K2302(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
REAL*8 K54, K55, K74
K54 = 2.58E+06/TEMP*EXP(500.3/TEMP)
K55 = 4.4E+04/TEMP*EXP(-800.2/TEMP)
K74 = 4.4E+17*TEMP*EXP(E/TEMP)*(L*EXP((-1.*E)/TEMP)/TEMP**2 &
& + 2.*CC*EXP(D/TEMP) + F*EXP(G/TEMP)*EXP(E/TEMP) &
& + 2.*A*EXP(B/TEMP) + 2.*CC*EXP(D/TEMP)*EXP(E/TEMP))
K2302 = DBLE(K74*K55/K54/60.)
RETURN
END
REAL*8 FUNCTION K2303(TEMP)
use cacm3_Parameters
include 'user_Parameters.h'
! use cacm3_Global
REAL(KIND=dp) TEMP
REAL*8 K54, K56, K74
K54 = 2.58E+06/TEMP*EXP(500.3/TEMP)
K56 = 4.4/TEMP
K74 = 4.4E+17*TEMP*EXP(E/TEMP)*(L*EXP((-1.*E)/TEMP)/TEMP**2 &
& + 2.*CC*EXP(D/TEMP) + F*EXP(G/TEMP)*EXP(E/TEMP) &
& + 2.*A*EXP(B/TEMP) + 2.*CC*EXP(D/TEMP)*EXP(E/TEMP))
K2303 = DBLE(K74*K56/K54/60.)
RETURN
END
REAL*8 FUNCTION K2304(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
REAL*8 K54, K57, K74
K54 = 2.58E+06/TEMP*EXP(500.3/TEMP)
K57 = 2.05E+06/TEMP
K74 = 4.4E+17*TEMP*EXP(E/TEMP)*(L*EXP((-1.*E)/TEMP)/TEMP**2 &
& + 2.*CC*EXP(D/TEMP) + F*EXP(G/TEMP)*EXP(E/TEMP) &
& + 2.*A*EXP(B/TEMP) + 2.*CC*EXP(D/TEMP)*EXP(E/TEMP))
K2304 = DBLE(K74*K57/K54/60.)
RETURN
END
REAL*8 FUNCTION K2308(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K2308 = DBLE(4.4E+17*TEMP*EXP(E/TEMP)*(2.*A*EXP(B/TEMP) &
& + P/TEMP**2 + CC*EXP(D/TEMP)*EXP(K/TEMP) &
& + F*EXP(G/TEMP)*EXP(E/TEMP) + 2.*CC*EXP(D/TEMP) &
& *EXP(E/TEMP) + CC*EXP(D/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K2309(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
REAL*8 K60, K61, K300
K60 = 3.039E+06/TEMP*EXP(250/TEMP)
K61 = 1.32E+05/TEMP*EXP(-1427.0/TEMP)
K300 = 4.4E+17*TEMP*EXP(E/TEMP)*(2.*A*EXP(B/TEMP) &
& + P/TEMP**2 + CC*EXP(D/TEMP)*EXP(K/TEMP) &
& + F*EXP(G/TEMP)*EXP(E/TEMP) + 2.*CC*EXP(D/TEMP) &
& *EXP(E/TEMP) + CC*EXP(D/TEMP))
K2309 = DBLE(K61*K300/K60/60.)
RETURN
END
REAL*8 FUNCTION KPAN(TEMP)
use cacm3_Parameters
! use cacm3_Global
REAL(KIND=dp) TEMP
REAL*8 KO, KINF, K1, MO
KO = 9.7E-29*(300.0/TEMP)**5.6
KINF = 9.3E-12*(300.0/TEMP)**1.5
MO = 7.33853E+21/TEMP
K1 = (4.4E+17/TEMP)*KO*MO/(1.0+(KO*MO/KINF)) &
& *0.6**(1.0+(LOG10(KO*MO/KINF))**2)**(-1)
KPAN = DBLE(60.0*1.16E+28*TEMP*EXP(-13954.0/TEMP) &
& *K1/4.4E+17/60.)
RETURN
END
REAL*8 FUNCTION K4201(II,TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
REAL*8 CF1, CF2
INTEGER II
CF1 = (CC*EXP(D/TEMP)*EXP(J/TEMP) + H*EXP(I/TEMP)*EXP(E/TEMP)) &
& /(A*EXP(B/TEMP)*EXP(E/TEMP) + &
& CC*EXP(D/TEMP)*EXP(J/TEMP) + H*EXP(I/TEMP)*EXP(E/TEMP))
CF2 = 1.0 - CF1
IF ( II .EQ. 1) THEN
K4201 = DBLE(CF1*2.72*TEMP*EXP(532.0/TEMP)/60.)
ELSE
K4201 = DBLE(CF2*2.72*TEMP*EXP(532.0/TEMP)/60.)
ENDIF
RETURN
END
REAL*8 FUNCTION K4301(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K4301 = DBLE(4.4E+17*TEMP*EXP(E/TEMP)*(2.*A*EXP(B/TEMP) &
& + F*EXP(G/TEMP)*EXP(J/TEMP) + H*EXP(I/TEMP) &
& + 2.*CC*EXP(D/TEMP)*EXP(E/TEMP) + CC*EXP(D/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K5201(TEMP)
use cacm3_Parameters
include 'user_Parameters.h'
! use cacm3_Global
REAL(KIND=dp) TEMP
K5201 = DBLE(4.4E+17*TEMP*EXP(E/TEMP)*(A*EXP(B/TEMP)* &
& EXP((-1.*E)/TEMP)*EXP(K/TEMP) + CC*EXP(D/TEMP) &
& *EXP(K/TEMP) + 2.*CC*EXP(D/TEMP)*EXP(E/TEMP) &
& + CC*EXP(D/TEMP) + A*EXP(B/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION TUN( A0,B0,C0,TEMP)
REAL(KIND=dp) TEMP
REAL A0,B0,C0
REAL*8 Molc2ppm
Parameter(Molc2ppm = 2.46E13)
TUN = DBLE(A0) * EXP(-DBLE(B0)/TEMP) * EXP(DBLE(C0)/TEMP**3)*Molc2ppm
END FUNCTION TUN
real*8 FUNCTION ISO1( A0,B0,C0,D0,E0,F0,G0,TEMP )
REAL(KIND=dp) TEMP
REAL A0,B0,C0,D0,E0,F0,G0
REAL(kind=dp) K0, K1, K2
REAL*8 Molc2ppm
Parameter(Molc2ppm = 2.46E13)
K0 = DBLE(D0)*EXP(DBLE(E0)/TEMP)*EXP(1.E8/TEMP**3)
K1 = DBLE(F0)*EXP(DBLE(G0)/TEMP)
K2 = DBLE(C0)*K0/(K0+K1)
ISO1 = DBLE(A0) * EXP(DBLE(B0)/TEMP) * (1.-K2)*Molc2ppm
END FUNCTION ISO1
real*8 FUNCTION ISO2( A0,B0,C0,D0,E0,F0,G0,TEMP )
REAL A0,B0,C0,D0,E0,F0,G0
REAL(KIND=dp) TEMP
REAL(kind=dp) K0, K1, K2
REAL*8 Molc2ppm
Parameter(Molc2ppm = 2.46E13)
K0 = DBLE(D0)*EXP(DBLE(E0)/TEMP)*EXP(1.E8/TEMP**3)
K1 = DBLE(F0)*EXP(DBLE(G0)/TEMP)
K2 = DBLE(C0)*K0/(K0+K1)
ISO2 = DBLE(A0) * EXP(DBLE(B0)/TEMP) * K2 * Molc2ppm
END FUNCTION ISO2
real*8 FUNCTION EPO(A1,E1,M1,TEMP)
REAL(KIND=dp) TEMP
REAL A1, E1, M1
REAL(kind=dp) K1
REAL(kind=dp), PARAMETER :: Molc2ppm=2.46E+13
REAL(kind=dp), PARAMETER :: CFACTOR=2.5E+19
K1 = 1.0_dp/(DBLE(M1) * CFACTOR + 1.0_dp)
EPO = DBLE(A1) * EXP(DBLE(E1)/TEMP) * K1 * Molc2ppm
END FUNCTION EPO
real*8 FUNCTION KCO(A1,M1,TEMP)
REAL(KIND=dp) TEMP
REAL A1, M1
REAL*8 Molc2ppm
Parameter(Molc2ppm = 2.46E13)
REAL(kind=dp), PARAMETER :: CFACTOR=2.5E+19
KCO = DBLE(A1) * (1.0_dp + (CFACTOR / DBLE(M1))) * Molc2ppm
END FUNCTION KCO
real*8 FUNCTION NIT ( A0,B0,C0,n,X0,Y0,TEMP)
REAL(KIND=dp) TEMP
REAL A0,B0,C0,n,X0,Y0
REAL(kind=dp) K0, K1, K2, K3, K4
REAL*8 Molc2ppm
Parameter(Molc2ppm = 2.46E13)
REAL(kind=dp), PARAMETER :: CFACTOR=2.5E+19
K0 = 2.0E-22_dp * EXP(DBLE(n))
K1 = 4.3E-1_dp*(TEMP/298.0_dp)**(-8)
K0 = K0*CFACTOR
K1 = K0/K1
K2 = (K0/(1.0_dp+K1))* &
4.1E-1_dp**(1.0_dp/(1.0_dp+(LOG10(K1))**2))
K3 = K2/(K2+DBLE(C0))
K4 = DBLE(A0)*(DBLE(X0)-TEMP*DBLE(Y0))
NIT = K4 * EXP(DBLE(B0)/TEMP) * K3 * Molc2ppm
END FUNCTION NIT
real*8 FUNCTION ALK ( A0,B0,C0,n,X0,Y0,TEMP)
REAL(KIND=dp) TEMP
REAL A0,B0,C0,n,X0,Y0
REAL(kind=dp) K0, K1, K2, K3, K4
REAL*8 Molc2ppm
Parameter(Molc2ppm = 2.46E13)
REAL(kind=dp), PARAMETER :: CFACTOR=2.5E+19
K0 = 2.0E-22_dp * EXP(DBLE(n))
K1 = 4.3E-1_dp*(TEMP/298.0_dp)**(-8)
K0 = K0*CFACTOR
K1 = K0/K1
K2 = (K0/(1.0_dp+K1))* &
4.1E-1_dp**(1.0_dp/(1.0_dp+(LOG10(K1))**2))
K3 = DBLE(C0)/(K2+DBLE(C0))
K4 = DBLE(A0)*(DBLE(X0)-TEMP*DBLE(Y0))
ALK = K4 * EXP(DBLE(B0)/TEMP) * K3 * Molc2ppm
END FUNCTION ALK
REAL*8 FUNCTION K7107(TEMP)
use cacm3_Parameters
! use cacm3_Global
REAL(KIND=dp) TEMP
K7107 = DBLE(EXP(101.2976-11.4*LOG(TEMP)-9460./TEMP)/60.*1.2)
RETURN
END
! POW reaction rates end here
! cacm reaction rates continue...
REAL*8 FUNCTION K7104(II,TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
REAL*8 CF_NC,CF_C, Y298, MO, HF1, CF1, CF2
INTEGER II
CF_NC = 9.0
CF_C = 0.40
Y298 = CF_A*EXP(CF_NC*CF_B)
MO = 7.33853E+21/TEMP
HF1 = (CF_C*(Y298*MO)/(1.0+(Y298*MO/CF_YI298/(TEMP/298.0) &
& **(-1.*CF_MINF)))*CF_F**(1.0+(LOG10(Y298*MO/CF_YI298/ &
& (TEMP/298.0)**(-1.*CF_MINF)))**2)**(-1))
CF1 = HF1/(1.0 + HF1)
CF2 = 1.0 - CF1
IF (II .EQ. 1) THEN
K7104 = DBLE(1.05E-12*EXP(180.2/TEMP)*4.4E+17/TEMP/60.*CF1)
ELSE
K7104 = DBLE(1.05E-12*EXP(180.2/TEMP)*4.4E+17/TEMP/60.*CF2)
ENDIF
RETURN
END
REAL*8 FUNCTION K7114(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K7114 = DBLE(4.4E+17/TEMP*(A*TEMP**2*EXP(B/TEMP)*EXP(K/TEMP) &
& + V + 2.0*A*TEMP**2*EXP(B/TEMP) + W + P)/60.)
RETURN
END
REAL*8 FUNCTION K7115(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K7115 = DBLE(4.4E+17/TEMP*(P + Q + S + A*TEMP*TEMP* &
& EXP(B/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K7201(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K7201 = DBLE(4.4E+17*TEMP*EXP(E/TEMP)*(1.26E-11*EXP((-1.*E)/TEMP) &
& /TEMP**2 + A*EXP(B/TEMP)*EXP((-1.*E)/TEMP) &
& + 2.*CC*EXP(D/TEMP) + A*EXP(B/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K7203(TEMP)
use cacm3_Parameters
! use cacm3_Global
REAL(KIND=dp) TEMP
K7203 = DBLE(EXP(101.2976-11.4*LOG(TEMP)-9460./TEMP)/60.*1.1)
RETURN
END
REAL*8 FUNCTION K7302(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K7302 = DBLE(4.4E+17*TEMP*(2.26E-10/TEMP**2 + &
& 2.*A*EXP(B/TEMP) + H*EXP(I/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K7306(II,TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
REAL*8 CF_NC,CF_C, Y298, MO, HF1, CF1, CF2
INTEGER II
CF_NC = 8.0
CF_C = 0.40
Y298 = CF_A*EXP(CF_NC*CF_B)
MO = 7.33853E+21/TEMP
HF1 = 0.4*(CF_C*(Y298*MO)/(1.0+(Y298*MO/CF_YI298/(TEMP/298.0) &
& **(-1.*CF_MINF)))*CF_F**(1.0+(LOG10(Y298*MO/CF_YI298/ &
& (TEMP/298.0)**(-1.*CF_MINF)))**2)**(-1))+1.0-0.4
CF1 = HF1/(1.0 + HF1)
CF2 = 1.0 - CF1
IF (II .EQ. 1) THEN
K7306 = DBLE(1.25E-12*EXP(180.2/TEMP)*4.4E+17/TEMP/60.*CF1)
ELSE
K7306 = DBLE(1.25E-12*EXP(180.2/TEMP)*4.4E+17/TEMP/60.*CF2)
ENDIF
RETURN
END
REAL*8 FUNCTION K7319(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP
K7319 = DBLE(4.4E+17*TEMP*(2.0*A*EXP(B/TEMP) + V/TEMP/TEMP + &
& Q/TEMP/TEMP + 2.0*P/TEMP/TEMP + H*EXP(I/TEMP))/60.)
RETURN
END
REAL*8 FUNCTION K7320(TEMP)
use cacm3_Parameters
! use cacm3_Global
include 'user_Parameters.h'
REAL(KIND=dp) TEMP