Supplement 1. R code for running PnET-CN simulations for AmeriFlux sites, as in text.

<h2>File List</h2><div> <p><a href="GenPnET-CN_Rcode2014-09-15/README">README</a> (MD5: c3c7b6e8b8c2e42f967dff8c15b6d9e6)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/SiteAndVegParams.RData">SiteAndVegParams.RData</a> (MD5: 86dcf70da2c1e4766cde4a222b78f80b)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/RunSimulations2014-06-11.R">RunSimulations2014-06-11.R</a> (MD5: a7ad23be70e82619e104dbe42746820b)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/AmerifluxToClimateFile.R">AmerifluxToClimateFile.R</a> (MD5: 093dfe9d2ff6e61fd2e1b92615d60a70)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/pnetcn_NewPhenology.R">pnetcn_NewPhenology.R</a> (MD5: 7e069c490ec0321a0572c7f73943e96a)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/pnetcn_NewPhenology_cont.R">pnetcn_NewPhenology_cont.R</a> (MD5: 44d4689a457b964f48e497f9b4d3d0df)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/pnetcn.R">pnetcn.R</a> (MD5: d4168f06879c698f46b12d4dfb748d74)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/spinup_pnetcn_NewPhenology.R">spinup_pnetcn_NewPhenology.R</a> (MD5: a64a22fd94e06389292c8c417d2d75d8)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/spinup_pnetcn.R">spinup_pnetcn.R</a> (MD5: 1dc1a10f75c4e14e8108919e0a2d31a3)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/run_pnetcn.R">run_pnetcn.R</a> (MD5: 204dcd9176dfe57b83474fc4677253d0)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/AllocateMo.R">AllocateMo.R</a> (MD5: 7bd2c8e7c2573b64fddef23878be7be6)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/AllocateYr_NewPhenology.R">AllocateYr_NewPhenology.R</a> (MD5: 68c4686f579ae19453fbdd73fdaca927)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/AllocateYr.R">AllocateYr.R</a> (MD5: 17e49c1aaf9d3d045af11344683eaa45)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/AtmEnviron_NewPhenologyOLD.R">AtmEnviron_NewPhenologyOLD.R</a> (MD5: f9f9ce07b2d1d29b719f58c0c2bf5eec)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/AtmEnviron_NewPhenology.R">AtmEnviron_NewPhenology.R</a> (MD5: 6d11dce44856009c05af514b8960cbf5)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/AtmEnviron.R">AtmEnviron.R</a> (MD5: 6a352d22899c3fe1c10cecd2f2bae41d)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/CalculateYr_NewPhenology.R">CalculateYr_NewPhenology.R</a> (MD5: b0d9d700ba3c9503c8d280a6bd50b0f4)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/CNTrans.R">CNTrans.R</a> (MD5: 15f7ea8951957fe0b5714d3164bcb739)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/Decomp.R">Decomp.R</a> (MD5: 6f851eea37ba654a2434a3a9df4f7160)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/GrowthInit_NewPhenology.R">GrowthInit_NewPhenology.R</a> (MD5: ce50ce5fa8a8282e7ad38ec913c9f948)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/initvars.R">initvars.R</a> (MD5: 8503263de5d593fde793622256556209)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/Leach.R">Leach.R</a> (MD5: 49667570a1eae670cb4121f7ca9bfd64)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/PhenologyNew.R">PhenologyNew.R</a> (MD5: 088b2c1b406fab16c4bc55c27c85a5c6)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/PhenologyNew2.R">PhenologyNew2.R</a> (MD5: 6d881331616e178c4b79d0bda723a934)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/Phenology.R">Phenology.R</a> (MD5: 07f72b99a8e981d76100548247d948f2)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/Photosyn.R">Photosyn.R</a> (MD5: 44755415a892bedc86b0f6bad0f50853)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/SoilResp.R">SoilResp.R</a> (MD5: 018dc6e0d4eb5a5f66bb46179099f74b)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/storeoutput.R">storeoutput.R</a> (MD5: f527f8a285c169bdb53aa518f15880c5)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/StoreYrOutput.R">StoreYrOutput.R</a> (MD5: 984cbf2a2f518b5795c319e48bac1ac4)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/Waterbal.R">Waterbal.R</a> (MD5: c3d9d4516e009b9fad7d08ac488f2abc)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/YearInit_NewPhenology.R">YearInit_NewPhenology.R</a> (MD5: 0e9957a828f64f25495bdca9c409d070)</p> <p><a href="GenPnET-CN_Rcode2014-09-15/YearInit.R">YearInit.R</a> (MD5: ceb4bab739a52b78cfcf7ca411939174)</p> <p><a href="#">Ameriflux/</a></p> <p><a href="#">Daymet/</a></p> <p><a href="GenPnET-CN_Rcode2014-09-15/FluxDataFunctions.R">FluxDataFunctions.R</a> (MD5: ae89d6b9cf4e01ba501941ce12690e4b)</p> </div><h2>Description</h2><div> <p>README - Brief notes to get started</p> <p>SiteAndVegParams.RData – R data structures containing site-specific parameters for the six sites analyzed in the paper</p> <p>RunSimulations2014-06-11.R – Template code for importing AmeriFlux and Daymet data and running simulations with climate files including spinup years (must be modified)</p> <p>AmerifluxToClimateFile.R – Functions needed to import Ameriflux and Daymet data and generate climate files</p> <p>pnetcn_NewPhenology.R - Top level function to run the version of PnET-CN used in the paper (new phenology routine)</p> <p>pnetcn.R - Top level function to run traditional version of PnET-CN (old phenology routine)</p> <p>spinup_pnetcn_NewPhenology.R – Alternative version of top-level function that repeats the climate data from the input climate file an arbitrary number of times for spinup (new phenology routine)</p> <p>pnetcn_NewPhenology_cont.R – Function to continue a simulation starting with spinup data from a previous run (called by spinup_pnetcn_NewPhenology.R)</p> <p>spinup_pnetcn.R - Alternative version of top-level function for traditional version of PnET-CN that repeats the climate data from the input climate file an arbitrary number of times for spinup (old phenology routine)</p> <p>run_pnetcn.R - Functions to run PnET-CN with output as data frames of monthly or annual data instead of as a list containing both formats</p> <p>AllocateMo.R - Monthly allocation routine for PnET-CN</p> <p>AllocateYr_NewPhenology.R - Yearly allocation routine for PnET-CN (with new phenology routine)</p> <p>AllocateYr.R - Yearly allocation routine for PnET-CN (with old phenology routine)</p> <p>AtmEnviron_NewPhenology.R - Environmental calculations for PnET-CN (for new phenology routine)</p> <p>AtmEnviron_NewPhenologyOLD.R – Older version of environmental calculations for PnET-CN, with less data saved to data structure (for new phenology routine)</p> <p>AtmEnviron.R - Environmental calculations for PnET-CN (for old phenology routine)</p> <p>CalculateYr_NewPhenology.R - Calculate yearly output values for PnET-CN (for new phenology routine)</p> <p>CNTrans.R - Carbon and nitrogen translocation routine for PnET-CN</p> <p>Decomp.R - Decompositin routine for PnET-CN</p> <p>GrowthInit_NewPhenology.R – Initialize annual aggregation variables for each year in PnET-CN</p> <p>initvars.R - Initialize internal shared variable structures for PnET-CN</p> <p>Leach.R - Leaching routine for PnET-CN</p> <p>PhenologyNew.R - Functions to calculate phenology for PnET-CN (new phenology routine)</p> <p>PhenologyNew2.R -  Skeleton code for new functions to calculate phenology for PnET-CN that would use alternative (e.g., water-driven) phenology cues for grasslands (new phenology routine - INCOMPLETE)</p> <p>Phenology.R - Functions to calculate phenology for PnET-CN (old phenology routine)</p> <p>Photosyn.R - Photosynthesis routine for PnET-CN</p> <p>SoilResp.R - Soil respiration routine for PnET-CN</p> <p>storeoutput.R - Adds variable values to the returned output structure so that the user may work with them (or save them) at the command line after running PnET-CN</p> <p>StoreYrOutput.R - Routine to save annual results to an output file for PnET-CN (not used)</p> <p>Waterbal.R - Ecosystem water balance routine for PnET-CN</p> </div><p>...</p>