Tags: rgknox/ED2
Tags
This commit migrates MLO r322-r327. Description of Changes: Committers Fixes: Fixed bug in fmean carbon values and some py accounting variables. revno: 327: 1 Minor bug fixes in the heat capacity of soils and vegetation. 2 Minor bug fix: mmean broot wasn’t being updated. 3 Updates of many R scripts. 4 Included many utility R scripts. revno: 326 1. Various changes in the post-processing shell and R scripts. 2. Added POV-Ray representations of the plant community. 3. Added the option of turning off the site-, patch- and cohort-level means (which make the output considerably larger). revno: 325: 1. Updated R scripts. 2. Added a new flag for MAXPATCH: if it is -1 or 1, it will force the fusion down to one patch for each land use type. revno: 324: Minor bug fixes on BRAMS, so it also works with the new variables. revno: 323: 1. Added R scripts 2. Changed ed state vars.f90 so it only writes fmean, dmean, mmean, qmean variables to history if it makes sense to do so. revno: 322: 1. Intermediate commit, to avoid losing stuff. New output standards. 2. Minor bug fixes in fusion, particularly with mortality. Fast means are now part of the patch/cohort dynamics because they are written to the output after the dynamics. Minor bug fixes applied by RGK as well.
Merging of Marcos' r321 commits. See report 81ml321rapid.pdf for details and tests. From Marcos' Line: revno: 321 committer: Marcos Longo <[email protected]> branch nick: EDBRAMS timestamp: Sat 2012-10-20 19:53:58 -0400 message: 1. Bug fix in multiple_scatter.f90. One variable was not initialised correctly. 2. Added several diagnostic variables to the output.
rv 81 Changes (M Longo) 1. Bug fixes: a. Budget_utils is now a module. Some compilers do not like when functions have pointers as arguments, unless they are inside a module. b. In disturbance.f90, variable mask was not allocated when cpatch%ncohorts was zero, so the debugger would crash if it tried to use mask. c. In average_utils.f90, daylight was used in divisions, but the number can be zero- this should happen only in polar nights so it should be fixed. d. Several disturbance-related variables were not properly set to zero, leading to some crazy values in the big leaf model whenever fires happened. 2. Added some diagnostic variables (means and mean sum of squares, mostly radiation and u*) 3. Modified INCLUDE_FIRE = 3, now the water deficit threshold is relative to the total rainfall instead of the absolute number. 4. Corrected some R scripts
Changes made by M Longo, R Knox, A Swann, and N Levine BRAMS - Several bug fixes in static control for Grell cumulus' parameterization - Added option QI for dynamic control, which is just an average between Arakawa-Schubert and Kain-Fritsch. ED Drought phenology: - Changes in the order in which plants burn carbon in drought phenology. If phenology_status = -1, then they first lose leaves, not storage. If phenology_status=0 or 1, then they burn storage before they start losing living tissues. - Maximum light photosynthesis is done using the top cohort that has leaves, not the top cohort that is resolvable. They are synonyms when IBRANCH_THERMO is 0, but not when it is 1 or 2. Mortality: - Use the log of population density when we apply mortality rates (dN/dt = -m*N, so the linear form is d lnN/dt = -m). - Added mortality due to disturbance as a 5th mortality rate in cpatch%mort. This is never applied to the cohorts, it is for diagnostics only. - Reverted the density-dependent mortality rate coefficients back to Moorcroft et al. (2001) numbers. Sapwood cannot be depleted when plants go to negative carbon balance, which is in line with Moorcroft et al. (2001). - DDMORT_CONST: new variable in ED2IN. If it is 1, then density-dependent mortality rate is the ED default (CBR = CB/CB_lightMax). If it is zero, CBR = CB/CB_smoistMax, and any number between 0 and 1 will do a weighted average. - IDDMORT_SCHEME. 0 is the default ED, 1 means that carbon balance is offset by storage (to give more chances for drought deciduous) New diagnostic variables: - cpatch%recruit_status, to make comparison with census data easier. 0 means that the cohort is still small, 1 means new recruit (first time with DBH > 10cm), and 2 means established (2nd+ time with DBH > 10cm). - Saved the change in log of DBH/AGB/BA, which is more comparable to Condit et al. (2006) growth rates. Big leaf: - Added biomass init. option for big leaf ED so we can use biometric data. - Replaced dbh_crit by dbh_bigleaf when we run bigleaf, which makes AGB and LAI closer to obs. - Photosynthetic parameters re-tuned for big leaf agains Manaus data *** Big-leaf ED now looks good (bug free) for the tropics and gives reasonable results when run with either iallom=1 or iallom=2 without fire*** Soil: - Small changes in ISOILBC. 0 (bedrock) and 1 (free vertical drainage) are the exact same options. 2 became "lateral" drainage (which is just free drainage reduced by a slope coefficient, defined by SLDRAIN). 3 is the aquifer. I removed "super drainage" and the field capacity options since they were just old tests. - "New" decomposition scheme, which is actually based on the original ED-1.0 formulation. I used the shape of ED-1.0 functions but wrote a exponential based one to sqrt of negative numbers. The new scheme works with DECOMP_SCHEME=2, other options stayed the same. - For DECOMP_SCHEME=2 only, I changed the turnover rate of slow carbon, which was non-sense (100.2 /yr). I switched by 0.2/yr, which is more typical of the slow pools from CENTURY model. The decay rates were renamed from K1, K2, K3 to something more intuitive (decay_rate_fsc, decay_rate_stsc, decay_rate_ssc) - New diagnostic variable: heterotrophic respiration from CWD. The instantaneous value already existed, now it saves all the dmean, qmean, avg stuff. Other: - Added a new fire model that is entirely independent of soil moisture, the threshold is given by accumulated water deficit (INCLUDE_FIRE=3). - Small correction in selective logging, there was a bogus 0.5 factor due to a mistake in the derivation. Also changed the weight for plants so it related to basal area (this should only affect simulations using SimAmazonia2, which has information about logged area, but no target biomass).
Implementation of grass scheme developed by ALS and MD The new grass code is optional with the flag "igrass" igrass = 0 Old Code igrass = 1 New Code The main changes: 1) Sapwood has been split into above and below ground components (bsapwooda/bsapwoodb) 2) bdead = 0 for grass 3) hite = f(bleaf), and changes daily 4) grasses put all stored carbon into reproduction when they reach maximum hite/bleaf 5) allometric functions have been made more generic i.e. size2bl (intended to replace dbh2bl) ingests both dbh and hite so it can decide within the function which to use. 6) DBH(effective) is still stored as a value but not used for grass calculations
Small fixes: - Reproduction, seed_dispersal fix: nseed_maygo was incorrectly weighted - Change phenology so that if phenology_status flag is updated every day. - Terminate_patches subroutine called in vegetation_dyanamics NOTE: THIS REVISION HAS A NON-WORKING VERSION OF BIG-LEAF ED AS AN OPTION IN ED2IN. THIS FEATURE IS UNDER-DEVELOPMENT AND WILL BE FULLY FUNCTIONAL SOON R Knox Changes: ------ Hybrid Solver ---- This commit encapsulates hybrid time stepping. This uses an euler forward step for everything but leaf and canopy temperature. Leaf and canopy temperature use a bdf2 implicit step. Boundary conditions for the implicit step use the following: -forward step leaf water and canopy humidity. -current step ground temperature, radiation, leaf liquid state, atmospheric temperature, aerodynamic conductances Future versions of the hybrid solver could work out using forward step radiation (cosz approx), and solving for the soil surface water balancing prior to the implicit step. This is done after the implicit step, prohibiting a good estimate of forward state surface water and therefore disallowing forward step ground temperature. Two new files are added, their names are self explanatory. hybrid_driver.f90 bdf2_solver.f90 Hybrid time-stepping is now option number 3 in the ED2IN card. Next step: incorporating hybrid stepping in the coupled model. Added some text to the ED2IN describing the hybrid option Amended bdf2_solver to solve for wood also. This is untested and needs discussion. Use ibranch_thermo=0 with hybrid stepping until this is tested. -also added option to read ED runs done with the late model (from Ke) but removing the water sites MD Longo Changes (mdl rv 289): 1. Bug fix in energy budget: the internal energy that left the soil layers to be transpired was removed from the soil but not added anywhere else. Because phase change happens at the leaves, I added this energy to the leaves so the energy budget is closed 2. Bug fix in the mixed branch thermodynamics (IBRANCH_THERMO=1). In case one part was resolvable and the other wasnt, the model was forcing the non-resolvable part to be in thermal equilibrium with the canopy air space when it left the integrator. This was causing instabilities, because inside the integrator both pools are bound together. Now we always impose thermal equilibrium between leaves and wood, and make them in thermal equilibrium with canopy air space only when neither the leaves nor the wood are resolvable. 3. Switched the prognostic variable of the canopy air space to specific enthalpy, which now includes the effect of moisture. There were a few reasons for this change: a. We assume constant pressure within one integration call. From the first law of thermodynamics change in enthalpy is equal to heat exchange when pressure remains constant, which makes enthalpy a natural prognostic variable. The caveat is that enthalpy is not preserved between time steps, so we still track potential temperature, which is conserved when no phase change and no energy is exchanged, but pressure changes, like between two consecutive calls. b. The energy associated with water vapor was not part of the budget so transpiration, and evaporation from ground and vegetation were both treated as sinks of energy, while condensation was treated as source. This is not true because the energy remains in the system, at the canopy air space. c. The amount of energy transferred between the surfaces and the CAS was incorrect. Phase change requires latent heat, but in ED once water evaporates from the surfaces, not only does it change phase, but it also moves from one pool to the other, so the total energy exchanged should include the loss of internal energy, and by using enthalpy we can track the total energy exchanged with simpler equations. 4. Because of the enthalpy, we redefined the latent heat of sublimation and evaporation. They used to be constants, which is thermodynamically inconsistent. Because we assume the specific heat to be constants, the latent heat must be assumed a linear function of temperature so latent heat becomes the difference in enthalpy between the two phases involved. The original terms were renamed as alvl3 and alvi3, to represent that they are values at the triple point, and alvl and alvi became functions 5. I moved all conversions between enthalpy/energy and temperature to therm_lib and therm_lib8, and renamed some of the functions (qtk, qwtk) to better represent their thermodynamic meaning. Minor changes; - nonlocal_dispersal wasnt assigned for PFTs (12-15) - I just added the 2 variables to control the detailed output, a flag to tell which types of output the user wants (IDETAILED) and PATCH_KEEP, a flag to define which patch remains (used only when IDETAILED is not 0). Most detailed output works only for single polygon runs. - Ramspost: now the buffers have enough size to deal with 4-D cumulus variables, and cumulus variables seem to be working fine.\ - Reduced the photosynthesis tolerance to the same as therm_lib8 - Bug fix in canopy_structure_dynamics so that Massaman+branch thermo works - IALLOM parameters for dbh2bl to the way they were originally intended - Changed vt_vector from pointer to allocatable array - Reduced the number of pointer variables to 1100 - Removed obsolete variables like wood projected area
Changes by M Longo (rv255) (plus bug fixes) 1. New radiation scheme, based on the multiple layer, multiple-scattering model by Zhao and Qualls (2005;2006). It has the finite crown area for diffuse radiation, and I ran it in the past and it works fine, but I haven't tested extensively, and should not be used in default runs. 2. Added the cosine interpolation for radiation for when the radiation from the met driver is not to be linearly interpolated. This avoids crashes with this non-standard option. 3. Added some new variables to the namelist, to help tuning: a. Leaf transmittance and reflectance, leaf mean orientation and clumping factor b. Kw for grasses and trees c. D0 (transpiration factor) d. Vm factor was split between C3 and C4 e. Some of the other parameters became absolute values and were split between C3/C4 or tree/grass f. Klow for CO2-limited photosynthesis (C4 grass only) g. Leaf width (grass/broadleaf/conifer) 4. Several bug fixes, including a couple on the surface layer model (a bogus von Karman constant in the definition of zeta), and a variable that wasn't properly copied (soil resistance). The latter didn't change results for the default method, but it made the ground vapour methods to work. 5. Added a CLM based surface layer model, although I think there is no real benefit so I am going to keep using Beljaars and Holtslag because the functional form is smoother. 6. Changed IALLOM, mainly to remove some options we didn't use, and added a new option. These are the new settings. Except for the rooting depth and maximum crown area, the options affect tropical trees and grasses only: 0 -- Original ED-2.1; 1 -- a. The coefficients for structural biomass are set so the total AGB is similar to Baker et al. (2004), equation 2. Balive is the default ED-2.1; b. Experimental root depth that makes canopy trees to have root depths of 5m and grasses/seedlings at 0.5 to have root depth of 0.5 m. c. Crown area defined as in Poorter et al. (2006), imposing maximum crown area. 2 -- Similar to 1, but with a few extra changes: a. Height -> DBH allometry as in Poorter et al. (2006), this makes the trees to hit 35 m at a somewhat higher DBH, so Bleaf still increases up to ~90 cm. b. Balive is retuned, using a few leaf biomass allometric equations for a few genuses in Costa Rica. References: Cole and Ewel (2006), and Calvo Alvarado et al. (2008). 7. I added a correction to the wind in the surface layer for the unstable case, so it accounts for additional turbulence when estimating the winds for each cohort 8. Added a temporary CLM-4 canopy resistance. This is ugly, overly simplified, but it seems to give the best results for water fluxes... 9. Added soil color as a new variable, which hopefully will let us to tune ground albedo. Soil colors 1-20 are based on CLM-4, and 21 is the default from ED. 10. Above ground biomass fraction is a PFT-dependent variable. There is no practical change except that loss_fraction disappeared and was substituted by agf_bs. The values are the currently the same for all PFTs. 11. Changed the light phenology so it has values that are closer to the current tuning. Changed the call for the top cohort, so it uses properties from a cohort with the same properties. None of these changes helped, results are still bad, though. 12. Changed (simplified) the branch thermodynamics options: a. I deleted some allometric options that were either non-functional, or not tested. Now we only have one DBH => WAI allometry. b. IBRANCH_THERMO has 3 options now: 0 -- No branches 1 -- Leaves and branches are solved together in RK4 (veg_energy and veg_water are the prognostic variables). I'm not a huge fan of this, but it works, and Paul and Steve supported this option. 2 -- Leaves and branches are solved as independent entities in RK4 (leaf_energy, leaf_water, wood_energy, wood_water are the prognostic variables). I like this better but it is a lot slower than 0 and 1. 13. Changed the fire model so it uses the monthly mean moisture rather than the instantaneous one, so rainfall on the 31st day of the month will not suppress fires if the month was very dry. 14. Added some diagnostic variables, and removed NEE as it was not NEE but carbon dioxide flux. We now track CO2 flux and storage, their monthly means and mean diurnal cycle as variables on their own. Since these variables are usually compared to tower, they were kept in umol/m2/s, not kgC/m2/yr... 15. Changed the critical height for reproduction for grasses, now it uses DBH (temporary fix until new grasses are implemented), which avoids the plants to stop growing just because of round-off errors. 16. When we sort cohorts, we use height as the primary variable, but in case of ties, we make the use DBH to break the tie. Not sure if this is going to be a problem when dealing with new grasses, but I think we should do that for trees. 17. Renamed the variable max_dbh to dbh_crit because it did not represent the maximum DBH, just a DBH when the cohort hits its maximum possible height. 18. Change to water limitation: New option to H2O_PLANT_LIM where available water is the soil water at field capacity minus wilting point, scaled by the so-called wilting factor: (psi(k) - (H - z(k)) - psi_wp) / (psi_fc - psi_wp) where psi is the matric potentital at layer k, z is the layer depth, H it the crown height and psi_fc and psi_wp are the matric potentials at wilting point and field capacity. 19. Several bug fixes in the coupled model, and a couple of changes in Ramspost. They are both working at least for my runs...
Changes made by M Longo (EDmodel#7 by N Levine, EDmodel#9 by R Knox) 1. Switched the temperature correction from Collatz to Foley, just because it effectively drops the photosynthesis more dramatically when it approaches the critical temperature. 2. Implemented a new allometry, based on Chave et al. (2001) and Baker et al. (2004). 3. Changes to the radiation scheme: - Split ground albedo between PAR and NIR, as soils usually reflect more in the NIR band. - Changed several radiation parameters as I am trying to reduce the energy reaching the ground. - Imposed a maximum radiation. - Change radiation interpolation from meteorological forcing so that incoming shortwave radiation is now interpolated using the cosine of zenith angle and add option to change the SW diffuse/direct split. 4. Changes to soil classification: - Changed the soil input data, now the class must be converted to ED and BRAMS classes beforehand, the code will assume that the classes are already converted. This is true for both ED and BRAMS - Changed the soil classification in ED, by adding 4 new soil types. 5. Added the multiple site capability using soil texture as the criterion for multiple sites 6. Ensured that when phenology_status is 2, leaf biomass is zero, LAI is zero, and elongation factor is zero, this way we guarantee that the cohort is not going to be resolvable. 7. Retuned photosynthetic parameters (Vm0, gamma, D0 etc) 8. Young patches (age < 2 years) can no longer be fused. This allows the newly formed patch to become more developed before we merged them. 9. Added Ryan.s new 2nd order turbulence scheme 10. Added a soil moisture offset for heterotrophic respiration. 11. Added the scripts to submit and post-process the jobs to BZR, that should make things easier for R code exchange.
PreviousNext