1 | /* Sanity check routine about coherence between C and Fortran parameters for chemistry */ |
---|
2 | /* Author : Jan Vatant d'Ollone - 2018 */ |
---|
3 | |
---|
4 | #include "titan.h" |
---|
5 | |
---|
6 | void check_( |
---|
7 | int *NLEV_fort, int *NLD_fort, |
---|
8 | int *NLRT_fort, int *NC_fort ) |
---|
9 | { |
---|
10 | |
---|
11 | if( (*NLEV_fort) != NLEV ) |
---|
12 | { |
---|
13 | printf("\n"); |
---|
14 | printf("!! Coherence problem between C and Fortran !!\n"); |
---|
15 | printf("In C, NLEV=%d whereas in Fortran nlaykim_tot=%d\n",NLEV,*(NLEV_fort)); |
---|
16 | printf("You surely didn't modified titan.h according to your startfile ! \n"); |
---|
17 | printf("I abort ...\n"); |
---|
18 | exit(0); |
---|
19 | } |
---|
20 | |
---|
21 | if( (*NLD_fort) != NLD ) |
---|
22 | { |
---|
23 | printf("\n"); |
---|
24 | printf("!! Coherence problem between C and Fortran !!\n"); |
---|
25 | printf("The number of levels with diffusion must be Numbers-of-levels-of-GCM minus 15 !\n"); |
---|
26 | printf("In C, NLD=%d whereas in Fortran klev-15=%d\n",NLD,*(NLD_fort)); |
---|
27 | printf("You surely didn't modified titan.h according to your startfile ! \n"); |
---|
28 | printf("I abort ...\n"); |
---|
29 | exit(0); |
---|
30 | } |
---|
31 | |
---|
32 | if( (*NLRT_fort) != NLRT ) |
---|
33 | { |
---|
34 | printf("\n"); |
---|
35 | printf("!! Coherence problem between C and Fortran for the number of UV levels !!\n"); |
---|
36 | printf("In C in titan.h, NLRT=%d whereas in Fortran comchem_h, nlrt_kim=%d\n",NLRT,*(NLRT_fort)); |
---|
37 | printf("I abort ...\n"); |
---|
38 | exit(0); |
---|
39 | } |
---|
40 | |
---|
41 | if( (*NC_fort) != NC ) |
---|
42 | { |
---|
43 | printf("\n"); |
---|
44 | printf("!! Coherence problem between C and Fortran for number of compounds !!\n"); |
---|
45 | printf("In C, NC=%d whereas in Fortran nkim=%d\n",NC,*(NC_fort)); |
---|
46 | printf("You have maybe changed the chemistry but running with old startfiles ! \n"); |
---|
47 | printf("I abort ...\n"); |
---|
48 | exit(0); |
---|
49 | } |
---|
50 | |
---|
51 | } |
---|