BioCro  0.92
 All Data Structures Files Functions Variables Typedefs Macros
printcropcentoutput.c File Reference
#include <R.h>
#include <Rmath.h>
#include <Rinternals.h>
#include "crocent.h"
+ Include dependency graph for printcropcentoutput.c:

Go to the source code of this file.

Functions

void printcropcentout (struct cropcentlayer CROPCENT, double *totalSOC, double *strucc1, double *strucc2, double *metabc1, double *metabc2, double *som1c1, double *som1c2, double *som2c1, double *som2c2, double *som3c, double *minN)
 

Function Documentation

void printcropcentout ( struct cropcentlayer  CROPCENT,
double *  totalSOC,
double *  strucc1,
double *  strucc2,
double *  metabc1,
double *  metabc2,
double *  som1c1,
double *  som1c2,
double *  som2c1,
double *  som2c2,
double *  som3c,
double *  minN 
)
8  {
9  double cbalance;
10 
11  *totalSOC = CROPCENT.strucc1.C.totalC +CROPCENT.strucc2.C.totalC+CROPCENT.metabc1.C.totalC+CROPCENT.metabc2.C.totalC
12  +CROPCENT.som1c1.C.totalC+CROPCENT.som1c2.C.totalC + CROPCENT.som2c1.C.totalC+CROPCENT.som2c2.C.totalC
13  +CROPCENT.som3c.C.totalC;
14 
15  *strucc1 = CROPCENT.strucc1.C.totalC;
16  *strucc2 = CROPCENT.strucc2.C.totalC;
17  *metabc1 = CROPCENT.metabc1.C.totalC;
18  *metabc2 = CROPCENT.metabc2.C.totalC;
19  *som1c1 = CROPCENT.som1c1.C.totalC;
20  *som1c2 = CROPCENT.som1c2.C.totalC;
21  *som2c1 = CROPCENT.som2c1.C.totalC;
22  *som2c2 = CROPCENT.som2c2.C.totalC;
23  *som3c = CROPCENT.som3c.C.totalC;
24  *minN=CROPCENT.ENV.minN;
25 
26 
27  /*
28  Rprintf("SOM1c1\n");
29  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.som1c1.Flux.hetresp);
30  cbalance=CROPCENT.som1c1.Flux.som1c1TOsom1c1.C.totalC+CROPCENT.som1c1.Flux.som1c1TOsom2c1.C.totalC+CROPCENT.som1c1.Flux.hetresp;
31  Rprintf("Cbalance=%f\n",cbalance);
32 
33  Rprintf("SOM1c2\n");
34  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.som1c2.Flux.hetresp);
35  cbalance=CROPCENT.som1c2.Flux.som1c2TOsom1c2.C.totalC+CROPCENT.som1c2.Flux.som1c2TOsom2c2.C.totalC+CROPCENT.som1c2.Flux.hetresp
36  +CROPCENT.som1c2.Flux.som1c2TOsom3c.C.totalC+CROPCENT.som1c2.Flux.som1c2TOleachate.C.totalC;
37  Rprintf("Cbalance=%f\n",cbalance);
38  Rprintf("leachate Losses = %f\n",CROPCENT.som1c2.Flux.som1c2TOleachate.C.totalC);
39  Rprintf("leachate CN = %f, som1c2 CN= %f\n",CROPCENT.som1c2.Flux.som1c2TOleachate.E.CP,CROPCENT.som1c2.E.CP);
40 
41  Rprintf("SOM2c1\n");
42  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.som2c1.Flux.hetresp);
43  cbalance=CROPCENT.som2c1.Flux.som2c1TOsom2c1.C.totalC+CROPCENT.som2c1.Flux.som2c1TOsom1c1.C.totalC+CROPCENT.som2c1.Flux.hetresp
44  +CROPCENT.som2c1.Flux.som2c1TOsom2c2.C.totalC;
45  Rprintf("Cbalance=%f\n",cbalance);
46 
47 
48  Rprintf("SOM2c2\n");
49  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.som2c2.Flux.hetresp);
50  cbalance=CROPCENT.som3c.Flux.som3cTOsom3c.C.totalC+CROPCENT.som3c.Flux.som3cTOsom1c2.C.totalC+CROPCENT.som3c.Flux.hetresp;
51  Rprintf("Cbalance=%f\n",cbalance);
52 
53 
54  Rprintf("SOM3c\n");
55  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.som3c.Flux.hetresp);
56  cbalance=CROPCENT.som3c.Flux.som3cTOsom3c.C.totalC+CROPCENT.som3c.Flux.som3cTOsom1c2.C.totalC+CROPCENT.som3c.Flux.hetresp;
57  Rprintf("Cbalance=%f\n",cbalance);
58 
59 
60  // Printing wood1
61  Rprintf("WOOD1\n");
62  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.wood1.Flux.hetresp);
63  Rprintf("wood1TOSOM1C1, totalC=%f \n",CROPCENT.wood1.Flux.wood1TOsom1c1.C.totalC);
64  Rprintf("wood1TOSOM2C1, totalC=%f \n",CROPCENT.wood1.Flux.wood1TOsom2c1.C.totalC);
65  Rprintf("wood1TOwood1, totalC=%f \n",CROPCENT.wood1.Flux.wood1TOwood1.C.totalC);
66 
67  cbalance=CROPCENT.wood1.Flux.wood1TOwood1.C.totalC+CROPCENT.wood1.Flux.wood1TOsom2c1.C.totalC
68  +CROPCENT.wood1.Flux.wood1TOsom1c1.C.totalC+CROPCENT.wood1.Flux.hetresp;
69 
70  Rprintf("Flux Balance of strucc1=%f\n",cbalance);
71  Rprintf("Environmental Mineral N= %f\n",CROPCENT.ENV.minN);
72 
73  Rprintf("wood1TOSOM1C2, CN=%f \n",CROPCENT.wood1.Flux.wood1TOsom1c1.E.CN);
74  Rprintf("wood1TOSOM2C2, CN=%f \n",CROPCENT.wood1.Flux.wood1TOsom2c1.E.CN);
75  Rprintf("wood1TOwood1, CN=%f \n",CROPCENT.wood1.Flux.wood1TOwood1.E.CN);
76 
77  Rprintf("METABC2\n");
78  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.metabc2.Flux.hetresp);
79  Rprintf("METABC2TOSOM1C2, totalC=%f \n",CROPCENT.metabc2.Flux.metabc2TOsom1c2.C.totalC);
80  Rprintf("METABC2TOMETABC2, totalC=%f \n",CROPCENT.metabc2.Flux.metabc2TOmetabc2.C.totalC);
81 
82  cbalance=CROPCENT.metabc2.Flux.metabc2TOmetabc2.C.totalC+CROPCENT.metabc2.Flux.metabc2TOsom1c2.C.totalC
83  +CROPCENT.metabc2.Flux.hetresp;
84  Rprintf("Flux Balance of metabc2=%f\n",cbalance);
85  Rprintf("Environmental Mineral N= %f\n",CROPCENT.ENV.minN);
86  Rprintf("METABC2TOMETABC2, CN=%f \n",CROPCENT.metabc2.Flux.metabc2TOmetabc2.E.CN);
87  Rprintf("METABC2TOSOM1C2, CN=%f \n",CROPCENT.metabc2.Flux.metabc2TOsom1c2.E.CN);
88 
89 
90  Rprintf("METABC1\n");
91  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.metabc1.Flux.hetresp);
92  Rprintf("METABC1TOSOM1C1, totalC=%f \n",CROPCENT.metabc1.Flux.metabc1TOsom1c1.C.totalC);
93  Rprintf("METABC1TOMETABC1, totalC=%f \n",CROPCENT.metabc1.Flux.metabc1TOmetabc1.C.totalC);
94 
95  cbalance=CROPCENT.metabc1.Flux.metabc1TOmetabc1.C.totalC+CROPCENT.metabc1.Flux.metabc1TOsom1c1.C.totalC
96  +CROPCENT.metabc1.Flux.hetresp;
97  Rprintf("Flux Balance of strucc1=%f\n",cbalance);
98 
99 
100  Rprintf("Environmental Mineral N= %f\n",CROPCENT.ENV.minN);
101 
102  Rprintf("METABC1TOMETABC1, CN=%f \n",CROPCENT.metabc1.Flux.metabc1TOmetabc1.E.CN);
103  Rprintf("METABC1TOSOM1C1, CN=%f \n",CROPCENT.metabc1.Flux.metabc1TOsom1c1.E.CN);
104 
105  // Printing strucc2
106  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.strucc2.Flux.hetresp);
107  Rprintf("STRUCC2TOSOM1C2, totalC=%f \n",CROPCENT.strucc2.Flux.strucc2TOsom1c2.C.totalC);
108  Rprintf("STRUCC2TOSOM2C2, totalC=%f \n",CROPCENT.strucc2.Flux.strucc2TOsom2c2.C.totalC);
109  Rprintf("STRUCC2TOSTRUCC2, totalC=%f \n",CROPCENT.strucc2.Flux.strucc2TOstrucc2.C.totalC);
110 
111  cbalance=CROPCENT.strucc2.Flux.strucc2TOstrucc2.C.totalC+CROPCENT.strucc2.Flux.strucc2TOsom2c2.C.totalC
112  +CROPCENT.strucc2.Flux.strucc2TOsom1c2.C.totalC+CROPCENT.strucc2.Flux.hetresp;
113 
114  Rprintf("Flux Balance of strucc1=%f\n",cbalance);
115  Rprintf("Environmental Mineral N= %f\n",CROPCENT.ENV.minN);
116 
117  Rprintf("STRUCC2TOSOM1C2, CN=%f \n",CROPCENT.strucc2.Flux.strucc2TOsom1c2.E.CN);
118  Rprintf("STRUCC2TOSOM2C2, CN=%f \n",CROPCENT.strucc2.Flux.strucc2TOsom2c2.E.CN);
119  Rprintf("STRUCC2TOSTRUCC2, CN=%f \n",CROPCENT.strucc2.Flux.strucc2TOstrucc2.E.CN);
120 */
121  // Printing STRUCC1
122  /*
123  Rprintf("C Pool = %f\n", CROPCENT.strucc1.C.totalC);
124  Rprintf("C Pool unlablto labl Ratio= %f \n", CROPCENT.strucc1.C.unlablTOlabl);
125  Rprintf("heterotrophic Respiration = %f\n",CROPCENT.strucc1.Flux.hetresp);
126  Rprintf("STRUCC1TOMETABC1, totalC=%f \n",CROPCENT.strucc1.Flux.strucc1TOmetabc1.C.totalC);
127  Rprintf("STRUCC1TOSOM1C1, totalC=%f \n",CROPCENT.strucc1.Flux.strucc1TOsom1c1.C.totalC);
128  Rprintf("STRUCC1TOSOM2C1, totalC=%f \n",CROPCENT.strucc1.Flux.strucc1TOsom2c1.C.totalC);
129  Rprintf("STRUCC1TOSTRUCC1, totalC=%f \n",CROPCENT.strucc1.Flux.strucc1TOstrucc1.C.totalC);
130 
131  cbalance=CROPCENT.strucc1.Flux.strucc1TOstrucc1.C.totalC+CROPCENT.strucc1.Flux.strucc1TOsom2c1.C.totalC
132  +CROPCENT.strucc1.Flux.strucc1TOsom1c1.C.totalC+CROPCENT.strucc1.Flux.strucc1TOmetabc1.C.totalC
133  +CROPCENT.strucc1.Flux.hetresp;
134 
135  Rprintf("Flux Balance of strucc1=%f\n",cbalance);
136  Rprintf("Environmental Mineral N= %f\n",CROPCENT.ENV.minN);
137 
138  Rprintf("STRUCC1TOMETABC1, CN=%f \n",CROPCENT.strucc1.Flux.strucc1TOmetabc1.E.CN);
139  Rprintf("STRUCC1TOSOM1C1, CN=%f \n",CROPCENT.strucc1.Flux.strucc1TOsom1c1.E.CN);
140  Rprintf("STRUCC1TOSOM2C1, CN=%f \n",CROPCENT.strucc1.Flux.strucc1TOsom2c1.E.CN);
141  Rprintf("STRUCC1TOSTRUCC1, CN=%f \n",CROPCENT.strucc1.Flux.strucc1TOstrucc1.E.CN);
142  */
143  return;
144  }
struct carbon C
Definition: crocent.h:163
Definition: crocent.h:442
struct carbon C
Definition: crocent.h:320
Definition: crocent.h:296
Definition: crocent.h:161
struct carbon C
Definition: crocent.h:418
struct som1c1 som1c1
Definition: crocent.h:521
struct carbon C
Definition: crocent.h:298
struct carbon C
Definition: crocent.h:366
struct carbon C
Definition: crocent.h:193
Definition: crocent.h:318
struct som3c som3c
Definition: crocent.h:525
struct som1c2 som1c2
Definition: crocent.h:522
struct som2c1 som2c1
Definition: crocent.h:523
struct strucc2 strucc2
Definition: crocent.h:518
struct metabc2 metabc2
Definition: crocent.h:520
struct som2c2 som2c2
Definition: crocent.h:524
Definition: crocent.h:416
Definition: crocent.h:389
struct strucc1 strucc1
Definition: crocent.h:517
struct metabc1 metabc1
Definition: crocent.h:519
double totalC
Definition: crocent.h:20
struct carbon C
Definition: crocent.h:391
Definition: crocent.h:364
Definition: crocent.h:340
struct cropcentEnvironment ENV
Definition: crocent.h:529
Definition: crocent.h:191
struct carbon C
Definition: crocent.h:444
struct carbon C
Definition: crocent.h:342
double minN
Definition: crocent.h:142