BioCro  0.92
 All Data Structures Files Functions Variables Typedefs Macros
crocent.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dailyclimate
 
struct  carbon
 
struct  minerals
 
struct  flowrestriction
 
struct  flow
 
struct  TempEffectParms
 
struct  SoilWaterEffectParms
 
struct  AnaerobicParms
 
struct  PHParms
 
struct  SymbNFixationParms
 
struct  ErosionParms
 
struct  OrgLeachParms
 
struct  SoilTexture
 
struct  C13Parms
 
struct  InputToCropcent
 
struct  SoilEmissions
 
struct  BioCroToCropcentParms
 
struct  cropcentEnvironment
 
struct  strucc1
 
struct  strucc1::Flux1
 
struct  strucc1::parms1
 
struct  strucc2
 
struct  strucc2::Flux2
 
struct  strucc2::parms2
 
struct  wood1
 
struct  wood1::Flux3
 
struct  wood1::parms3
 
struct  wood2
 
struct  wood2::Flux4
 
struct  wood2::parms4
 
struct  wood3
 
struct  wood3::Flux5
 
struct  wood3::parms5
 
struct  metabc1
 
struct  metabc1::Flux6
 
struct  metabc1::parms6
 
struct  metabc2
 
struct  metabc2::Flux7
 
struct  metabc2::parms7
 
struct  som1c1
 
struct  som1c1::Flux8
 
struct  som1c1::parms8
 
struct  som2c1
 
struct  som2c1::Flux9
 
struct  som2c1::parms9
 
struct  som1c2
 
struct  som1c2::Flux10
 
struct  som1c2::parms10
 
struct  som2c2
 
struct  som2c2::Flux11
 
struct  som2c2::parms11
 
struct  som3c
 
struct  som3c::Flux12
 
struct  som3c::parms12
 
struct  siteparameters
 
struct  soilprofile
 
struct  soilprofile::profileproperties
 
struct  soilprofile::profilepools
 
struct  soilprofile::profilefluxes
 
struct  cropcentlayer
 
struct  leaf
 
struct  stem
 
struct  rhizome
 
struct  root
 
struct  dailyvec
 
struct  littervec
 
struct  DailyAutoResp
 
struct  miscanthus
 
struct  senthermaltemp
 
struct  canopyparms
 
struct  respirationParms
 
struct  respirationParms::growth
 
struct  respirationParms::maint
 
struct  c3tree
 
struct  management
 
struct  management::harvestparms
 
struct  management::emergenceparms
 

Macros

#define MAXSOILLAY   100 /* Maximum number of layers */
 

Functions

void assignPools (struct cropcentlayer *CROPCENT, double *sompoolsfromR)
 
void assignParms (struct cropcentlayer *CROPCENT, double *somassignparmsfromR)
 
double timescaling (double k, double t)
 
void CROPCENTTimescaling (struct cropcentlayer *CROPCENT)
 
void assignFluxRatios (struct cropcentlayer *CROPCENT)
 
void assignENV (struct cropcentlayer *CROPCENT, double *getsoiltexturefromR, double *getcropcentstatevarfromR, double *getbiocrotocropcentparmsfromR, double *geterosionparmsfromR, double *getc13parmsfromR, double *getleachingparmsfromR, double *getsymbnfixationparmsfromR)
 
void GetC13Parms (struct C13Parms *temp, double *getc13parmsfromR)
 
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)
 
void GetBioCroToCropcentParms (struct BioCroToCropcentParms *temp, double *getbiocrotocropcentparmsfromR)
 
void GetSymbNFixationParms (struct SymbNFixationParms *temp, double *getsymbnfixationparmsfromR)
 
void GetErosionParms (struct ErosionParms *temp, double *geterosionparmsfromR)
 
void GetSoilTexture (struct SoilTexture *temp, double *getsoiltexturefromR)
 
void GetCropCentStateVar (struct cropcentEnvironment *ENV, double *getcropcentstatevarfromR)
 
void GetInFlowCERatio (struct flowrestriction *INFLOWRESTRICT, struct minerals *output, struct cropcentEnvironment *ENV)
 
double GetMDR (double a, double b, double x1, double x2, double soilrad)
 
double GetMTI (double a, double b, double x1, double x2, double soilrad)
 
void replaceMineralStruct (struct minerals *FROM, struct minerals *TO)
 
struct flow GetLeachate (double tcflow, struct minerals *E, double leachedWATER, double sand, struct OrgLeachParms *temp)
 
double weightavg (double W1, double v1, double W2, double v2)
 
void UpdateDirectAbsorp (struct InputToCropcent *INCROCENT, struct BioCroToCropcentParms *parms, struct cropcentEnvironment *ENV)
 
void UpdateCropcentPoolsFromBioCro (struct cropcentlayer *CROPCENT, struct InputToCropcent *INCROPCENT)
 
void decomposeCROPCENT (struct cropcentlayer *CROPCENT, int woody, int Eflag)
 
void BiocroToCrocent (double *stdedbc, double fallrate, double lignin, struct minerals *E, double isotoperatio, int surface, int woody, struct InputToCropcent *INCROCENT)
 
int CheckDecomposition (struct minerals *source, struct minerals *flow, struct cropcentEnvironment *ENV, int Eflag)
 
double line (double x, double x1, double y1, double x2, double y2)
 
double Getdefac (struct TempEffectParms *Temp, struct SoilWaterEffectParms *swc, double RELWC, double TEMP)
 
double GetPHfac (struct PHParms *PHEFF, double pH)
 
double GetAnerbFac (struct AnaerobicParms *ANEREFF, double PET, double AWC, double drainage)
 
void updateCEafterleachate (struct som1c2 *som1c2)
 
