1 | PROGRAM KPP_ROOT_Driver |
---|
2 | |
---|
3 | USE KPP_ROOT_Model |
---|
4 | USE KPP_ROOT_Initialize, ONLY: Initialize |
---|
5 | |
---|
6 | KPP_REAL :: T, DVAL(NSPEC) |
---|
7 | KPP_REAL :: RSTATE(20) |
---|
8 | INTEGER :: i |
---|
9 | |
---|
10 | !~~~> Initialization |
---|
11 | |
---|
12 | STEPMIN = 0.0d0 |
---|
13 | STEPMAX = 0.0d0 |
---|
14 | |
---|
15 | DO i=1,NVAR |
---|
16 | RTOL(i) = 1.0d-4 |
---|
17 | ATOL(i) = 1.0d-3 |
---|
18 | END DO |
---|
19 | |
---|
20 | CALL Initialize() |
---|
21 | CALL InitSaveData() |
---|
22 | |
---|
23 | !~~~> Time loop |
---|
24 | T = TSTART |
---|
25 | kron: DO WHILE (T < TEND) |
---|
26 | |
---|
27 | TIME = T |
---|
28 | CALL GetMass( C, DVAL ) |
---|
29 | WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T, & |
---|
30 | ( TRIM(SPC_NAMES(MONITOR(i))), & |
---|
31 | C(MONITOR(i))/CFACTOR, i=1,NMONITOR ) |
---|
32 | CALL SaveData() |
---|
33 | CALL Update_SUN() |
---|
34 | CALL Update_RCONST() |
---|
35 | |
---|
36 | CALL INTEGRATE( TIN = T, TOUT = T+DT, RSTATUS_U = RSTATE, & |
---|
37 | ICNTRL_U = (/ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /) ) |
---|
38 | T = RSTATE(1) |
---|
39 | |
---|
40 | END DO kron |
---|
41 | !~~~> End Time loop |
---|
42 | |
---|
43 | CALL GetMass( C, DVAL ) |
---|
44 | WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T, & |
---|
45 | ( TRIM(SPC_NAMES(MONITOR(i))), & |
---|
46 | C(MONITOR(i))/CFACTOR, i=1,NMONITOR ) |
---|
47 | TIME = T |
---|
48 | CALL SaveData() |
---|
49 | CALL CloseSaveData() |
---|
50 | |
---|
51 | 991 FORMAT(F6.1,'%. T=',E9.3,2X,200(A,'=',E11.4,'; ')) |
---|
52 | |
---|
53 | END PROGRAM KPP_ROOT_Driver |
---|
54 | |
---|