INTERFACE:
subroutine CNiniTimeVar() #ifdef CNDESCRIPTION:
Initializes time varying variables used only in coupled carbon-nitrogen mode (CN):
USES:
use clmtype use clm_atmlnd , only: clm_a2l use shr_kind_mod, only: r8 => shr_kind_r8 use clm_varcon , only: istsoil use clm_varcon , only: istcrop #if (defined C13) use clm_varcon , only: c13ratio #endif use pftvarcon , only: noveg use pftvarcon , only: npcropmin use decompMod , only: get_proc_bounds use surfrdMod , only: crop_progARGUMENTS:
implicit noneCALLED FROM:
subroutine iniTimeVar in file iniTimeVar.F90REVISION HISTORY:
10/21/03: Created by Peter Thornton local pointers to implicit in arguments real(r8), pointer :: evergreen(:) ! binary flag for evergreen leaf habit (0 or 1) real(r8), pointer :: woody(:) ! binary flag for woody lifeform (1=woody, 0=not woody) real(r8), pointer :: leafcn(:) ! leaf C:N (gC/gN) real(r8), pointer :: deadwdcn(:) ! dead wood (xylem and heartwood) C:N (gC/gN) integer , pointer :: ivt(:) ! pft vegetation type logical , pointer :: lakpoi(:) ! true => landunit is a lake point integer , pointer :: plandunit(:) ! landunit index associated with each pft integer , pointer :: clandunit(:) ! landunit index associated with each column integer , pointer :: itypelun(:) ! landunit type local pointers to implicit out arguments real(r8), pointer :: forc_hgt_u_pft(:) !observational height of wind at pft-level [m] real(r8), pointer :: annsum_counter(:) ! seconds since last annual accumulator turnover real(r8), pointer :: cannsum_npp(:) ! annual sum of NPP, averaged from pft-level (gC/m2/yr) real(r8), pointer :: cannavg_t2m(:) !annual average of 2m air temperature, averaged from pft-level (K) real(r8), pointer :: cwdc(:) ! (gC/m2) coarse woody debris C real(r8), pointer :: litr1c(:) ! (gC/m2) litter labile C real(r8), pointer :: litr2c(:) ! (gC/m2) litter cellulose C real(r8), pointer :: litr3c(:) ! (gC/m2) litter lignin C real(r8), pointer :: soil1c(:) ! (gC/m2) soil organic matter C (fast pool) real(r8), pointer :: soil2c(:) ! (gC/m2) soil organic matter C (medium pool) real(r8), pointer :: soil3c(:) ! (gC/m2) soil organic matter C (slow pool) real(r8), pointer :: soil4c(:) ! (gC/m2) soil organic matter C (slowest pool) real(r8), pointer :: cwdn(:) ! (gN/m2) coarse woody debris N real(r8), pointer :: litr1n(:) ! (gN/m2) litter labile N real(r8), pointer :: litr2n(:) ! (gN/m2) litter cellulose N real(r8), pointer :: litr3n(:) ! (gN/m2) litter lignin N real(r8), pointer :: soil1n(:) ! (gN/m2) soil organic matter N (fast pool) real(r8), pointer :: soil2n(:) ! (gN/m2) soil organic matter N (medium pool) real(r8), pointer :: soil3n(:) ! (gN/m2) soil orgainc matter N (slow pool) real(r8), pointer :: soil4n(:) ! (gN/m2) soil orgainc matter N (slowest pool) real(r8), pointer :: sminn(:) ! (gN/m2) soil mineral N real(r8), pointer :: leafc(:) ! (gC/m2) leaf C real(r8), pointer :: leafc_storage(:) ! (gC/m2) leaf C storage real(r8), pointer :: leafc_xfer(:) ! (gC/m2) leaf C transfer real(r8), pointer :: grainc(:) ! (gC/m2) grain C real(r8), pointer :: grainc_storage(:) ! (gC/m2) grain C storage real(r8), pointer :: grainc_xfer(:) ! (gC/m2) grain C transfer real(r8), pointer :: frootc(:) ! (gC/m2) fine root C real(r8), pointer :: frootc_storage(:) ! (gC/m2) fine root C storage real(r8), pointer :: frootc_xfer(:) ! (gC/m2) fine root C transfer real(r8), pointer :: livestemc(:) ! (gC/m2) live stem C real(r8), pointer :: livestemc_storage(:) ! (gC/m2) live stem C storage real(r8), pointer :: livestemc_xfer(:) ! (gC/m2) live stem C transfer real(r8), pointer :: deadstemc(:) ! (gC/m2) dead stem C real(r8), pointer :: deadstemc_storage(:) ! (gC/m2) dead stem C storage real(r8), pointer :: deadstemc_xfer(:) ! (gC/m2) dead stem C transfer real(r8), pointer :: livecrootc(:) ! (gC/m2) live coarse root C real(r8), pointer :: livecrootc_storage(:) ! (gC/m2) live coarse root C storage real(r8), pointer :: livecrootc_xfer(:) ! (gC/m2) live coarse root C transfer real(r8), pointer :: deadcrootc(:) ! (gC/m2) dead coarse root C real(r8), pointer :: deadcrootc_storage(:) ! (gC/m2) dead coarse root C storage real(r8), pointer :: deadcrootc_xfer(:) ! (gC/m2) dead coarse root C transfer real(r8), pointer :: gresp_storage(:) ! (gC/m2) growth respiration storage real(r8), pointer :: gresp_xfer(:) ! (gC/m2) growth respiration transfer real(r8), pointer :: cpool(:) ! (gC/m2) temporary photosynthate C pool real(r8), pointer :: xsmrpool(:) ! (gC/m2) abstract C pool to meet excess MR demand real(r8), pointer :: leafn(:) ! (gN/m2) leaf N real(r8), pointer :: leafn_storage(:) ! (gN/m2) leaf N storage real(r8), pointer :: leafn_xfer(:) ! (gN/m2) leaf N transfer real(r8), pointer :: grainn(:) ! (gN/m2) grain N real(r8), pointer :: grainn_storage(:) ! (gN/m2) grain N storage real(r8), pointer :: grainn_xfer(:) ! (gN/m2) grain N transfer real(r8), pointer :: frootn(:) ! (gN/m2) fine root N real(r8), pointer :: frootn_storage(:) ! (gN/m2) fine root N storage real(r8), pointer :: frootn_xfer(:) ! (gN/m2) fine root N transfer real(r8), pointer :: livestemn(:) ! (gN/m2) live stem N real(r8), pointer :: livestemn_storage(:) ! (gN/m2) live stem N storage real(r8), pointer :: livestemn_xfer(:) ! (gN/m2) live stem N transfer real(r8), pointer :: deadstemn(:) ! (gN/m2) dead stem N real(r8), pointer :: deadstemn_storage(:) ! (gN/m2) dead stem N storage real(r8), pointer :: deadstemn_xfer(:) ! (gN/m2) dead stem N transfer real(r8), pointer :: livecrootn(:) ! (gN/m2) live coarse root N real(r8), pointer :: livecrootn_storage(:) ! (gN/m2) live coarse root N storage real(r8), pointer :: livecrootn_xfer(:) ! (gN/m2) live coarse root N transfer real(r8), pointer :: deadcrootn(:) ! (gN/m2) dead coarse root N real(r8), pointer :: deadcrootn_storage(:) ! (gN/m2) dead coarse root N storage real(r8), pointer :: deadcrootn_xfer(:) ! (gN/m2) dead coarse root N transfer real(r8), pointer :: retransn(:) ! (gN/m2) plant pool of retranslocated N real(r8), pointer :: npool(:) ! (gN/m2) temporary plant N pool real(r8), pointer :: psnsun(:) ! sunlit leaf photosynthesis (umol CO2 /m**2/ s) real(r8), pointer :: psnsha(:) ! shaded leaf photosynthesis (umol CO2 /m**2/ s) #if (defined C13) real(r8), pointer :: c13_psnsun(:) ! sunlit leaf photosynthesis (umol CO2 /m**2/ s) real(r8), pointer :: c13_psnsha(:) ! shaded leaf photosynthesis (umol CO2 /m**2/ s) #endif real(r8), pointer :: laisun(:) ! sunlit projected leaf area index real(r8), pointer :: laisha(:) ! shaded projected leaf area index real(r8), pointer :: dormant_flag(:) ! dormancy flag real(r8), pointer :: days_active(:) ! number of days since last dormancy real(r8), pointer :: onset_flag(:) ! onset flag real(r8), pointer :: onset_counter(:) ! onset days counter real(r8), pointer :: onset_gddflag(:) ! onset flag for growing degree day sum real(r8), pointer :: onset_fdd(:) ! onset freezing degree days counter real(r8), pointer :: onset_gdd(:) ! onset growing degree days real(r8), pointer :: onset_swi(:) ! onset soil water index real(r8), pointer :: offset_flag(:) ! offset flag real(r8), pointer :: offset_counter(:) ! offset days counter real(r8), pointer :: offset_fdd(:) ! offset freezing degree days counter real(r8), pointer :: offset_swi(:) ! offset soil water index real(r8), pointer :: lgsf(:) ! long growing season factor [0-1] real(r8), pointer :: bglfr(:) ! background litterfall rate (1/s) real(r8), pointer :: bgtr(:) ! background transfer rate (1/s) real(r8), pointer :: dayl(:) ! daylength (seconds) real(r8), pointer :: prev_dayl(:) ! daylength from previous timestep (seconds) real(r8), pointer :: annavg_t2m(:) ! annual average 2m air temperature (K) real(r8), pointer :: tempavg_t2m(:) ! temporary average 2m air temperature (K) real(r8), pointer :: gpp(:) ! GPP flux before downregulation (gC/m2/s) real(r8), pointer :: availc(:) ! C flux available for allocation (gC/m2/s) real(r8), pointer :: xsmrpool_recover(:) ! C flux assigned to recovery of negative cpool (gC/m2/s) #if (defined C13) real(r8), pointer :: xsmrpool_c13ratio(:) ! C flux assigned to recovery of negative cpool (gC/m2/s) #endif real(r8), pointer :: alloc_pnow(:) ! fraction of current allocation to display as new growth (DIM) real(r8), pointer :: c_allometry(:) ! C allocation index (DIM) real(r8), pointer :: n_allometry(:) ! N allocation index (DIM) real(r8), pointer :: plant_ndemand(:) ! N flux required to support initial GPP (gN/m2/s) real(r8), pointer :: tempsum_potential_gpp(:) ! temporary annual sum of plant_ndemand real(r8), pointer :: annsum_potential_gpp(:) ! annual sum of plant_ndemand real(r8), pointer :: tempmax_retransn(:) ! temporary max of retranslocated N pool (gN/m2) real(r8), pointer :: annmax_retransn(:) ! annual max of retranslocated N pool (gN/m2) real(r8), pointer :: avail_retransn(:) ! N flux available from retranslocation pool (gN/m2/s) real(r8), pointer :: plant_nalloc(:) ! total allocated N flux (gN/m2/s) real(r8), pointer :: plant_calloc(:) ! total allocated C flux (gC/m2/s) real(r8), pointer :: excess_cflux(:) ! C flux not allocated due to downregulation (gC/m2/s) real(r8), pointer :: downreg(:) ! fractional reduction in GPP due to N limitation (DIM) real(r8), pointer :: tempsum_npp(:) ! temporary annual sum of NPP real(r8), pointer :: annsum_npp(:) ! annual sum of NPP #if (defined CNDV) real(r8), pointer :: tempsum_litfall(:) ! temporary annual sum of litfall real(r8), pointer :: annsum_litfall(:) ! annual sum of litfall #endif #if (defined C13) real(r8), pointer :: rc13_canair(:) !C13O2/C12O2 in canopy air real(r8), pointer :: rc13_psnsun(:) !C13O2/C12O2 in sunlit canopy psn flux real(r8), pointer :: rc13_psnsha(:) !C13O2/C12O2 in shaded canopy psn flux real(r8), pointer :: alphapsnsun(:) !sunlit 13c fractionation ([]) real(r8), pointer :: alphapsnsha(:) !shaded 13c fractionation ([]) #endif real(r8), pointer :: qflx_drain(:) ! sub-surface runoff (mm H2O /s) real(r8), pointer :: qflx_irrig(:) !irrigation flux (mm H2O/s) ! new variables for fire real(r8), pointer :: wf(:) ! soil moisture in top 0.5 m real(r8), pointer :: me(:) ! moisture of extinction (proportion) real(r8), pointer :: fire_prob(:) ! daily fire probability (0-1) real(r8), pointer :: mean_fire_prob(:) ! e-folding mean of daily fire probability (0-1) real(r8), pointer :: fireseasonl(:) ! annual fire season length (days, <= days/year) real(r8), pointer :: farea_burned(:) ! timestep fractional area burned (proportion) real(r8), pointer :: ann_farea_burned(:) ! annual total fractional area burned (proportion) real(r8), pointer :: col_ctrunc(:) ! (gC/m2) column-level sink for C truncation real(r8), pointer :: totcolc(:) ! (gC/m2) total column carbon, incl veg and cpool real(r8), pointer :: totecosysc(:) ! (gC/m2) total ecosystem carbon, incl veg but excl cpool real(r8), pointer :: totlitc(:) ! (gC/m2) total litter carbon real(r8), pointer :: totsomc(:) ! (gC/m2) total soil organic matter carbon real(r8), pointer :: woodc(:) ! (gC/m2) pft-level wood C real(r8), pointer :: col_ntrunc(:) ! (gN/m2) column-level sink for N truncation real(r8), pointer :: totcoln(:) ! (gN/m2) total column nitrogen, incl veg real(r8), pointer :: totecosysn(:) ! (gN/m2) total ecosystem nitrogen, incl veg real(r8), pointer :: totlitn(:) ! (gN/m2) total litter nitrogen real(r8), pointer :: totsomn(:) ! (gN/m2) total soil organic matter nitrogen real(r8), pointer :: dispvegc(:) ! (gC/m2) displayed veg carbon, excluding storage and cpool real(r8), pointer :: pft_ctrunc(:) ! (gC/m2) pft-level sink for C truncation real(r8), pointer :: storvegc(:) ! (gC/m2) stored vegetation carbon, excluding cpool real(r8), pointer :: totpftc(:) ! (gC/m2) total pft-level carbon, including cpool real(r8), pointer :: totvegc(:) ! (gC/m2) total vegetation carbon, excluding cpool real(r8), pointer :: prev_frootc_to_litter(:)!previous timestep froot C litterfall flux (gC/m2/s) real(r8), pointer :: prev_leafc_to_litter(:) !previous timestep leaf C litterfall flux (gC/m2/s) real(r8), pointer :: dispvegn(:) ! (gN/m2) displayed veg nitrogen, excluding storage real(r8), pointer :: pft_ntrunc(:) ! (gN/m2) pft-level sink for N truncation real(r8), pointer :: storvegn(:) ! (gN/m2) stored vegetation nitrogen real(r8), pointer :: totpftn(:) ! (gN/m2) total pft-level nitrogen real(r8), pointer :: totvegn(:) ! (gN/m2) total vegetation nitrogen real(r8), pointer :: lncsha(:) ! leaf N concentration per unit projected LAI (gN leaf/m^2) real(r8), pointer :: lncsun(:) ! leaf N concentration per unit projected LAI (gN leaf/m^2) real(r8), pointer :: vcmxsha(:) ! shaded leaf Vcmax (umolCO2/m^2/s) real(r8), pointer :: vcmxsun(:) ! sunlit leaf Vcmax (umolCO2/m^2/s) #if (defined C13) ! 4/14/05: PET ! Adding isotope code real(r8), pointer :: cwdc13(:) ! (gC/m2) coarse woody debris C real(r8), pointer :: litr1c13(:) ! (gC/m2) litter labile C real(r8), pointer :: litr2c13(:) ! (gC/m2) litter cellulose C real(r8), pointer :: litr3c13(:) ! (gC/m2) litter lignin C real(r8), pointer :: soil1c13(:) ! (gC/m2) soil organic matter C (fast pool) real(r8), pointer :: soil2c13(:) ! (gC/m2) soil organic matter C (medium pool) real(r8), pointer :: soil3c13(:) ! (gC/m2) soil organic matter C (slow pool) real(r8), pointer :: soil4c13(:) ! (gC/m2) soil organic matter C (slowest pool) real(r8), pointer :: c13_col_ctrunc(:) ! (gC/m2) C truncation term real(r8), pointer :: leafc13(:) ! (gC/m2) leaf C real(r8), pointer :: leafc13_storage(:) ! (gC/m2) leaf C storage real(r8), pointer :: leafc13_xfer(:) ! (gC/m2) leaf C transfer real(r8), pointer :: frootc13(:) ! (gC/m2) fine root C real(r8), pointer :: frootc13_storage(:) ! (gC/m2) fine root C storage real(r8), pointer :: frootc13_xfer(:) ! (gC/m2) fine root C transfer real(r8), pointer :: livestemc13(:) ! (gC/m2) live stem C real(r8), pointer :: livestemc13_storage(:) ! (gC/m2) live stem C storage real(r8), pointer :: livestemc13_xfer(:) ! (gC/m2) live stem C transfer real(r8), pointer :: deadstemc13(:) ! (gC/m2) dead stem C real(r8), pointer :: deadstemc13_storage(:) ! (gC/m2) dead stem C storage real(r8), pointer :: deadstemc13_xfer(:) ! (gC/m2) dead stem C transfer real(r8), pointer :: livecrootc13(:) ! (gC/m2) live coarse root C real(r8), pointer :: livecrootc13_storage(:) ! (gC/m2) live coarse root C storage real(r8), pointer :: livecrootc13_xfer(:) ! (gC/m2) live coarse root C transfer real(r8), pointer :: deadcrootc13(:) ! (gC/m2) dead coarse root C real(r8), pointer :: deadcrootc13_storage(:) ! (gC/m2) dead coarse root C storage real(r8), pointer :: deadcrootc13_xfer(:) ! (gC/m2) dead coarse root C transfer real(r8), pointer :: c13_gresp_storage(:) ! (gC/m2) growth respiration storage real(r8), pointer :: c13_gresp_xfer(:) ! (gC/m2) growth respiration transfer real(r8), pointer :: c13pool(:) ! (gC/m2) temporary photosynthate C pool real(r8), pointer :: c13xsmrpool(:) ! (gC/m2) temporary photosynthate C pool real(r8), pointer :: c13_pft_ctrunc(:) ! (gC/m2) C truncation term real(r8), pointer :: totvegc13(:) ! (gC/m2) total vegetation carbon, excluding cpool #endif ! dynamic landuse variables real(r8), pointer :: seedc(:) ! (gC/m2) column-level pool for seeding new PFTs real(r8), pointer :: prod10c(:) ! (gC/m2) wood product C pool, 10-year lifespan real(r8), pointer :: prod100c(:) ! (gC/m2) wood product C pool, 100-year lifespan real(r8), pointer :: totprodc(:) ! (gC/m2) total wood product C #if (defined C13) real(r8), pointer :: seedc13(:) ! (gC/m2) column-level pool for seeding new PFTs real(r8), pointer :: prod10c13(:) ! (gC/m2) wood product C13 pool, 10-year lifespan real(r8), pointer :: prod100c13(:) ! (gC/m2) wood product C13 pool, 100-year lifespan real(r8), pointer :: totprodc13(:) ! (gC/m2) total wood product C13 #endif real(r8), pointer :: seedn(:) ! (gN/m2) column-level pool for seeding new PFTs real(r8), pointer :: prod10n(:) ! (gN/m2) wood product N pool, 10-year lifespan real(r8), pointer :: prod100n(:) ! (gN/m2) wood product N pool, 100-year lifespan real(r8), pointer :: totprodn(:) ! (gN/m2) total wood product NLOCAL VARIABLES:
integer :: g,l,c,p ! indices integer :: begp, endp ! per-clump/proc beginning and ending pft indices integer :: begc, endc ! per-clump/proc beginning and ending column indices integer :: begl, endl ! per-clump/proc beginning and ending landunit indices integer :: begg, endg ! per-clump/proc gridcell ending gridcell indices