void decomposeSTRUCC1 (struct strucc1 *strucc1, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeSTRUCC2 (struct strucc2 *strucc2, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeMETABC1 (struct metabc1 *metabc1, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeMETABC2 (struct metabc2 *metabc2, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeWOOD1 (struct wood1 *wood1, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeWOOD2 (struct wood2 *wood2, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeWOOD3 (struct wood3 *wood3, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeSOM1C1 (struct som1c1 *som1c1, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeSOM1C2 (struct som1c2 *som1c2, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeSOM2C2 (struct som2c2 *som2c2, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void decomposeSOM3C (struct som3c *som3c, struct cropcentEnvironment *ENV, int flag, int Eflag)
 
void updatecropcentpools (struct cropcentlayer *CROPCENT)
 
void updateMineralStructure (struct carbon *toupdateC, struct minerals *toupdateE, struct carbon flowC, struct minerals flowE)
 
void updateCarbonStructure (struct carbon *toupdateC, struct carbon flow)
 
double CalculateGrowthResp (double newbiomass, double growthRespFactor)
 
void dailymiscanthus (struct miscanthus *miscanthus, double coefs[25], double TherPrds[6], double TherTime, double Temp, double dailynetassim, struct senthermaltemp *senparms, struct canopyparms *canopyparms, struct frostParms *frostparms, int N, double delTT, struct respirationParms *RESP, int emergence)
 
double getThermalSenescence (double criticalTT, double currentTT, double biomass, double dailyfractionalloss)
 
double canopyNsenescence (struct leaf *leaf, double SLA, double kN, double leafNsen)
 
double getStemSenescence (struct stem *stem, double criticalTT, double senefracion, double Temp, struct frostParms *frostparms, double TT)
 
double getRootSenescence (struct root *root, double criticalTT, double senefracion, double Temp, struct frostParms *frostparms, double TT)
 
double getRhizomeSenescence (struct rhizome *rhizome, double criticalTT, double senefracion, double Temp, struct frostParms *frostparms, double TT)
 
double getLeafSenescence (struct leaf *leaf, double criticalTT, double senefracion, double Temp, struct frostParms *frostparms, double TT, struct canopyparms *canopyparm)
 
void updatelittervec (struct littervec *littervec, double newbiomass, int N, double delTT)
 
void updatebiomass (double *res, double toadd, double toremove)
 
void dailymiscanthusupdate (struct miscanthus *miscanthus, struct miscanthus *deltamiscanthus)
 
double newbiomass (double AcanopyNet, double k, double GrowthRespCoeff)
 
double getThermaltime (double temp, double Tbase)
 
void UpdateStandingbiomass (double *standing, double newbiomass)
 
void UpdateStandingLeaf (struct leaf *leaf, double newbiomass, double deadleaf, double remobFactor)
 
void UpdateStandingStem (struct stem *stem, double newbiomass, double deadstem, double remobFactor)
 
void UpdateStandingRoot (struct root *root, double newbiomass, double deadroot, double remobFactor)
 
void UpdateStandingRhizome (struct rhizome *rhizome, double newbiomass, double deadrhizome, double remobFactor)
 
void updatedailyvec (struct dailyvec *dailyvec, double newbiomass, double newlitter, int N, double delTT)
 
void createNULLmiscanthus (struct miscanthus *miscanthus, int vecsize)
 
void getdailyclimate (struct dailyclimate *dailyclimate, int *doy, double *solar, double *temp, double *rh, double *windspeed, double *precip, int currenthour, int vecsize)
 
int CheckEmergence (struct dailyclimate *dailyclimate, double EmergTemperature)
 
void updatedormantstage (struct miscanthus *miscanthus)
 
void dailyC3tree (struct c3tree *c3tree, double coefs[25], double TherPrds[6], double TherTime, double Temp, double dailynetassim, struct senthermaltemp *senparms, struct canopyparms *canopyparms, struct frostParms *frostparms, struct respirationParms *RESP)
 
void assignManagement (struct management *management)
 
void updateafterharvest (struct miscanthus *miscanthus, struct management *management)
 
void updateafteremergence (struct miscanthus *miscanthus, struct management *management)
 
void getsenescenceparms (struct senthermaltemp *senparms)
 
void getfrostparms (struct frostParms *frostparms)
 
void UpdateC3treeAfterEmergence (struct c3tree *willow, struct management *management)
 
void UpdateWillowAfterHarvest (struct c3tree *willow, struct management *management)
 

Macro Definition Documentation

#define MAXSOILLAY   100 /* Maximum number of layers */

Function Documentation

void assignENV ( struct cropcentlayer *  CROPCENT,
double *  getsoiltexturefromR,
double *  getcropcentstatevarfromR,
double *  getbiocrotocropcentparmsfromR,
double *  geterosionparmsfromR,
double *  getc13parmsfromR,
double *  getleachingparmsfromR,
double *  getsymbnfixationparmsfromR 
)
436  {
437 
438  GetBioCroToCropcentParms(&CROPCENT->BcroTOCentParms,getbiocrotocropcentparmsfromR);
439  GetSymbNFixationParms(&CROPCENT->ENV.NFIX,getsymbnfixationparmsfromR);
440  GetLeachingParms(&CROPCENT->ENV.ORGLECH,getleachingparmsfromR);
441  GetC13Parms(&CROPCENT->ENV.C13,getc13parmsfromR);
442  GetErosionParms(&CROPCENT->ENV.EROSION,geterosionparmsfromR);
443  GetSoilTexture(&CROPCENT->ENV.SOILTEX,getsoiltexturefromR);
444  GetCropCentStateVar(&CROPCENT->ENV,getcropcentstatevarfromR);
445  return;
446 }
void GetSymbNFixationParms(struct SymbNFixationParms *temp, double *getsymbnfixationparmsfromR)
Definition: Assigncropcent.c:620
void GetErosionParms(struct ErosionParms *temp, double *geterosionparmsfromR)
Definition: Assigncropcent.c:651
struct SymbNFixationParms NFIX
Definition: crocent.h:156
struct C13Parms C13
Definition: crocent.h:155
void GetLeachingParms(struct OrgLeachParms *temp, double *getleachingparmsfromR)
Definition: Assigncropcent.c:631
struct OrgLeachParms ORGLECH
Definition: crocent.h:154
struct BioCroToCropcentParms BcroTOCentParms
Definition: crocent.h:530
void GetCropCentStateVar(struct cropcentEnvironment *ENV, double *getcropcentstatevarfromR)
Definition: Assigncropcent.c:448
void GetSoilTexture(struct SoilTexture *temp, double *getsoiltexturefromR)
Definition: Assigncropcent.c:661
struct SoilTexture SOILTEX
Definition: crocent.h:152
struct cropcentEnvironment ENV
Definition: crocent.h:529
void GetC13Parms(struct C13Parms *temp, double *getc13parmsfromR)
Definition: Assigncropcent.c:644
void GetBioCroToCropcentParms(struct BioCroToCropcentParms *temp, double *getbiocrotocropcentparmsfromR)
Definition: Assigncropcent.c:674
struct ErosionParms EROSION
Definition: crocent.h:153
void assignFluxRatios ( struct cropcentlayer *  CROPCENT)
472 {
473  struct minerals *tmp;
474  // Updating unlabl and labl C ratio in each flux component based on source
480 
485 
486 // replaceMineralStruct(&CROPCENT->metabc1.E,&CROPCENT->metabc1.Flux.metabc1TOmetabc1.E); this is repeated
487 // replaceMineralStruct(&CROPCENT->metabc2.E,&CROPCENT->metabc2.Flux.metabc2TOmetabc2.E); this is repeated
488 
489  CROPCENT->wood1.Flux.wood1TOsom1c1.C.unlablTOlabl = CROPCENT->wood1.C.unlablTOlabl;
490  CROPCENT->wood1.Flux.wood1TOsom2c1.C.unlablTOlabl = CROPCENT->wood1.C.unlablTOlabl;
491  CROPCENT->wood1.Flux.wood1TOwood1.C.unlablTOlabl = CROPCENT->wood1.C.unlablTOlabl;
492  replaceMineralStruct(&CROPCENT->wood1.E,&CROPCENT->wood1.Flux.wood1TOwood1.E);
493 
494  CROPCENT->wood2.Flux.wood2TOsom1c1.C.unlablTOlabl = CROPCENT->wood2.C.unlablTOlabl;
495  CROPCENT->wood2.Flux.wood2TOsom2c1.C.unlablTOlabl = CROPCENT->wood2.C.unlablTOlabl;
496  CROPCENT->wood2.Flux.wood2TOwood2.C.unlablTOlabl = CROPCENT->wood2.C.unlablTOlabl;
497  replaceMineralStruct(&CROPCENT->wood2.E,&CROPCENT->wood2.Flux.wood2TOwood2.E);
498 
499 
500  CROPCENT->wood3.Flux.wood3TOsom1c2.C.unlablTOlabl = CROPCENT->wood3.C.unlablTOlabl;
501  CROPCENT->wood3.Flux.wood3TOsom2c2.C.unlablTOlabl = CROPCENT->wood3.C.unlablTOlabl;
502  CROPCENT->wood3.Flux.wood3TOwood3.C.unlablTOlabl = CROPCENT->wood3.C.unlablTOlabl;
503  replaceMineralStruct(&CROPCENT->wood3.E,&CROPCENT->wood3.Flux.wood3TOwood3.E);
504 
508 
509 
513 
516  replaceMineralStruct(&CROPCENT->som1c1.E,&CROPCENT->som1c1.Flux.som1c1TOsom1c1.E);
517 
519  CROPCENT->som2c1.Flux.som2c1TOsom2c2.C.unlablTOlabl = CROPCENT->som2c1.C.unlablTOlabl; // due to mixing
521  replaceMineralStruct(&CROPCENT->som2c1.E,&CROPCENT->som2c1.Flux.som2c1TOsom2c1.E);
522 
524  CROPCENT->som1c2.Flux.som1c2TOsom3c.C.unlablTOlabl = CROPCENT->som1c2.C.unlablTOlabl;
527  replaceMineralStruct(&CROPCENT->som1c2.E,&CROPCENT->som1c2.Flux.som1c2TOsom1c2.E);
528 
530  CROPCENT->som2c2.Flux.som2c2TOsom3c.C.unlablTOlabl = CROPCENT->som2c2.C.unlablTOlabl;
532  replaceMineralStruct(&CROPCENT->som2c2.E,&CROPCENT->som2c2.Flux.som2c2TOsom2c2.E);
533 
534  CROPCENT->som3c.Flux.som3cTOsom1c2.C.unlablTOlabl = CROPCENT->som3c.C.unlablTOlabl;
535  CROPCENT->som3c.Flux.som3cTOsom3c.C.unlablTOlabl = CROPCENT->som3c.C.unlablTOlabl;
536  replaceMineralStruct(&CROPCENT->som3c.E,&CROPCENT->som3c.Flux.som3cTOsom3c.E);
537 
538  // updating CE ratio of each Flux based on Environmental condition and Restriction criteria
539 
540  // Cflow from strucc1 to metabc1 due to photodegradation
541  tmp=&CROPCENT->strucc1.E;
543 
544 
545  // Lets focus on all the fluxes to pool som1c1
546  GetInFlowCERatio(&CROPCENT->som1c1.INFLOW, tmp, &CROPCENT->ENV);
552 
553  // Get CE ratio of inflow to som2c1 pool and update all the fluxes E
554  GetInFlowCERatio(&CROPCENT->som2c1.INFLOW, tmp, &CROPCENT->ENV);
559 
560  // Get CE ratio of inflow to som1c2 and update all the fluxes
561  GetInFlowCERatio(&CROPCENT->som1c2.INFLOW, tmp, &CROPCENT->ENV);
567 
568  // CE ratio of inflow to som2c2 and update all the fluxes
569  GetInFlowCERatio(&CROPCENT->som2c2.INFLOW, tmp, &CROPCENT->ENV);
572  replaceMineralStruct(tmp,&CROPCENT->som2c1.Flux.som2c1TOsom2c2.E); // due to mixing
574 
575  // CE ratio of inflow to som3c and update all the fluxes
576  GetInFlowCERatio(&CROPCENT->som3c.INFLOW, tmp, &CROPCENT->ENV);
579 
580  return;
581 }
struct carbon C
Definition: crocent.h:163
struct minerals E
Definition: crocent.h:299
struct flow som1c1TOsom2c1
Definition: crocent.h:346
struct carbon C
Definition: crocent.h:320
struct flow strucc1TOsom1c1
Definition: crocent.h:168
struct flowrestriction INFLOW
Definition: crocent.h:361
struct som2c1::Flux9 Flux
struct flow som2c2TOsom3c
Definition: crocent.h:423
struct minerals E
Definition: crocent.h:392
struct carbon C
Definition: crocent.h:221
struct wood2 wood2
Definition: crocent.h:527
struct flow strucc2TOsom2c2
Definition: crocent.h:198
struct flow strucc1TOstrucc1
Definition: crocent.h:170
struct carbon C
Definition: crocent.h:418
struct flow wood1TOsom1c1
Definition: crocent.h:226
struct som1c1::Flux8 Flux
struct minerals E
Definition: crocent.h:445
struct metabc2::Flux7 Flux
struct flowrestriction INFLOW
Definition: crocent.h:414
struct som1c1 som1c1
Definition: crocent.h:521
struct strucc2::Flux2 Flux
struct flow strucc1TOmetabc1
Definition: crocent.h:171
struct minerals E
Definition: crocent.h:247
struct flow som1c2TOsom3c
Definition: crocent.h:396
struct flow wood2TOsom2c1
Definition: crocent.h:252
struct flow som2c2TOsom2c2
Definition: crocent.h:424
struct som2c2::Flux11 Flux
struct carbon C
Definition: crocent.h:298
struct wood3 wood3
Definition: crocent.h:528
struct carbon C
Definition: crocent.h:366
struct carbon C
Definition: crocent.h:193
struct som3c som3c
Definition: crocent.h:525
Definition: crocent.h:25
struct wood1::Flux3 Flux
struct minerals E
Definition: crocent.h:367
struct metabc1::Flux6 Flux
struct flow wood2TOsom1c1
Definition: crocent.h:251
struct flow wood3TOwood3
Definition: crocent.h:278
struct som1c2 som1c2
Definition: crocent.h:522
struct flow strucc2TOstrucc2
Definition: crocent.h:200
struct som3c::Flux12 Flux
struct flow som1c1TOsom1c1
Definition: crocent.h:347
struct som2c1 som2c1
Definition: crocent.h:523
struct strucc2 strucc2
Definition: crocent.h:518
struct flow metabc1TOmetabc1
Definition: crocent.h:303
struct strucc1::Flux1 Flux
struct minerals E
Definition: crocent.h:40
struct som1c2::Flux10 Flux
struct flow som1c2TOleachate
Definition: crocent.h:397
struct flowrestriction INFLOW
Definition: crocent.h:462
struct flow wood3TOsom1c2
Definition: crocent.h:277
struct flow wood3TOsom2c2
Definition: crocent.h:276
struct minerals E
Definition: crocent.h:164
struct metabc2 metabc2
Definition: crocent.h:520
struct som2c2 som2c2
Definition: crocent.h:524
struct flow som1c2TOsom2c2
Definition: crocent.h:395
void GetInFlowCERatio(struct flowrestriction *INFLOWRESTRICT, struct minerals *output, struct cropcentEnvironment *ENV)
Definition: Assigncropcent.c:583
struct flow strucc2TOsom1c2
Definition: crocent.h:199
struct flow som2c2TOsom1c2
Definition: crocent.h:422
struct flow wood2TOwood2
Definition: crocent.h:253
struct wood2::Flux4 Flux
struct minerals E
Definition: crocent.h:343
struct wood1 wood1
Definition: crocent.h:526
struct carbon C
Definition: crocent.h:246
struct carbon C
Definition: crocent.h:39
struct minerals E
Definition: crocent.h:272
struct flowrestriction INFLOW
Definition: crocent.h:386
struct strucc1 strucc1
Definition: crocent.h:517
struct flow som1c2TOsom1c2
Definition: crocent.h:398
struct flow metabc2TOsom1c2
Definition: crocent.h:324
struct flow strucc1TOsom2c1
Definition: crocent.h:169
struct minerals E
Definition: crocent.h:419
double unlablTOlabl
Definition: crocent.h:21
void replaceMineralStruct(struct minerals *FROM, struct minerals *TO)
Definition: Assigncropcent.c:610
struct metabc1 metabc1
Definition: crocent.h:519
struct minerals E
Definition: crocent.h:321
struct minerals E
Definition: crocent.h:222
struct carbon C
Definition: crocent.h:391
struct flow som2c1TOsom2c1
Definition: crocent.h:371
struct flow som2c1TOsom2c2
Definition: crocent.h:372
struct flow som3cTOsom1c2
Definition: crocent.h:448
struct flowrestriction INFLOW
Definition: crocent.h:439
struct flow wood1TOwood1
Definition: crocent.h:228
struct flow wood1TOsom2c1
Definition: crocent.h:227
struct cropcentEnvironment ENV
Definition: crocent.h:529
struct flow som3cTOsom3c
Definition: crocent.h:449
struct flow som2c1TOsom1c1
Definition: crocent.h:370
struct flow metabc1TOsom1c1
Definition: crocent.h:302
struct carbon C
Definition: crocent.h:444
struct carbon C
Definition: crocent.h:271
struct flow metabc2TOmetabc2
Definition: crocent.h:325
struct carbon C
Definition: crocent.h:342
struct minerals E
Definition: crocent.h:194
struct wood3::Flux5 Flux
void assignManagement ( struct management *  management)
8 {
9 management->harvestparms.harvestdoy=300;
10 management->harvestparms.frleaf=1.0;
11 management->harvestparms.frleaflitter=0.0;
12 management->harvestparms.frstem=1.0;
13 management->harvestparms.frstemlitter=0.0;
14 management->harvestparms.frdeadroot=0.0;
15 management->harvestparms.frdeadrhizome=0.0;
16 
17 management->emergenceparms.minimumdoy=90;
18 management->emergenceparms.emergenceTemp=6.0;
19 management->emergenceparms.StoragetoLeaffraction=0.02;
20 management->emergenceparms.StemtoLeaffraction=0.02;
21 management->emergenceparms.plantingrate=20;
22 return;
23 }
int minimumdoy
Definition: crocent.h:779
double StoragetoLeaffraction
Definition: crocent.h:781
double frstem
Definition: crocent.h:772
double frstemlitter
Definition: crocent.h:772
struct management::emergenceparms emergenceparms
double frdeadrhizome
Definition: crocent.h:774
double plantingrate
Definition: crocent.h:783
double frleaflitter
Definition: crocent.h:771
struct management::harvestparms harvestparms
double emergenceTemp
Definition: crocent.h:780
int harvestdoy
Definition: crocent.h:770
double StemtoLeaffraction
Definition: crocent.h:782
double frleaf
Definition: crocent.h:771
double frdeadroot
Definition: crocent.h:773
void assignParms ( struct cropcentlayer *  CROPCENT,
double *  somassignparmsfromR 
)
90 {//Rprintf("%f, %f, %f \n", *somassignparmsfromR,*(somassignparmsfromR+1),*(somassignparmsfromR+2));
91  CROPCENT->strucc1.parms.k=3.9;
92  CROPCENT->strucc1.parms.timestep=1440.0;
93  CROPCENT->strucc1.parms.strmx=5000.0;
94  CROPCENT->strucc1.parms.pligst=3.0;
95  CROPCENT->strucc1.parms.bioabsorp=100.0;
96  CROPCENT->strucc1.parms.rsplig=0.3;
97  CROPCENT->strucc1.parms.ps1co2=0.45;
98  CROPCENT->strucc1.parms.pmetabco2=0.48;
99  CROPCENT->strucc1.parms.maxphoto=0.0;
100  CROPCENT->strucc1.TEff.teff1=15.4;
101  CROPCENT->strucc1.TEff.teff2=11.75;
102  CROPCENT->strucc1.TEff.teff3=29.7;
103  CROPCENT->strucc1.TEff.teff4=0.031;
104  CROPCENT->strucc1.SWEFF.a=1.0;
105  CROPCENT->strucc1.SWEFF.b=1.0;
106  CROPCENT->strucc1.SWEFF.c=30.0;
107  CROPCENT->strucc1.SWEFF.d=-9.0;
108  CROPCENT->strucc1.PHEFF.a=4.0;
109  CROPCENT->strucc1.PHEFF.b=0.5;
110  CROPCENT->strucc1.PHEFF.c=1.1;
111  CROPCENT->strucc1.PHEFF.d=0.7;
112 
113 
114 
115 
116  CROPCENT->strucc2.parms.k=4.9;
117  CROPCENT->strucc2.parms.timestep=1440.0;
118  CROPCENT->strucc2.parms.strmx=5000.0;
119  CROPCENT->strucc2.parms.pligst=3.0;
120  CROPCENT->strucc2.parms.rsplig=0.3;
121  CROPCENT->strucc2.parms.ps1co2=0.55;
122  CROPCENT->strucc2.TEff.teff1=15.4;
123  CROPCENT->strucc2.TEff.teff2=11.75;
124  CROPCENT->strucc2.TEff.teff3=29.7;
125  CROPCENT->strucc2.TEff.teff4=0.031;
126  CROPCENT->strucc2.SWEFF.a=1.0;
127  CROPCENT->strucc2.SWEFF.b=1.0;
128  CROPCENT->strucc2.SWEFF.c=30.0;
129  CROPCENT->strucc2.SWEFF.d=9.0;
130  CROPCENT->strucc2.PHEFF.a=4.0;
131  CROPCENT->strucc2.PHEFF.b=0.5;
132  CROPCENT->strucc2.PHEFF.c=1.1;
133  CROPCENT->strucc2.PHEFF.d=0.7;
134  CROPCENT->strucc2.ANEREFF.ANEREF1=1.5;
135  CROPCENT->strucc2.ANEREFF.ANEREF2=3.0;
136  CROPCENT->strucc2.ANEREFF.ANEREF3=0.3;
137 
138 
139  CROPCENT->metabc1.parms.k=14.8;
140  CROPCENT->metabc1.parms.timestep=1440.0;
141  CROPCENT->metabc1.parms.pmco2=0.55;
142  CROPCENT->metabc1.parms.a=1.0;
143  CROPCENT->metabc1.parms.b=0.2;
144  CROPCENT->metabc1.parms.x1=0.0;
145  CROPCENT->metabc1.parms.x2=30000.0;
146  CROPCENT->metabc1.TEff.teff1=15.4;
147  CROPCENT->metabc1.TEff.teff2=11.75;
148  CROPCENT->metabc1.TEff.teff3=29.7;
149  CROPCENT->metabc1.TEff.teff4=0.031;
150  CROPCENT->metabc1.SWEFF.a=1.0;
151  CROPCENT->metabc1.SWEFF.b=1.0;
152  CROPCENT->metabc1.SWEFF.c=30.0;
153  CROPCENT->metabc1.SWEFF.d=-9.0;
154  CROPCENT->metabc1.PHEFF.a=4.8;
155  CROPCENT->metabc1.PHEFF.b=0.5;
156  CROPCENT->metabc1.PHEFF.c=1.14;
157  CROPCENT->metabc1.PHEFF.d=0.7;
158 
159 
160  CROPCENT->metabc2.parms.k=18.5;
161  CROPCENT->metabc2.parms.timestep=1440.0;
162  CROPCENT->metabc2.parms.pmco2=0.55;
163  CROPCENT->metabc2.TEff.teff1=15.4;
164  CROPCENT->metabc2.TEff.teff2=11.75;
165  CROPCENT->metabc2.TEff.teff3=29.7;
166  CROPCENT->metabc2.TEff.teff4=0.031;
167  CROPCENT->metabc2.SWEFF.a=1.0;
168  CROPCENT->metabc2.SWEFF.b=1.0;
169  CROPCENT->metabc2.SWEFF.c=30.0;
170  CROPCENT->metabc2.SWEFF.d=9.0;
171  CROPCENT->metabc2.PHEFF.a=4.8;
172  CROPCENT->metabc2.PHEFF.b=0.5;
173  CROPCENT->metabc2.PHEFF.c=1.14;
174  CROPCENT->metabc2.PHEFF.d=0.7;
175  CROPCENT->metabc2.ANEREFF.ANEREF1=1.5;
176  CROPCENT->metabc2.ANEREFF.ANEREF2=3.0;
177  CROPCENT->metabc2.ANEREFF.ANEREF3=0.3;
178 
179  CROPCENT->wood1.parms.k=3.9;
180  CROPCENT->wood1.parms.timestep=1440.0;
181  CROPCENT->wood1.parms.pligst=3.0;
182  CROPCENT->wood1.parms.rsplig=0.3;
183  CROPCENT->wood1.parms.ps1co2=0.45;
184  CROPCENT->wood1.TEff.teff1=15.4;
185  CROPCENT->wood1.TEff.teff2=11.75;
186  CROPCENT->wood1.TEff.teff3=29.7;
187  CROPCENT->wood1.TEff.teff4=0.031;
188  CROPCENT->wood1.SWEFF.a=1.0;
189  CROPCENT->wood1.SWEFF.b=1.0;
190  CROPCENT->wood1.SWEFF.c=30.0;
191  CROPCENT->wood1.SWEFF.d=9.0;
192  CROPCENT->wood1.PHEFF.a=4.0;
193  CROPCENT->wood1.PHEFF.b=0.5;
194  CROPCENT->wood1.PHEFF.c=1.1;
195  CROPCENT->wood1.PHEFF.d=0.7;
196 
197 
198  CROPCENT->wood2.parms.k=3.9;
199  CROPCENT->wood2.parms.timestep=1440.0;
200  CROPCENT->wood2.parms.pligst=3.0;
201  CROPCENT->wood2.parms.rsplig=0.3;
202  CROPCENT->wood2.parms.ps1co2=0.45;
203  CROPCENT->wood2.TEff.teff1=15.4;
204  CROPCENT->wood2.TEff.teff2=11.75;
205  CROPCENT->wood2.TEff.teff3=29.7;
206  CROPCENT->wood2.TEff.teff4=0.031;
207  CROPCENT->wood2.SWEFF.a=1.0;
208  CROPCENT->wood2.SWEFF.b=1.0;
209  CROPCENT->wood2.SWEFF.c=30.0;
210  CROPCENT->wood2.SWEFF.d=-9.0;
211  CROPCENT->wood2.PHEFF.a=4.0;
212  CROPCENT->wood2.PHEFF.b=0.5;
213  CROPCENT->wood2.PHEFF.c=1.1;
214  CROPCENT->wood2.PHEFF.d=0.7;
215 
216 
217  CROPCENT->wood3.parms.k=4.9;
218  CROPCENT->wood3.parms.timestep=1440.0;
219  CROPCENT->wood3.parms.pligst=3.0;
220  CROPCENT->wood3.parms.rsplig=0.3;
221  CROPCENT->wood3.parms.ps1co2=0.55;
222  CROPCENT->wood3.TEff.teff1=15.4;
223  CROPCENT->wood3.TEff.teff2=11.75;
224  CROPCENT->wood3.TEff.teff3=29.7;
225  CROPCENT->wood3.TEff.teff4=0.031;
226  CROPCENT->wood3.SWEFF.a=1.0;
227  CROPCENT->wood3.SWEFF.b=1.0;
228  CROPCENT->wood3.SWEFF.c=30.0;
229  CROPCENT->wood3.SWEFF.d=-9.0;
230  CROPCENT->wood3.PHEFF.a=4.0;
231  CROPCENT->wood3.PHEFF.b=0.5;
232  CROPCENT->wood3.PHEFF.c=1.1;
233  CROPCENT->wood3.PHEFF.d=0.7;
234  CROPCENT->wood3.ANEREFF.ANEREF1=1.5;
235  CROPCENT->wood3.ANEREFF.ANEREF2=3.0;
236  CROPCENT->wood3.ANEREFF.ANEREF3=0.3;
237 
238 
239  CROPCENT->som1c1.parms.k=6.0;
240  CROPCENT->som1c1.parms.timestep=1440.0;
241  CROPCENT->som1c1.parms.p1co2a=0.6;
242  CROPCENT->som1c1.parms.p1co2b=0.0;
243  CROPCENT->som1c1.parms.a=1.0;
244  CROPCENT->som1c1.parms.b=5.0;
245  CROPCENT->som1c1.parms.x1=0.0;
246  CROPCENT->som1c1.parms.x2=30000.0;
247  CROPCENT->som1c1.TEff.teff1=15.4;
248  CROPCENT->som1c1.TEff.teff2=11.75;
249  CROPCENT->som1c1.TEff.teff3=29.7;
250  CROPCENT->som1c1.TEff.teff4=0.031;
251  CROPCENT->som1c1.SWEFF.a=1.0;
252  CROPCENT->som1c1.SWEFF.b=1.0;
253  CROPCENT->som1c1.SWEFF.c=30.0;
254  CROPCENT->som1c1.SWEFF.d=-9.0;
255  CROPCENT->som1c1.PHEFF.a=4.0;
256  CROPCENT->som1c1.PHEFF.b=0.5;
257  CROPCENT->som1c1.PHEFF.c=1.1;
258  CROPCENT->som1c1.PHEFF.d=0.7;
259  CROPCENT->som1c1.INFLOW.maxCN= 15.0;
260  CROPCENT->som1c1.INFLOW.minCN= 6.0;
261  CROPCENT->som1c1.INFLOW.minN= 1.0;
262  CROPCENT->som1c1.INFLOW.maxCP= 150.0;
263  CROPCENT->som1c1.INFLOW.minCP= 30.0;
264  CROPCENT->som1c1.INFLOW.minP= 2.0;
265  CROPCENT->som1c1.INFLOW.maxCS= 200.0;
266  CROPCENT->som1c1.INFLOW.minCS= 50.0;
267  CROPCENT->som1c1.INFLOW.minS= 2.0;
268  CROPCENT->som1c1.INFLOW.maxCK= 0.0;
269  CROPCENT->som1c1.INFLOW.minCK= 0.0;
270  CROPCENT->som1c1.INFLOW.minK= 0.0;
271 
272 
273 
274  CROPCENT->som2c1.parms.k=0.2;
275  CROPCENT->som2c1.parms.timestep=1440.0;
276  CROPCENT->som2c1.parms.p2co2=0.55;
277  CROPCENT->som2c1.parms.a=1.0;
278  CROPCENT->som2c1.parms.b=5.0;
279  CROPCENT->som2c1.parms.x1=0.0;
280  CROPCENT->som2c1.parms.x2=30000.0;
281  CROPCENT->som2c1.parms.mix=0.5;
282  CROPCENT->som2c1.TEff.teff1=15.4;
283  CROPCENT->som2c1.TEff.teff2=11.75;
284  CROPCENT->som2c1.TEff.teff3=29.7;
285  CROPCENT->som2c1.TEff.teff4=0.031;
286  CROPCENT->som2c1.SWEFF.a=1.0;
287  CROPCENT->som2c1.SWEFF.b=1.0;
288  CROPCENT->som2c1.SWEFF.c=30.0;
289  CROPCENT->som2c1.SWEFF.d=-9.0;
290  CROPCENT->som2c1.PHEFF.a=4.0;
291  CROPCENT->som2c1.PHEFF.b=0.5;
292  CROPCENT->som2c1.PHEFF.c=1.1;
293  CROPCENT->som2c1.PHEFF.d=0.7;
294  CROPCENT->som2c1.INFLOW .maxCN= 20.0;
295  CROPCENT->som2c1.INFLOW .minCN= 12.0;
296  CROPCENT->som2c1.INFLOW .minN= 1.0;
297  CROPCENT->som2c1.INFLOW .maxCP= 300.0;
298  CROPCENT->som2c1.INFLOW .minCP= 100.0;
299  CROPCENT->som2c1.INFLOW .minP= 2.0;
300  CROPCENT->som2c1.INFLOW .maxCS= 400.0;
301  CROPCENT->som2c1.INFLOW .minCS= 100.0;
302  CROPCENT->som2c1.INFLOW .minS= 2.0;
303  CROPCENT->som2c1.INFLOW .maxCK= 0.0;
304  CROPCENT->som2c1.INFLOW .minCK= 0.0;
305  CROPCENT->som2c1.INFLOW .minK= 0.0;
306 
307 
308 
309 
310 
311  CROPCENT->som1c2.parms.k=7.3;
312  CROPCENT->som1c2.parms.timestep=1440.0;
313  CROPCENT->som1c2.parms.peftxa=0.25;
314  CROPCENT->som1c2.parms.peftxb=0.75;
315  CROPCENT->som1c2.parms.p1co2a=0.17;
316  CROPCENT->som1c2.parms.p1co2b=0.68;
317  CROPCENT->som1c2.parms.ps1s3[0]=0.003;
318  CROPCENT->som1c2.parms.ps1s3[1]=0.032;
319  CROPCENT->som1c2.parms.animpt=5.0;
320  CROPCENT->som1c2.TEff.teff1=15.4;
321  CROPCENT->som1c2.TEff.teff2=11.75;
322  CROPCENT->som1c2.TEff.teff3=29.7;
323  CROPCENT->som1c2.TEff.teff4=0.031;
324  CROPCENT->som1c2.SWEFF.a=1.0;
325  CROPCENT->som1c2.SWEFF.b=1.0;
326  CROPCENT->som1c2.SWEFF.c=30.0;
327  CROPCENT->som1c2.SWEFF.d=-9.0;
328  CROPCENT->som1c2.PHEFF.a=4.0;
329  CROPCENT->som1c2.PHEFF.b=0.5;
330  CROPCENT->som1c2.PHEFF.c=1.1;
331  CROPCENT->som1c2.PHEFF.d=0.7;
332  CROPCENT->som1c2.ANEREFF.ANEREF1=1.5;
333  CROPCENT->som1c2.ANEREFF.ANEREF2=3.0;
334  CROPCENT->som1c2.ANEREFF.ANEREF3=0.3;
335  CROPCENT->som1c2.INFLOW .maxCN= 14.0;
336  CROPCENT->som1c2.INFLOW .minCN= 3.0;
337  CROPCENT->som1c2.INFLOW .minN= 2.0;
338  CROPCENT->som1c2.INFLOW .maxCP= 150.0;
339  CROPCENT->som1c2.INFLOW .minCP= 30.0;
340  CROPCENT->som1c2.INFLOW .minP= 2.0;
341  CROPCENT->som1c2.INFLOW .maxCS= 200.0;
342  CROPCENT->som1c2.INFLOW .minCS= 50.0;
343  CROPCENT->som1c2.INFLOW .minS= 2.0;
344  CROPCENT->som1c2.INFLOW .maxCK= 0.0;
345  CROPCENT->som1c2.INFLOW .minCK= 0.0;
346  CROPCENT->som1c2.INFLOW .minK= 0.0;
347 
348 
349 
350  CROPCENT->som2c2.parms.k=0.25;
351  CROPCENT->som2c2.parms.timestep=1440.0;
352  CROPCENT->som2c2.parms.p2co2=0.55;
353  CROPCENT->som2c2.parms.ps2s3[0]=0.003;
354  CROPCENT->som2c2.parms.ps2s3[1]=0.009;
355  CROPCENT->som2c2.parms.animpt=5.0;
356  CROPCENT->som2c2.TEff.teff1=15.4;
357  CROPCENT->som2c2.TEff.teff2=11.75;
358  CROPCENT->som2c2.TEff.teff3=29.7;
359  CROPCENT->som2c2.TEff.teff4=.031;
360  CROPCENT->som2c2.SWEFF.a=1.0;
361  CROPCENT->som2c2.SWEFF.b=1.0;
362  CROPCENT->som2c2.SWEFF.c=30.0;
363  CROPCENT->som2c2.SWEFF.d=-9.0;
364  CROPCENT->som2c2.PHEFF.a=4.0;
365  CROPCENT->som2c2.PHEFF.b=0.5;
366  CROPCENT->som2c2.PHEFF.c=1.1;
367  CROPCENT->som2c2.PHEFF.d=0.7;
368  CROPCENT->som2c2.ANEREFF.ANEREF1=1.5;
369  CROPCENT->som2c2.ANEREFF.ANEREF2=3.0;
370  CROPCENT->som2c2.ANEREFF.ANEREF3=0.3;
371  CROPCENT->som2c2.INFLOW .maxCN= 20.0;
372  CROPCENT->som2c2.INFLOW .minCN= 12.0;
373  CROPCENT->som2c2.INFLOW .minN= 2.0;
374  CROPCENT->som2c2.INFLOW .maxCP= 400.0;
375  CROPCENT->som2c2.INFLOW .minCP= 100.0;
376  CROPCENT->som2c2.INFLOW .minP= 2.0;
377  CROPCENT->som2c2.INFLOW .maxCS= 400.0;
378  CROPCENT->som2c2.INFLOW .minCS= 100.0;
379  CROPCENT->som2c2.INFLOW .minS= 2.0;
380  CROPCENT->som2c2.INFLOW .maxCK= 0.0;
381  CROPCENT->som2c2.INFLOW .minCK= 0.0;
382  CROPCENT->som2c2.INFLOW .minK= 0.0;
383 
384 
385 
386  CROPCENT->som3c.parms.k=0.0025;
387  CROPCENT->som3c.parms.timestep=1440.0;
388  CROPCENT->som3c.parms.p3co2=0.55;
389  CROPCENT->som3c.TEff.teff1=15.4;
390  CROPCENT->som3c.TEff.teff2=11.75;
391  CROPCENT->som3c.TEff.teff3=29.7;
392  CROPCENT->som3c.TEff.teff4=0.031;
393  CROPCENT->som3c.SWEFF.a=1.0;
394  CROPCENT->som3c.SWEFF.b=1.0;
395  CROPCENT->som3c.SWEFF.c=30.0;
396  CROPCENT->som3c.SWEFF.d=-9.0;
397  CROPCENT->som3c.PHEFF.a=3.0;
398  CROPCENT->som3c.PHEFF.b=0.5;
399  CROPCENT->som3c.PHEFF.c=1.10;
400  CROPCENT->som3c.PHEFF.d=0.7;
401  CROPCENT->som3c.ANEREFF.ANEREF1=1.5;
402  CROPCENT->som3c.ANEREFF.ANEREF2=3.0;
403  CROPCENT->som3c.ANEREFF.ANEREF3=0.3;
404  CROPCENT->som3c.INFLOW .maxCN= 8.0;
405  CROPCENT->som3c.INFLOW .minCN= 6.0;
406  CROPCENT->som3c.INFLOW .minN= 2.0;
407  CROPCENT->som3c.INFLOW .maxCP= 200.0;
408  CROPCENT->som3c.INFLOW .minCP= 50.0;
409  CROPCENT->som3c.INFLOW .minP= 2.0;
410  CROPCENT->som3c.INFLOW .maxCS= 200.0;
411  CROPCENT->som3c.INFLOW .minCS= 50.0;
412  CROPCENT->som3c.INFLOW .minS= 2.0;
413  CROPCENT->som3c.INFLOW .maxCK= 0.0;
414  CROPCENT->som3c.INFLOW .minCK= 0.0;
415  CROPCENT->som3c.INFLOW .minK= 0.0;
416  return;
417 }
double ps1co2
Definition: crocent.h:210
double k
Definition: crocent.h:283
struct strucc2::parms2 parms
double x1
Definition: crocent.h:311
double peftxb
Definition: crocent.h:405
struct TempEffectParms TEff
Definition: crocent.h:264
double bioabsorp
Definition: crocent.h:180
double pmco2
Definition: crocent.h:310
double timestep
Definition: crocent.h:404
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:411
double ANEREF1
Definition: crocent.h:59
double a
Definition: crocent.h:52
double rsplig
Definition: crocent.h:286
double p2co2
Definition: crocent.h:380
double timestep
Definition: crocent.h:378
double rsplig
Definition: crocent.h:209
double pligst
Definition: crocent.h:285
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:314
struct flowrestriction INFLOW
Definition: crocent.h:361
double k
Definition: crocent.h:205
double ps1co2
Definition: crocent.h:237
double k
Definition: crocent.h:429
struct TempEffectParms TEff
Definition: crocent.h:186
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:240
double timestep
Definition: crocent.h:234
double maxCP
Definition: crocent.h:33
double a
Definition: crocent.h:66
double b
Definition: crocent.h:379
struct wood2 wood2
Definition: crocent.h:527
double b
Definition: crocent.h:67
struct TempEffectParms TEff
Definition: crocent.h:212
double b
Definition: crocent.h:311
double c
Definition: crocent.h:68
double p1co2b
Definition: crocent.h:406
double strmx
Definition: crocent.h:207
struct PHParms PHEFF
Definition: crocent.h:438
double teff3
Definition: crocent.h:47
double k
Definition: crocent.h:233
double a
Definition: crocent.h:311
double ps1co2
Definition: crocent.h:182
struct PHParms PHEFF
Definition: crocent.h:241
double rsplig
Definition: crocent.h:236
struct flowrestriction INFLOW
Definition: crocent.h:414
struct TempEffectParms TEff
Definition: crocent.h:383
double x2
Definition: crocent.h:311
struct som1c1 som1c1
Definition: crocent.h:521
double minCS
Definition: crocent.h:34
struct som3c::parms12 parms
struct TempEffectParms TEff
Definition: crocent.h:239
double timestep
Definition: crocent.h:206
double k
Definition: crocent.h:403
double a
Definition: crocent.h:354
double p1co2a
Definition: crocent.h:406
double minK
Definition: crocent.h:35
struct TempEffectParms TEff
Definition: crocent.h:435
double k
Definition: crocent.h:308
double pmco2
Definition: crocent.h:332
struct wood3 wood3
Definition: crocent.h:528
double k
Definition: crocent.h:176
double rsplig
Definition: crocent.h:181
double teff1
Definition: crocent.h:45
struct PHParms PHEFF
Definition: crocent.h:385
struct PHParms PHEFF
Definition: crocent.h:315
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:459
double timestep
Definition: crocent.h:284
double pligst
Definition: crocent.h:179
double ps1co2
Definition: crocent.h:262
double a
Definition: crocent.h:379
struct som1c2::parms10 parms
double k
Definition: crocent.h:454
struct som3c som3c
Definition: crocent.h:525
struct PHParms PHEFF
Definition: crocent.h:337
double ANEREF3
Definition: crocent.h:61
double maxCK
Definition: crocent.h:33
double minN
Definition: crocent.h:35
struct metabc1::parms6 parms
double teff2
Definition: crocent.h:46
struct metabc2::parms7 parms
double timestep
Definition: crocent.h:309
double ps2s3[2]
Definition: crocent.h:432
double minCK
Definition: crocent.h:34
double p1co2a
Definition: crocent.h:355
struct AnaerobicParms ANEREFF
Definition: crocent.h:336
double minCP
Definition: crocent.h:34
double k
Definition: crocent.h:258
double p3co2
Definition: crocent.h:456
struct AnaerobicParms ANEREFF
Definition: crocent.h:292
double rsplig
Definition: crocent.h:261
struct som1c1::parms8 parms
struct AnaerobicParms ANEREFF
Definition: crocent.h:412
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:187
struct som1c2 som1c2
Definition: crocent.h:522
double x1
Definition: crocent.h:354
struct wood1::parms3 parms
struct PHParms PHEFF
Definition: crocent.h:293
struct som2c1 som2c1
Definition: crocent.h:523
struct strucc2 strucc2
Definition: crocent.h:518
struct som2c2::parms11 parms
double d
Definition: crocent.h:55
struct TempEffectParms TEff
Definition: crocent.h:290
double maxphoto
Definition: crocent.h:184
struct PHParms PHEFF
Definition: crocent.h:413
double animpt
Definition: crocent.h:408
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:265
double pligst
Definition: crocent.h:208
double k
Definition: crocent.h:330
struct flowrestriction INFLOW
Definition: crocent.h:462
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:384
double strmx
Definition: crocent.h:178
double mix
Definition: crocent.h:381
struct PHParms PHEFF
Definition: crocent.h:461
double p2co2
Definition: crocent.h:431
struct metabc2 metabc2
Definition: crocent.h:520
struct som2c2 som2c2
Definition: crocent.h:524
double c
Definition: crocent.h:54
double x2
Definition: crocent.h:354
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:213
double timestep
Definition: crocent.h:331
double timestep
Definition: crocent.h:455
double minCN
Definition: crocent.h:34
struct PHParms PHEFF
Definition: crocent.h:215
struct TempEffectParms TEff
Definition: crocent.h:458
double d
Definition: crocent.h:69
double pmetabco2
Definition: crocent.h:183
double maxCS
Definition: crocent.h:33
double pligst
Definition: crocent.h:260
struct PHParms PHEFF
Definition: crocent.h:360
double p1co2b
Definition: crocent.h:356
double x2
Definition: crocent.h:379
struct AnaerobicParms ANEREFF
Definition: crocent.h:437
struct som2c1::parms9 parms
double timestep
Definition: crocent.h:353
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:436
double animpt
Definition: crocent.h:433
double timestep
Definition: crocent.h:259
struct AnaerobicParms ANEREFF
Definition: crocent.h:214
struct wood1 wood1
Definition: crocent.h:526
double maxCN
Definition: crocent.h:33
double minP
Definition: crocent.h:35
struct flowrestriction INFLOW
Definition: crocent.h:386
double peftxa
Definition: crocent.h:405
struct strucc1 strucc1
Definition: crocent.h:517
struct PHParms PHEFF
Definition: crocent.h:188
struct wood3::parms5 parms
double b
Definition: crocent.h:354
struct wood2::parms4 parms
struct PHParms PHEFF
Definition: crocent.h:266
double teff4
Definition: crocent.h:48
struct TempEffectParms TEff
Definition: crocent.h:313
double timestep
Definition: crocent.h:430
double x1
Definition: crocent.h:379
struct metabc1 metabc1
Definition: crocent.h:519
double b
Definition: crocent.h:53
double timestep
Definition: crocent.h:177
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:335
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:291
double ANEREF2
Definition: crocent.h:60
double pligst
Definition: crocent.h:235
struct AnaerobicParms ANEREFF
Definition: crocent.h:460
struct flowrestriction INFLOW
Definition: crocent.h:439
struct SoilWaterEffectParms SWEFF
Definition: crocent.h:359
struct TempEffectParms TEff
Definition: crocent.h:358
double k
Definition: crocent.h:377
double minS
Definition: crocent.h:35
double ps1co2
Definition: crocent.h:287
struct TempEffectParms TEff
Definition: crocent.h:410
struct strucc1::parms1 parms
double ps1s3[2]
Definition: crocent.h:407
struct TempEffectParms TEff
Definition: crocent.h:334
double k
Definition: crocent.h:352
void assignPools ( struct cropcentlayer *  CROPCENT,
double *  sompoolsfromR 
)
7 {
8  CROPCENT->strucc1.C.totalC=*(sompoolsfromR+0);
9  CROPCENT->strucc1.C.unlablTOlabl=*(sompoolsfromR+1);
10  CROPCENT->strucc1.E.CN=*(sompoolsfromR+2);
11  CROPCENT->strucc1.E.CP=*(sompoolsfromR+3);
12  CROPCENT->strucc1.E.CS=*(sompoolsfromR+4);
13  CROPCENT->strucc1.E.CK=*(sompoolsfromR+5);
14  CROPCENT->strucc1.lignin=*(sompoolsfromR+6);
15  CROPCENT->strucc2.C.totalC=*(sompoolsfromR+7);
16  CROPCENT->strucc2.C.unlablTOlabl=*(sompoolsfromR+8);
17  CROPCENT->strucc2.E.CN=*(sompoolsfromR+9);
18  CROPCENT->strucc2.E.CP=*(sompoolsfromR+10);
19  CROPCENT->strucc2.E.CS=*(sompoolsfromR+11);
20  CROPCENT->strucc2.E.CK=*(sompoolsfromR+12);
21  CROPCENT->strucc2.lignin=*(sompoolsfromR+13);
22  CROPCENT->metabc1.C.totalC=*(sompoolsfromR+14);
23  CROPCENT->metabc1.C.unlablTOlabl=*(sompoolsfromR+15);
24  CROPCENT->metabc1.E.CN=*(sompoolsfromR+16);
25  CROPCENT->metabc1.E.CP=*(sompoolsfromR+17);
26  CROPCENT->metabc1.E.CS=*(sompoolsfromR+18);
27  CROPCENT->metabc1.E.CK=*(sompoolsfromR+19);
28  CROPCENT->metabc2.C.totalC=*(sompoolsfromR+20);
29  CROPCENT->metabc2.C.unlablTOlabl=*(sompoolsfromR+21);
30  CROPCENT->metabc2.E.CN=*(sompoolsfromR+22);
31  CROPCENT->metabc2.E.CP=*(sompoolsfromR+23);
32  CROPCENT->metabc2.E.CS=*(sompoolsfromR+24);
33  CROPCENT->metabc2.E.CK=*(sompoolsfromR+25);
34  CROPCENT->wood1.C.totalC=*(sompoolsfromR+26);
35  CROPCENT->wood1.C.unlablTOlabl=*(sompoolsfromR+27);
36  CROPCENT->wood1.E.CN=*(sompoolsfromR+28);
37  CROPCENT->wood1.E.CP=*(sompoolsfromR+29);
38  CROPCENT->wood1.E.CS=*(sompoolsfromR+30);
39  CROPCENT->wood1.E.CK=*(sompoolsfromR+31);
40  CROPCENT->wood1.lignin=*(sompoolsfromR+32);
41  CROPCENT->wood2.C.totalC=*(sompoolsfromR+33);
42  CROPCENT->wood2.C.unlablTOlabl=*(sompoolsfromR+34);
43  CROPCENT->wood2.E.CN=*(sompoolsfromR+35);
44  CROPCENT->wood2.E.CP=*(sompoolsfromR+36);
45  CROPCENT->wood2.E.CS=*(sompoolsfromR+37);
46  CROPCENT->wood2.E.CK=*(sompoolsfromR+38);
47  CROPCENT->wood2.lignin=*(sompoolsfromR+39);
48  CROPCENT->wood3.C.totalC=*(sompoolsfromR+40);
49  CROPCENT->wood3.C.unlablTOlabl=*(sompoolsfromR+41);
50  CROPCENT->wood3.E.CN=*(sompoolsfromR+42);
51  CROPCENT->wood3.E.CP=*(sompoolsfromR+43);
52  CROPCENT->wood3.E.CS=*(sompoolsfromR+44);
53  CROPCENT->wood3.E.CK=*(sompoolsfromR+45);
54  CROPCENT->wood3.lignin=*(sompoolsfromR+46);
55  CROPCENT->som1c1.C.totalC=*(sompoolsfromR+47);
56  CROPCENT->som1c1.C.unlablTOlabl=*(sompoolsfromR+48);
57  CROPCENT->som1c1.E.CN=*(sompoolsfromR+49);
58  CROPCENT->som1c1.E.CP=*(sompoolsfromR+50);
59  CROPCENT->som1c1.E.CS=*(sompoolsfromR+51);
60  CROPCENT->som1c1.E.CK=*(sompoolsfromR+52);
61  CROPCENT->som1c2.C.totalC=*(sompoolsfromR+53);
62  CROPCENT->som1c2.C.unlablTOlabl=*(sompoolsfromR+54);
63  CROPCENT->som1c2.E.CN=*(sompoolsfromR+55);
64  CROPCENT->som1c2.E.CP=*(sompoolsfromR+56);
65  CROPCENT->som1c2.E.CS=*(sompoolsfromR+57);
66  CROPCENT->som1c2.E.CK=*(sompoolsfromR+58);
67  CROPCENT->som2c1.C.totalC=*(sompoolsfromR+59);
68  CROPCENT->som2c1.C.unlablTOlabl=*(sompoolsfromR+60);
69  CROPCENT->som2c1.E.CN=*(sompoolsfromR+61);
70  CROPCENT->som2c1.E.CP=*(sompoolsfromR+62);
71  CROPCENT->som2c1.E.CS=*(sompoolsfromR+63);
72  CROPCENT->som2c1.E.CK=*(sompoolsfromR+64);
73  CROPCENT->som2c2.C.totalC=*(sompoolsfromR+65);
74  CROPCENT->som2c2.C.unlablTOlabl=*(sompoolsfromR+66);
75  CROPCENT->som2c2.E.CN=*(sompoolsfromR+67);
76  CROPCENT->som2c2.E.CP=*(sompoolsfromR+68);
77  CROPCENT->som2c2.E.CS=*(sompoolsfromR+69);
78  CROPCENT->som2c2.E.CK=*(sompoolsfromR+70);
79  CROPCENT->som3c.C.totalC=*(sompoolsfromR+71);
80  CROPCENT->som3c.C.unlablTOlabl=*(sompoolsfromR+72);
81  CROPCENT->som3c.E.CN=*(sompoolsfromR+73);
82  CROPCENT->som3c.E.CP=*(sompoolsfromR+74);
83  CROPCENT->som3c.E.CS=*(sompoolsfromR+75);
84  CROPCENT->som3c.E.CK=*(sompoolsfromR+76);
85  return;
86 }
struct carbon C
Definition: crocent.h:163
double lignin
Definition: crocent.h:223
struct minerals E
Definition: crocent.h:299
double CK
Definition: crocent.h:29
struct carbon C
Definition: crocent.h:320
double lignin
Definition: crocent.h:195
struct minerals E
Definition: crocent.h:392
struct carbon C
Definition: crocent.h:221
struct wood2 wood2
Definition: crocent.h:527
struct carbon C
Definition: crocent.h:418
struct minerals E
Definition: crocent.h:445
double lignin
Definition: crocent.h:273
struct som1c1 som1c1
Definition: crocent.h:521
struct minerals E
Definition: crocent.h:247
struct carbon C
Definition: crocent.h:298
struct wood3 wood3
Definition: crocent.h:528
struct carbon C
Definition: crocent.h:366
struct carbon C
Definition: crocent.h:193
struct som3c som3c
Definition: crocent.h:525
struct minerals E
Definition: crocent.h:367
double lignin
Definition: crocent.h:165
double lignin
Definition: crocent.h:248
struct som1c2 som1c2
Definition: crocent.h:522
struct som2c1 som2c1
Definition: crocent.h:523
struct strucc2 strucc2
Definition: crocent.h:518
struct minerals E
Definition: crocent.h:164
struct metabc2 metabc2
Definition: crocent.h:520
struct som2c2 som2c2
Definition: crocent.h:524
struct minerals E
Definition: crocent.h:343
struct wood1 wood1
Definition: crocent.h:526
double CP
Definition: crocent.h:27
struct carbon C
Definition: crocent.h:246
struct minerals E
Definition: crocent.h:272
struct strucc1 strucc1
Definition: crocent.h:517
struct minerals E
Definition: crocent.h:419
double unlablTOlabl
Definition: crocent.h:21
struct metabc1 metabc1
Definition: crocent.h:519
struct minerals E
Definition: crocent.h:321
double totalC
Definition: crocent.h:20
struct minerals E
Definition: crocent.h:222
struct carbon C
Definition: crocent.h:391
double CS
Definition: crocent.h:28
double CN
Definition: crocent.h:26
struct carbon C
Definition: crocent.h:444
struct carbon C
Definition: crocent.h:271
struct carbon C
Definition: crocent.h:342
struct minerals E
Definition: crocent.h:194
void BiocroToCrocent ( double *  stdedbc,
double  fallrate,
double  lignin,
struct minerals *  E,
double  isotoperatio,
int  surface,
int  woody,
struct InputToCropcent *  INCROCENT 
)
149 {
150  /***************************************************************
151  * Purpose:
152  * Purpose of this function is to take the daily output of BioCro
153  * and create structure InputToCrocent that contains information
154  * about characteristics of the litter and this structure can be used to
155  * update Crocent pools
156  * Note that we are not reducing standing biomass due to photodecomposition
157  * we are only letting it fall based on fallrate to contribute to
158  * appropriate soilpools
159  *
160  *
161  * Arguments
162  * (1) *stdedbc - This is a pointe to standing dead biomass. We are using
163  * ponters here because we would like to update it after accouting for
164  * reduction in fall rate
165  * (2) fallrate - This represents fraction of standing deadbiomasss
166  * that will contribute to soil pools
167  * (3) lignin - This represents lignin content of the dead biomass
168  * (4) E representes CN,CP,CS, CK- represents nutrient:C ratio for the dead biomass
169  * (5) isotopratio - represents ratio of unlabled and labled C in
170  * the dead biomass
171  * (6) surface = 1 for surface input and 0 for below ground input
172  * (7) woody =0 for non woody material and
173  * woody =1 for branches
174  * woody =2 for large wood
175  * woody =3 for coarse roots
176  *
177  * We also need some environmental variables to evaluate photodegradation of
178  * the standing biomass
179  * **********************************************************/
180  double temp;
181  if(fallrate>1.0)
182  {
183  error("Fall rate is greather than 1.0");
184  }
185 
186  temp=(*stdedbc)*fallrate; // Find how much litter goes to ground
187  (*stdedbc)=(*stdedbc)-temp; // update standing litter
188 
189  temp=temp*40; // unit conversion for Mg biomass/ha to gram C/m2 for non woody
190 
191  INCROCENT->C.totalC =temp;
192  INCROCENT->C.unlablTOlabl = isotoperatio;
193  INCROCENT->E.CN= E->CN;
194  INCROCENT->E.CP= E->CP;
195  INCROCENT->E.CS= E->CS;
196  INCROCENT->E.CK= E->CK;
197  INCROCENT->lignin=lignin;
198  INCROCENT->surface=surface;
199  INCROCENT->woody=woody;
200  return;
201 }
double CK
Definition: crocent.h:29
int woody
Definition: crocent.h:112
struct carbon C
Definition: crocent.h:108
double lignin
Definition: crocent.h:110
int surface
Definition: crocent.h:111
double CP
Definition: crocent.h:27
double unlablTOlabl
Definition: crocent.h:21
struct minerals E
Definition: crocent.h:109
double totalC
Definition: crocent.h:20
double CS
Definition: crocent.h:28
double CN
Definition: crocent.h:26
double CalculateGrowthResp ( double  newbiomass,
double  growthRespFactor 
)
457 {
458  double tmp;
459  tmp=(newbiomass>0.0)?newbiomass*growthRespCoeff:0.0;
460  return(tmp);
461 }
double newbiomass(double AcanopyNet, double k, double GrowthRespCoeff)
Definition: AuxCropGro.c:422
double canopyNsenescence ( struct leaf *  leaf,
double  SLA,
double  kN,
double  leafNsen 
)
263 {
264  /*****************************************************
265  * Purpose:
266  *
267  * Purpose of this function is to calculate additional N senescence due to N deficiency
268  * It uses current value of average canopy N, use this and an exponential coefficient to
269  * determine vertical distribution of leaf N canopy.
270  * If this vertical distrbution results in leaf N of lower canopy which is less than a threshold value
271  * then an leaf biomass (equivalent to LAI which is having lower than threshold leaf N conc.) is senesced
272  * Input
273  * leaf: pointer to leaf structure
274  * SLA: specific leaf area (in ha/Mg)
275  * kN: coefficient determining exponentially declining leaf N conc (dimensionless)
276  * leafNsen: any leaf with leaf N conc lower than leafNsen will be senesced (mmol N m-2)
277  * Output/return
278  * Senesced leaf biomass (Mg/ha)
279  * ***************************************************/
280  double tmp;
281  double laimax,laicurrent;
282  double leafN;
283  leafN=leaf->biomassE.CN;
284  laimax=(1/kN)*log(1+(kN*leafN/leafNsen));
285  laicurrent=leaf->biomass*SLA;
286  if(laicurrent<=laimax)
287  {
288  tmp=0.0;
289  }
290  else
291  {
292  tmp=(laicurrent-laimax)/SLA;
293  }
294  return(tmp);
295 }
double biomass
Definition: crocent.h:630
int CheckDecomposition ( struct minerals *  source,
struct minerals *  flow,
struct cropcentEnvironment *  ENV,
int  Eflag 
)
int CheckEmergence ( struct dailyclimate *  dailyclimate,
double  EmergTemperature 
)
674 {
675  int flag;
676  if(((dailyclimate->minimumTemp)>EmergTemperature)&&((dailyclimate->doy)>90)&&((dailyclimate->doy)<270)){
677  flag =1;
678  }
679  else
680  {
681  flag = 0;
682  }
683  return(flag);
684 }
double minimumTemp
Definition: crocent.h:15
int doy
Definition: crocent.h:9
void createNULLmiscanthus ( struct miscanthus *  miscanthus,
int  vecsize 
)
12 {
13  int i;
14  miscanthus->leafvec=malloc((vecsize+1)*sizeof(*miscanthus->leafvec));
15  miscanthus->stemvec=malloc((vecsize+1)*sizeof(*miscanthus->stemvec));
16  miscanthus->rootvec=malloc((vecsize+1)*sizeof(*miscanthus->rootvec));
17  miscanthus->rhizomevec=malloc((vecsize+1)*sizeof(*miscanthus->rhizomevec));
18 
19  for (i = 0; i<=vecsize;i++)
20  {
21  miscanthus->leafvec[i].newbiomass=0.0;
22  miscanthus->leafvec[i].newlitter=0.0;
23  miscanthus->leafvec[i].ageinTT=0.0;
24  miscanthus->stemvec[i].newbiomass=0.0;
25  miscanthus->stemvec[i].newlitter=0.0;
26  miscanthus->stemvec[i].ageinTT=0.0;
27  miscanthus->rootvec[i].newbiomass=0.0;
28  miscanthus->rootvec[i].newlitter=0.0;
29  miscanthus->rootvec[i].ageinTT=0.0;
30  miscanthus->rhizomevec[i].newbiomass=0.0;
31  miscanthus->rhizomevec[i].newlitter=0.0;
32  miscanthus->rhizomevec[i].ageinTT=0.0;
33 
34  }
35 
36  miscanthus->leaf.biomass=0.0;
37  miscanthus->stem.biomass=0.0;
38  miscanthus->root.biomass=0.0;
39  miscanthus->rhizome.biomass=0.0;
40  miscanthus->leaf.litter=0.0;
41  miscanthus->stem.litter=0.0;
42  miscanthus->root.litter=0.0;
43  miscanthus->rhizome.litter=0.0;
44  miscanthus->rhizome.carbohydratefraction=0.6; // Lets assume that in the beginning carbohydrate fraction of dry biomass is 60%
45  return;
46 }
double newbiomass
Definition: crocent.h:654
double carbohydratefraction
Definition: crocent.h:643
double biomass
Definition: crocent.h:642
double litter
Definition: crocent.h:642
struct leaf leaf
Definition: crocent.h:677
double biomass
Definition: crocent.h:649
double litter
Definition: crocent.h:649
struct root root
Definition: crocent.h:680
double ageinTT
Definition: crocent.h:656
struct dailyvec * rootvec
Definition: crocent.h:681
double litter
Definition: crocent.h:630
double litter
Definition: crocent.h:636
double newlitter
Definition: crocent.h:655
double biomass
Definition: crocent.h:630
struct rhizome rhizome
Definition: crocent.h:679
struct stem stem
Definition: crocent.h:678
struct dailyvec * leafvec
Definition: crocent.h:681
double biomass
Definition: crocent.h:636
struct dailyvec * stemvec
Definition: crocent.h:681
struct dailyvec * rhizomevec
Definition: crocent.h:681
void CROPCENTTimescaling ( struct cropcentlayer *  CROPCENT)
419  {
420 CROPCENT->strucc1.parms.k= timescaling(CROPCENT->strucc1.parms.k,CROPCENT->strucc1.parms.timestep);
421 CROPCENT->strucc2.parms.k= timescaling(CROPCENT->strucc2.parms.k,CROPCENT->strucc2.parms.timestep);
422 CROPCENT->metabc1.parms.k= timescaling(CROPCENT->metabc1.parms.k,CROPCENT->metabc1.parms.timestep);
423 CROPCENT->metabc2.parms.k= timescaling(CROPCENT->metabc2.parms.k,CROPCENT->metabc2.parms.timestep);
424 CROPCENT->wood1.parms.k= timescaling(CROPCENT->wood1.parms.k,CROPCENT->wood1.parms.timestep);
425 CROPCENT->wood2.parms.k= timescaling(CROPCENT->wood2.parms.k,CROPCENT->wood2.parms.timestep);
426 CROPCENT->wood3.parms.k= timescaling(CROPCENT->wood3.parms.k,CROPCENT->wood3.parms.timestep);
427 CROPCENT->som1c1.parms.k= timescaling(CROPCENT->som1c1.parms.k,CROPCENT->som1c1.parms.timestep);
428 CROPCENT->som2c1.parms.k= timescaling(CROPCENT->som2c1.parms.k,CROPCENT->som2c1.parms.timestep);
429 CROPCENT->som1c2.parms.k= timescaling(CROPCENT->som1c2.parms.k,CROPCENT->som1c2.parms.timestep);
430 CROPCENT->som2c2.parms.k= timescaling(CROPCENT->som2c2.parms.k,CROPCENT->som2c2.parms.timestep);
431 CROPCENT->som3c.parms.k= timescaling(CROPCENT->som3c.parms.k,CROPCENT->som3c.parms.timestep);
432  return;
433 }
double k
Definition: crocent.h:283
struct strucc2::parms2 parms
double timestep
Definition: crocent.h:404
double timestep
Definition: crocent.h:378
double k
Definition: crocent.h:205
double k
Definition: crocent.h:429
double timestep
Definition: crocent.h:234
struct wood2 wood2
Definition: crocent.h:527
double k
Definition: crocent.h:233
struct som1c1 som1c1
Definition: crocent.h:521
struct som3c::parms12 parms
double timestep
Definition: crocent.h:206
double k
Definition: crocent.h:403
double k
Definition: crocent.h:308
struct wood3 wood3
Definition: crocent.h:528
double k
Definition: crocent.h:176
double timestep
Definition: crocent.h:284
struct som1c2::parms10 parms
double k
Definition: crocent.h:454
struct som3c som3c
Definition: crocent.h:525
struct metabc1::parms6 parms
struct metabc2::parms7 parms
double timestep
Definition: crocent.h:309
double k
Definition: crocent.h:258
struct som1c1::parms8 parms
struct som1c2 som1c2
Definition: crocent.h:522
struct wood1::parms3 parms
struct som2c1 som2c1
Definition: crocent.h:523
struct strucc2 strucc2
Definition: crocent.h:518
struct som2c2::parms11 parms
double k
Definition: crocent.h:330
struct metabc2 metabc2
Definition: crocent.h:520
struct som2c2 som2c2
Definition: crocent.h:524
double timestep
Definition: crocent.h:331
double timestep
Definition: crocent.h:455
struct som2c1::parms9 parms
double timestep
Definition: crocent.h:353
double timestep
Definition: crocent.h:259
struct wood1 wood1
Definition: crocent.h:526
struct strucc1 strucc1
Definition: crocent.h:517
struct wood3::parms5 parms
double timescaling(double k, double t)
struct wood2::parms4 parms
double timestep
Definition: crocent.h:430
struct metabc1 metabc1
Definition: crocent.h:519
double timestep
Definition: crocent.h:177
double k
Definition: crocent.h:377
struct strucc1::parms1 parms
double k
Definition: crocent.h:352
void dailyC3tree ( struct c3tree *  c3tree,
double  coefs[25],
double  TherPrds[6],
double  TherTime,
double  Temp,
double  dailynetassim,
struct senthermaltemp *  senparms,
struct canopyparms *  canopyparms,
struct frostParms *  frostparms,
struct respirationParms *  RESP 
)
void dailymiscanthus ( struct miscanthus *  miscanthus,
double  coefs[25],
double  TherPrds[6],
double  TherTime,
double  Temp,
double  dailynetassim,
struct senthermaltemp *  senparms,
struct canopyparms *  canopyparms,
struct frostParms *  frostparms,
int  N,
double  delTT,
struct respirationParms *  RESP,
int  emergence 
)
467 {
468 
469  double remobStem,remobRoot,remobRhiz;
470  remobStem=canopyparms->remobFac;
471  remobRoot=canopyparms->remobFac;
472  remobRhiz=canopyparms->remobFac;
473  double deadleaf,deadstem,deadroot,deadrhiz;
474  double dailysenesced;
475  double remobilized;
476  double totalassimilate;
477  struct crop_phenology cropdbp;
478  double newleaf,newstem,newrhiz,newroot;
479  double kLeaf,kStem,kRoot,kRhizome;
480  double newLeaf,newStem,newRhizome,newRoot;
481  double newLeaflitter,newStemlitter,newRhizomelitter,newRootlitter;
482  double totalmaintenance;
483  double RemobilizedFromLitter,RemobilizedFromRhizome;
484  double SumofKpart,Dailybalance;
485 
486 // double getStemSenescence(struct stem *stem, struct littervec *littervec, double criticalTT, double Temp, double remobfa, struct frostParms *frostparms, int N)
487  // calculate senescing biomass for today based on Thermal Time, N conce. and Frost conditions
488 
489  getfrostparms(frostparms);
490  getsenescenceparms(senparms);
491 
492 
493  if(emergence ==1)
494  {
495  cropcent_dbp(coefs,TherPrds,TherTime, &cropdbp);
496  kLeaf = cropdbp.DBP.kLeaf;
497  kStem = cropdbp.DBP.kStem;
498  kRoot = cropdbp.DBP.kRoot;
499  kRhizome = cropdbp.DBP.kRhiz;
500 
501  // calculate senescence, Remobilization due to senescece will contribute to growth of new plant organs
502  deadleaf=getLeafSenescence(&miscanthus->leaf,senparms->leafcriticalT,senparms->leaffr, Temp, frostparms,TherTime,canopyparms);
503  deadstem=getStemSenescence(&miscanthus->stem,senparms->stemcriticalT,senparms->stemfr, Temp, frostparms,TherTime);
504  deadroot=getRootSenescence(&miscanthus->root, senparms->rootcriticalT,senparms->rootfr, Temp, frostparms,TherTime);
505  deadrhiz=getRhizomeSenescence(&miscanthus->rhizome,senparms->rhizomecriticalT,senparms->rhizomefr, Temp, frostparms,TherTime);
506  dailysenesced=deadleaf+deadstem+deadroot+deadrhiz;
507  //Calculate how much of dead biomass is remobilized based on a remobilization factor
508  RemobilizedFromLitter = dailysenesced*canopyparms->remobFac; // assuming all the dead organs remobilizes same fraction
509 
510  // Check and calculate whether carbohydrate in Rhizome is being remobilized baksed on K(negative value of partitioning coefficient)
511  if(kRhizome>=0)
512  {
513  RemobilizedFromRhizome=0;
514  }
515  else
516  {
517  // I need to multiply by (-1) because kRhizome is negative
518  RemobilizedFromRhizome=(-1)*kRhizome*miscanthus->rhizome.biomass;
519  }
520 
521  // Total maintenance respiration, which is a temperature dependet function of existing biomass
522  totalmaintenance=miscanthus->autoresp.stemmaint+miscanthus->autoresp.rootmaint+miscanthus->autoresp.rhizomemaint;
523  // Total assimilate includes net canopy assimilation and remobilization from litter and rhizome, also it must satisfy total maintenance respiration
524  totalassimilate=dailynetassim+RemobilizedFromLitter+RemobilizedFromRhizome-totalmaintenance;
525 
526  // If total assimilate for growth (& growth respiration) is negative then this is provided by rhizome only (storage carb.) leaving other parts intacts
527  if(totalassimilate<=0.0)
528  {
529  newLeaf=0.0;
530  miscanthus->autoresp.stemgrowth=0.0;
531  newStem=0.0;
532  miscanthus->autoresp.rootgrowth=0.0;
533  newRoot=0.0;
534  miscanthus->autoresp.rhizomegrowth=0.0;
535  // New rhizome must provide for total negative assimilate. Also we need to update remobilization
536  newRhizome=totalassimilate+RemobilizedFromRhizome;
537  miscanthus->autoresp.rhizomegrowth=0.0;
538  }
539  else
540  {
541  SumofKpart=((kLeaf>0)?kLeaf:0)+((kStem>0)?kStem:0)+((kRoot>0)?kRoot:0)+((kRhizome>0)?kRhizome:0);
542  if(SumofKpart!=1)
543  {
544  error("Sum of Positive partitioning coefficient is not one");
545  }
546  newLeaf=newbiomass(totalassimilate,kLeaf,0.0);
547  newStem=newbiomass(totalassimilate,kStem,RESP->growth.stem);
548  miscanthus->autoresp.stemgrowth=CalculateGrowthResp(newStem,RESP->growth.stem);
549  newRoot=newbiomass(totalassimilate,kRoot,RESP->growth.root);
550  miscanthus->autoresp.rootgrowth=CalculateGrowthResp(newRoot,RESP->growth.stem);
551  // Make sure that remobilization termis taken care of in the calculation of newRhizome
552  newRhizome=(kRhizome>0)?newbiomass(totalassimilate,kRhizome,RESP->growth.rhizome):(-1)*RemobilizedFromRhizome;
553 
554  miscanthus->autoresp.rhizomegrowth=CalculateGrowthResp(newRhizome,RESP->growth.stem);
555  }
556 
557  // Now we know growth respiration of each component & we can update total autotrophic respiration
558  miscanthus->autoresp.total=miscanthus->autoresp.leafdarkresp+totalmaintenance+miscanthus->autoresp.stemgrowth+miscanthus->autoresp.rootgrowth+miscanthus->autoresp.rhizomegrowth;
559  // Here, we are updating net primary productivity
560  miscanthus->NPP=miscanthus->GPP-miscanthus->autoresp.total;
561 
562  // Here, we are evaluating new litter, This is fraction of dead biomass which was not remobilized
563  newLeaflitter=(deadleaf>0)?deadleaf*(1-canopyparms->remobFac):0.0;
564  newStemlitter=(deadleaf>0)?deadstem*(1-canopyparms->remobFac):0.0;
565  newRootlitter=(deadroot>0)?deadroot*(1-canopyparms->remobFac):0.0;
566  newRhizomelitter=(deadrhiz>0)?deadrhiz*(1-canopyparms->remobFac):0.0;
567 
568 
569  Dailybalance=newLeaf- deadleaf+newRoot- deadroot+newStem- deadstem+newRhizome- deadrhiz+newLeaflitter+newStemlitter+newRootlitter + newRhizomelitter;
570  Dailybalance=Dailybalance-miscanthus->NPP;
571  if(Dailybalance>1e-10)
572  {
573  Rprintf("\nNPP and Daily Change inBiomass is not matching & difference is %f\n", Dailybalance);
574  Rprintf("Thermal Time = %f, GPP = %f, Autotrophic Respiration = %f, NPP = %f, Remobilized from Litter = %f, Remobilized from Rhizome = %f \n", TherTime,miscanthus->GPP, miscanthus->autoresp.total,miscanthus->NPP,RemobilizedFromLitter,RemobilizedFromRhizome);
575  Rprintf("kLeaf=%f, kstem=%f, kRoot=%f, kRhizome=%f \n", kLeaf, kStem, kRoot,kRhizome);
576  Rprintf("NewLeaf = %f Dead Leaf=%f, newLeafLitter=%f\n",newLeaf, deadleaf,newLeaflitter);
577  Rprintf("NewStem = %f Dead Stem=%f, newStemLitter=%f\n",newStem, deadstem,newStemlitter);
578  Rprintf("NewRoot = %f Dead Root=%f, newRootLitter=%f\n",newRoot, deadroot,newRootlitter);
579  Rprintf("NewRhizome = %f Dead Rhizome=%f, newRhizomeLitter=%f\n",newRhizome, deadrhiz,newRhizomelitter);
580  Rprintf("LeafDarkResp=%f, Total maintenance (ExceptLeaf) = %f, StemGrowthResp=%f, RootGrowthResp=%f, RhizGrowthResp=%f\n",miscanthus->autoresp.leafdarkresp,totalmaintenance,miscanthus->autoresp.stemgrowth,miscanthus->autoresp.rootgrowth,miscanthus->autoresp.rhizomegrowth);
581  Rprintf("Daily Biomas Balance Gain = %f", Dailybalance);
582  Rprintf("--------Emergence= %i-, N= %i---------------------\n",emergence, N);
583  }
584 
585  // Adding new biomass of green components
586  UpdateStandingbiomass(&miscanthus->leaf.biomass, newLeaf);
587  UpdateStandingbiomass(&miscanthus->stem.biomass, newStem);
588  UpdateStandingbiomass(&miscanthus->root.biomass, newRoot);
589  UpdateStandingbiomass(&miscanthus->rhizome.biomass, newRhizome);
590 
591  // Subtracting dead biomass from the green components
592  // before thant I must multiply all the dead leaf components by -1, so I can still use
593  // Updatestandingbiomass function for SUBTRACTING instead of ADDING
594 
595  deadleaf*=(-1);
596  deadstem*=(-1);
597  deadroot*=(-1);
598  deadrhiz*=(-1);
599 
600  UpdateStandingbiomass(&miscanthus->leaf.biomass, deadleaf);
601  UpdateStandingbiomass(&miscanthus->stem.biomass, deadstem);
602  UpdateStandingbiomass(&miscanthus->root.biomass, deadroot);
603  UpdateStandingbiomass(&miscanthus->rhizome.biomass, deadrhiz);
604 
605 
606  // Updating standing biomass of litter components
607  UpdateStandingbiomass(&miscanthus->leaf.litter, newLeaflitter);
608  UpdateStandingbiomass(&miscanthus->stem.litter, newStemlitter);
609  UpdateStandingbiomass(&miscanthus->root.litter, newRootlitter);
610  UpdateStandingbiomass(&miscanthus->rhizome.litter, newRhizomelitter);
611 
612 
613 
614  }
615  else // Dormant stange simulation, where rhizome provides for respiration loss
616  {
617  miscanthus->stem.biomass=0.0;
618  miscanthus->autoresp.stemgrowth=0;
619  miscanthus->leaf.biomass=0.0;
620  miscanthus->autoresp.leafdarkresp=0.0;
621 
622  //Perhaps I can implement senescence rate of belowground components during dormant stage?
623 // miscanthus->root.biomass=0.0;
624  miscanthus->autoresp.rootgrowth=0;
625 // miscanthus->rhizome.biomass=0.0;
626  miscanthus->autoresp.rhizomegrowth=0;
627 
628  totalmaintenance=miscanthus->autoresp.stemmaint+miscanthus->autoresp.rootmaint+miscanthus->autoresp.rhizomemaint;
629  miscanthus->autoresp.total=miscanthus->autoresp.leafdarkresp+totalmaintenance+miscanthus->autoresp.stemgrowth+miscanthus->autoresp.rootgrowth+miscanthus->autoresp.rhizomegrowth;
630  miscanthus->NPP=miscanthus->GPP-miscanthus->autoresp.total;
631  newRhizome=(-1)* miscanthus->autoresp.total;
632  UpdateStandingbiomass(&miscanthus->rhizome.biomass, newRhizome);
633  if(miscanthus->rhizome.biomass <0)error("rhizome has become negative");
634  }
635  return;
636 }
double stemgrowth
Definition: crocent.h:666
void UpdateStandingbiomass(double *standing, double newbiomass)
Definition: AuxCropGro.c:638
double leaffr
Definition: crocent.h:688
double rootfr
Definition: crocent.h:691
double stemcriticalT
Definition: crocent.h:689
struct DailyAutoResp autoresp
Definition: crocent.h:682
void getfrostparms(struct frostParms *frostparms)
Definition: AuxCropGro.c:430
double biomass
Definition: crocent.h:642
double root
Definition: crocent.h:705
double rootmaint
Definition: crocent.h:670
double CalculateGrowthResp(double newbiomass, double growthRespCoeff)
Definition: AuxCropGro.c:456
Definition: AuxBioCro.h:146
double NPP
Definition: crocent.h:683
double leafdarkresp
Definition: crocent.h:665
double litter
Definition: crocent.h:642
struct leaf leaf
Definition: crocent.h:677
double biomass
Definition: crocent.h:649
double litter
Definition: crocent.h:649
double total
Definition: crocent.h:672
struct root root
Definition: crocent.h:680
double remobFac
Definition: crocent.h:697
double stem
Definition: crocent.h:704
struct respirationParms::growth growth
double litter
Definition: crocent.h:630
double GPP
Definition: crocent.h:683
double getRhizomeSenescence(struct rhizome *rhizome, double criticalTT, double senefracion, double Temp, struct frostParms *frostparms, double TT)
Definition: AuxCropGro.c:378
double litter
Definition: crocent.h:636
double getRootSenescence(struct root *root, double criticalTT, double senefracion, double Temp, struct frostParms *frostparms, double TT)
Definition: AuxCropGro.c:352
double rhizomegrowth
Definition: crocent.h:668
double rhizomefr
Definition: crocent.h:690
double rhizome
Definition: crocent.h:706
double getStemSenescence(struct stem *stem, double criticalTT, double senefracion, double Temp, struct frostParms *frostparms, double TT)
Definition: AuxCropGro.c:326
double biomass
Definition: crocent.h:630
struct rhizome rhizome
Definition: crocent.h:679
double rhizomemaint
Definition: crocent.h:671
struct stem stem
Definition: crocent.h:678
double newbiomass(double AcanopyNet, double k, double GrowthRespCoeff)
Definition: AuxCropGro.c:422
double stemfr
Definition: crocent.h:689
double rootcriticalT
Definition: crocent.h:691
double stemmaint
Definition: crocent.h:669
double biomass
Definition: crocent.h:636
double rootgrowth
Definition: crocent.h:667
double getLeafSenescence(struct leaf *leaf, double criticalTT, double senefraction, double Temp, struct frostParms *frostparms, double TT, struct canopyparms *canopyparm)
Definition: AuxCropGro.c:298
void cropcent_dbp(double coefs[25], double TherPrds[6], double TherTime, struct crop_phenology *cropdbp)
Definition: AuxBioCro.c:1342
void getsenescenceparms(struct senthermaltemp *senparms)
Definition: AuxCropGro.c:442
double rhizomecriticalT
Definition: crocent.h:690
double leafcriticalT
Definition: crocent.h:688
void dailymiscanthusupdate ( struct miscanthus *  miscanthus,
struct miscanthus *  deltamiscanthus 
)
730 {
731  double toadd,toremove;
732 
733  toadd=deltamiscanthus->leaf.biomass;
734  toremove=deltamiscanthus->leaf.litter;
735  updatebiomass(&miscanthus->leaf.biomass,toadd,toremove);
736  updatebiomass(&miscanthus->leaf.litter,toremove,0.0);
737 
738  toadd=deltamiscanthus->stem.biomass;
739  toremove=deltamiscanthus->stem.litter;
740  updatebiomass(&miscanthus->stem.biomass,toadd,toremove);
741  updatebiomass(&miscanthus->stem.litter,toremove,0.0);
742 
743  toadd=deltamiscanthus->root.biomass;
744  toremove=deltamiscanthus->root.litter;
745  updatebiomass(&miscanthus->root.biomass,toadd,toremove);
746  updatebiomass(&miscanthus->root.litter,toremove,0.0);
747 
748  toadd=deltamiscanthus->rhizome.biomass;
749  toremove=deltamiscanthus->rhizome.litter;
750  updatebiomass(&miscanthus->rhizome.biomass,toadd,toremove);
751  updatebiomass(&miscanthus->rhizome.litter,toremove,0.0);
752  return;
753 }
void updatebiomass(double *res, double toadd, double toremove)
Definition: AuxCropGro.c:416
double biomass
Definition: crocent.h:642
double litter
Definition: crocent.h:642
struct leaf leaf
Definition: crocent.h:677
double biomass
Definition: crocent.h:649
double litter
Definition: crocent.h:649
struct root root
Definition: crocent.h:680
double litter
Definition: crocent.h:630
double litter
Definition: crocent.h:636
double biomass
Definition: crocent.h:630
struct rhizome rhizome
Definition: crocent.h:679
struct stem stem
Definition: crocent.h:678
double biomass
Definition: crocent.h:636
void decomposeCROPCENT ( struct cropcentlayer *  CROPCENT,
int  woody,
int  Eflag 
)
void decomposeMETABC1 ( struct metabc1 *  metabc1,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeMETABC2 ( struct metabc2 *  metabc2,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeSOM1C1 ( struct som1c1 *  som1c1,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeSOM1C2 ( struct som1c2 *  som1c2,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeSOM2C2 ( struct som2c2 *  som2c2,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeSOM3C ( struct som3c *  som3c,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeSTRUCC1 ( struct strucc1 *  strucc1,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeSTRUCC2 ( struct strucc2 *  strucc2,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeWOOD1 ( struct wood1 *  wood1,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeWOOD2 ( struct wood2 *  wood2,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
void decomposeWOOD3 ( struct wood3 *  wood3,
struct cropcentEnvironment *  ENV,
int  flag,
int  Eflag 
)
double GetAnerbFac ( struct AnaerobicParms *  ANEREFF,
double  PET,
double  AWC,
double  drainage 
)
void GetBioCroToCropcentParms ( struct BioCroToCropcentParms *  temp,
double *  getbiocrotocropcentparmsfromR 
)
674  {
675 
676  temp->structometaSLOPE=-0.013;
677  temp->structometaINTERCEP=0.85;
678  temp->surfacedamrN=0.0;
679  temp->surfacedamrP=0.0;
680  temp->surfacedamrS=0.01;
681  temp->surfacedamrK=0.0;
682  temp->soildamrN=0.02;
683  temp->soildamrP=0.02;
684  temp->soildamrS=0.04;
685  temp->soildamrK=0.0;
686  temp->mindamrN=15.0;
687  temp->mindamrP=150.0;
688  temp->mindamrS=150.0;
689  temp->mindamrK=0.0;
690  temp->pabres=100;
691  return;
692 }
double structometaSLOPE
Definition: crocent.h:132
double mindamrK
Definition: crocent.h:136
double soildamrP
Definition: crocent.h:135
double surfacedamrN
Definition: crocent.h:134
double pabres
Definition: crocent.h:137
double mindamrN
Definition: crocent.h:136
double mindamrP
Definition: crocent.h:136
double structometaINTERCEP
Definition: crocent.h:133
double mindamrS
Definition: crocent.h:136
double surfacedamrP
Definition: crocent.h:134
double surfacedamrK
Definition: crocent.h:134
double soildamrK
Definition: crocent.h:135
double soildamrS
Definition: crocent.h:135
double surfacedamrS
Definition: crocent.h:134
double soildamrN
Definition: crocent.h:135
void GetC13Parms ( struct C13Parms *  temp,
double *  getc13parmsfromR 
)
645 {
646  temp->DRESP=0.999;
647  temp->DLIGDF=-4.0;
648  return;
649 }
double DRESP
Definition: crocent.h:103
double DLIGDF
Definition: crocent.h:104
void GetCropCentStateVar ( struct cropcentEnvironment *  ENV,
double *  getcropcentstatevarfromR 
)
448  {
449 
450  ENV->minN=1e-6;
451  ENV->minP=5.0;
452  ENV->minS=5.0;
453  ENV->minK=5.0;
454  ENV->surfaceTEMP=25.0;
455  ENV->soilTEMP=25.0;
456  ENV->surfaceRELWC=0.3;
457  ENV->soilRELWC=0.3;
458  ENV->leachedWATER=0.0;
459  ENV->PET=0.8;
460  ENV->AWC=0.8;
461  ENV->soilrad=100.0; // check unit for this variable
462  ENV->pH=7.0;
463  ENV->drainage=0.5;
464  /***************************/
465  if(ENV->minN <1e-6) ENV->minN=1e-6;
466  /*****************************/
467  return;
468 }
double pH
Definition: crocent.h:148
double AWC
Definition: crocent.h:146
double surfaceRELWC
Definition: crocent.h:146
double minK
Definition: crocent.h:142
double soilrad
Definition: crocent.h:149
double minP
Definition: crocent.h:142
double surfaceTEMP
Definition: crocent.h:145
double soilRELWC
Definition: crocent.h:146
double drainage
Definition: crocent.h:150
double minS
Definition: crocent.h:142
double leachedWATER
Definition: crocent.h:147
double soilTEMP
Definition: crocent.h:145
double PET
Definition: crocent.h:146
double minN
Definition: crocent.h:142
void getdailyclimate ( struct dailyclimate *  dailyclimate,
int *  doy,
double *  solar,
double *  temp,
double *  rh,
double *  windspeed,
double *  precip,
int  currenthour,
int  vecsize 
)
688 {
689  //For the first hour after planting
690  int i,indx;
691  if ((currenthour==0)||(currenthour==vecsize))
692  {
693  dailyclimate->doy=*(doy+currenthour);
694  dailyclimate->solar=*(solar+currenthour);
695  dailyclimate->temp=*(temp+currenthour);
696  dailyclimate->rh=*(rh+currenthour);
697  dailyclimate->windspeed=*(windspeed+currenthour);
698  dailyclimate->precip=*(precip+currenthour);
699  dailyclimate->minimumTemp=*(temp+currenthour);
700  }
701  else
702  {
703  dailyclimate->solar=0.0;
704  dailyclimate->temp=0.0;
705  dailyclimate->minimumTemp=*(temp+currenthour);
706  dailyclimate->rh=0.0;
707  dailyclimate->windspeed=0.0;
708  dailyclimate->precip=0.0;
709  for(i=1;i<=24;i++)
710  {
711  indx = currenthour-i+1;
712  dailyclimate->solar+=*(solar+indx);
713  dailyclimate->temp+=*(temp+indx);
714  dailyclimate->rh+=*(rh+indx);
715  dailyclimate->windspeed+=*(windspeed+indx);
716  dailyclimate->precip+=*(precip+indx);
717  dailyclimate->minimumTemp=(dailyclimate->minimumTemp>(*(temp+indx)))?(*(temp+indx)):dailyclimate->minimumTemp;
718  }
719  dailyclimate->solar=dailyclimate->solar/24.0;
720  dailyclimate->temp=dailyclimate->temp/24.0;
721  dailyclimate->rh=dailyclimate->rh/24.0;
722  dailyclimate->windspeed= dailyclimate->windspeed/24.0;
723  dailyclimate->doy=*(doy+currenthour);
724  }
725  return;
726 }
double rh
Definition: crocent.h:14
double minimumTemp
Definition: crocent.h:15
double precip
Definition: crocent.h:11
double windspeed
Definition: crocent.h:13
double solar
Definition: crocent.h:12
double temp
Definition: crocent.h:10
int doy
Definition: crocent.h:9
double Getdefac ( struct TempEffectParms *  Temp,
struct SoilWaterEffectParms *  swc,
double  RELWC,
double  TEMP 
)
void GetErosionParms ( struct ErosionParms *  temp,
double *  geterosionparmsfromR 
)
651  {
652 
653  temp->LHZF[0]=0.2;
654  temp->LHZF[1]=0.4;
655  temp->LHZF[2]=0.8;
656  temp->EDEPTH=0.2;
657  temp->ENRICH=2.0;
658  return;
659 }
double LHZF[3]
Definition: crocent.h:82
double EDEPTH
Definition: crocent.h:83
double ENRICH
Definition: crocent.h:84
void getfrostparms ( struct frostParms *  frostparms)
431 {
432  frostparms->leafT0=0.0;
433  frostparms->leafT100=-5.0;
434  frostparms->stemT0=0.0;
435  frostparms->stemT100=-10.0;
436  frostparms->rootT0=-200.0;
437  frostparms->rootT100=-200.0;
438  frostparms->rhizomeT0=-200.0;
439  frostparms->rhizomeT100=-200.0;
440  return;
441 }
double stemT0
Definition: AuxcaneGro.h:21
double stemT100
Definition: AuxcaneGro.h:22
double rhizomeT0
Definition: AuxcaneGro.h:25
double rootT0
Definition: AuxcaneGro.h:23
double rhizomeT100
Definition: AuxcaneGro.h:26
double leafT100
Definition: AuxcaneGro.h:20
double rootT100
Definition: AuxcaneGro.h:24
double leafT0
Definition: AuxcaneGro.h:19
void GetInFlowCERatio ( struct flowrestriction *  INFLOWRESTRICT,
struct minerals *  output,
struct cropcentEnvironment *  ENV 
)
583  {
584  /****************************************
585  * Purpose:
586  * This function calculates CE ratio of the flow structure flow nased on cropcent environment and restriction critera
587  * Input
588  * cropcent Environment ENV
589  * flow restriction criteria input
590  * OUTPUT
591  * flow structure output
592  * **************************************/
593  double temp;
594 
595  if(ENV->minN <= 0.0) // when mineral N is too low in the crocent environment
596  {
597  output->CN=INFLOWRESTRICT->maxCN;
598  }
599  if((ENV->minN > 0.0)&&(ENV->minN < INFLOWRESTRICT->minN)) // when mineral N is sufficient but lower than required to obtain MINIMUM CN ratio of flow
600  {
601  temp=(1.0-ENV->minN)/INFLOWRESTRICT->minN;
602  output->CN=temp*(INFLOWRESTRICT->maxCN-INFLOWRESTRICT->minCN)+INFLOWRESTRICT->minCN;
603  }
604  if(ENV->minN >= INFLOWRESTRICT->minN)// when mineral N of crocent environment is greater than what is required for min CN ratio of INFLOWRESTRICT
605  {
606  output->CN=INFLOWRESTRICT->minCN;
607  }
608  return;
609 }
double minN
Definition: crocent.h:35
double minCN
Definition: crocent.h:34
double maxCN
Definition: crocent.h:33
double CN
Definition: crocent.h:26
double minN
Definition: crocent.h:142
struct flow GetLeachate ( double  tcflow,
struct minerals *  E,
double  leachedWATER,
double  sand,
struct OrgLeachParms *  temp 
)
double getLeafSenescence ( struct leaf *  leaf,
double  criticalTT,
double  senefracion,
double  Temp,
struct frostParms *  frostparms,
double  TT,
struct canopyparms *  canopyparm 
)
299 {
300  /******************************************************
301  * Purpose:
302  * This function calculates Leaf Senescence
303  *
304  * Input Arguments:
305  * stem : is a pointer to stem structure
306  * criticalTT: is critical value of accumulated thermal time where senesence begins
307  * Temp: minimum daily temperature
308  * frostparms: is a pointer to structure containing parameters to somulate damage due to frost
309  * TT: is current [daily] value of accumutaed thermal time
310  *
311  * Output/Returns
312  * Biomass to be semesced due to aging (thermal time) and frost, together
313  * ****************************************************/
314  double ttsen, frostsen, Nsen;
315  double totalsen;
316  Nsen=0.0;
317  ttsen=getThermalSenescence(criticalTT,TT,leaf->biomass,senefraction);
318 // Rprintf("TSEN=%f,critcalT=%f, TT=%f, biomass=%f, senfraction=%f \n",ttsen,criticalTT, TT,leaf->biomass,senefraction);
319  frostsen=getFrostdamage(frostparms->leafT0,frostparms->leafT100, Temp,leaf->biomass);
320  // Nsen=canopyNsenescence(leaf, canopyparm->SLA, canopyparm->kN,canopyparm->leafNsen);
321  totalsen=ttsen+frostsen+Nsen;
322  totalsen= (totalsen>(leaf->biomass))?(leaf->biomass):totalsen;
323  return(totalsen);
324 }
double getThermalSenescence(double criticalTT, double currentTT, double biomass, double dailyfractionalloss)
Definition: AuxCropGro.c:213
double getFrostdamage(double T0, double T100, double T, double biomass)
Definition: AuxCropGro.c:240
double biomass
Definition: crocent.h:630
double leafT100
Definition: AuxcaneGro.h:20
double leafT0
Definition: AuxcaneGro.h:19
double GetMDR ( double  a,
double  b,
double  x1,
double  x2,
double  soilrad 
)
double GetMTI ( double  a,
double  b,
double  x1,
double  x2,
double  soilrad 
)
double GetPHfac ( struct PHParms *  PHEFF,
double  pH 
)
double getRhizomeSenescence ( struct rhizome *  rhizome,
double  criticalTT,
double  senefracion,
double  Temp,
struct frostParms *  frostparms,
double  TT 
)
379 {
380  /******************************************************
381  * Purpose:
382  * This function calculates Root Senescence
383  *
384  * Input Arguments:
385  * stem : is a pointer to stem structure
386  * criticalTT: is critical value of accumulated thermal time where senesence begins
387  * Temp: minimum daily temperature
388  * frostparms: is a pointer to structure containing parameters to somulate damage due to frost
389  * TT: is current [daily] value of accumutaed thermal time
390  *
391  * Output/Returns
392  * Biomass to be senesced due to aging (thermal time) and frost, together
393  * ****************************************************/
394  double ttsen, frostsen;
395  double totalsen;
396  frostsen=0.0;
397  ttsen=getThermalSenescence(criticalTT,TT,rhizome->biomass,senefracion);
398  frostsen=getFrostdamage(frostparms->rhizomeT0, frostparms->rhizomeT100, Temp,rhizome->biomass);
399  totalsen=ttsen+frostsen;
400  totalsen= (totalsen>(rhizome->biomass))?(rhizome->biomass):totalsen;
401  return(totalsen);
402 }
double biomass
Definition: crocent.h:642
double rhizomeT0
Definition: AuxcaneGro.h:25
double getThermalSenescence(double criticalTT, double currentTT, double biomass, double dailyfractionalloss)
Definition: AuxCropGro.c:213
double rhizomeT100
Definition: AuxcaneGro.h:26
double getFrostdamage(double T0, double T100, double T, double biomass)
Definition: AuxCropGro.c:240
double getRootSenescence ( struct root *  root,
double  criticalTT,
double  senefracion,
double  Temp,
struct frostParms *  frostparms,
double  TT 
)
353 {
354  /******************************************************
355  * Purpose:
356  * This function calculates Root Senescence
357  *
358  * Input Arguments:
359  * stem : is a pointer to stem structure
360  * criticalTT: is critical value of accumulated thermal time where senesence begins
361  * Temp: minimum daily temperature
362  * frostparms: is a pointer to structure containing parameters to somulate damage due to frost
363  * TT: is current [daily] value of accumutaed thermal time
364  *
365  * Output/Returns
366  * Biomassto be semesced due to aging (thermal time) and frost, together
367  * ****************************************************/
368  double ttsen, frostsen;
369  double totalsen;
370  frostsen=0.0;
371  ttsen=getThermalSenescence(criticalTT,TT,root->biomass,senefracion);
372  frostsen=getFrostdamage(frostparms->rootT0, frostparms->rootT100, Temp,root->biomass);
373  totalsen=ttsen+frostsen;
374  totalsen= (totalsen>(root->biomass))?(root->biomass):totalsen;
375  return(totalsen);
376 }
double getThermalSenescence(double criticalTT, double currentTT, double biomass, double dailyfractionalloss)
Definition: AuxCropGro.c:213
double rootT0
Definition: AuxcaneGro.h:23
double biomass
Definition: crocent.h:649
double getFrostdamage(double T0, double T100, double T, double biomass)
Definition: AuxCropGro.c:240
double rootT100
Definition: AuxcaneGro.h:24
void getsenescenceparms ( struct senthermaltemp *  senparms)
443 {
444  senparms->leafcriticalT = 3600;
445  senparms->leaffr=0.05;
446  senparms->stemcriticalT = 3600;
447  senparms->stemfr=0.02;
448  senparms->rootcriticalT = 3600;
449  senparms->rootfr=0.05;
450  senparms->rhizomecriticalT = 3600;
451  senparms->rhizomefr=0.001;
452  return;
453 }
double leaffr
Definition: crocent.h:688
double rootfr
Definition: crocent.h:691
double stemcriticalT
Definition: crocent.h:689
double rhizomefr
Definition: crocent.h:690
double stemfr
Definition: crocent.h:689
double rootcriticalT
Definition: crocent.h:691
double rhizomecriticalT
Definition: crocent.h:690
double leafcriticalT
Definition: crocent.h:688
void GetSoilTexture ( struct SoilTexture *  temp,
double *  getsoiltexturefromR 
)
661  {
662 /**************************************************************************
663 // I am chaning it back to constant value to avoid error now as ther eis not pointer passed from R for now
664  temp->sand=*getsoiltexturefromR;
665  temp->silt=*(getsoiltexturefromR+1);
666  temp->clay=*(getsoiltexturefromR+2);
667  *************************************************************************/
668  temp->sand=0.33;
669  temp->silt=0.33;
670  temp->clay=0.34;
671  return;
672 }
double silt
Definition: crocent.h:95
double clay
Definition: crocent.h:96
double sand
Definition: crocent.h:94
double getStemSenescence ( struct stem *  stem,
double  criticalTT,
double  senefracion,
double  Temp,
struct frostParms *  frostparms,
double  TT 
)
327 {
328  /******************************************************
329  * Purpose:
330  * This function calculates Stem Senescence
331  *
332  * Input Arguments:
333  * stem : is a pointer to stem structure
334  * criticalTT: is critical value of accumulated thermal time where senesence begins
335  * Temp: minimum daily temperature
336  * frostparms: is a pointer to structure containing parameters to somulate damage due to frost
337  * TT: is current [daily] value of accumutaed thermal time
338  *
339  * Output/Returns
340  * Biomass to be semesced due to aging (thermal time) and frost, together
341  * ****************************************************/
342  double ttsen, frostsen;
343  double totalsen;
344  frostsen=0.0;
345  ttsen=getThermalSenescence(criticalTT,TT,stem->biomass,senefracion);
346  frostsen=getFrostdamage(frostparms->stemT0, frostparms->stemT100, Temp,stem->biomass);
347  totalsen=ttsen+frostsen;
348  totalsen= (totalsen>(stem->biomass))?(stem->biomass):totalsen;
349  return(totalsen);
350 }
double stemT0
Definition: AuxcaneGro.h:21
double stemT100
Definition: AuxcaneGro.h:22
double getThermalSenescence(double criticalTT, double currentTT, double biomass, double dailyfractionalloss)
Definition: AuxCropGro.c:213
double getFrostdamage(double T0, double T100, double T, double biomass)
Definition: AuxCropGro.c:240
double biomass
Definition: crocent.h:636
void GetSymbNFixationParms ( struct SymbNFixationParms *  temp,
double *  getsymbnfixationparmsfromR 
)
621 {//Rprintf("%f, %f, %f \n", *getsymbnfixationparmsfromR,*(getsymbnfixationparmsfromR+1),*(getsymbnfixationparmsfromR+2));
622  temp->FXMCA=-0.125;
623  temp->FXMCB=0.005;
624  temp->FXMXS=0.35;
625  temp->FXNPB=7.0;
626  temp->NSNFIX=0;
627  temp->NTSPM=4.0;
628  return;
629 }
double NTSPM
Definition: crocent.h:78
int NSNFIX
Contrl of P on non-symbiotic fixation rate on availability of top soil N rate when NSNFIX=1...
Definition: crocent.h:77
double FXNPB
Definition: crocent.h:76
double FXMCA
Definition: crocent.h:73
double FXMCB
Definition: crocent.h:74
double FXMXS
Definition: crocent.h:75
double getThermalSenescence ( double  criticalTT,
double  currentTT,
double  biomass,
double  dailyfractionalloss 
)
214 {
215  /*************************************
216  * Purpose
217  * To calculate senescence as a constant fraction of exisiting biomass after a critical threshold temperature
218  * Input:
219  * criticalTT: This is critical Thermal temperature, beyond which senescence begins
220  * currentTT: Current thermal TT or phenological stage
221  * biomass: Exisiting biomass
222  * dailyfractionalloss: Fraction of biomass which will be lost
223  * Output:
224  *
225  * Returns senesced biomass
226  *
227  * **********************************/
228  double tmp;
229  if(currentTT <= criticalTT)
230  {
231  tmp=0.0;
232  }
233  else
234  {
235  tmp=biomass*dailyfractionalloss;
236  }
237  return(tmp);
238 }
double getThermaltime ( double  temp,
double  Tbase 
)
206 {
207  double res;
208  res =(temp<=Tbase)? 0.0:(temp-Tbase);
209  return(res);
210 }
double line ( double  x,
double  x1,
double  y1,
double  x2,
double  y2 
)
double newbiomass ( double  AcanopyNet,
double  k,
double  GrowthRespCoeff 
)
423 {
424  double tmp;
425 
426  tmp=(k>=0.0)?AcanopyNet*k/(1+GrowthRespCoeff):0.0;
427  return(tmp);
428 }
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
void replaceMineralStruct ( struct minerals *  FROM,
struct minerals *  TO 
)
611 {
612  TO->CN=FROM->CN;
613  TO->CP=FROM->CP;
614  TO->CS=FROM->CS;
615  TO->CK=FROM->CK;
616  return;
617 }
double CK
Definition: crocent.h:29
double CP
Definition: crocent.h:27
double CS
Definition: crocent.h:28
double CN
Definition: crocent.h:26
double timescaling ( double  k,
double  t 
)
void updateafteremergence ( struct miscanthus *  miscanthus,
struct management *  management 
)
42 {
43  miscanthus->leaf.biomass=(management->emergenceparms.StoragetoLeaffraction)* miscanthus->rhizome.biomass;
44  miscanthus->rhizome.biomass= miscanthus->rhizome.biomass - miscanthus->leaf.biomass;
45  return;
46 }
double StoragetoLeaffraction
Definition: crocent.h:781
double biomass
Definition: crocent.h:642
struct management::emergenceparms emergenceparms
struct leaf leaf
Definition: crocent.h:677
double biomass
Definition: crocent.h:630
struct rhizome rhizome
Definition: crocent.h:679
void updateafterharvest ( struct miscanthus *  miscanthus,
struct management *  management 
)
26 {
27  miscanthus->leaf.biomass=(1-management->harvestparms.frleaf)*miscanthus->leaf.biomass;
28  miscanthus->leaf.litter=(1-management->harvestparms.frleaflitter)*miscanthus->leaf.litter;
29 
30  miscanthus->stem.biomass=(1-management->harvestparms.frstem)*miscanthus->stem.biomass;
31  miscanthus->stem.litter=(1-management->harvestparms.frstemlitter)*miscanthus->stem.litter;
32 
33  miscanthus->root.biomass=(1-management->harvestparms.frdeadroot)*miscanthus->root.biomass;
34  miscanthus->root.litter=management->harvestparms.frdeadroot*miscanthus->root.biomass;
35 
36  miscanthus->rhizome.biomass=(1-management->harvestparms.frdeadrhizome)*miscanthus->rhizome.biomass;
37  miscanthus->rhizome.litter=management->harvestparms.frdeadrhizome*miscanthus->rhizome.biomass;
38  return;
39 }
double frstem
Definition: crocent.h:772
double frstemlitter
Definition: crocent.h:772
double biomass
Definition: crocent.h:642
double litter
Definition: crocent.h:642
struct leaf leaf
Definition: crocent.h:677
double biomass
Definition: crocent.h:649
double litter
Definition: crocent.h:649
double frdeadrhizome
Definition: crocent.h:774
struct root root
Definition: crocent.h:680
double litter
Definition: crocent.h:630
double litter
Definition: crocent.h:636
double frleaflitter
Definition: crocent.h:771
struct management::harvestparms harvestparms
double biomass
Definition: crocent.h:630
struct rhizome rhizome
Definition: crocent.h:679
struct stem stem
Definition: crocent.h:678
double biomass
Definition: crocent.h:636
double frleaf
Definition: crocent.h:771
double frdeadroot
Definition: crocent.h:773
void updatebiomass ( double *  res,
double  toadd,
double  toremove 
)
417 {
418  *res=*res+toadd-toremove;
419  return;
420 }
void UpdateC3treeAfterEmergence ( struct c3tree *  willow,
struct management *  management 
)
12 {
13  willow->leaf.biomass=(management->emergenceparms.StoragetoLeaffraction)* willow->rhizome.biomass +
14  (management->emergenceparms.StemtoLeaffraction)* willow->stem.biomass;
15  willow->rhizome.biomass= (1-management->emergenceparms.StoragetoLeaffraction)*willow->rhizome.biomass;
16  willow->stem.biomass=(1-management->emergenceparms.StemtoLeaffraction)* willow->stem.biomass;
17  return;
18 }
double StoragetoLeaffraction
Definition: crocent.h:781
double biomass
Definition: crocent.h:642
struct management::emergenceparms emergenceparms
struct leaf leaf
Definition: crocent.h:747
struct rhizome rhizome
Definition: crocent.h:750
double biomass
Definition: crocent.h:630
double biomass
Definition: crocent.h:636
struct stem stem
Definition: crocent.h:748
double StemtoLeaffraction
Definition: crocent.h:782
void updateCarbonStructure ( struct carbon *  toupdateC,
struct carbon  flow 
)
void updateCEafterleachate ( struct som1c2 *  som1c2)
void updatecropcentpools ( struct cropcentlayer *  CROPCENT)
8 {
9  double delN, delP, delS,delK;
10  double out, in;
11 
12  delN=0.0;
13  delP=0.0;
14  delS=0.0;
15  delK=0.0;
16  CROPCENT->ENV.newminN=0.0;
17  CROPCENT->ENV.newminP=0.0;
18  CROPCENT->ENV.newminS=0.0;
19  CROPCENT->ENV.newminK=0.0;
20 
21  // updating strucc1 flux [only source is self-negative outflow]
22  // step 1: chnage in mineral N of CropCENT layer due to flow from strucc1
23  out=(CROPCENT->strucc1.Flux.strucc1TOstrucc1.C.totalC)/(CROPCENT->strucc1.Flux.strucc1TOstrucc1.E.CN); // This is always negative
26  +(CROPCENT->strucc1.Flux.strucc1TOsom2c1.C.totalC)/(CROPCENT->strucc1.Flux.strucc1TOsom2c1.E.CN); // This is always positive
27  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
28  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
29  CROPCENT->ENV.newminN+=delN;
30  // now update CN ratioi snot required as all outflow CE ratio is same as of source pool
31  // finally update C structure of the pool
34  updateMineralStructure(&CROPCENT->metabc1.C, &CROPCENT->metabc1.E, CROPCENT->strucc1.Flux.strucc1TOmetabc1.C, CROPCENT->strucc1.Flux.strucc1TOmetabc1.E);
36  updateMineralStructure(&CROPCENT->som1c1.C, &CROPCENT->som1c1.E, CROPCENT->strucc1.Flux.strucc1TOsom1c1.C, CROPCENT->strucc1.Flux.strucc1TOsom1c1.E);
38  updateMineralStructure(&CROPCENT->som2c1.C, &CROPCENT->som2c1.E, CROPCENT->strucc1.Flux.strucc1TOsom2c1.C, CROPCENT->strucc1.Flux.strucc1TOsom2c1.E);
39 
40  // updating strucc2 flux [ only source is self-negative outflow]
41  out=(CROPCENT->strucc2.Flux.strucc2TOstrucc2.C.totalC)/(CROPCENT->strucc2.Flux.strucc2TOstrucc2.E.CN); // This is always negative
42  in= (CROPCENT->strucc2.Flux.strucc2TOsom1c2.C.totalC)/(CROPCENT->strucc2.Flux.strucc2TOsom1c2.E.CN)
43  +(CROPCENT->strucc2.Flux.strucc2TOsom2c2.C.totalC)/(CROPCENT->strucc2.Flux.strucc2TOsom2c2.E.CN); // This is always positive
44  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
45  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
46  CROPCENT->ENV.newminN+=delN;
47  // now update CN ratio, which does not change because outflow CE is same as CE of pool. Only CE ratio of receiving flux changes
48  // finally update C structure of the pool
51  updateMineralStructure(&CROPCENT->som1c2.C, &CROPCENT->som1c2.E, CROPCENT->strucc2.Flux.strucc2TOsom1c2.C, CROPCENT->strucc2.Flux.strucc2TOsom1c2.E);
53  updateMineralStructure(&CROPCENT->som2c2.C, &CROPCENT->som2c2.E, CROPCENT->strucc2.Flux.strucc2TOsom2c2.C, CROPCENT->strucc2.Flux.strucc2TOsom2c2.E);
54 
55  // updating metabc1 flux [source is self -negative outflow and from strucc1]
56  out=(CROPCENT->metabc1.Flux.metabc1TOmetabc1.C.totalC)/(CROPCENT->metabc1.Flux.metabc1TOmetabc1.E.CN);
57  in=(CROPCENT->metabc1.Flux.metabc1TOsom1c1.C.totalC)/(CROPCENT->metabc1.Flux.metabc1TOsom1c1.E.CN);
58  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
59  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
60  CROPCENT->ENV.newminN+=delN;
63  updateMineralStructure(&CROPCENT->som1c1.C, &CROPCENT->som1c1.E, CROPCENT->metabc1.Flux.metabc1TOsom1c1.C, CROPCENT->metabc1.Flux.metabc1TOsom1c1.E);
64 
65  // updating metabc2 flux [source is self -negative outflow and from strucc1]
66  out=(CROPCENT->metabc2.Flux.metabc2TOmetabc2.C.totalC)/(CROPCENT->metabc2.Flux.metabc2TOmetabc2.E.CN);
67  in=(CROPCENT->metabc2.Flux.metabc2TOsom1c2.C.totalC)/(CROPCENT->metabc2.Flux.metabc2TOsom1c2.E.CN);
68  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
69  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
70  CROPCENT->ENV.newminN+=delN;
73  updateMineralStructure(&CROPCENT->som1c2.C, &CROPCENT->som1c2.E, CROPCENT->metabc2.Flux.metabc2TOsom1c2.C, CROPCENT->metabc2.Flux.metabc2TOsom1c2.E);
74 
75  // updating som1c1 Fluxes
76  out=(CROPCENT->som1c1.Flux.som1c1TOsom1c1.C.totalC)/(CROPCENT->som1c1.Flux.som1c1TOsom1c1.E.CN);
77  in=(CROPCENT->som1c1.Flux.som1c1TOsom2c1.C.totalC)/(CROPCENT->som1c1.Flux.som1c1TOsom2c1.E.CN);
78  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
79  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
80  CROPCENT->ENV.newminN+=delN;
81  updateCarbonStructure(&CROPCENT->som1c1.C, CROPCENT->som1c1.Flux.som1c1TOsom1c1.C);
82  updateCarbonStructure(&CROPCENT->som2c1.C, CROPCENT->som1c1.Flux.som1c1TOsom2c1.C);
83  updateMineralStructure(&CROPCENT->som2c1.C, &CROPCENT->som2c1.E, CROPCENT->som1c1.Flux.som1c1TOsom2c1.C, CROPCENT->som1c1.Flux.som1c1TOsom2c1.E);
84 
85 
86  // updating som2c1 Fluxes
87  out=(CROPCENT->som2c1.Flux.som2c1TOsom2c1.C.totalC)/(CROPCENT->som2c1.Flux.som2c1TOsom2c1.E.CN);
88  in=(CROPCENT->som2c1.Flux.som2c1TOsom1c1.C.totalC)/(CROPCENT->som2c1.Flux.som2c1TOsom1c1.E.CN)
89  +(CROPCENT->som2c1.Flux.som2c1TOsom2c2.C.totalC)/(CROPCENT->som2c1.Flux.som2c1TOsom2c2.E.CN);
90  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
91  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
92  CROPCENT->ENV.newminN+=delN;
93  updateCarbonStructure(&CROPCENT->som2c1.C, CROPCENT->som2c1.Flux.som2c1TOsom2c1.C);
94  updateCarbonStructure(&CROPCENT->som1c1.C, CROPCENT->som2c1.Flux.som2c1TOsom1c1.C);
95  updateMineralStructure(&CROPCENT->som1c1.C, &CROPCENT->som1c1.E, CROPCENT->som2c1.Flux.som2c1TOsom1c1.C, CROPCENT->som2c1.Flux.som2c1TOsom1c1.E);
96  updateCarbonStructure(&CROPCENT->som2c2.C, CROPCENT->som2c1.Flux.som2c1TOsom2c2.C);
97  updateMineralStructure(&CROPCENT->som2c2.C, &CROPCENT->som2c2.E, CROPCENT->som2c1.Flux.som2c1TOsom2c2.C, CROPCENT->som2c1.Flux.som2c1TOsom2c2.E);
98 
99 
100  // updating som1c2 Fluxes
101  out=(CROPCENT->som1c2.Flux.som1c2TOsom1c2.C.totalC)/(CROPCENT->som1c2.Flux.som1c2TOsom1c2.E.CN);
102  in=(CROPCENT->som1c2.Flux.som1c2TOsom2c2.C.totalC)/(CROPCENT->som1c2.Flux.som1c2TOsom2c2.E.CN)
103  +(CROPCENT->som1c2.Flux.som1c2TOsom3c.C.totalC)/(CROPCENT->som1c2.Flux.som1c2TOsom3c.E.CN)
104  +(CROPCENT->som1c2.Flux.som1c2TOleachate.C.totalC)/(CROPCENT->som1c2.Flux.som1c2TOleachate.E.CN);
105  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
106  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
107  CROPCENT->ENV.newminN+=delN;
108  updateCarbonStructure(&CROPCENT->som1c2.C, CROPCENT->som1c2.Flux.som1c2TOsom1c2.C);
109  // remember here we need to modify CN ratio of the som1c2 pool because CN ratio of leachate loss is much larger
110  // This modified ratio can be obtained in th below function
111  updateCEafterleachate(&CROPCENT->som1c2);
112 
113  updateCarbonStructure(&CROPCENT->som2c2.C, CROPCENT->som1c2.Flux.som1c2TOsom2c2.C);
114  updateMineralStructure(&CROPCENT->som2c2.C, &CROPCENT->som2c2.E, CROPCENT->som1c2.Flux.som1c2TOsom2c2.C, CROPCENT->som1c2.Flux.som1c2TOsom2c2.E);
115 
116  updateCarbonStructure(&CROPCENT->som3c.C, CROPCENT->som1c2.Flux.som1c2TOsom3c.C);
117  updateMineralStructure(&CROPCENT->som3c.C, &CROPCENT->som3c.E, CROPCENT->som1c2.Flux.som1c2TOsom3c.C, CROPCENT->som1c2.Flux.som1c2TOsom3c.E);
118 
119 
120  // updating som2c2 Fluxes
121  out=(CROPCENT->som2c2.Flux.som2c2TOsom2c2.C.totalC)/(CROPCENT->som2c2.Flux.som2c2TOsom2c2.E.CN);
122  in=(CROPCENT->som2c2.Flux.som2c2TOsom3c.C.totalC)/(CROPCENT->som2c2.Flux.som2c2TOsom3c.E.CN)
123  +(CROPCENT->som2c2.Flux.som2c2TOsom1c2.C.totalC)/(CROPCENT->som2c2.Flux.som2c2TOsom1c2.E.CN);
124  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
125  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
126  CROPCENT->ENV.newminN+=delN;
127  updateCarbonStructure(&CROPCENT->som2c2.C, CROPCENT->som2c2.Flux.som2c2TOsom2c2.C);
128  updateCarbonStructure(&CROPCENT->som1c2.C, CROPCENT->som2c2.Flux.som2c2TOsom1c2.C);
129  updateMineralStructure(&CROPCENT->som1c2.C, &CROPCENT->som1c2.E, CROPCENT->som2c2.Flux.som2c2TOsom1c2.C, CROPCENT->som2c2.Flux.som2c2TOsom1c2.E);
130  updateCarbonStructure(&CROPCENT->som2c2.C, CROPCENT->som2c2.Flux.som2c2TOsom3c.C);
131  updateMineralStructure(&CROPCENT->som2c2.C, &CROPCENT->som2c2.E, CROPCENT->som2c2.Flux.som2c2TOsom3c.C, CROPCENT->som2c2.Flux.som2c2TOsom3c.E);
132 
133  // updating som3c Fluxes
134  out=(CROPCENT->som3c.Flux.som3cTOsom3c.C.totalC)/(CROPCENT->som3c.Flux.som3cTOsom3c.E.CN);
135  in=(CROPCENT->som3c.Flux.som3cTOsom1c2.C.totalC)/(CROPCENT->som3c.Flux.som3cTOsom1c2.E.CN);
136 
137  delN=out+in; // if this is negative then out > in or mineralization is occurin otherwise immobilization
138  CROPCENT->ENV.minN = CROPCENT->ENV.minN-delN;
139  CROPCENT->ENV.newminN+=delN;
140  updateCarbonStructure(&CROPCENT->som3c.C, CROPCENT->som3c.Flux.som3cTOsom3c.C);
141  updateCarbonStructure(&CROPCENT->som1c2.C, CROPCENT->som3c.Flux.som3cTOsom1c2.C);
142  updateMineralStructure(&CROPCENT->som1c2.C, &CROPCENT->som1c2.E, CROPCENT->som3c.Flux.som3cTOsom1c2.C, CROPCENT->som3c.Flux.som3cTOsom1c2.E);
143 
144  CROPCENT->ENV.newminN=(-1)*CROPCENT->ENV.newminN; // Because negative value represents mineralization and net mineralization is postiive for trace gas calculations
145  return;
146 }
struct carbon C
Definition: crocent.h:163
struct minerals E
Definition: crocent.h:299
struct flow som1c1TOsom2c1
Definition: crocent.h:346
struct carbon C
Definition: crocent.h:320
struct flow strucc1TOsom1c1
Definition: crocent.h:168
struct som2c1::Flux9 Flux
struct flow som2c2TOsom3c
Definition: crocent.h:423
struct minerals E
Definition: crocent.h:392
void updateCEafterleachate(struct som1c2 *som1c2)
struct flow strucc2TOsom2c2
Definition: crocent.h:198
struct flow strucc1TOstrucc1
Definition: crocent.h:170
struct carbon C
Definition: crocent.h:418
struct som1c1::Flux8 Flux
struct minerals E
Definition: crocent.h:445
struct metabc2::Flux7 Flux
double newminK
Definition: crocent.h:143
struct som1c1 som1c1
Definition: crocent.h:521
struct strucc2::Flux2 Flux
struct flow strucc1TOmetabc1
Definition: crocent.h:171
struct flow som1c2TOsom3c
Definition: crocent.h:396
void updateCarbonStructure(struct carbon *toupdateC, struct carbon flow)
struct flow som2c2TOsom2c2
Definition: crocent.h:424
struct som2c2::Flux11 Flux
struct carbon C
Definition: crocent.h:298
struct carbon C
Definition: crocent.h:366
struct carbon C
Definition: crocent.h:193
struct som3c som3c
Definition: crocent.h:525
struct minerals E
Definition: crocent.h:367
struct metabc1::Flux6 Flux
double newminN
Definition: crocent.h:143
struct som1c2 som1c2
Definition: crocent.h:522
struct flow strucc2TOstrucc2
Definition: crocent.h:200
struct som3c::Flux12 Flux
struct flow som1c1TOsom1c1
Definition: crocent.h:347
struct som2c1 som2c1
Definition: crocent.h:523
struct strucc2 strucc2
Definition: crocent.h:518
struct flow metabc1TOmetabc1
Definition: crocent.h:303
struct strucc1::Flux1 Flux
struct minerals E
Definition: crocent.h:40
struct som1c2::Flux10 Flux
struct flow som1c2TOleachate
Definition: crocent.h:397
struct metabc2 metabc2
Definition: crocent.h:520
struct som2c2 som2c2
Definition: crocent.h:524
struct flow som1c2TOsom2c2
Definition: crocent.h:395
struct flow strucc2TOsom1c2
Definition: crocent.h:199
struct flow som2c2TOsom1c2
Definition: crocent.h:422
double newminS
Definition: crocent.h:143
struct minerals E
Definition: crocent.h:343
struct carbon C
Definition: crocent.h:39
struct strucc1 strucc1
Definition: crocent.h:517
struct flow som1c2TOsom1c2
Definition: crocent.h:398
struct flow metabc2TOsom1c2
Definition: crocent.h:324
struct flow strucc1TOsom2c1
Definition: crocent.h:169
struct minerals E
Definition: crocent.h:419
struct metabc1 metabc1
Definition: crocent.h:519
double totalC
Definition: crocent.h:20
struct carbon C
Definition: crocent.h:391
struct flow som2c1TOsom2c1
Definition: crocent.h:371
struct flow som2c1TOsom2c2
Definition: crocent.h:372
struct flow som3cTOsom1c2
Definition: crocent.h:448
struct cropcentEnvironment ENV
Definition: crocent.h:529
struct flow som3cTOsom3c
Definition: crocent.h:449
struct flow som2c1TOsom1c1
Definition: crocent.h:370
struct flow metabc1TOsom1c1
Definition: crocent.h:302
double CN
Definition: crocent.h:26
struct carbon C
Definition: crocent.h:444
double newminP
Definition: crocent.h:143
void updateMineralStructure(struct carbon *toupdateC, struct minerals *toupdateE, struct carbon flowC, struct minerals flowE)
struct flow metabc2TOmetabc2
Definition: crocent.h:325
struct carbon C
Definition: crocent.h:342
double minN
Definition: crocent.h:142
void UpdateCropcentPoolsFromBioCro ( struct cropcentlayer *  CROPCENT,
struct InputToCropcent *  INCROPCENT 
)
void updatedailyvec ( struct dailyvec *  dailyvec,
double  newbiomass,
double  newlitter,
int  N,
double  delTT 
)
405 {
406  int i;
407  for (i=0; i<=N;i++)
408  {
409  dailyvec[i].ageinTT+=delTT;
410  }
411  dailyvec[N].newbiomass=newbiomass;
412  dailyvec[N].newlitter=newlitter;
413  return;
414 }
double newbiomass
Definition: crocent.h:654
double ageinTT
Definition: crocent.h:656
double newlitter
Definition: crocent.h:655
double newbiomass(double AcanopyNet, double k, double GrowthRespCoeff)
Definition: AuxCropGro.c:422
void UpdateDirectAbsorp ( struct InputToCropcent *  INCROCENT,
struct BioCroToCropcentParms *  parms,
struct cropcentEnvironment *  ENV 
)
void updatedormantstage ( struct miscanthus *  miscanthus)
759 {
760  double LostinRespiration,availablecarb,newcarb;
761  LostinRespiration=miscanthus->autoresp.stemmaint + miscanthus->autoresp.rootmaint + miscanthus->autoresp.rhizomemaint;
762  // This loss will occur at the expense of carbohydrate fraction of rhizome, resulting in change in the carbohydrate fraction of the rhizome
763  availablecarb= miscanthus->rhizome.biomass*miscanthus->rhizome.carbohydratefraction;
764  newcarb=availablecarb-LostinRespiration;
765  miscanthus->rhizome.biomass= miscanthus->rhizome.biomass- LostinRespiration;
766 
767  if((miscanthus->rhizome.carbohydratefraction)<0.05)miscanthus->rhizome.carbohydratefraction=0.05;
768  if(miscanthus->rhizome.biomass <0)error("rhizome has become negative");
769 
770 
771  miscanthus->autoresp.stemgrowth=0;
772  miscanthus->autoresp.rootgrowth=0;
773  miscanthus->autoresp.rhizomegrowth=0;
774  miscanthus->autoresp.leafdarkresp=0.0;
775  miscanthus->autoresp.total= LostinRespiration;
776  miscanthus->NPP=miscanthus->GPP-miscanthus->autoresp.total;
777  // Do i need to specify root death rate ? or probably Ican simply kill the roots at the time of harvest
778 
779 }
double stemgrowth
Definition: crocent.h:666
double carbohydratefraction
Definition: crocent.h:643
struct DailyAutoResp autoresp
Definition: crocent.h:682
double biomass
Definition: crocent.h:642
double rootmaint
Definition: crocent.h:670
double NPP
Definition: crocent.h:683
double leafdarkresp
Definition: crocent.h:665
double total
Definition: crocent.h:672
double GPP
Definition: crocent.h:683
double rhizomegrowth
Definition: crocent.h:668
struct rhizome rhizome
Definition: crocent.h:679
double rhizomemaint
Definition: crocent.h:671
double stemmaint
Definition: crocent.h:669
double rootgrowth
Definition: crocent.h:667
void updatelittervec ( struct littervec *  littervec,
double  newbiomass,
int  N,
double  delTT 
)
void updateMineralStructure ( struct carbon *  toupdateC,
struct minerals *  toupdateE,
struct carbon  flowC,
struct minerals  flowE 
)
void UpdateStandingbiomass ( double *  standing,
double  newbiomass 
)
639 {
640  *standing= *standing +newbiomass;
641  return;
642 }
double newbiomass(double AcanopyNet, double k, double GrowthRespCoeff)
Definition: AuxCropGro.c:422
void UpdateStandingLeaf ( struct leaf *  leaf,
double  newbiomass,
double  deadleaf,
double  remobFactor 
)
646 {
647  leaf->biomass+=newbiomass-deadleaf;
648  leaf->litter+=deadleaf*(1-remobFactor);
649  return;
650 }
double litter
Definition: crocent.h:630
double biomass
Definition: crocent.h:630
double newbiomass(double AcanopyNet, double k, double GrowthRespCoeff)
Definition: AuxCropGro.c:422
void UpdateStandingRhizome ( struct rhizome *  rhizome,
double  newbiomass,
double  deadrhizome,
double  remobFactor 
)
667 {
668  rhizome->biomass+=newbiomass-deadrhizome;
669  rhizome->litter+=deadrhizome*(1-remobFactor);
670  return;
671 }
double biomass
Definition: crocent.h:642
double litter
Definition: crocent.h:642
double newbiomass(double AcanopyNet, double k, double GrowthRespCoeff)
Definition: AuxCropGro.c:422
void UpdateStandingRoot ( struct root *  root,
double  newbiomass,
double  deadroot,
double  remobFactor 
)
660 {
661  root->biomass+=newbiomass-deadroot;
662  root->litter+=deadroot*(1-remobFactor);
663  return;
664 }
double biomass
Definition: crocent.h:649
double litter
Definition: crocent.h:649
double newbiomass(double AcanopyNet, double k, double GrowthRespCoeff)
Definition: AuxCropGro.c:422
void UpdateStandingStem ( struct stem *  stem,
double  newbiomass,
double  deadstem,
double  remobFactor 
)
653 {
654  stem->biomass+=newbiomass-deadstem;
655  stem->litter+=deadstem*(1-remobFactor);
656  return;
657 }
double litter
Definition: crocent.h:636
double newbiomass(double AcanopyNet, double k, double GrowthRespCoeff)
Definition: AuxCropGro.c:422
double biomass
Definition: crocent.h:636
void UpdateWillowAfterHarvest ( struct c3tree *  willow,
struct management *  management 
)
58 {
59  willow->leaf.biomass=(1-management->harvestparms.frleaf)*willow->leaf.biomass;
60  willow->leaf.litter=(1-management->harvestparms.frleaflitter)*willow->leaf.litter;
61 
62  willow->stem.biomass=(1-management->harvestparms.frstem)*willow->stem.biomass;
63  willow->stem.litter=(1-management->harvestparms.frstemlitter)*willow->stem.litter;
64 
65  willow->root.biomass=(1-management->harvestparms.frdeadroot)*willow->root.biomass;
66  willow->root.litter=management->harvestparms.frdeadroot*willow->root.biomass;
67 
68  willow->rhizome.biomass=(1-management->harvestparms.frdeadrhizome)*willow->rhizome.biomass;
69  willow->rhizome.litter=management->harvestparms.frdeadrhizome*willow->rhizome.biomass;
70  return;
71 }
double frstem
Definition: crocent.h:772
double frstemlitter
Definition: crocent.h:772
double biomass
Definition: crocent.h:642
struct root root
Definition: crocent.h:749
double litter
Definition: crocent.h:642
double biomass
Definition: crocent.h:649
double litter
Definition: crocent.h:649
double frdeadrhizome
Definition: crocent.h:774
struct leaf leaf
Definition: crocent.h:747
double litter
Definition: crocent.h:630
struct rhizome rhizome
Definition: crocent.h:750
double litter
Definition: crocent.h:636
double frleaflitter
Definition: crocent.h:771
struct management::harvestparms harvestparms
double biomass
Definition: crocent.h:630
double biomass
Definition: crocent.h:636
struct stem stem
Definition: crocent.h:748
double frleaf
Definition: crocent.h:771
double frdeadroot
Definition: crocent.h:773
double weightavg ( double  W1,
double  v1,
double  W2,
double  v2 
)