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

Go to the source code of this file.

Functions

SEXP cropcent (SEXP FAKE)
 

Function Documentation

SEXP cropcent ( SEXP  FAKE)
11 {
12  struct cropcentlayer CROPCENT;
13 // SOIL_SPT soil;
14  double hetResp;
15  int woody, Eflag;
16  double *fake;
17  woody = 0; // not testing for woody for now
18  Eflag=1; //N simulation for now
19 // assignPools(&CROPCENT);
20 // assignParms(&CROPCENT);
21  CROPCENTTimescaling(&CROPCENT);
22 // assignENV(&CROPCENT);
23  assignFluxRatios(&CROPCENT);
24  Rprintf("Before Decomposition\n");
25  printcropcentout(CROPCENT,fake,fake,fake,fake,fake,fake,fake,fake,fake,fake,fake);
26  decomposeCROPCENT(&CROPCENT, woody,Eflag);
27  Rprintf("After Decomposition \n");
28  printcropcentout(CROPCENT,fake,fake,fake,fake,fake,fake,fake,fake,fake,fake,fake);
29  Rprintf("After updating\n");
30  updatecropcentpools(&CROPCENT);
31  printcropcentout(CROPCENT,fake,fake,fake,fake,fake,fake,fake,fake,fake,fake,fake);
32  SEXP res;
33  PROTECT(res=allocVector(REALSXP,1));
34  REAL(res)[0]=1.0;
35  UNPROTECT(1);
36  return(res);
37 }
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)
Definition: printcropcentoutput.c:6
void CROPCENTTimescaling(struct cropcentlayer *CROPCENT)
Definition: Assigncropcent.c:419
Definition: crocent.h:516
void decomposeCROPCENT(struct cropcentlayer *CROPCENT, int woody, int Eflag)
void updatecropcentpools(struct cropcentlayer *CROPCENT)
Definition: Auxcropcent.c:7
void assignFluxRatios(struct cropcentlayer *CROPCENT)
Definition: Assigncropcent.c:471