diff --git a/biogeochem/EDCanopyStructureMod.F90 b/biogeochem/EDCanopyStructureMod.F90 index d256234a97..7cd4ef1c8c 100644 --- a/biogeochem/EDCanopyStructureMod.F90 +++ b/biogeochem/EDCanopyStructureMod.F90 @@ -148,20 +148,6 @@ subroutine canopy_structure( currentSite , bc_in ) enddo - ! ------------------------------------------------------------------------------ - ! Check patch area to prevent numerical weirdness - ! ------------------------------------------------------------------------------ - - if (currentPatch%area .lt. min_patch_area) then - - write(fates_log(),*) 'An incredibly small patch exists that should' - write(fates_log(),*) 'had been fused or culled already' - write(fates_log(),*) 'currentPatch%area: ',currentPatch%area - write(fates_log(),*) 'min_patch_area: ',min_patch_area - call endrun(msg=errMsg(sourcefile, __LINE__)) - - end if - ! Does any layer have excess area in it? Keep going until it does not... patch_area_counter = 0 area_not_balanced = .true. @@ -1099,6 +1085,13 @@ subroutine leaf_area_profile( currentSite , snow_depth_si, frac_sno_eff_si) currentPatch%canopy_area_profile(:,:,:) = 0._r8 currentPatch%canopy_mask(:,:) = 0 + ! ------------------------------------------------------------------------------ + ! It is remotely possible that in deserts we will not have any canopy + ! area, ie not plants at all... + ! ------------------------------------------------------------------------------ + + if (currentPatch%total_canopy_area > tiny(currentPatch%total_canopy_area)) then + currentCohort => currentPatch%shortest do while(associated(currentCohort)) @@ -1230,12 +1223,6 @@ subroutine leaf_area_profile( currentSite , snow_depth_si, frac_sno_eff_si) ! and canopy area to the accumulators. ! ----------------------------------------------------------------------------- - ! ------------------------------------------------------------------------------ - ! It is remotely possible that in deserts we will not have any canopy - ! area, ie not plants at all... - ! ------------------------------------------------------------------------------ - - if (currentPatch%total_canopy_area > tiny(currentPatch%total_canopy_area)) then currentCohort => currentPatch%shortest do while(associated(currentCohort)) @@ -1393,7 +1380,7 @@ subroutine leaf_area_profile( currentSite , snow_depth_si, frac_sno_eff_si) do cl = 1,currentPatch%NCL_p do iv = 1,currentPatch%ncan(cl,ft) - if( sum(currentPatch%canopy_area_profile(cl,:,iv)) > 1.0001_r8 ) then + if( DEBUG .and. sum(currentPatch%canopy_area_profile(cl,:,iv)) > 1.0001_r8 ) then write(fates_log(), *) 'FATES: A canopy_area_profile exceeded 1.0' write(fates_log(), *) 'cl: ',cl diff --git a/biogeochem/EDLoggingMortalityMod.F90 b/biogeochem/EDLoggingMortalityMod.F90 index f620290cb0..84b3c62f48 100644 --- a/biogeochem/EDLoggingMortalityMod.F90 +++ b/biogeochem/EDLoggingMortalityMod.F90 @@ -31,6 +31,7 @@ module EDLoggingMortalityMod use EDParamsMod , only : logging_direct_frac use EDParamsMod , only : logging_mechanical_frac use EDParamsMod , only : logging_coll_under_frac + use EDParamsMod , only : logging_dbhmax_infra use FatesInterfaceMod , only : hlm_current_year use FatesInterfaceMod , only : hlm_current_month use FatesInterfaceMod , only : hlm_current_day @@ -154,7 +155,6 @@ subroutine LoggingMortality_frac( pft_i, dbh, lmort_direct,lmort_collateral,lmor ! Parameters real(r8), parameter :: adjustment = 1.0 ! adjustment for mortality rates - real(r8), parameter :: logging_dbhmax_infra = 35 !(cm), based on Feldpaush et al. (2005) and Ferry et al. (2010) if (logging_time) then if(EDPftvarcon_inst%woody(pft_i) == 1)then ! only set logging rates for trees diff --git a/biogeochem/EDMortalityFunctionsMod.F90 b/biogeochem/EDMortalityFunctionsMod.F90 index 4e84928361..620e0f8f43 100644 --- a/biogeochem/EDMortalityFunctionsMod.F90 +++ b/biogeochem/EDMortalityFunctionsMod.F90 @@ -12,7 +12,6 @@ module EDMortalityFunctionsMod use EDTypesMod , only : ed_patch_type use FatesConstantsMod , only : itrue,ifalse use FatesAllometryMod , only : bleaf - use EDParamsMod , only : ED_val_stress_mort use FatesInterfaceMod , only : bc_in_type use FatesInterfaceMod , only : hlm_use_ed_prescribed_phys use FatesInterfaceMod , only : hlm_freq_day @@ -62,7 +61,6 @@ subroutine mortality_rates( cohort_in,bc_in,cmort,hmort,bmort,frmort ) real(r8) :: hf_sm_threshold ! hydraulic failure soil moisture threshold real(r8) :: temp_dep ! Temp. function (freezing mortality) real(r8) :: temp_in_C ! Daily averaged temperature in Celcius - real(r8),parameter :: frost_mort_scaler = 3.0_r8 ! Scaling factor for freezing mortality real(r8),parameter :: frost_mort_buffer = 5.0_r8 ! 5deg buffer for freezing mortality logical, parameter :: test_zero_mortality = .false. ! Developer test which @@ -79,7 +77,7 @@ subroutine mortality_rates( cohort_in,bc_in,cmort,hmort,bmort,frmort ) hf_sm_threshold = EDPftvarcon_inst%hf_sm_threshold(cohort_in%pft) if(cohort_in%patchptr%btran_ft(cohort_in%pft) <= hf_sm_threshold)then - hmort = ED_val_stress_mort + hmort = EDPftvarcon_inst%mort_scalar_hydrfailure(cohort_in%pft) else hmort = 0.0_r8 endif @@ -89,7 +87,8 @@ subroutine mortality_rates( cohort_in,bc_in,cmort,hmort,bmort,frmort ) call bleaf(cohort_in%dbh,cohort_in%pft,cohort_in%canopy_trim,b_leaf) if( b_leaf > 0._r8 .and. cohort_in%bstore <= b_leaf )then frac = cohort_in%bstore/ b_leaf - cmort = max(0.0_r8,ED_val_stress_mort*(1.0_r8 - frac)) + cmort = max(0.0_r8,EDPftvarcon_inst%mort_scalar_cstarvation(cohort_in%pft) * & + (1.0_r8 - frac)) else cmort = 0.0_r8 endif @@ -109,7 +108,7 @@ subroutine mortality_rates( cohort_in,bc_in,cmort,hmort,bmort,frmort ) temp_in_C = bc_in%t_veg24_si - tfrz temp_dep = max(0.0,min(1.0,1.0 - (temp_in_C - & EDPftvarcon_inst%freezetol(cohort_in%pft))/frost_mort_buffer) ) - frmort = frost_mort_scaler * temp_dep + frmort = EDPftvarcon_inst%mort_scalar_coldstress(cohort_in%pft) * temp_dep !mortality_rates = bmort + hmort + cmort diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 388637136c..463a8e4179 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -196,9 +196,12 @@ subroutine trim_canopy( currentSite ) endif call bleaf(currentcohort%dbh,ipft,currentcohort%canopy_trim,tar_bl) - call bfineroot(currentcohort%dbh,ipft,currentcohort%canopy_trim,tar_bfr) - bfr_per_bleaf = tar_bfr/tar_bl + if ( int(EDPftvarcon_inst%allom_fmode(ipft)) .eq. 1 ) then + ! only query fine root biomass if using a fine root allometric model that takes leaf trim into account + call bfineroot(currentcohort%dbh,ipft,currentcohort%canopy_trim,tar_bfr) + bfr_per_bleaf = tar_bfr/tar_bl + endif !Leaf cost vs netuptake for each leaf layer. do z = 1,nlevleaf @@ -210,18 +213,27 @@ subroutine trim_canopy( currentSite ) currentCohort%leaf_cost = 1._r8/(EDPftvarcon_inst%slatop(ipft)*1000.0_r8) - currentCohort%leaf_cost = currentCohort%leaf_cost + & - 1.0_r8/(EDPftvarcon_inst%slatop(ipft)*1000.0_r8) * & - bfr_per_bleaf / EDPftvarcon_inst%root_long(ipft) + + if ( int(EDPftvarcon_inst%allom_fmode(ipft)) .eq. 1 ) then + ! if using trimmed leaf for fine root biomass allometry, add the cost of the root increment + ! to the leaf increment; otherwise do not. + currentCohort%leaf_cost = currentCohort%leaf_cost + & + 1.0_r8/(EDPftvarcon_inst%slatop(ipft)*1000.0_r8) * & + bfr_per_bleaf / EDPftvarcon_inst%root_long(ipft) + endif currentCohort%leaf_cost = currentCohort%leaf_cost * & (EDPftvarcon_inst%grperc(ipft) + 1._r8) else !evergreen costs currentCohort%leaf_cost = 1.0_r8/(EDPftvarcon_inst%slatop(ipft)* & EDPftvarcon_inst%leaf_long(ipft)*1000.0_r8) !convert from sla in m2g-1 to m2kg-1 - currentCohort%leaf_cost = currentCohort%leaf_cost + & - 1.0_r8/(EDPftvarcon_inst%slatop(ipft)*1000.0_r8) * & - bfr_per_bleaf / EDPftvarcon_inst%root_long(ipft) + if ( int(EDPftvarcon_inst%allom_fmode(ipft)) .eq. 1 ) then + ! if using trimmed leaf for fine root biomass allometry, add the cost of the root increment + ! to the leaf increment; otherwise do not. + currentCohort%leaf_cost = currentCohort%leaf_cost + & + 1.0_r8/(EDPftvarcon_inst%slatop(ipft)*1000.0_r8) * & + bfr_per_bleaf / EDPftvarcon_inst%root_long(ipft) + endif currentCohort%leaf_cost = currentCohort%leaf_cost * & (EDPftvarcon_inst%grperc(ipft) + 1._r8) endif @@ -875,15 +887,9 @@ subroutine PlantGrowth( currentSite, currentCohort, bc_in ) integer , parameter :: max_substeps = 300 real(r8), parameter :: max_trunc_error = 1.0_r8 integer, parameter :: ODESolve = 2 ! 1=RKF45, 2=Euler - real(r8), parameter :: global_branch_turnover = 0.0_r8 ! Temporary branch turnover setting - ! Branch-turnover control will be - ! introduced in a later PR - ipft = currentCohort%pft - EDPftvarcon_inst%branch_turnover(ipft) = global_branch_turnover - ! Initialize seed production currentCohort%seed_prod = 0.0_r8 @@ -976,35 +982,6 @@ subroutine PlantGrowth( currentSite, currentCohort, bc_in ) currentCohort%canopy_trim, currentCohort%dbh, currentCohort%hite ) end if - ! ----------------------------------------------------------------------------------- - ! III(a). Calculate the maintenance turnover demands - ! Pre-check, make sure phenology is mutually exclusive and at least one chosen - ! (MOVE THIS TO THE PARAMETER READ-IN SECTION) - ! ----------------------------------------------------------------------------------- - - if (EDPftvarcon_inst%evergreen(ipft) == 1) then - if (EDPftvarcon_inst%season_decid(ipft) == 1)then - write(fates_log(),*) 'PFT # ',ipft,' was specified as being both evergreen' - write(fates_log(),*) ' and seasonally deciduous, impossible, aborting' - call endrun(msg=errMsg(sourcefile, __LINE__)) - end if - if (EDPftvarcon_inst%stress_decid(ipft) == 1)then - write(fates_log(),*) 'PFT # ',ipft,' was specified as being both evergreen' - write(fates_log(),*) ' and stress deciduous, impossible, aborting' - call endrun(msg=errMsg(sourcefile, __LINE__)) - end if - end if - if (EDPftvarcon_inst%stress_decid(ipft) /= 1 .and. & - EDPftvarcon_inst%season_decid(ipft) /= 1 .and. & - EDPftvarcon_inst%evergreen(ipft) /= 1) then - write(fates_log(),*) 'PFT # ',ipft,' must be defined as having one of three' - write(fates_log(),*) 'phenology habits, ie == 1' - write(fates_log(),*) 'stress_decid: ',EDPftvarcon_inst%stress_decid(ipft) - write(fates_log(),*) 'season_decid: ',EDPftvarcon_inst%season_decid(ipft) - write(fates_log(),*) 'evergreen: ',EDPftvarcon_inst%evergreen(ipft) - call endrun(msg=errMsg(sourcefile, __LINE__)) - endif - ! ----------------------------------------------------------------------------------- ! III(b). Calculate the maintenance turnover demands @@ -1463,7 +1440,7 @@ function AllomCGrowthDeriv(c_pools,c_mask,cbalance,currentCohort) result(dCdx) if (dbh <= EDPftvarcon_inst%dbh_repro_threshold(ipft)) then ! cap on leaf biomass repro_fraction = EDPftvarcon_inst%seed_alloc(ipft) else - repro_fraction = EDPftvarcon_inst%seed_alloc(ipft) + EDPftvarcon_inst%clone_alloc(ipft) + repro_fraction = EDPftvarcon_inst%seed_alloc(ipft) + EDPftvarcon_inst%seed_alloc_mature(ipft) end if dCdx = 0.0_r8 diff --git a/biogeochem/FatesAllometryMod.F90 b/biogeochem/FatesAllometryMod.F90 index 702764bfae..537e98b30e 100644 --- a/biogeochem/FatesAllometryMod.F90 +++ b/biogeochem/FatesAllometryMod.F90 @@ -86,6 +86,9 @@ module FatesAllometryMod use EDPFTvarcon , only : EDPftvarcon_inst use FatesConstantsMod, only : r8 => fates_r8 use FatesConstantsMod, only : i4 => fates_int + use FatesConstantsMod, only : g_per_kg + use FatesConstantsMod, only : cm2_per_m2 + use FatesConstantsMod, only : kg_per_Megag use shr_log_mod , only : errMsg => shr_log_errMsg use FatesGlobals , only : fates_log use FatesGlobals , only : endrun => fates_endrun @@ -110,11 +113,9 @@ module FatesAllometryMod public :: StructureResetOfDH ! Method to set DBH to sync with structure biomass public :: CheckIntegratedAllometries - logical , parameter :: verbose_logging = .false. character(len=*), parameter :: sourcefile = __FILE__ - ! If testing b4b with older versions, do not remove sapwood ! Our old methods with saldarriaga did not remove sapwood from the ! bdead pool. But newer allometries are providing total agb @@ -520,7 +521,7 @@ real(r8) function tree_lai( bl, status_coh, pft, c_area, n ) write(fates_log(),*) 'problem in treelai',bl,pft endif - slat = 1000.0_r8 * EDPftvarcon_inst%slatop(pft) ! m2/g to m2/kg + slat = g_per_kg * EDPftvarcon_inst%slatop(pft) ! m2/g to m2/kg leafc_per_unitarea = bl/(c_area/n) !KgC/m2 if(leafc_per_unitarea > 0.0_r8)then tree_lai = leafc_per_unitarea * slat !kg/m2 * m2/kg = unitless LAI @@ -560,7 +561,7 @@ real(r8) function tree_sai( dbh, pft, canopy_trim, c_area, n ) real(r8) :: sai_scaler real(r8) :: b_leaf - sai_scaler = 1000. * EDPftvarcon_inst%allom_sai_scaler(pft) ! m2/g to m2/kg + sai_scaler = g_per_kg * EDPftvarcon_inst%allom_sai_scaler(pft) ! m2/g to m2/kg call bleaf(dbh,pft,canopy_trim,b_leaf) @@ -705,7 +706,7 @@ subroutine bfineroot(d,ipft,canopy_trim,bfr,dbfrdd) real(r8) :: slascaler select case(int(EDPftvarcon_inst%allom_fmode(ipft))) - case(1) ! "constant proportionality with bleaf" + case(1) ! "constant proportionality with TRIMMED target bleaf" call blmax_allom(d,ipft,blmax,dblmaxdd) call bfrmax_const(d,blmax,dblmaxdd,ipft,bfrmax,dbfrmaxdd) @@ -713,6 +714,15 @@ subroutine bfineroot(d,ipft,canopy_trim,bfr,dbfrdd) if(present(dbfrdd))then dbfrdd = dbfrmaxdd * canopy_trim end if + case(2) ! "constant proportionality with UNTRIMMED target bleaf" + + call blmax_allom(d,ipft,blmax,dblmaxdd) + call bfrmax_const(d,blmax,dblmaxdd,ipft,bfrmax,dbfrmaxdd) + bfr = bfrmax + if(present(dbfrdd))then + dbfrdd = dbfrmaxdd + end if + case DEFAULT write(fates_log(),*) 'An undefined fine root allometry was specified: ', & EDPftvarcon_inst%allom_fmode(ipft) @@ -881,9 +891,7 @@ end subroutine bbgw_const subroutine bsap_deprecated(d,h,dhdd,bleaf,dbleafdd,ipft,bsap,dbsapdd) - use FatesConstantsMod, only : g_per_kg - use FatesConstantsMod, only : cm2_per_m2 - use FatesConstantsMod, only : kg_per_Megag + ! ------------------------------------------------------------------------- ! ------------------------------------------------------------------------- @@ -930,10 +938,6 @@ end subroutine bsap_deprecated subroutine bsap_dlinear(d,h,dhdd,bleaf,dbleafdd,ipft,bsap,dbsapdd) - use FatesConstantsMod, only : g_per_kg - use FatesConstantsMod, only : cm2_per_m2 - use FatesConstantsMod, only : kg_per_Megag - ! ------------------------------------------------------------------------- ! Calculate sapwood biomass based on leaf area to sapwood area ! proportionality. In this function, the leaftosapwood area is a function @@ -1762,7 +1766,6 @@ subroutine StructureResetOfDH( bdead, ipft, canopy_trim, d, h ) ! T ! ============================================================================ - use FatesConstantsMod , only : calloc_abs_error ! Arguments diff --git a/biogeophys/EDSurfaceAlbedoMod.F90 b/biogeophys/EDSurfaceAlbedoMod.F90 index d71b9715cd..95c37de148 100644 --- a/biogeophys/EDSurfaceAlbedoMod.F90 +++ b/biogeophys/EDSurfaceAlbedoMod.F90 @@ -21,6 +21,12 @@ module EDSurfaceRadiationMod use EDTypesMod , only : maxSWb use EDTypesMod , only : nclmax use EDTypesMod , only : nlevleaf + use EDTypesMod , only : n_rad_stream_types + use EDTypesMod , only : idiffuse + use EDTypesMod , only : idirect + use EDTypesMod , only : ivis + use EDTypesMod , only : inir + use EDTypesMod , only : ipar use EDCanopyStructureMod, only: calc_areaindex use FatesGlobals , only : fates_log @@ -39,10 +45,6 @@ module EDSurfaceRadiationMod real(r8), public :: albice(maxSWb) = & ! albedo land ice by waveband (1=vis, 2=nir) (/ 0.80_r8, 0.55_r8 /) - ! INTERF-TODO: THIS NEEDS SOME CONSISTENCY AND SHOULD BE SET IN THE INTERFACE - ! WITH OTHER DIMENSIONS - integer, parameter :: ipar = 1 ! The band index for PAR - contains subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) @@ -214,9 +216,10 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) end do !ft end do !L - do radtype = 1,2 !do this once for one unit of diffuse, and once for one unit of direct radiation + !do this once for one unit of diffuse, and once for one unit of direct radiation + do radtype = 1, n_rad_stream_types do ib = 1,hlm_numSWb - if (radtype == 1) then + if (radtype == idirect) then ! Set the hypothetical driving radiation. We do this once for a single unit of direct and ! once for a single unit of diffuse radiation. forc_dir(ifp,ib) = 1.00_r8 @@ -706,9 +709,9 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) ! Absorbed radiation, shaded and sunlit portions of leaf layers !here we get one unit of diffuse radiation... how much of !it is absorbed? - if (ib == 1) then ! only set the absorbed PAR for the visible light band. + if (ib == ivis) then ! only set the absorbed PAR for the visible light band. do iv = 1, currentPatch%nrad(L,ft) - if (radtype==1) then + if (radtype==idirect) then if ( DEBUG ) then write(fates_log(),*) 'EDsurfAlb 730 ',Abs_dif_z(ft,iv),currentPatch%f_sun(L,ft,iv) write(fates_log(),*) 'EDsurfAlb 731 ', currentPatch%fabd_sha_z(L,ft,iv), & @@ -742,8 +745,9 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) end if ! Solar radiation absorbed by vegetation and sunlit/shaded leaves do iv = 1,currentPatch%nrad(L,ft) - if (radtype == 1)then - currentPatch%fabd(ib) = currentPatch%fabd(ib) + Abs_dir_z(ft,iv)+Abs_dif_z(ft,iv) + if (radtype == idirect)then + currentPatch%fabd(ib) = currentPatch%fabd(ib) + & + Abs_dir_z(ft,iv)+Abs_dif_z(ft,iv) ! bc_out(s)%fabd_parb(ifp,ib) = currentPatch%fabd(ib) else currentPatch%fabi(ib) = currentPatch%fabi(ib) + Abs_dif_z(ft,iv) @@ -752,7 +756,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) end do ! Albefor if (L==1)then !top canopy layer. - if (radtype == 1)then + if (radtype == idirect)then bc_out(s)%albd_parb(ifp,ib) = bc_out(s)%albd_parb(ifp,ib) + & Dif_up(L,ft,1) * ftweight(L,ft,1) else @@ -762,7 +766,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) end if ! pass normalized PAR profiles for use in diagnostic averaging for history fields - if (ib == 1) then ! only diagnose PAR profiles for the visible band + if (ib == ivis) then ! only diagnose PAR profiles for the visible band do iv = 1, currentPatch%nrad(L,ft) currentPatch%nrmlzd_parprof_pft_dir_z(radtype,L,ft,iv) = & forc_dir(ifp,ib) * tr_dir_z(L,ft,iv) @@ -781,7 +785,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) end if ! ib = visible end if ! present end do !ft - if (radtype == 1)then + if (radtype == idirect)then bc_out(s)%fabd_parb(ifp,ib) = currentPatch%fabd(ib) else bc_out(s)%fabi_parb(ifp,ib) = currentPatch%fabi(ib) @@ -798,7 +802,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) tr_soild = tr_soild + forc_dir(ifp,ib) * weighted_dir_tr(L-1) * (1.0_r8-sum(ftweight(L,1:numpft,1))) endif - if (radtype == 1)then + if (radtype == idirect)then currentPatch%tr_soil_dir(ib) = tr_soild currentPatch%tr_soil_dir_dif(ib) = tr_soili currentPatch%sabs_dir(ib) = abs_rad(ib) @@ -818,7 +822,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) !==============================================================================! ! Total radiation balance: absorbed = incoming - outgoing - if (radtype == 1)then + if (radtype == idirect)then error = abs(currentPatch%sabs_dir(ib) - (currentPatch%tr_soil_dir(ib) * & (1.0_r8-bc_in(s)%albgr_dir_rb(ib)) + & currentPatch%tr_soil_dir_dif(ib) * (1.0_r8-bc_in(s)%albgr_dif_rb(ib)))) @@ -844,7 +848,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) endif endif - if (radtype == 1)then + if (radtype == idirect)then error = (forc_dir(ifp,ib) + forc_dif(ifp,ib)) - & (bc_out(s)%fabd_parb(ifp,ib) + bc_out(s)%albd_parb(ifp,ib) + currentPatch%sabs_dir(ib)) else @@ -864,7 +868,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) enddo enddo - if (radtype == 1)then + if (radtype == idirect)then !here we are adding a within-ED radiation scheme tolerance, and then adding the diffrence onto the albedo !it is important that the lower boundary for this is ~1000 times smaller than the tolerance in surface albedo. if (abs(error) > 1.e-9_r8 .and. abs(error) < 0.15_r8)then @@ -913,7 +917,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out ) bc_out(s)%albi_parb(ifp,ib) = bc_out(s)%albi_parb(ifp,ib) + error end if - if (radtype == 1)then + if (radtype == idirect)then error = (forc_dir(ifp,ib) + forc_dif(ifp,ib)) - & (bc_out(s)%fabd_parb(ifp,ib) + bc_out(s)%albd_parb(ifp,ib) + currentPatch%sabs_dir(ib)) else @@ -1087,13 +1091,13 @@ subroutine ED_SunShadeFracs(nsites, sites,bc_in,bc_out) do FT = 1,numpft do iv = 1, cpatch%nrad(CL,ft) cpatch%parprof_pft_dir_z(CL,FT,iv) = (bc_in(s)%solad_parb(ifp,ipar) * & - cpatch%nrmlzd_parprof_pft_dir_z(1,CL,FT,iv)) + & + cpatch%nrmlzd_parprof_pft_dir_z(idirect,CL,FT,iv)) + & (bc_in(s)%solai_parb(ifp,ipar) * & - cpatch%nrmlzd_parprof_pft_dir_z(2,CL,FT,iv)) + cpatch%nrmlzd_parprof_pft_dir_z(idiffuse,CL,FT,iv)) cpatch%parprof_pft_dif_z(CL,FT,iv) = (bc_in(s)%solad_parb(ifp,ipar) * & - cpatch%nrmlzd_parprof_pft_dif_z(1,CL,FT,iv)) + & + cpatch%nrmlzd_parprof_pft_dif_z(idirect,CL,FT,iv)) + & (bc_in(s)%solai_parb(ifp,ipar) * & - cpatch%nrmlzd_parprof_pft_dif_z(2,CL,FT,iv)) + cpatch%nrmlzd_parprof_pft_dif_z(idiffuse,CL,FT,iv)) end do ! iv end do ! FT end do ! CL @@ -1101,13 +1105,13 @@ subroutine ED_SunShadeFracs(nsites, sites,bc_in,bc_out) do CL = 1, cpatch%NCL_p do iv = 1, maxval(cpatch%nrad(CL,:)) cpatch%parprof_dir_z(CL,iv) = (bc_in(s)%solad_parb(ifp,ipar) * & - cpatch%nrmlzd_parprof_dir_z(1,CL,iv)) + & + cpatch%nrmlzd_parprof_dir_z(idirect,CL,iv)) + & (bc_in(s)%solai_parb(ifp,ipar) * & - cpatch%nrmlzd_parprof_dir_z(2,CL,iv)) + cpatch%nrmlzd_parprof_dir_z(idiffuse,CL,iv)) cpatch%parprof_dif_z(CL,iv) = (bc_in(s)%solad_parb(ifp,ipar) * & - cpatch%nrmlzd_parprof_dif_z(1,CL,iv)) + & + cpatch%nrmlzd_parprof_dif_z(idirect,CL,iv)) + & (bc_in(s)%solai_parb(ifp,ipar) * & - cpatch%nrmlzd_parprof_dif_z(2,CL,iv)) + cpatch%nrmlzd_parprof_dif_z(idiffuse,CL,iv)) end do ! iv end do ! CL diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 35286333d4..f78f57cce8 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -191,7 +191,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! Ball-Berry minimum leaf conductance, unstressed (umol H2O/m**2/s) ! For C3 and C4 plants ! ----------------------------------------------------------------------------------- - real(r8), dimension(2) :: bbbopt + real(r8), dimension(0:1) :: bbbopt associate( & c3psn => EDPftvarcon_inst%c3psn , & @@ -202,9 +202,9 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) frootcn => EDPftvarcon_inst%frootcn, & ! froot C:N (gc/gN) ! slope of BB relationship q10 => FatesSynchronizedParamsInst%Q10 ) + bbbopt(0) = ED_val_bbopt_c4 bbbopt(1) = ED_val_bbopt_c3 - bbbopt(2) = ED_val_bbopt_c4 - + do s = 1,nsites ! Multi-layer parameters scaled by leaf nitrogen profile. @@ -324,10 +324,12 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! are there any leaves of this pft in this layer? if(currentPatch%canopy_mask(cl,ft) == 1)then - if(cl==NCL_p)then !are we in the top canopy layer or a shaded layer? + if(cl==1)then !are we in the top canopy layer or a shaded layer? laican = 0._r8 else - laican = sum(currentPatch%canopy_layer_tai(cl+1:NCL_p)) + + laican = sum(currentPatch%canopy_layer_tai(1:cl-1)) + end if ! Loop over leaf-layers @@ -366,7 +368,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) laican = laican + 0.5_r8 * vai else laican = laican + 0.5_r8 * (currentPatch%elai_profile(cl,ft,iv-1)+ & - currentPatch%esai_profile(cl,ft,iv-1))+vai + currentPatch%esai_profile(cl,ft,iv-1)+vai) end if ! Scale for leaf nitrogen profile @@ -719,7 +721,8 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! Locals ! ------------------------------------------------------------------------ - integer :: pp_type ! Index for the different photosynthetic pathways C3,C4 + integer :: c3c4_path_index ! Index for which photosynthetic pathway + ! is active. C4 = 0, C3 = 1 integer :: sunsha ! Index for differentiating sun and shade real(r8) :: gstoma ! Stomatal Conductance of this leaf layer (m/s) real(r8) :: agross ! co-limited gross leaf photosynthesis (umol CO2/m**2/s) @@ -756,22 +759,23 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in real(r8),parameter :: init_a2l_co2_c3 = 0.7_r8 real(r8),parameter :: init_a2l_co2_c4 = 0.4_r8 - ! quantum efficiency, used only for C4 (mol CO2 / mol photons) - real(r8),parameter,dimension(2) :: quant_eff = [0.0_r8,0.05_r8] + ! quantum efficiency, used only for C4 (mol CO2 / mol photons) (index 0) + real(r8),parameter,dimension(0:1) :: quant_eff = [0.05_r8,0.0_r8] ! empirical curvature parameter for ac, aj photosynthesis co-limitation - real(r8),parameter,dimension(2) :: theta_cj = [0.98_r8,0.80_r8] + real(r8),parameter,dimension(0:1) :: theta_cj = [0.80_r8,0.98_r8] ! empirical curvature parameter for ap photosynthesis co-limitation real(r8),parameter :: theta_ip = 0.95_r8 - associate( bb_slope => EDPftvarcon_inst%BB_slope ) ! slope of BB relationship + associate( bb_slope => EDPftvarcon_inst%BB_slope) ! slope of BB relationship + + ! photosynthetic pathway: 0. = c4, 1. = c3 + c3c4_path_index = nint(EDPftvarcon_inst%c3psn(ft)) - if (nint(EDPftvarcon_inst%c3psn(ft)) == 1) then! photosynthetic pathway: 0. = c4, 1. = c3 - pp_type = 1 + if (c3c4_path_index == 1) then init_co2_intra_c = init_a2l_co2_c3 * can_co2_ppress else - pp_type = 2 init_co2_intra_c = init_a2l_co2_c4 * can_co2_ppress end if @@ -843,7 +847,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in co2_intra_c_old = co2_intra_c ! Photosynthesis limitation rate calculations - if (pp_type == 1)then + if (c3c4_path_index == 1)then ! C3: Rubisco-limited photosynthesis ac = vcmax * max(co2_intra_c-co2_cpoint, 0._r8) / & @@ -865,14 +869,14 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in if(sunsha == 1)then !sunlit !guard against /0's in the night. if((laisun_lsl * canopy_area_lsl) > 0.0000000001_r8) then - aj = quant_eff(pp_type) * parsun_lsl * 4.6_r8 + aj = quant_eff(c3c4_path_index) * parsun_lsl * 4.6_r8 !convert from per cohort to per m2 of leaf) aj = aj / (laisun_lsl * canopy_area_lsl) else aj = 0._r8 end if else - aj = quant_eff(pp_type) * parsha_lsl * 4.6_r8 + aj = quant_eff(c3c4_path_index) * parsha_lsl * 4.6_r8 aj = aj / (laisha_lsl * canopy_area_lsl) end if @@ -882,7 +886,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in end if ! Gross photosynthesis smoothing calculations. First co-limit ac and aj. Then co-limit ap - aquad = theta_cj(pp_type) + aquad = theta_cj(c3c4_path_index) bquad = -(ac + aj) cquad = ac * aj call quadratic_f (aquad, bquad, cquad, r1, r2) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index f9cc8a54a3..8ffa505dfd 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -20,11 +20,8 @@ module EDParamsMod ! this is what the user can use for the actual values ! - real(r8),protected :: ED_size_diagnostic_scale ! Flag to switch between a linear and exponential - ! scale on the plant size axis in diagnostics (NOT USED YET) real(r8),protected :: fates_mortality_disturbance_fraction ! the fraction of canopy mortality that results in disturbance real(r8),protected :: ED_val_comp_excln - real(r8),protected :: ED_val_stress_mort real(r8),protected :: ED_val_init_litter real(r8),protected :: ED_val_nignitions real(r8),protected :: ED_val_understorey_death @@ -50,13 +47,11 @@ module EDParamsMod real(r8),protected,allocatable :: ED_val_history_sizeclass_bin_edges(:) real(r8),protected,allocatable :: ED_val_history_ageclass_bin_edges(:) - character(len=param_string_length),parameter :: ED_name_size_diagnostic_scale = "fates_size_diagnostic_scale" character(len=param_string_length),parameter :: ED_name_mort_disturb_frac = "fates_mort_disturb_frac" character(len=param_string_length),parameter :: ED_name_comp_excln = "fates_comp_excln" - character(len=param_string_length),parameter :: ED_name_stress_mort = "fates_stress_mort" character(len=param_string_length),parameter :: ED_name_init_litter = "fates_init_litter" - character(len=param_string_length),parameter :: ED_name_nignitions = "fates_nignitions" - character(len=param_string_length),parameter :: ED_name_understorey_death = "fates_understorey_death" + character(len=param_string_length),parameter :: ED_name_nignitions = "fates_fire_nignitions" + character(len=param_string_length),parameter :: ED_name_understorey_death = "fates_mort_understorey_death" character(len=param_string_length),parameter :: ED_name_cwd_fcel= "fates_cwd_fcel" character(len=param_string_length),parameter :: ED_name_cwd_flig= "fates_cwd_flig" character(len=param_string_length),parameter :: ED_name_bbopt_c3= "fates_bbopt_c3" @@ -110,6 +105,8 @@ module EDParamsMod real(r8),protected :: logging_event_code ! Code that options how logging events are structured character(len=param_string_length),parameter :: logging_name_event_code = "fates_logging_event_code" + real(r8),protected :: logging_dbhmax_infra ! "Tree diameter, above which infrastructure from logging does not impact damage or mortality. + character(len=param_string_length),parameter :: logging_name_dbhmax_infra = "fates_logging_dbhmax_infra" public :: FatesParamsInit public :: FatesRegisterParams @@ -127,10 +124,8 @@ subroutine FatesParamsInit() implicit none - ED_size_diagnostic_scale = nan fates_mortality_disturbance_fraction = nan ED_val_comp_excln = nan - ED_val_stress_mort = nan ED_val_init_litter = nan ED_val_nignitions = nan ED_val_understorey_death = nan @@ -160,6 +155,7 @@ subroutine FatesParamsInit() logging_direct_frac = nan logging_mechanical_frac = nan logging_event_code = nan + logging_dbhmax_infra = nan end subroutine FatesParamsInit @@ -182,18 +178,12 @@ subroutine FatesRegisterParams(fates_params) call FatesParamsInit() - call fates_params%RegisterParameter(name=ED_name_size_diagnostic_scale, dimension_shape=dimension_shape_1d, & - dimension_names=dim_names) - call fates_params%RegisterParameter(name=ED_name_mort_disturb_frac, dimension_shape=dimension_shape_1d, & dimension_names=dim_names) call fates_params%RegisterParameter(name=ED_name_comp_excln, dimension_shape=dimension_shape_1d, & dimension_names=dim_names) - call fates_params%RegisterParameter(name=ED_name_stress_mort, dimension_shape=dimension_shape_1d, & - dimension_names=dim_names) - call fates_params%RegisterParameter(name=ED_name_init_litter, dimension_shape=dimension_shape_1d, & dimension_names=dim_names) @@ -278,6 +268,8 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=logging_name_event_code, dimension_shape=dimension_shape_1d, & dimension_names=dim_names) + call fates_params%RegisterParameter(name=logging_name_dbhmax_infra, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names) ! non-scalar parameters call fates_params%RegisterParameter(name=ED_name_history_sizeclass_bin_edges, dimension_shape=dimension_shape_1d, & @@ -298,18 +290,12 @@ subroutine FatesReceiveParams(fates_params) class(fates_parameters_type), intent(inout) :: fates_params - call fates_params%RetreiveParameter(name=ED_name_size_diagnostic_scale, & - data=ED_size_diagnostic_scale) - call fates_params%RetreiveParameter(name=ED_name_mort_disturb_frac, & data=fates_mortality_disturbance_fraction) call fates_params%RetreiveParameter(name=ED_name_comp_excln, & data=ED_val_comp_excln) - call fates_params%RetreiveParameter(name=ED_name_stress_mort, & - data=ED_val_stress_mort) - call fates_params%RetreiveParameter(name=ED_name_init_litter, & data=ED_val_init_litter) @@ -394,6 +380,9 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameter(name=logging_name_event_code, & data=logging_event_code) + call fates_params%RetreiveParameter(name=logging_name_dbhmax_infra, & + data=logging_dbhmax_infra) + ! parameters that are arrays of size defined within the params file and thus need allocating as well call fates_params%RetreiveParameterAllocate(name=ED_name_history_sizeclass_bin_edges, & data=ED_val_history_sizeclass_bin_edges) @@ -416,10 +405,8 @@ subroutine FatesReportParams(is_master) if(debug_report .and. is_master) then write(fates_log(),*) '----------- FATES Scalar Parameters -----------------' - write(fates_log(),fmt0) 'ED_size_diagnostic_scale = ',ED_size_diagnostic_scale write(fates_log(),fmt0) 'fates_mortality_disturbance_fraction = ',fates_mortality_disturbance_fraction write(fates_log(),fmt0) 'ED_val_comp_excln = ',ED_val_comp_excln - write(fates_log(),fmt0) 'ED_val_stress_mort = ',ED_val_stress_mort write(fates_log(),fmt0) 'ED_val_init_litter = ',ED_val_init_litter write(fates_log(),fmt0) 'ED_val_nignitions = ',ED_val_nignitions write(fates_log(),fmt0) 'ED_val_understorey_death = ',ED_val_understorey_death @@ -448,6 +435,7 @@ subroutine FatesReportParams(is_master) write(fates_log(),fmt0) 'logging_direct_frac = ',logging_direct_frac write(fates_log(),fmt0) 'logging_mechanical_frac = ',logging_mechanical_frac write(fates_log(),fmt0) 'logging_event_code = ',logging_event_code + write(fates_log(),fmt0) 'logging_dbhmax_infra = ',logging_dbhmax_infra write(fates_log(),*) '------------------------------------------------------' end if diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index c9ee8647f1..ff8e07f331 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -44,7 +44,7 @@ module EDPftvarcon real(r8), allocatable :: seed_rain (:) ! seeds that come from outside the gridbox. real(r8), allocatable :: BB_slope (:) ! ball berry slope parameter real(r8), allocatable :: root_long (:) ! root longevity (yrs) - real(r8), allocatable :: clone_alloc (:) ! fraction of carbon balance allocated to clonal reproduction. + real(r8), allocatable :: seed_alloc_mature (:) ! fraction of carbon balance allocated to clonal reproduction. real(r8), allocatable :: seed_alloc (:) ! fraction of carbon balance allocated to seeds. real(r8), allocatable :: c2b (:) ! Carbon to biomass multiplier [kg/kgC] real(r8), allocatable :: woody(:) @@ -62,15 +62,23 @@ module EDPftvarcon real(r8), allocatable :: fr_fcel(:) real(r8), allocatable :: fr_flig(:) real(r8), allocatable :: xl(:) - real(r8), allocatable :: clumping_index(:) - real(r8), allocatable :: c3psn(:) + real(r8), allocatable :: clumping_index(:) ! factor describing how much self-occlusion + ! of leaf scattering elements decreases light interception + real(r8), allocatable :: c3psn(:) ! index defining the photosynthetic pathway C4 = 0, C3 = 1 real(r8), allocatable :: vcmax25top(:) real(r8), allocatable :: leafcn(:) real(r8), allocatable :: frootcn(:) real(r8), allocatable :: smpso(:) real(r8), allocatable :: smpsc(:) real(r8), allocatable :: grperc(:) + real(r8), allocatable :: maintresp_reduction_curvature(:) ! curvature of MR reduction as f(carbon storage), + ! 1=linear, 0=very curved + real(r8), allocatable :: maintresp_reduction_intercept(:) ! intercept of MR reduction as f(carbon storage), + ! 0=no throttling, 1=max throttling real(r8), allocatable :: bmort(:) + real(r8), allocatable :: mort_scalar_coldstress(:) + real(r8), allocatable :: mort_scalar_cstarvation(:) + real(r8), allocatable :: mort_scalar_hydrfailure(:) real(r8), allocatable :: hf_sm_threshold(:) real(r8), allocatable :: vcmaxha(:) real(r8), allocatable :: jmaxha(:) @@ -189,6 +197,7 @@ module EDPftvarcon ! ! !PUBLIC MEMBER FUNCTIONS: public :: FatesReportPFTParams + public :: FatesCheckParams !----------------------------------------------------------------------- contains @@ -263,11 +272,11 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_dbh_repro_threshold' + name = 'fates_seed_dbh_repro_threshold' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_freezetol' + name = 'fates_mort_freezetol' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -275,11 +284,11 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_hgt_min' + name = 'fates_recruit_hgt_min' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_cushion' + name = 'fates_alloc_storage_cushion' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -287,19 +296,19 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_crown_depth_frac' + name = 'fates_fire_crown_depth_frac' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_bark_scaler' + name = 'fates_fire_bark_scaler' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_crown_kill' + name = 'fates_fire_crown_kill' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_initd' + name = 'fates_recruit_initd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -307,7 +316,7 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_BB_slope' + name = 'fates_leaf_BB_slope' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -315,7 +324,7 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_clone_alloc' + name = 'fates_seed_alloc_mature' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -331,15 +340,15 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_stress_decid' + name = 'fates_phen_stress_decid' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_season_decid' + name = 'fates_phen_season_decid' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_evergreen' + name = 'fates_phen_evergreen' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -347,7 +356,7 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_slatop' + name = 'fates_leaf_slatop' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -387,27 +396,28 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_xl' + name = 'fates_leaf_xl' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_clumping_index' + + name = 'fates_leaf_clumping_index' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_c3psn' + name = 'fates_leaf_c3psn' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_vcmax25top' + name = 'fates_leaf_vcmax25top' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_leafcn' + name = 'fates_leaf_cn_ratio' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_frootcn' + name = 'fates_froot_cn_ratio' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -423,6 +433,14 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_maintresp_reduction_curvature' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_maintresp_reduction_intercept' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_prescribed_npp_canopy' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -443,7 +461,7 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_alpha_SH' + name = 'fates_fire_alpha_SH' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -467,10 +485,9 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) -! THIS VARIABLE IS NOT YET IN THE DEFAULT PARAMETER FILE -! name = 'fates_allom_stmode' -! call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & -! dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_allom_stmode' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) name = 'fates_allom_cmode' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & @@ -572,51 +589,63 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_bmort' + name = 'fates_mort_bmort' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_mort_scalar_coldstress' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_mort_scalar_cstarvation' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_hf_sm_threshold' + name = 'fates_mort_scalar_hydrfailure' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_vcmaxha' + name = 'fates_mort_hf_sm_threshold' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_jmaxha' + name = 'fates_leaf_vcmaxha' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_tpuha' + name = 'fates_leaf_jmaxha' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_vcmaxhd' + name = 'fates_leaf_tpuha' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_jmaxhd' + name = 'fates_leaf_vcmaxhd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_tpuhd' + name = 'fates_leaf_jmaxhd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_vcmaxse' + name = 'fates_leaf_tpuhd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_jmaxse' + name = 'fates_leaf_vcmaxse' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_tpuse' + name = 'fates_leaf_jmaxse' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_germination_timescale' + name = 'fates_leaf_tpuse' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_seed_germination_timescale' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -636,7 +665,7 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_dleaf' + name = 'fates_leaf_diameter' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -672,11 +701,11 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%pft_used) - name = 'fates_dbh_repro_threshold' + name = 'fates_seed_dbh_repro_threshold' call fates_params%RetreiveParameterAllocate(name=name, & data=this%dbh_repro_threshold) - name = 'fates_freezetol' + name = 'fates_mort_freezetol' call fates_params%RetreiveParameterAllocate(name=name, & data=this%freezetol) @@ -684,11 +713,11 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%wood_density) - name = 'fates_hgt_min' + name = 'fates_recruit_hgt_min' call fates_params%RetreiveParameterAllocate(name=name, & data=this%hgt_min) - name = 'fates_cushion' + name = 'fates_alloc_storage_cushion' call fates_params%RetreiveParameterAllocate(name=name, & data=this%cushion) @@ -696,19 +725,19 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%leaf_stor_priority) - name = 'fates_crown_depth_frac' + name = 'fates_fire_crown_depth_frac' call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown) - name = 'fates_bark_scaler' + name = 'fates_fire_bark_scaler' call fates_params%RetreiveParameterAllocate(name=name, & data=this%bark_scaler) - name = 'fates_crown_kill' + name = 'fates_fire_crown_kill' call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_kill) - name = 'fates_initd' + name = 'fates_recruit_initd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%initd) @@ -716,7 +745,7 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%seed_rain) - name = 'fates_BB_slope' + name = 'fates_leaf_BB_slope' call fates_params%RetreiveParameterAllocate(name=name, & data=this%BB_slope) @@ -724,9 +753,9 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%root_long) - name = 'fates_clone_alloc' + name = 'fates_seed_alloc_mature' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%clone_alloc) + data=this%seed_alloc_mature) name = 'fates_seed_alloc' call fates_params%RetreiveParameterAllocate(name=name, & @@ -740,19 +769,19 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%woody) - name = 'fates_stress_decid' + name = 'fates_phen_stress_decid' call fates_params%RetreiveParameterAllocate(name=name, & data=this%stress_decid) - name = 'fates_season_decid' + name = 'fates_phen_season_decid' call fates_params%RetreiveParameterAllocate(name=name, & data=this%season_decid) - name = 'fates_evergreen' + name = 'fates_phen_evergreen' call fates_params%RetreiveParameterAllocate(name=name, & data=this%evergreen) - name = 'fates_slatop' + name = 'fates_leaf_slatop' call fates_params%RetreiveParameterAllocate(name=name, & data=this%slatop) @@ -792,27 +821,27 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%fr_flig) - name = 'fates_xl' + name = 'fates_leaf_xl' call fates_params%RetreiveParameterAllocate(name=name, & data=this%xl) - name = 'fates_clumping_index' + name = 'fates_leaf_clumping_index' call fates_params%RetreiveParameterAllocate(name=name, & data=this%clumping_index) - name = 'fates_c3psn' + name = 'fates_leaf_c3psn' call fates_params%RetreiveParameterAllocate(name=name, & data=this%c3psn) - name = 'fates_vcmax25top' + name = 'fates_leaf_vcmax25top' call fates_params%RetreiveParameterAllocate(name=name, & data=this%vcmax25top) - name = 'fates_leafcn' + name = 'fates_leaf_cn_ratio' call fates_params%RetreiveParameterAllocate(name=name, & data=this%leafcn) - name = 'fates_frootcn' + name = 'fates_froot_cn_ratio' call fates_params%RetreiveParameterAllocate(name=name, & data=this%frootcn) @@ -828,6 +857,14 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%grperc) + name = 'fates_maintresp_reduction_curvature' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%maintresp_reduction_curvature) + + name = 'fates_maintresp_reduction_intercept' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%maintresp_reduction_intercept) + name = 'fates_prescribed_npp_canopy' call fates_params%RetreiveParameterAllocate(name=name, & data=this%prescribed_npp_canopy) @@ -848,7 +885,7 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%prescribed_recruitment) - name = 'fates_alpha_SH' + name = 'fates_fire_alpha_SH' call fates_params%RetreiveParameterAllocate(name=name, & data=this%fire_alpha_SH) @@ -872,13 +909,9 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%allom_amode) - ! THIS PARAMETER IS NOT YET IN THE DEFAULT FILE - ! USE AMODE TO TEMPORARILY FILL AND ALLOCATE - ! name = 'fates_allom_stmode' - name = 'fates_allom_amode' + name = 'fates_allom_stmode' call fates_params%RetreiveParameterAllocate(name=name, & data=this%allom_stmode) - this%allom_stmode(:) = 1.0_r8 name = 'fates_allom_cmode' call fates_params%RetreiveParameterAllocate(name=name, & @@ -984,51 +1017,63 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%hydr_p50_gs) - name = 'fates_bmort' + name = 'fates_mort_bmort' call fates_params%RetreiveParameterAllocate(name=name, & data=this%bmort) - name = 'fates_hf_sm_threshold' + name = 'fates_mort_scalar_coldstress' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%mort_scalar_coldstress) + + name = 'fates_mort_scalar_cstarvation' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%mort_scalar_cstarvation) + + name = 'fates_mort_scalar_hydrfailure' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%mort_scalar_hydrfailure) + + name = 'fates_mort_hf_sm_threshold' call fates_params%RetreiveParameterAllocate(name=name, & data=this%hf_sm_threshold) - name = 'fates_vcmaxha' + name = 'fates_leaf_vcmaxha' call fates_params%RetreiveParameterAllocate(name=name, & data=this%vcmaxha) - name = 'fates_jmaxha' + name = 'fates_leaf_jmaxha' call fates_params%RetreiveParameterAllocate(name=name, & data=this%jmaxha) - name = 'fates_tpuha' + name = 'fates_leaf_tpuha' call fates_params%RetreiveParameterAllocate(name=name, & data=this%tpuha) - name = 'fates_vcmaxhd' + name = 'fates_leaf_vcmaxhd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%vcmaxhd) - name = 'fates_jmaxhd' + name = 'fates_leaf_jmaxhd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%jmaxhd) - name = 'fates_tpuhd' + name = 'fates_leaf_tpuhd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%tpuhd) - name = 'fates_vcmaxse' + name = 'fates_leaf_vcmaxse' call fates_params%RetreiveParameterAllocate(name=name, & data=this%vcmaxse) - name = 'fates_jmaxse' + name = 'fates_leaf_jmaxse' call fates_params%RetreiveParameterAllocate(name=name, & data=this%jmaxse) - name = 'fates_tpuse' + name = 'fates_leaf_tpuse' call fates_params%RetreiveParameterAllocate(name=name, & data=this%tpuse) - name = 'fates_germination_timescale' + name = 'fates_seed_germination_timescale' call fates_params%RetreiveParameterAllocate(name=name, & data=this%germination_timescale) @@ -1048,7 +1093,7 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%trim_inc) - name = 'fates_dleaf' + name = 'fates_leaf_diameter' call fates_params%RetreiveParameterAllocate(name=name, & data=this%dleaf) @@ -1435,7 +1480,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'seed_rain = ',EDPftvarcon_inst%seed_rain write(fates_log(),fmt0) 'BB_slope = ',EDPftvarcon_inst%BB_slope write(fates_log(),fmt0) 'root_long = ',EDPftvarcon_inst%root_long - write(fates_log(),fmt0) 'clone_alloc = ',EDPftvarcon_inst%clone_alloc + write(fates_log(),fmt0) 'seed_alloc_mature = ',EDPftvarcon_inst%seed_alloc_mature write(fates_log(),fmt0) 'seed_alloc = ',EDPftvarcon_inst%seed_alloc write(fates_log(),fmt0) 'woody = ',EDPftvarcon_inst%woody write(fates_log(),fmt0) 'stress_decid = ',EDPftvarcon_inst%stress_decid @@ -1462,6 +1507,9 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'grperc = ',EDPftvarcon_inst%grperc write(fates_log(),fmt0) 'c2b = ',EDPftvarcon_inst%c2b write(fates_log(),fmt0) 'bmort = ',EDPftvarcon_inst%bmort + write(fates_log(),fmt0) 'mort_scalar_coldstress = ',EDPftvarcon_inst%mort_scalar_coldstress + write(fates_log(),fmt0) 'mort_scalar_cstarvation = ',EDPftvarcon_inst%mort_scalar_cstarvation + write(fates_log(),fmt0) 'mort_scalar_hydrfailure = ',EDPftvarcon_inst%mort_scalar_hydrfailure write(fates_log(),fmt0) 'hf_sm_threshold = ',EDPftvarcon_inst%hf_sm_threshold write(fates_log(),fmt0) 'vcmaxha = ',EDPftvarcon_inst%vcmaxha write(fates_log(),fmt0) 'jmaxha = ',EDPftvarcon_inst%jmaxha @@ -1528,5 +1576,159 @@ subroutine FatesReportPFTParams(is_master) end subroutine FatesReportPFTParams + + ! ===================================================================================== + + subroutine FatesCheckParams(is_master) + + ! ---------------------------------------------------------------------------------- + ! + ! This subroutine performs logical checks on user supplied parameters. It cross + ! compares various parameters and will fail if they don't make sense. + ! Examples: + ! A tree can not be defined as both evergreen and deciduous. A woody plant + ! cannot have a structural biomass allometry intercept of 0, and a non-woody + ! plant (grass) can't have a non-zero intercept... + ! ----------------------------------------------------------------------------------- + + + ! Argument + logical, intent(in) :: is_master ! Only log if this is the master proc + + character(len=32),parameter :: fmt0 = '(a,100(F12.4,1X))' + + integer :: npft,ipft + + npft = size(EDPftvarcon_inst%pft_used,1) + + if(.not.is_master) return + + do ipft = 1,npft + + ! Check to see if evergreen, deciduous flags are mutually exclusive + ! ---------------------------------------------------------------------------------- + + if ( int(EDPftvarcon_inst%evergreen(ipft) + & + EDPftvarcon_inst%season_decid(ipft) + & + EDPftvarcon_inst%stress_decid(ipft)) .ne. 1 ) then + + write(fates_log(),*) 'PFT # ',ipft,' must be defined as having one of three' + write(fates_log(),*) 'phenology habits, ie == 1' + write(fates_log(),*) 'stress_decid: ',EDPftvarcon_inst%stress_decid(ipft) + write(fates_log(),*) 'season_decid: ',EDPftvarcon_inst%season_decid(ipft) + write(fates_log(),*) 'evergreen: ',EDPftvarcon_inst%evergreen(ipft) + write(fates_log(),*) 'Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + + end if + + + ! Check to see if mature and base seed allocation is greater than 1 + ! ---------------------------------------------------------------------------------- + if ( ( EDPftvarcon_inst%seed_alloc(ipft) + & + EDPftvarcon_inst%seed_alloc_mature(ipft)) > 1.0_r8 ) then + + write(fates_log(),*) 'The sum of seed allocation from base and mature trees may' + write(fates_log(),*) ' not exceed 1.' + write(fates_log(),*) ' PFT#: ',ipft + write(fates_log(),*) ' seed_alloc: ',EDPftvarcon_inst%seed_alloc(ipft) + write(fates_log(),*) ' seed_alloc_mature: ',EDPftvarcon_inst%seed_alloc_mature(ipft) + write(fates_log(),*) ' Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + + end if + + ! Check if woody plants have a structural biomass (agb) intercept + ! ---------------------------------------------------------------------------------- + if ( ( EDPftvarcon_inst%allom_agb1(ipft) <= tiny(EDPftvarcon_inst%allom_agb1(ipft)) ) .and. & + ( int(EDPftvarcon_inst%woody(ipft)) .eq. 1 ) ) then + + write(fates_log(),*) 'Woody plants are expected to have a non-zero intercept' + write(fates_log(),*) ' in the diameter to AGB allometry equations' + write(fates_log(),*) ' PFT#: ',ipft + write(fates_log(),*) ' allom_agb1: ',EDPftvarcon_inst%allom_agb1(ipft) + write(fates_log(),*) ' woody: ',int(EDPftvarcon_inst%woody(ipft)) + write(fates_log(),*) ' Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + + end if + + ! Check if non-woody plants have structural biomass (agb) intercept + ! ---------------------------------------------------------------------------------- +! if ( ( EDPftvarcon_inst%allom_agb1(ipft) > tiny(EDPftvarcon_inst%allom_agb1(ipft)) ) .and. & +! ( int(EDPftvarcon_inst%woody(ipft)) .ne. 1 ) ) then +! +! write(fates_log(),*) 'Non-woody plants are expected to have a zero intercept' +! write(fates_log(),*) ' in the diameter to AGB allometry equations' +! write(fates_log(),*) ' This is because the definition of AGB (as far as allometry)' +! write(fates_log(),*) ' is concerned, ignores leaf and fine-roots, and only contains' +! write(fates_log(),*) ' woody tissues (sap and structural dead wood).' +! write(fates_log(),*) ' PFT#: ',ipft +! write(fates_log(),*) ' allom_agb1: ',EDPftvarcon_inst%allom_agb1(ipft) +! write(fates_log(),*) ' woody: ',int(EDPftvarcon_inst%woody(ipft)) +! write(fates_log(),*) ' Aborting' +! call endrun(msg=errMsg(sourcefile, __LINE__)) +! +! end if + + ! Check if freezing tolerance is within reasonable bounds + ! ---------------------------------------------------------------------------------- + + if ( ( EDPftvarcon_inst%freezetol(ipft) > 60.0_r8 ) .or. & + ( EDPFtvarcon_inst%freezetol(ipft) < -273.1_r8 ) ) then + + write(fates_log(),*) 'Freezing tolerance was set to a strange value' + write(fates_log(),*) ' Units should be degrees celcius. It cannot' + write(fates_log(),*) ' be less than absolute zero, and we check to see' + write(fates_log(),*) ' if it is greater than 60C, which would be ludicrous as well' + write(fates_log(),*) ' PFT#: ',ipft + write(fates_log(),*) ' freezetol: ', EDPFtvarcon_inst%freezetol(ipft) + write(fates_log(),*) ' Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + + end if + + ! Check if leaf storage priority is between 0-1 + ! ---------------------------------------------------------------------------------- + + if ( ( EDPftvarcon_inst%leaf_stor_priority(ipft) < 0.0_r8 ) .or. & + ( EDPftvarcon_inst%leaf_stor_priority(ipft) > 1.0_r8 ) ) then + + write(fates_log(),*) 'Prioritization of carbon allocation to leaf' + write(fates_log(),*) ' and root turnover replacement, must be between' + write(fates_log(),*) ' 0 and 1' + write(fates_log(),*) ' PFT#: ',ipft + write(fates_log(),*) 'leaf_stor_priority: ',EDPftvarcon_inst%leaf_stor_priority(ipft) + write(fates_log(),*) ' Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + + end if + + ! Check if photosynthetic pathway is neither C3/C4 + ! ---------------------------------------------------------------------------------- + + if ( ( EDPftvarcon_inst%c3psn(ipft) < 0.0_r8 ) .or. & + ( EDPftvarcon_inst%c3psn(ipft) > 1.0_r8 ) ) then + + write(fates_log(),*) ' Two photosynthetic pathways are currently supported' + write(fates_log(),*) ' C4 plants have c3psn = 0' + write(fates_log(),*) ' C3 plants have c3psn = 1' + write(fates_log(),*) ' PFT#: ',ipft + write(fates_log(),*) ' c3psn(pft): ',EDPftvarcon_inst%c3psn(ipft) + write(fates_log(),*) ' Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + + end if + + end do + + + + return + end subroutine FatesCheckParams + + + + end module EDPftvarcon diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 8ecea6054a..89dd9794a8 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -22,11 +22,25 @@ module EDTypesMod ! the parameter file may determine that fewer ! are used, but this helps allocate scratch ! space and output arrays. + + + ! ------------------------------------------------------------------------------------- + ! Radiation parameters + ! These should be part of the radiation module, but since we only have one option + ! this is ok for now. (RGK 04-2018) + ! ------------------------------------------------------------------------------------- + + + integer, parameter :: n_rad_stream_types = 2 ! The number of radiation streams used (direct/diffuse) + integer, parameter :: idirect = 1 ! This is the array index for direct radiation + integer, parameter :: idiffuse = 2 ! This is the array index for diffuse radiation + ! TODO: we use this cp_maxSWb only because we have a static array q(size=2) of ! land-ice abledo for vis and nir. This should be a parameter, which would ! get us on track to start using multi-spectral or hyper-spectral (RGK 02-2017) + integer, parameter :: maxSWb = 2 ! maximum number of broad-bands in the ! shortwave spectrum cp_numSWb <= cp_maxSWb ! this is just for scratch-array purposes @@ -44,6 +58,10 @@ module EDTypesMod ! files. This will be compared with ! the HLM's expectation in FatesInterfaceMod + integer, parameter :: ipar = ivis ! The photosynthetically active band + ! can be approximated to be equal to the visible band + + ! Switches that turn on/off ED dynamics process (names are self explanatory) ! IMPORTANT NOTE!!! THESE SWITCHES ARE EXPERIMENTAL. ! THEY SHOULD CORRECTLY TURN OFF OR ON THE PROCESS, BUT.. THERE ARE VARIOUS @@ -342,14 +360,23 @@ module EDTypesMod real(r8) :: f_sun(nclmax,maxpft,nlevleaf) ! fraction of leaves in the sun in each canopy layer, pft, ! radiation profiles for comparison against observations - real(r8) :: nrmlzd_parprof_pft_dir_z(2,nclmax,maxpft,nlevleaf) ! normalized direct photosynthetically active radiation profiles by - ! incident type (direct/diffuse at top of canopy),leaf,pft,leaf (unitless) - real(r8) :: nrmlzd_parprof_pft_dif_z(2,nclmax,maxpft,nlevleaf) ! normalized diffuse photosynthetically active radiation profiles by - ! incident type (direct/diffuse at top of canopy),leaf,pft,leaf (unitless) - real(r8) :: nrmlzd_parprof_dir_z(2,nclmax,nlevleaf) ! normalized direct photosynthetically active radiation profiles by - ! incident type (direct/diffuse at top of canopy),leaf,leaf (unitless) - real(r8) :: nrmlzd_parprof_dif_z(2,nclmax,nlevleaf) ! normalized diffuse photosynthetically active radiation profiles by - ! incident type (direct/diffuse at top of canopy),leaf,leaf (unitless) + + ! normalized direct photosynthetically active radiation profiles by + ! incident type (direct/diffuse at top of canopy),leaf,pft,leaf (unitless) + real(r8) :: nrmlzd_parprof_pft_dir_z(n_rad_stream_types,nclmax,maxpft,nlevleaf) + + ! normalized diffuse photosynthetically active radiation profiles by + ! incident type (direct/diffuse at top of canopy),leaf,pft,leaf (unitless) + real(r8) :: nrmlzd_parprof_pft_dif_z(n_rad_stream_types,nclmax,maxpft,nlevleaf) + + ! normalized direct photosynthetically active radiation profiles by + ! incident type (direct/diffuse at top of canopy),leaf,leaf (unitless) + real(r8) :: nrmlzd_parprof_dir_z(n_rad_stream_types,nclmax,nlevleaf) + + ! normalized diffuse photosynthetically active radiation profiles by + ! incident type (direct/diffuse at top of canopy),leaf,leaf (unitless) + real(r8) :: nrmlzd_parprof_dif_z(n_rad_stream_types,nclmax,nlevleaf) + real(r8) :: parprof_pft_dir_z(nclmax,maxpft,nlevleaf) ! direct-beam PAR profile through canopy, by canopy,PFT,leaf level (w/m2) real(r8) :: parprof_pft_dif_z(nclmax,maxpft,nlevleaf) ! diffuse PAR profile through canopy, by canopy,PFT,leaf level (w/m2) real(r8) :: parprof_dir_z(nclmax,nlevleaf) ! direct-beam PAR profile through canopy, by canopy,leaf level (w/m2) diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index 54a7abbb3a..502c52ada1 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -24,6 +24,7 @@ module FatesInterfaceMod use FatesGlobals , only : fates_log use FatesGlobals , only : endrun => fates_endrun use EDPftvarcon , only : FatesReportPFTParams + use EDPftvarcon , only : FatesCheckParams use EDPftvarcon , only : EDPftvarcon_inst use EDParamsMod , only : FatesReportParams @@ -1522,7 +1523,7 @@ subroutine FatesReportParameters(masterproc) call FatesReportPFTParams(masterproc) call FatesReportParams(masterproc) - + call FatesCheckParams(masterproc) return end subroutine FatesReportParameters diff --git a/parameter_files/fates_params_14pfts.cdl b/parameter_files/fates_params_14pfts.cdl new file mode 100644 index 0000000000..7a0fd504bc --- /dev/null +++ b/parameter_files/fates_params_14pfts.cdl @@ -0,0 +1,1069 @@ +netcdf fates_params_default_sorted { +dimensions: + fates_pft = 14 ; + fates_history_age_bins = 7 ; + fates_history_size_bins = 13 ; + fates_history_height_bins = 6 ; + fates_hydr_organs = 4 ; + fates_NCWD = 4 ; + fates_litterclass = 6 ; + fates_scalar = 1 ; + fates_string_length = 60 ; + fates_variants = 2 ; +variables: + float fates_history_height_bin_edges(fates_history_height_bins) ; + fates_history_height_bin_edges:units = "m" ; + fates_history_height_bin_edges:long_name = "Lower edges for height bins used in height-resolved history output" ; + float fates_history_sizeclass_bin_edges(fates_history_size_bins) ; + fates_history_sizeclass_bin_edges:units = "cm" ; + fates_history_sizeclass_bin_edges:long_name = "Lower edges for DBH size class bins used in size-resolved cohort history output" ; + float fates_history_ageclass_bin_edges(fates_history_age_bins) ; + fates_history_ageclass_bin_edges:units = "yr" ; + fates_history_ageclass_bin_edges:long_name = "Lower edges for age class bins used in age-resolved patch history output" ; + float fates_base_mr_20(fates_scalar) ; + fates_base_mr_20:units = "gC/gN/s" ; + fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; + float fates_bbopt_c3(fates_scalar) ; + fates_bbopt_c3:units = "umol H2O/m**2/s" ; + fates_bbopt_c3:long_name = "Ball-Berry minimum unstressed leaf conductance for C3" ; + float fates_bbopt_c4(fates_scalar) ; + fates_bbopt_c4:units = "umol H2O/m**2/s" ; + fates_bbopt_c4:long_name = "Ball-Berry minimum unstressed leaf conductance for C4" ; + float fates_canopy_closure_thresh(fates_scalar) ; + fates_canopy_closure_thresh:units = "unitless" ; + fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; + float fates_cohort_fusion_tol(fates_scalar) ; + fates_cohort_fusion_tol:units = "unitless" ; + fates_cohort_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; + float fates_comp_excln(fates_scalar) ; + fates_comp_excln:units = "none" ; + fates_comp_excln:long_name = "weighting factor (exponent on dbh) for canopy layer exclusion and promotion" ; + float fates_cwd_fcel(fates_scalar) ; + fates_cwd_fcel:units = "unitless" ; + fates_cwd_fcel:long_name = "Cellulose fraction for CWD" ; + float fates_cwd_flig(fates_scalar) ; + fates_cwd_flig:units = "unitless" ; + fates_cwd_flig:long_name = "Lignin fraction of coarse woody debris" ; + float fates_fire_nignitions(fates_scalar) ; + fates_fire_nignitions:units = "/m2 (?)" ; + fates_fire_nignitions:long_name = "number of daily ignitions (nfires = nignitions*FDI*area_scaling)" ; + float fates_hydr_psi0(fates_scalar) ; + fates_hydr_psi0:units = "MPa" ; + fates_hydr_psi0:long_name = "sapwood water potential at saturation" ; + float fates_hydr_psicap(fates_scalar) ; + fates_hydr_psicap:units = "MPa" ; + fates_hydr_psicap:long_name = "sapwood water potential at which capillary reserves exhausted" ; + float fates_init_litter(fates_scalar) ; + fates_init_litter:units = "NA" ; + fates_init_litter:long_name = "Initialization value for litter pool in cold-start (NOT USED)" ; + float fates_logging_coll_under_frac(fates_scalar) ; + fates_logging_coll_under_frac:units = "fraction" ; + fates_logging_coll_under_frac:long_name = "Fraction of stems killed in the understory when logging generates disturbance" ; + float fates_logging_collateral_frac(fates_scalar) ; + fates_logging_collateral_frac:units = "fraction" ; + fates_logging_collateral_frac:long_name = "Fraction of large stems in upperstory that die from logging collateral damage" ; + float fates_logging_dbhmax_infra(fates_scalar) ; + fates_logging_dbhmax_infra:units = "cm" ; + fates_logging_dbhmax_infra:long_name = "Tree diameter, above which infrastructure from logging does not impact damage or mortality." ; + float fates_logging_dbhmin(fates_scalar) ; + fates_logging_dbhmin:units = "cm" ; + fates_logging_dbhmin:long_name = "Minimum dbh at which logging is applied" ; + float fates_logging_direct_frac(fates_scalar) ; + fates_logging_direct_frac:units = "fraction" ; + fates_logging_direct_frac:long_name = "Fraction of stems logged directly per event" ; + float fates_logging_event_code(fates_scalar) ; + fates_logging_event_code:units = "unitless" ; + fates_logging_event_code:long_name = "Integer code that options how logging events are structured" ; + float fates_logging_mechanical_frac(fates_scalar) ; + fates_logging_mechanical_frac:units = "fraction" ; + fates_logging_mechanical_frac:long_name = "Fraction of stems killed due infrastructure an other mechanical means" ; + float fates_mort_disturb_frac(fates_scalar) ; + fates_mort_disturb_frac:units = "fraction" ; + fates_mort_disturb_frac:long_name = "fraction of canopy mortality that results in disturbance (i.e. transfer of area from new to old patch)" ; + float fates_mort_understorey_death(fates_scalar) ; + fates_mort_understorey_death:units = "fraction" ; + fates_mort_understorey_death:long_name = "fraction of plants in understorey cohort impacted by overstorey tree-fall" ; + float fates_patch_fusion_tol(fates_scalar) ; + fates_patch_fusion_tol:units = "unitless" ; + fates_patch_fusion_tol:long_name = "minimum fraction in difference in profiles between patches" ; + float fates_phen_a(fates_scalar) ; + fates_phen_a:units = "none" ; + fates_phen_a:long_name = "GDD accumulation function, intercept parameter: gdd_thesh = a + b exp(c*ncd)" ; + float fates_phen_b(fates_scalar) ; + fates_phen_b:units = "none" ; + fates_phen_b:long_name = "GDD accumulation function, multiplier parameter: gdd_thesh = a + b exp(c*ncd)" ; + float fates_phen_c(fates_scalar) ; + fates_phen_c:units = "none" ; + fates_phen_c:long_name = "GDD accumulation function, exponent parameter: gdd_thesh = a + b exp(c*ncd)" ; + float fates_phen_chiltemp(fates_scalar) ; + fates_phen_chiltemp:units = "degrees C" ; + fates_phen_chiltemp:long_name = "chilling day counting threshold" ; + float fates_phen_coldtemp(fates_scalar) ; + fates_phen_coldtemp:units = "degrees C" ; + fates_phen_coldtemp:long_name = "temperature exceedance to flag a cold-day for temperature leaf drop" ; + float fates_phen_doff_time(fates_scalar) ; + fates_phen_doff_time:units = "days" ; + fates_phen_doff_time:long_name = "day threshold compared against days since leaves became off-allometry" ; + float fates_phen_drought_threshold(fates_scalar) ; + fates_phen_drought_threshold:units = "m3/m3" ; + fates_phen_drought_threshold:long_name = "liquid volume in soil layer, threashold for drought phenology" ; + float fates_phen_mindayson(fates_scalar) ; + fates_phen_mindayson:units = "days" ; + fates_phen_mindayson:long_name = "day threshold compared against days since leaves became on-allometry" ; + float fates_phen_ncolddayslim(fates_scalar) ; + fates_phen_ncolddayslim:units = "days" ; + fates_phen_ncolddayslim:long_name = "day threshold exceedance for temperature leaf-drop" ; + char fates_pftname(fates_pft, fates_string_length) ; + fates_pftname:units = "unitless - string" ; + fates_pftname:long_name = "Description of plant type" ; + float fates_alloc_storage_cushion(fates_pft) ; + fates_alloc_storage_cushion:units = "fraction" ; + fates_alloc_storage_cushion:long_name = "maximum size of storage C pool, relative to maximum size of leaf C pool" ; + float fates_allom_agb1(fates_pft) ; + fates_allom_agb1:units = "variable" ; + fates_allom_agb1:long_name = "Parameter 1 for agb allometry" ; + float fates_allom_agb2(fates_pft) ; + fates_allom_agb2:units = "variable" ; + fates_allom_agb2:long_name = "Parameter 2 for agb allometry" ; + float fates_allom_agb3(fates_pft) ; + fates_allom_agb3:units = "variable" ; + fates_allom_agb3:long_name = "Parameter 3 for agb allometry" ; + float fates_allom_agb4(fates_pft) ; + fates_allom_agb4:units = "variable" ; + fates_allom_agb4:long_name = "Parameter 4 for agb allometry" ; + float fates_allom_agb_frac(fates_pft) ; + fates_allom_agb_frac:units = "fraction" ; + fates_allom_agb_frac:long_name = "Fraction of woody biomass that is above ground" ; + float fates_allom_amode(fates_pft) ; + fates_allom_amode:units = "index" ; + fates_allom_amode:long_name = "AGB allometry function index" ; + float fates_allom_blca_expnt_diff(fates_pft) ; + fates_allom_blca_expnt_diff:units = "unitless" ; + fates_allom_blca_expnt_diff:long_name = "difference between allometric DBH:bleaf and DBH:crown area exponents" ; + float fates_allom_cmode(fates_pft) ; + fates_allom_cmode:units = "index" ; + fates_allom_cmode:long_name = "coarse root biomass allometry function index" ; + float fates_allom_d2bl1(fates_pft) ; + fates_allom_d2bl1:units = "variable" ; + fates_allom_d2bl1:long_name = "Parameter 1 for d2bl allometry (intercept)" ; + float fates_allom_d2bl2(fates_pft) ; + fates_allom_d2bl2:units = "variable" ; + fates_allom_d2bl2:long_name = "Parameter 2 for d2bl allometry (slope)" ; + float fates_allom_d2bl3(fates_pft) ; + fates_allom_d2bl3:units = "unitless" ; + fates_allom_d2bl3:long_name = "Parameter 3 for d2bl allometry (optional)" ; + float fates_allom_d2ca_coefficient_max(fates_pft) ; + fates_allom_d2ca_coefficient_max:units = "m2 cm^(-1/beta)" ; + fates_allom_d2ca_coefficient_max:long_name = "max (savanna) dbh to area multiplier factor where: area = n*d2ca_coeff*dbh^beta" ; + float fates_allom_d2ca_coefficient_min(fates_pft) ; + fates_allom_d2ca_coefficient_min:units = "m2 cm^(-1/beta)" ; + fates_allom_d2ca_coefficient_min:long_name = "min (forest) dbh to area multiplier factor where: area = n*d2ca_coeff*dbh^beta" ; + float fates_allom_d2h1(fates_pft) ; + fates_allom_d2h1:units = "variable" ; + fates_allom_d2h1:long_name = "Parameter 1 for d2h allometry (intercept, or c)" ; + float fates_allom_d2h2(fates_pft) ; + fates_allom_d2h2:units = "variable" ; + fates_allom_d2h2:long_name = "Parameter 2 for d2h allometry (slope, or m)" ; + float fates_allom_d2h3(fates_pft) ; + fates_allom_d2h3:units = "variable" ; + fates_allom_d2h3:long_name = "Parameter 3 for d2h allometry (optional)" ; + float fates_allom_dbh_maxheight(fates_pft) ; + fates_allom_dbh_maxheight:units = "cm" ; + fates_allom_dbh_maxheight:long_name = "the diameter (if any) corresponding to maximum height, diameters may increase beyond this" ; + float fates_allom_fmode(fates_pft) ; + fates_allom_fmode:units = "index" ; + fates_allom_fmode:long_name = "fine root biomass allometry function index" ; + float fates_allom_hmode(fates_pft) ; + fates_allom_hmode:units = "index" ; + fates_allom_hmode:long_name = "height allometry function index" ; + float fates_allom_l2fr(fates_pft) ; + fates_allom_l2fr:units = "gC/gC" ; + fates_allom_l2fr:long_name = "Allocation parameter: fine root C per leaf C" ; + float fates_allom_latosa_int(fates_pft) ; + fates_allom_latosa_int:units = "ratio" ; + fates_allom_latosa_int:long_name = "Leaf area to sap area ratio, intercept [m2/cm2]" ; + float fates_allom_latosa_slp(fates_pft) ; + fates_allom_latosa_slp:units = "unitless" ; + fates_allom_latosa_slp:long_name = "Leaf area to sap area ratio, slope (optional)" ; + float fates_allom_lmode(fates_pft) ; + fates_allom_lmode:units = "index" ; + fates_allom_lmode:long_name = "leaf biomass allometry function index" ; + float fates_allom_sai_scaler(fates_pft) ; + fates_allom_sai_scaler:units = "m2/gC" ; + fates_allom_sai_scaler:long_name = "allometric ratio of SAI to target bleaf" ; + float fates_allom_smode(fates_pft) ; + fates_allom_smode:units = "index" ; + fates_allom_smode:long_name = "sapwood allometry function index" ; + float fates_allom_stmode(fates_pft) ; + fates_allom_stmode:units = "index" ; + fates_allom_stmode:long_name = "storage allometry function index" ; + float fates_branch_turnover(fates_pft) ; + fates_branch_turnover:units = "yr-1" ; + fates_branch_turnover:long_name = "turnover time of branches" ; + float fates_c2b(fates_pft) ; + fates_c2b:units = "ratio" ; + fates_c2b:long_name = "Carbon to biomass multiplier of bulk structural tissues" ; + float fates_displar(fates_pft) ; + fates_displar:units = "unitless" ; + fates_displar:long_name = "Ratio of displacement height to canopy top height" ; + float fates_fire_alpha_SH(fates_pft) ; + fates_fire_alpha_SH:units = "NA" ; + fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, Equation 16 Thonicke et al 2010" ; + float fates_fire_bark_scaler(fates_pft) ; + fates_fire_bark_scaler:units = "fraction" ; + fates_fire_bark_scaler:long_name = "the thickness of a cohorts bark as a fraction of its dbh" ; + float fates_fire_crown_depth_frac(fates_pft) ; + fates_fire_crown_depth_frac:units = "fraction" ; + fates_fire_crown_depth_frac:long_name = "the depth of a cohorts crown as a fraction of its height" ; + float fates_fire_crown_kill(fates_pft) ; + fates_fire_crown_kill:units = "NA" ; + fates_fire_crown_kill:long_name = "fire parameter, see equation 22 in Thonicke et al 2010" ; + float fates_fr_fcel(fates_pft) ; + fates_fr_fcel:units = "fraction" ; + fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; + float fates_fr_flab(fates_pft) ; + fates_fr_flab:units = "fraction" ; + fates_fr_flab:long_name = "Fine root litter labile fraction" ; + float fates_fr_flig(fates_pft) ; + fates_fr_flig:units = "fraction" ; + fates_fr_flig:long_name = "Fine root litter lignin fraction" ; + float fates_froot_cn_ratio(fates_pft) ; + fates_froot_cn_ratio:units = "gC/gN" ; + fates_froot_cn_ratio:long_name = "Fine root C:N" ; + float fates_grperc(fates_pft) ; + fates_grperc:units = "unitless" ; + fates_grperc:long_name = "Growth respiration factor" ; + float fates_hydr_avuln_gs(fates_pft) ; + fates_hydr_avuln_gs:units = "unitless" ; + fates_hydr_avuln_gs:long_name = "shape parameter for stomatal control of water vapor exiting leaf" ; + float fates_hydr_avuln_node(fates_hydr_organs, fates_pft) ; + fates_hydr_avuln_node:units = "unitless" ; + fates_hydr_avuln_node:long_name = "xylem vulnerability curve shape parameter" ; + float fates_hydr_epsil_node(fates_hydr_organs, fates_pft) ; + fates_hydr_epsil_node:units = "MPa" ; + fates_hydr_epsil_node:long_name = "bulk elastic modulus" ; + float fates_hydr_fcap_node(fates_hydr_organs, fates_pft) ; + fates_hydr_fcap_node:units = "unitless" ; + fates_hydr_fcap_node:long_name = "fraction of (1-resid_node) that is capillary in source" ; + float fates_hydr_kmax_node(fates_hydr_organs, fates_pft) ; + fates_hydr_kmax_node:units = "kgMPa/m/s" ; + fates_hydr_kmax_node:long_name = "maximum xylem conductivity per unit conducting xylem area" ; + float fates_hydr_p50_gs(fates_pft) ; + fates_hydr_p50_gs:units = "MPa" ; + fates_hydr_p50_gs:long_name = "water potential at 50% loss of stomatal conductance" ; + float fates_hydr_p50_node(fates_hydr_organs, fates_pft) ; + fates_hydr_p50_node:units = "MPa" ; + fates_hydr_p50_node:long_name = "xylem water potential at 50% loss of conductivity" ; + float fates_hydr_p_taper(fates_pft) ; + fates_hydr_p_taper:units = "unitless" ; + fates_hydr_p_taper:long_name = "xylem taper exponent" ; + float fates_hydr_pinot_node(fates_hydr_organs, fates_pft) ; + fates_hydr_pinot_node:units = "MPa" ; + fates_hydr_pinot_node:long_name = "osmotic potential at full turgor" ; + float fates_hydr_pitlp_node(fates_hydr_organs, fates_pft) ; + fates_hydr_pitlp_node:units = "MPa" ; + fates_hydr_pitlp_node:long_name = "turgor loss point" ; + float fates_hydr_resid_node(fates_hydr_organs, fates_pft) ; + fates_hydr_resid_node:units = "fraction" ; + fates_hydr_resid_node:long_name = "residual fraction" ; + float fates_hydr_rfrac_stem(fates_pft) ; + fates_hydr_rfrac_stem:units = "fraction" ; + fates_hydr_rfrac_stem:long_name = "fraction of total tree resistance from troot to canopy" ; + float fates_hydr_rs2(fates_pft) ; + fates_hydr_rs2:units = "mm" ; + fates_hydr_rs2:long_name = "absorbing root radius" ; + float fates_hydr_srl(fates_pft) ; + fates_hydr_srl:units = "m g-1" ; + fates_hydr_srl:long_name = "specific root length" ; + float fates_hydr_thetas_node(fates_hydr_organs, fates_pft) ; + fates_hydr_thetas_node:units = "cm3/cm3" ; + fates_hydr_thetas_node:long_name = "saturated water content" ; + float fates_leaf_BB_slope(fates_pft) ; + fates_leaf_BB_slope:units = "unitless" ; + fates_leaf_BB_slope:long_name = "stomatal slope parameter, as per Ball-Berry" ; + float fates_leaf_cn_ratio(fates_pft) ; + fates_leaf_cn_ratio:units = "gC/gN" ; + fates_leaf_cn_ratio:long_name = "Leaf C:N" ; + float fates_leaf_c3psn(fates_pft) ; + fates_leaf_c3psn:units = "flag" ; + fates_leaf_c3psn:long_name = "Photosynthetic pathway (1=c3, 0=c4)" ; + float fates_leaf_clumping_index(fates_pft) ; + fates_leaf_clumping_index:units = "fraction (0-1)" ; + fates_leaf_clumping_index:long_name = "factor describing how much self-occlusion of leaf scattering elements decreases light interception" ; + float fates_leaf_diameter(fates_pft) ; + fates_leaf_diameter:units = "m" ; + fates_leaf_diameter:long_name = "Characteristic leaf dimension" ; + float fates_leaf_jmaxha(fates_pft) ; + fates_leaf_jmaxha:units = "J/mol" ; + fates_leaf_jmaxha:long_name = "activation energy for jmax" ; + float fates_leaf_jmaxhd(fates_pft) ; + fates_leaf_jmaxhd:units = "J/mol" ; + fates_leaf_jmaxhd:long_name = "deactivation energy for jmax" ; + float fates_leaf_jmaxse(fates_pft) ; + fates_leaf_jmaxse:units = "J/mol/K" ; + fates_leaf_jmaxse:long_name = "entropy term for jmax" ; + float fates_leaf_long(fates_pft) ; + fates_leaf_long:units = "yr" ; + fates_leaf_long:long_name = "Leaf longevity (ie turnover timescale)" ; + float fates_leaf_slatop(fates_pft) ; + fates_leaf_slatop:units = "m^2/gC" ; + fates_leaf_slatop:long_name = "Specific Leaf Area (SLA) at top of canopy, projected area basis" ; + float fates_leaf_stor_priority(fates_pft) ; + fates_leaf_stor_priority:units = "unitless" ; + fates_leaf_stor_priority:long_name = "factor governing priority of replacing storage with NPP" ; + float fates_leaf_tpuha(fates_pft) ; + fates_leaf_tpuha:units = "J/mol" ; + fates_leaf_tpuha:long_name = "activation energy for tpu" ; + float fates_leaf_tpuhd(fates_pft) ; + fates_leaf_tpuhd:units = "J/mol" ; + fates_leaf_tpuhd:long_name = "deactivation energy for tpu" ; + float fates_leaf_tpuse(fates_pft) ; + fates_leaf_tpuse:units = "J/mol/K" ; + fates_leaf_tpuse:long_name = "entropy term for tpu" ; + float fates_leaf_vcmax25top(fates_pft) ; + fates_leaf_vcmax25top:units = "umol CO2/m^2/s" ; + fates_leaf_vcmax25top:long_name = "maximum carboxylation rate of Rub. at 25C, canopy top" ; + float fates_leaf_vcmaxha(fates_pft) ; + fates_leaf_vcmaxha:units = "J/mol" ; + fates_leaf_vcmaxha:long_name = "activation energy for vcmax" ; + float fates_leaf_vcmaxhd(fates_pft) ; + fates_leaf_vcmaxhd:units = "J/mol" ; + fates_leaf_vcmaxhd:long_name = "deactivation energy for vcmax" ; + float fates_leaf_vcmaxse(fates_pft) ; + fates_leaf_vcmaxse:units = "J/mol/K" ; + fates_leaf_vcmaxse:long_name = "entropy term for vcmax" ; + float fates_leaf_xl(fates_pft) ; + fates_leaf_xl:units = "unitless" ; + fates_leaf_xl:long_name = "Leaf/stem orientation index" ; + float fates_lf_fcel(fates_pft) ; + fates_lf_fcel:units = "fraction" ; + fates_lf_fcel:long_name = "Leaf litter cellulose fraction" ; + float fates_lf_flab(fates_pft) ; + fates_lf_flab:units = "fraction" ; + fates_lf_flab:long_name = "Leaf litter labile fraction" ; + float fates_lf_flig(fates_pft) ; + fates_lf_flig:units = "fraction" ; + fates_lf_flig:long_name = "Leaf litter lignin fraction" ; + float fates_maintresp_reduction_curvature(fates_pft) ; + fates_maintresp_reduction_curvature:units = "unitless (0-1)" ; + fates_maintresp_reduction_curvature:long_name = "curvature of MR reduction as f(carbon storage), 1=linear, 0=very curved" ; + float fates_maintresp_reduction_intercept(fates_pft) ; + fates_maintresp_reduction_intercept:units = "unitless (0-1)" ; + fates_maintresp_reduction_intercept:long_name = "intercept of MR reduction as f(carbon storage), 0=no throttling, 1=max throttling" ; + float fates_mort_bmort(fates_pft) ; + fates_mort_bmort:units = "1/yr" ; + fates_mort_bmort:long_name = "background mortality rate" ; + float fates_mort_freezetol(fates_pft) ; + fates_mort_freezetol:units = "NA" ; + fates_mort_freezetol:long_name = "minimum temperature tolerance (NOT USED)" ; + float fates_mort_hf_sm_threshold(fates_pft) ; + fates_mort_hf_sm_threshold:units = "unitless" ; + fates_mort_hf_sm_threshold:long_name = "soil moisture (btran units) at which drought mortality begins for non-hydraulic model" ; + float fates_mort_scalar_coldstress(fates_pft) ; + fates_mort_scalar_coldstress:units = "1/yr" ; + fates_mort_scalar_coldstress:long_name = "maximum mortality rate from cold stress" ; + float fates_mort_scalar_cstarvation(fates_pft) ; + fates_mort_scalar_cstarvation:units = "1/yr" ; + fates_mort_scalar_cstarvation:long_name = "maximum mortality rate from carbon starvation" ; + float fates_mort_scalar_hydrfailure(fates_pft) ; + fates_mort_scalar_hydrfailure:units = "1/yr" ; + fates_mort_scalar_hydrfailure:long_name = "maximum mortality rate from hydraulic failure" ; + float fates_pft_used(fates_pft) ; + fates_pft_used:units = "0 = off (dont use), 1 = on (use)" ; + fates_pft_used:long_name = "Switch to turn on and off PFTs (also see fates_initd for cold-start)" ; + float fates_phen_evergreen(fates_pft) ; + fates_phen_evergreen:units = "logical flag" ; + fates_phen_evergreen:long_name = "Binary flag for evergreen leaf habit" ; + float fates_phen_season_decid(fates_pft) ; + fates_phen_season_decid:units = "logical flag" ; + fates_phen_season_decid:long_name = "Binary flag for seasonal-deciduous leaf habit" ; + float fates_phen_stress_decid(fates_pft) ; + fates_phen_stress_decid:units = "logical flag" ; + fates_phen_stress_decid:long_name = "Binary flag for stress-deciduous leaf habit" ; + float fates_prescribed_mortality_canopy(fates_pft) ; + fates_prescribed_mortality_canopy:units = "1/yr" ; + fates_prescribed_mortality_canopy:long_name = "mortality rate of canopy trees for prescribed physiology mode" ; + float fates_prescribed_mortality_understory(fates_pft) ; + fates_prescribed_mortality_understory:units = "1/yr" ; + fates_prescribed_mortality_understory:long_name = "mortality rate of understory trees for prescribed physiology mode" ; + float fates_prescribed_npp_canopy(fates_pft) ; + fates_prescribed_npp_canopy:units = "gC / m^2 / yr" ; + fates_prescribed_npp_canopy:long_name = "NPP per unit crown area of canopy trees for prescribed physiology mode" ; + float fates_prescribed_npp_understory(fates_pft) ; + fates_prescribed_npp_understory:units = "gC / m^2 / yr" ; + fates_prescribed_npp_understory:long_name = "NPP per unit crown area of understory trees for prescribed physiology mode" ; + float fates_prescribed_recruitment(fates_pft) ; + fates_prescribed_recruitment:units = "n/yr" ; + fates_prescribed_recruitment:long_name = "recruitment rate for prescribed physiology mode" ; + float fates_recruit_hgt_min(fates_pft) ; + fates_recruit_hgt_min:units = "m" ; + fates_recruit_hgt_min:long_name = "the minimum height (ie starting height) of a newly recruited plant" ; + float fates_recruit_initd(fates_pft) ; + fates_recruit_initd:units = "stems/m2" ; + fates_recruit_initd:long_name = "initial seedling density for a cold-start near-bare-ground simulation" ; + float fates_rholnir(fates_pft) ; + fates_rholnir:units = "fraction" ; + fates_rholnir:long_name = "Leaf reflectance: near-IR" ; + float fates_rholvis(fates_pft) ; + fates_rholvis:units = "fraction" ; + fates_rholvis:long_name = "Leaf reflectance: visible" ; + float fates_rhosnir(fates_pft) ; + fates_rhosnir:units = "fraction" ; + fates_rhosnir:long_name = "Stem reflectance: near-IR" ; + float fates_rhosvis(fates_pft) ; + fates_rhosvis:units = "fraction" ; + fates_rhosvis:long_name = "Stem reflectance: visible" ; + float fates_root_long(fates_pft) ; + fates_root_long:units = "yr" ; + fates_root_long:long_name = "root longevity (alternatively, turnover time)" ; + float fates_roota_par(fates_pft) ; + fates_roota_par:units = "1/m" ; + fates_roota_par:long_name = "CLM rooting distribution parameter" ; + float fates_rootb_par(fates_pft) ; + fates_rootb_par:units = "1/m" ; + fates_rootb_par:long_name = "CLM rooting distribution parameter" ; + float fates_rootprof_beta(fates_variants, fates_pft) ; + fates_rootprof_beta:units = "unitless" ; + fates_rootprof_beta:long_name = "Rooting beta parameter, for C and N vertical discretization (NOT USED BY DEFAULT)" ; + float fates_seed_alloc(fates_pft) ; + fates_seed_alloc:units = "fraction" ; + fates_seed_alloc:long_name = "fraction of available carbon balance allocated to seeds" ; + float fates_seed_alloc_mature(fates_pft) ; + fates_seed_alloc_mature:units = "fraction" ; + fates_seed_alloc_mature:long_name = "fraction of available carbon balance allocated to seeds in mature plants (adds to fates_seed_alloc)" ; + float fates_seed_dbh_repro_threshold(fates_pft) ; + fates_seed_dbh_repro_threshold:units = "cm" ; + fates_seed_dbh_repro_threshold:long_name = "the diameter (if any) where the plant will start extra clonal allocation to the seed pool (NOT USED YET)" ; + float fates_seed_decay_turnover(fates_pft) ; + fates_seed_decay_turnover:units = "1/yr" ; + fates_seed_decay_turnover:long_name = "turnover time for seeds with respect to germination" ; + float fates_seed_germination_timescale(fates_pft) ; + fates_seed_germination_timescale:units = "1/yr" ; + fates_seed_germination_timescale:long_name = "turnover time for seeds with respect to decay" ; + float fates_seed_rain(fates_pft) ; + fates_seed_rain:units = "KgC/m2/yr" ; + fates_seed_rain:long_name = "External seed rain from outside site (non-mass conserving)" ; + float fates_smpsc(fates_pft) ; + fates_smpsc:units = "mm" ; + fates_smpsc:long_name = "Soil water potential at full stomatal closure" ; + float fates_smpso(fates_pft) ; + fates_smpso:units = "mm" ; + fates_smpso:long_name = "Soil water potential at full stomatal opening" ; + float fates_taulnir(fates_pft) ; + fates_taulnir:units = "fraction" ; + fates_taulnir:long_name = "Leaf transmittance: near-IR" ; + float fates_taulvis(fates_pft) ; + fates_taulvis:units = "fraction" ; + fates_taulvis:long_name = "Leaf transmittance: visible" ; + float fates_tausnir(fates_pft) ; + fates_tausnir:units = "fraction" ; + fates_tausnir:long_name = "Stem transmittance: near-IR" ; + float fates_tausvis(fates_pft) ; + fates_tausvis:units = "fraction" ; + fates_tausvis:long_name = "Stem transmittance: visible" ; + float fates_trim_inc(fates_pft) ; + fates_trim_inc:units = "m2/m2" ; + fates_trim_inc:long_name = "Arbitrary incremental change in trimming function." ; + float fates_trim_limit(fates_pft) ; + fates_trim_limit:units = "m2/m2" ; + fates_trim_limit:long_name = "Arbitrary limit to reductions in leaf area with stress" ; + float fates_wood_density(fates_pft) ; + fates_wood_density:units = "g/cm3" ; + fates_wood_density:long_name = "mean density of woody tissue in plant" ; + float fates_woody(fates_pft) ; + fates_woody:units = "logical flag" ; + fates_woody:long_name = "Binary woody lifeform flag" ; + float fates_z0mr(fates_pft) ; + fates_z0mr:units = "unitless" ; + fates_z0mr:long_name = "Ratio of momentum roughness length to canopy top height" ; + float fates_alpha_FMC(fates_litterclass) ; + fates_alpha_FMC:units = "NA" ; + fates_alpha_FMC:long_name = "spitfire parameter related to fuel moisture content, Equation 6 Thonicke et al 2010" ; + float fates_FBD(fates_litterclass) ; + fates_FBD:units = "NA" ; + fates_FBD:long_name = "spitfire parameter related to fuel bulk density, see SFMain.F90" ; + float fates_low_moisture_Coeff(fates_litterclass) ; + fates_low_moisture_Coeff:units = "NA" ; + fates_low_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + float fates_low_moisture_Slope(fates_litterclass) ; + fates_low_moisture_Slope:units = "NA" ; + fates_low_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + float fates_max_decomp(fates_litterclass) ; + fates_max_decomp:units = "kgC/m2/yr ?" ; + fates_max_decomp:long_name = "maximum rate of litter & CWD transfer from non-decomposing class into decomposing class" ; + float fates_mid_moisture(fates_litterclass) ; + fates_mid_moisture:units = "NA" ; + fates_mid_moisture:long_name = "spitfire litter moisture threshold to be considered medium dry" ; + float fates_mid_moisture_Coeff(fates_litterclass) ; + fates_mid_moisture_Coeff:units = "NA" ; + fates_mid_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + float fates_mid_moisture_Slope(fates_litterclass) ; + fates_mid_moisture_Slope:units = "NA" ; + fates_mid_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + float fates_min_moisture(fates_litterclass) ; + fates_min_moisture:units = "NA" ; + fates_min_moisture:long_name = "spitfire litter moisture threshold to be considered very dry" ; + float fates_SAV(fates_litterclass) ; + fates_SAV:units = "NA" ; + fates_SAV:long_name = "spitfire parameter related to surface area to volume ratio, see SFMain.F90" ; + float fates_CWD_frac(fates_NCWD) ; + fates_CWD_frac:units = "fraction" ; + fates_CWD_frac:long_name = "fraction of woody (bdead+bsw) biomass destined for CWD pool" ; + float fates_durat_slope ; + fates_durat_slope:units = "NA" ; + fates_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" ; + float fates_fdi_a ; + fates_fdi_a:units = "NA" ; + fates_fdi_a:long_name = "spitfire parameter (unknown) " ; + float fates_fdi_alpha ; + fates_fdi_alpha:units = "NA" ; + fates_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " ; + float fates_fdi_b ; + fates_fdi_b:units = "NA" ; + fates_fdi_b:long_name = "spitfire parameter (unknown) " ; + float fates_fire_wind_max ; + fates_fire_wind_max:units = "m/min" ; + fates_fire_wind_max:long_name = "maximum wind speed expected by the fire model" ; + float fates_fuel_energy ; + fates_fuel_energy:units = "kJ/kg" ; + fates_fuel_energy:long_name = "pitfire parameter, heat content of fuel" ; + float fates_max_durat ; + fates_max_durat:units = "minutes" ; + fates_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; + float fates_miner_damp ; + fates_miner_damp:units = "NA" ; + fates_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " ; + float fates_miner_total ; + fates_miner_total:units = "fraction" ; + fates_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" ; + float fates_part_dens ; + fates_part_dens:units = "kg/m2" ; + fates_part_dens:long_name = "spitfire parameter, oven dry particle density, Table A1 Thonicke et al 2010" ; + +// global attributes: + :history = "This file was made from FatesPFTIndexSwapper.py \n", + " Input File = fates_params_13pfts.c180315.nc \n", + " Indices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 13] \n", + " Wed Feb 28 13:43:44 PST 2018 Values from Jennifer Holms 13pft test file fates_params.c170929_13pfts.nc were then manually converted over into positions 2-13, position 1 kept the tropical broadleaf evergreen. Wed Mar 7 15:53:33 PST 2018 (RGK) added fates_logging_dbhmax_infra, fates_maintresp_reduction_curvature, fates_maintresp_reduction_intercept, and fates_leaf_clumping_index. CHanged fates_clone_alloc to fates_seed_alloc_mature. Updated minimum grass sizes per J Shuman notes. Set grass AGB intercepts and latosa to zero. Updated clumping to have more substanteated starter values per suggestions by Shawn Serbin.\n", + " Thu Mar 15 13:48:11 PDT 2018 Added C4 plants via suggestions by @huitang_earth.\n", + " Mon Mar 19 19:05:44 EDT 2018 forced all plants to be evergreen till carbon-imbalances are fixed.\n", + " Mon Mar 19 19:05:44 EDT 2018 added entry for fates_history_height_bin_edges.\n", + " Thu Apr 12 14:18:46 PDT 2018 updated names on CN recruitment parameters. -- fates_params_14pft.c180412.nc -- \n", + "" ; +data: + + fates_history_height_bin_edges = 0, 0.1, 0.3, 1, 3, 10 ; + + fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, + 80, 90, 100 ; + + fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; + + fates_base_mr_20 = 2.52e-06 ; + + fates_bbopt_c3 = 10000 ; + + fates_bbopt_c4 = 40000 ; + + fates_canopy_closure_thresh = 0.8 ; + + fates_cohort_fusion_tol = 0.05 ; + + fates_comp_excln = 3 ; + + fates_cwd_fcel = 0.76 ; + + fates_cwd_flig = 0.24 ; + + fates_fire_nignitions = 15 ; + + fates_hydr_psi0 = 0 ; + + fates_hydr_psicap = -0.6 ; + + fates_init_litter = 0.05 ; + + fates_logging_coll_under_frac = 0.55983 ; + + fates_logging_collateral_frac = 0.05 ; + + fates_logging_dbhmax_infra = 35 ; + + fates_logging_dbhmin = 50 ; + + fates_logging_direct_frac = 0.15 ; + + fates_logging_event_code = -30 ; + + fates_logging_mechanical_frac = 0.05 ; + + fates_mort_disturb_frac = 1 ; + + fates_mort_understorey_death = 0.55983 ; + + fates_patch_fusion_tol = 0.05 ; + + fates_phen_a = -68 ; + + fates_phen_b = 638 ; + + fates_phen_c = -0.001 ; + + fates_phen_chiltemp = 5 ; + + fates_phen_coldtemp = 7.5 ; + + fates_phen_doff_time = 100 ; + + fates_phen_drought_threshold = 0.15 ; + + fates_phen_mindayson = 30 ; + + fates_phen_ncolddayslim = 5 ; + + fates_pftname = + "broadleaf_evergreen_tropical_tree ", + "needleleaf_evergreen_temperate_tree ", + "needleleaf_evergreen_boreal_tree ", + "needleleaf_deciduous_boreal_tree (force evgrn)", + "broadleaf_evergreen_temperate_tree ", + "broadleaf_deciduous_tropical_tree (force evgrn)", + "broadleaf_deciduous_temperate_tree (force evgrn)", + "broadleaf_deciduous_boreal_tree (force evgrn)", + "broadleaf_evergreen_temperate_shrub ", + "broadleaf_deciduous_temperate_shrub (force evgrn)", + "broadleaf_deciduous_boreal_shrub (force evgrn)", + "arctic_c3_grass (force evgrn)", + "cool_c3_grass (force evgrn)", + "c4_grass (force evgrn)" ; + + fates_alloc_storage_cushion = 2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, + 1.2, 1.2, 1.2, 1.2, 1.2 ; + + fates_allom_agb1 = 0.06896, 0.06896, 0.06896, 0.06896, 0.06896, 0.06896, + 0.06896, 0.06896, 0.06896, 0.06896, 0.06896, 0.01, 0.01, 0.01 ; + + fates_allom_agb2 = 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, + 0.572, 0.572, 0.572, 0.572, 0.572, 0.572 ; + + fates_allom_agb3 = 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, + 1.94, 1.94, 1.94, 1.94, 1.94 ; + + fates_allom_agb4 = 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, + 0.931, 0.931, 0.931, 0.931, 0.931, 0.931 ; + + fates_allom_agb_frac = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, + 0.6, 0.6, 0.6, 0.6 ; + + fates_allom_amode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_blca_expnt_diff = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + + fates_allom_cmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_d2bl1 = 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, + 0.07, 0.07, 0.07, 0.07, 0.07 ; + + fates_allom_d2bl2 = 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, + 1.3, 1.3, 1.3 ; + + fates_allom_d2bl3 = 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, + 0.55, 0.55, 0.55, 0.55, 0.55 ; + + fates_allom_d2ca_coefficient_max = 0.6568464, 0.6568464, 0.6568464, + 0.6568464, 0.6568464, 0.6568464, 0.6568464, 0.6568464, 0.6568464, + 0.6568464, 0.6568464, 0.6568464, 0.6568464, 0.6568464 ; + + fates_allom_d2ca_coefficient_min = 0.3381119, 0.3381119, 0.3381119, + 0.3381119, 0.3381119, 0.3381119, 0.3381119, 0.3381119, 0.3381119, + 0.3381119, 0.3381119, 0.3381119, 0.3381119, 0.3381119 ; + + fates_allom_d2h1 = 0.64, 0.64, 0.64, 0.64, 0.64, 0.64, 0.64, 0.64, 0.64, + 0.64, 0.64, 0.64, 0.64, 0.64 ; + + fates_allom_d2h2 = 0.37, 0.37, 0.37, 0.37, 0.37, 0.37, 0.37, 0.37, 0.37, + 0.37, 0.37, 0.37, 0.37, 0.37 ; + + fates_allom_d2h3 = -999.9, -999.9, -999.9, -999.9, -999.9, -999.9, -999.9, + -999.9, -999.9, -999.9, -999.9, -999.9, -999.9, -999.9 ; + + fates_allom_dbh_maxheight = 150, 90, 90, 90, 90, 90, 90, 90, 3, 3, 2, 1.47, + 1.47, 1.47 ; + + fates_allom_fmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_hmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_l2fr = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_latosa_int = 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, + 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001 ; + + fates_allom_latosa_slp = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + + fates_allom_lmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_sai_scaler = 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, + 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012 ; + + fates_allom_smode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_stmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_branch_turnover = 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, 0, 0 ; + + fates_c2b = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ; + + fates_displar = 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, + 0.67, 0.67, 0.67, 0.67 ; + + fates_fire_alpha_SH = 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, + 0.2, 0.2, 0.2 ; + + fates_fire_bark_scaler = 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, + 0.07, 0.07, 0.07, 0.07, 0.07, 0.07 ; + + fates_fire_crown_depth_frac = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.95, + 0.95, 0.95, 1, 1, 1 ; + + fates_fire_crown_kill = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, + 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775 ; + + fates_fr_fcel = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, + 0.5, 0.5 ; + + fates_fr_flab = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, + 0.25, 0.25, 0.25, 0.25 ; + + fates_fr_flig = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, + 0.25, 0.25, 0.25, 0.25 ; + + fates_froot_cn_ratio = 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 ; + + fates_grperc = 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, + 0.11, 0.11, 0.11, 0.11 ; + + fates_hydr_avuln_gs = 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, + 2.5, 2.5, 2.5 ; + + fates_hydr_avuln_node = + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ; + + fates_hydr_epsil_node = + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; + + fates_hydr_fcap_node = + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, + 0.08, 0.08, + 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, + 0.08, 0.08, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + + fates_hydr_kmax_node = + -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999 ; + + fates_hydr_p50_gs = -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, + -1.5, -1.5, -1.5, -1.5, -1.5 ; + + fates_hydr_p50_node = + -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, + -2.25, -2.25, -2.25, -2.25, + -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, + -2.25, -2.25, -2.25, -2.25, + -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, + -2.25, -2.25, -2.25, -2.25, + -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, -2.25, + -2.25, -2.25, -2.25, -2.25 ; + + fates_hydr_p_taper = 0.333, 0.333, 0.333, 0.333, 0.333, 0.333, 0.333, 0.333, + 0.333, 0.333, 0.333, 0.333, 0.333, 0.333 ; + + fates_hydr_pinot_node = + -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999 ; + + fates_hydr_pitlp_node = + -1.67, -1.67, -1.67, -1.67, -1.67, -1.67, -1.67, -1.67, -1.67, -1.67, + -1.67, -1.67, -1.67, -1.67, + -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, + -1.4, -1.4, + -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, + -1.4, -1.4, + -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, + -1.2, -1.2 ; + + fates_hydr_resid_node = + 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, + 0.25, 0.25, + 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, + 0.325, 0.325, 0.325, 0.325, + 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, + 0.325, 0.325, 0.325, 0.325, + 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, + 0.15, 0.15 ; + + fates_hydr_rfrac_stem = 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, + 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625 ; + + fates_hydr_rs2 = 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, + 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001 ; + + fates_hydr_srl = 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25 ; + + fates_hydr_thetas_node = + 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, + 0.65, 0.65, + 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, + 0.65, 0.65, + 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, + 0.65, 0.65, + 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, + 0.75, 0.75 ; + + fates_leaf_BB_slope = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; + + fates_leaf_cn_ratio = 30, 35, 40, 25, 30, 25, 25, 25, 30, 25, 25, 25, 25, 25 ; + + fates_leaf_c3psn = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ; + + fates_leaf_clumping_index = 0.85, 0.85, 0.675, 0.8, 0.85, 0.85, 0.9, 0.75, + 0.85, 0.9, 0.9, 0.75, 0.75, 0.75 ; + + fates_leaf_diameter = 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, + 0.04, 0.04, 0.04, 0.04, 0.04 ; + + fates_leaf_jmaxha = 43540, 43540, 43540, 43540, 43540, 43540, 43540, 43540, + 43540, 43540, 43540, 43540, 43540, 43540 ; + + fates_leaf_jmaxhd = 152040, 152040, 152040, 152040, 152040, 152040, 152040, + 152040, 152040, 152040, 152040, 152040, 152040, 152040 ; + + fates_leaf_jmaxse = 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, + 495, 495, 495 ; + + fates_leaf_long = 1.5, 4, 6, 1, 1.5, 1, 1, 1, 1.5, 1, 1, 1, 1, 1 ; + + fates_leaf_slatop = 0.012, 0.01, 0.008, 0.024, 0.012, 0.03, 0.03, 0.03, + 0.012, 0.03, 0.03, 0.03, 0.03, 0.03 ; + + fates_leaf_stor_priority = 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, + 0.8, 0.8, 0.8, 0.8 ; + + fates_leaf_tpuha = 53100, 53100, 53100, 53100, 53100, 53100, 53100, 53100, + 53100, 53100, 53100, 53100, 53100, 53100 ; + + fates_leaf_tpuhd = 150650, 150650, 150650, 150650, 150650, 150650, 150650, + 150650, 150650, 150650, 150650, 150650, 150650, 150650 ; + + fates_leaf_tpuse = 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, + 490, 490, 490 ; + + fates_leaf_vcmax25top = 50, 65, 63, 39, 62, 41, 58, 58, 62, 54, 54, 78, 78, 78 ; + + fates_leaf_vcmaxha = 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, + 65330, 65330, 65330, 65330, 65330, 65330 ; + + fates_leaf_vcmaxhd = 149250, 149250, 149250, 149250, 149250, 149250, 149250, + 149250, 149250, 149250, 149250, 149250, 149250, 149250 ; + + fates_leaf_vcmaxse = 485, 485, 485, 485, 485, 485, 485, 485, 485, 485, 485, + 485, 485, 485 ; + + fates_leaf_xl = 0.1, 0.01, 0.01, 0.01, 0.1, 0.01, 0.25, 0.25, 0.01, 0.25, + 0.25, -0.3, -0.3, -0.3 ; + + fates_lf_fcel = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, + 0.5, 0.5 ; + + fates_lf_flab = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, + 0.25, 0.25, 0.25, 0.25 ; + + fates_lf_flig = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, + 0.25, 0.25, 0.25, 0.25 ; + + fates_maintresp_reduction_curvature = 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, + 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 ; + + fates_maintresp_reduction_intercept = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1 ; + + fates_mort_bmort = 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, + 0.014, 0.014, 0.014, 0.014, 0.014, 0.014 ; + + fates_mort_freezetol = 2.5, -55, -80, -80, -30, 2.5, -30, -80, -60, -10, + -80, -80, -80, -80 ; + + fates_mort_hf_sm_threshold = 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, + 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06 ; + + fates_mort_scalar_coldstress = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ; + + fates_mort_scalar_cstarvation = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, + 0.6, 0.6, 0.6, 0.6, 0.6 ; + + fates_mort_scalar_hydrfailure = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, + 0.6, 0.6, 0.6, 0.6, 0.6 ; + + fates_pft_used = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_phen_evergreen = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_phen_season_decid = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + + fates_phen_stress_decid = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + + fates_prescribed_mortality_canopy = 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, + 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194 ; + + fates_prescribed_mortality_understory = 0.025, 0.025, 0.025, 0.025, 0.025, + 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025 ; + + fates_prescribed_npp_canopy = 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, + 0.4, 0.4, 0.4, 0.4, 0.4 ; + + fates_prescribed_npp_understory = 0.03125, 0.03125, 0.03125, 0.03125, + 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, + 0.03125, 0.03125 ; + + fates_prescribed_recruitment = 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, + 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 ; + + fates_recruit_hgt_min = 1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25, 1.25, + 0.75, 0.75, 0.75, 0.75, 0.75, 0.75 ; + + fates_recruit_initd = 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, + 20, 20, 20 ; + + fates_rholnir = 0.45, 0.35, 0.35, 0.35, 0.45, 0.45, 0.45, 0.45, 0.35, 0.45, + 0.45, 0.35, 0.35, 0.35 ; + + fates_rholvis = 0.1, 0.07, 0.07, 0.07, 0.1, 0.1, 0.1, 0.1, 0.07, 0.1, 0.1, + 0.1, 0.1, 0.1 ; + + fates_rhosnir = 0.39, 0.39, 0.39, 0.39, 0.39, 0.39, 0.39, 0.39, 0.39, 0.39, + 0.39, 0.53, 0.53, 0.53 ; + + fates_rhosvis = 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, + 0.16, 0.31, 0.31, 0.31 ; + + fates_root_long = 1, 2, 3, 1, 1.5, 1, 1, 1, 1.5, 1, 1, 1, 1, 1 ; + + fates_roota_par = 7, 7, 7, 7, 7, 6, 6, 6, 7, 7, 7, 11, 11, 11 ; + + fates_rootb_par = 1, 2, 2, 2, 1, 2, 2, 2, 1.5, 1.5, 1.5, 2, 2, 2 ; + + fates_rootprof_beta = + 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, + 0.976, 0.976, 0.976, 0.976, + _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_seed_alloc = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1 ; + + fates_seed_alloc_mature = 0, 0, 0, 0, 0, 0, 0, 0, 0.9, 0.9, 0.9, 0.9, 0.9, + 0.9 ; + + fates_seed_dbh_repro_threshold = 150, 90, 90, 90, 90, 90, 90, 90, 3, 3, 2, + 1.47, 1.47, 1.47 ; + + fates_seed_decay_turnover = 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, + 0.51, 0.51, 0.51, 0.51, 0.51, 0.51 ; + + fates_seed_germination_timescale = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, + 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ; + + fates_seed_rain = 0.28, 0.28, 0.28, 0.28, 0.28, 0.28, 0.28, 0.28, 0.28, + 0.28, 0.28, 0.28, 0.28, 0.28 ; + + fates_smpsc = -255000, -255000, -255000, -255000, -255000, -255000, -255000, + -255000, -255000, -255000, -255000, -255000, -255000, -255000 ; + + fates_smpso = -66000, -66000, -66000, -66000, -66000, -66000, -66000, + -66000, -66000, -66000, -66000, -66000, -66000, -66000 ; + + fates_taulnir = 0.25, 0.1, 0.1, 0.1, 0.25, 0.25, 0.25, 0.25, 0.1, 0.25, + 0.25, 0.34, 0.34, 0.34 ; + + fates_taulvis = 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, + 0.05, 0.05, 0.05, 0.05 ; + + fates_tausnir = 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, + 0.001, 0.001, 0.001, 0.25, 0.25, 0.25 ; + + fates_tausvis = 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, + 0.001, 0.001, 0.001, 0.12, 0.12, 0.12 ; + + fates_trim_inc = 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, + 0.03, 0.03, 0.03, 0.03 ; + + fates_trim_limit = 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, + 0.3, 0.3, 0.3 ; + + fates_wood_density = 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, + 0.7, 0.7, 0.7 ; + + fates_woody = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ; + + fates_z0mr = 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, + 0.055, 0.055, 0.055, 0.055, 0.055 ; + + fates_alpha_FMC = 0.0050769, 0.001, 0.0002754, 7.54e-05, 1.54e-05, 999 ; + + fates_FBD = 4, 15.4, 16.8, 19.6, 999, 4 ; + + fates_low_moisture_Coeff = 1.15, 1.12, 1.09, 0.98, 0.8, 1.15 ; + + fates_low_moisture_Slope = 0.62, 0.62, 0.72, 0.85, 0.8, 0.62 ; + + fates_max_decomp = 1, 0.52, 0.383, 0.383, 0.19, 999 ; + + fates_mid_moisture = 0.8, 0.72, 0.51, 0.38, 1, 0.8 ; + + fates_mid_moisture_Coeff = 3.2, 2.35, 1.47, 1.06, 0.8, 3.2 ; + + fates_mid_moisture_Slope = 3.2, 2.35, 1.47, 1.06, 0.8, 3.2 ; + + fates_min_moisture = 0.24, 0.18, 0.12, 0, 0, 0.24 ; + + fates_SAV = 66, 13, 3.58, 0.98, 0.2, 66 ; + + fates_CWD_frac = 0.045, 0.075, 0.21, 0.67 ; + + fates_durat_slope = -11.06 ; + + fates_fdi_a = 17.62 ; + + fates_fdi_alpha = 0.00037 ; + + fates_fdi_b = 243.12 ; + + fates_fire_wind_max = 45.718 ; + + fates_fuel_energy = 18000 ; + + fates_max_durat = 240 ; + + fates_miner_damp = 0.41739 ; + + fates_miner_total = 0.055 ; + + fates_part_dens = 513 ; +} diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl new file mode 100644 index 0000000000..ffb83f35a4 --- /dev/null +++ b/parameter_files/fates_params_default.cdl @@ -0,0 +1,948 @@ +netcdf fates_params.2trop { +dimensions: + fates_NCWD = 4 ; + fates_history_age_bins = 7 ; + fates_history_height_bins = 6 ; + fates_history_size_bins = 13 ; + fates_hydr_organs = 4 ; + fates_litterclass = 6 ; + fates_pft = 2 ; + fates_scalar = 1 ; + fates_string_length = 60 ; + fates_variants = 2 ; +variables: + float fates_history_sizeclass_bin_edges(fates_history_size_bins) ; + fates_history_sizeclass_bin_edges:units = "cm" ; + fates_history_sizeclass_bin_edges:long_name = "Lower edges for DBH size class bins used in size-resolved cohort history output" ; + float fates_history_ageclass_bin_edges(fates_history_age_bins) ; + fates_history_ageclass_bin_edges:units = "yr" ; + fates_history_ageclass_bin_edges:long_name = "Lower edges for age class bins used in age-resolved patch history output" ; + float fates_FBD(fates_litterclass) ; + fates_FBD:units = "NA" ; + fates_FBD:long_name = "spitfire parameter related to fuel bulk density, see SFMain.F90" ; + float fates_SAV(fates_litterclass) ; + fates_SAV:units = "NA" ; + fates_SAV:long_name = "spitfire parameter related to surface area to volume ratio, see SFMain.F90" ; + float fates_alpha_FMC(fates_litterclass) ; + fates_alpha_FMC:units = "NA" ; + fates_alpha_FMC:long_name = "spitfire parameter related to fuel moisture content, Equation 6 Thonicke et al 2010" ; + float fates_history_height_bin_edges(fates_history_height_bins) ; + fates_history_height_bin_edges:units = "m" ; + fates_history_height_bin_edges:long_name = "Lower edges for height bins used in height-resolved history output" ; + float fates_low_moisture_Coeff(fates_litterclass) ; + fates_low_moisture_Coeff:units = "NA" ; + fates_low_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + float fates_low_moisture_Slope(fates_litterclass) ; + fates_low_moisture_Slope:units = "NA" ; + fates_low_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + float fates_max_decomp(fates_litterclass) ; + fates_max_decomp:units = "kgC/m2/yr ?" ; + fates_max_decomp:long_name = "maximum rate of litter & CWD transfer from non-decomposing class into decomposing class" ; + float fates_mid_moisture(fates_litterclass) ; + fates_mid_moisture:units = "NA" ; + fates_mid_moisture:long_name = "spitfire litter moisture threshold to be considered medium dry" ; + float fates_mid_moisture_Coeff(fates_litterclass) ; + fates_mid_moisture_Coeff:units = "NA" ; + fates_mid_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + float fates_mid_moisture_Slope(fates_litterclass) ; + fates_mid_moisture_Slope:units = "NA" ; + fates_mid_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + float fates_min_moisture(fates_litterclass) ; + fates_min_moisture:units = "NA" ; + fates_min_moisture:long_name = "spitfire litter moisture threshold to be considered very dry" ; + float fates_hydr_avuln_node(fates_hydr_organs, fates_pft) ; + fates_hydr_avuln_node:units = "unitless" ; + fates_hydr_avuln_node:long_name = "xylem vulnerability curve shape parameter" ; + float fates_hydr_epsil_node(fates_hydr_organs, fates_pft) ; + fates_hydr_epsil_node:units = "MPa" ; + fates_hydr_epsil_node:long_name = "bulk elastic modulus" ; + float fates_hydr_fcap_node(fates_hydr_organs, fates_pft) ; + fates_hydr_fcap_node:units = "unitless" ; + fates_hydr_fcap_node:long_name = "fraction of (1-resid_node) that is capillary in source" ; + float fates_hydr_kmax_node(fates_hydr_organs, fates_pft) ; + fates_hydr_kmax_node:units = "kgMPa/m/s" ; + fates_hydr_kmax_node:long_name = "maximum xylem conductivity per unit conducting xylem area" ; + float fates_hydr_p50_node(fates_hydr_organs, fates_pft) ; + fates_hydr_p50_node:units = "MPa" ; + fates_hydr_p50_node:long_name = "xylem water potential at 50% loss of conductivity" ; + float fates_hydr_pinot_node(fates_hydr_organs, fates_pft) ; + fates_hydr_pinot_node:units = "MPa" ; + fates_hydr_pinot_node:long_name = "osmotic potential at full turgor" ; + float fates_hydr_pitlp_node(fates_hydr_organs, fates_pft) ; + fates_hydr_pitlp_node:units = "MPa" ; + fates_hydr_pitlp_node:long_name = "turgor loss point" ; + float fates_hydr_resid_node(fates_hydr_organs, fates_pft) ; + fates_hydr_resid_node:units = "fraction" ; + fates_hydr_resid_node:long_name = "residual fraction" ; + float fates_hydr_thetas_node(fates_hydr_organs, fates_pft) ; + fates_hydr_thetas_node:units = "cm3/cm3" ; + fates_hydr_thetas_node:long_name = "saturated water content" ; + float fates_CWD_frac(fates_NCWD) ; + fates_CWD_frac:units = "fraction" ; + fates_CWD_frac:long_name = "fraction of woody (bdead+bsw) biomass destined for CWD pool" ; + char fates_pftname(fates_pft, fates_string_length) ; + fates_pftname:units = "unitless - string" ; + fates_pftname:long_name = "Description of plant type" ; + float fates_rootprof_beta(fates_variants, fates_pft) ; + fates_rootprof_beta:units = "unitless" ; + fates_rootprof_beta:long_name = "Rooting beta parameter, for C and N vertical discretization (NOT USED BY DEFAULT)" ; + float fates_alloc_storage_cushion(fates_pft) ; + fates_alloc_storage_cushion:units = "fraction" ; + fates_alloc_storage_cushion:long_name = "maximum size of storage C pool, relative to maximum size of leaf C pool" ; + float fates_allom_agb1(fates_pft) ; + fates_allom_agb1:units = "variable" ; + fates_allom_agb1:long_name = "Parameter 1 for agb allometry" ; + float fates_allom_agb2(fates_pft) ; + fates_allom_agb2:units = "variable" ; + fates_allom_agb2:long_name = "Parameter 2 for agb allometry" ; + float fates_allom_agb3(fates_pft) ; + fates_allom_agb3:units = "variable" ; + fates_allom_agb3:long_name = "Parameter 3 for agb allometry" ; + float fates_allom_agb4(fates_pft) ; + fates_allom_agb4:units = "variable" ; + fates_allom_agb4:long_name = "Parameter 4 for agb allometry" ; + float fates_allom_agb_frac(fates_pft) ; + fates_allom_agb_frac:units = "fraction" ; + fates_allom_agb_frac:long_name = "Fraction of woody biomass that is above ground" ; + float fates_allom_amode(fates_pft) ; + fates_allom_amode:units = "index" ; + fates_allom_amode:long_name = "AGB allometry function index" ; + float fates_allom_blca_expnt_diff(fates_pft) ; + fates_allom_blca_expnt_diff:units = "unitless" ; + fates_allom_blca_expnt_diff:long_name = "difference between allometric DBH:bleaf and DBH:crown area exponents" ; + float fates_allom_cmode(fates_pft) ; + fates_allom_cmode:units = "index" ; + fates_allom_cmode:long_name = "coarse root biomass allometry function index" ; + float fates_allom_d2bl1(fates_pft) ; + fates_allom_d2bl1:units = "variable" ; + fates_allom_d2bl1:long_name = "Parameter 1 for d2bl allometry (intercept)" ; + float fates_allom_d2bl2(fates_pft) ; + fates_allom_d2bl2:units = "variable" ; + fates_allom_d2bl2:long_name = "Parameter 2 for d2bl allometry (slope)" ; + float fates_allom_d2bl3(fates_pft) ; + fates_allom_d2bl3:units = "unitless" ; + fates_allom_d2bl3:long_name = "Parameter 3 for d2bl allometry (optional)" ; + float fates_allom_d2ca_coefficient_max(fates_pft) ; + fates_allom_d2ca_coefficient_max:units = "m2 cm^(-1/beta)" ; + fates_allom_d2ca_coefficient_max:long_name = "max (savanna) dbh to area multiplier factor where: area = n*d2ca_coeff*dbh^beta" ; + float fates_allom_d2ca_coefficient_min(fates_pft) ; + fates_allom_d2ca_coefficient_min:units = "m2 cm^(-1/beta)" ; + fates_allom_d2ca_coefficient_min:long_name = "min (forest) dbh to area multiplier factor where: area = n*d2ca_coeff*dbh^beta" ; + float fates_allom_d2h1(fates_pft) ; + fates_allom_d2h1:units = "variable" ; + fates_allom_d2h1:long_name = "Parameter 1 for d2h allometry (intercept, or c)" ; + float fates_allom_d2h2(fates_pft) ; + fates_allom_d2h2:units = "variable" ; + fates_allom_d2h2:long_name = "Parameter 2 for d2h allometry (slope, or m)" ; + float fates_allom_d2h3(fates_pft) ; + fates_allom_d2h3:units = "variable" ; + fates_allom_d2h3:long_name = "Parameter 3 for d2h allometry (optional)" ; + float fates_allom_dbh_maxheight(fates_pft) ; + fates_allom_dbh_maxheight:units = "cm" ; + fates_allom_dbh_maxheight:long_name = "the diameter (if any) corresponding to maximum height, diameters may increase beyond this" ; + float fates_allom_fmode(fates_pft) ; + fates_allom_fmode:units = "index" ; + fates_allom_fmode:long_name = "fine root biomass allometry function index" ; + float fates_allom_hmode(fates_pft) ; + fates_allom_hmode:units = "index" ; + fates_allom_hmode:long_name = "height allometry function index" ; + float fates_allom_l2fr(fates_pft) ; + fates_allom_l2fr:units = "gC/gC" ; + fates_allom_l2fr:long_name = "Allocation parameter: fine root C per leaf C" ; + float fates_allom_latosa_int(fates_pft) ; + fates_allom_latosa_int:units = "ratio" ; + fates_allom_latosa_int:long_name = "Leaf area to sap area ratio, intercept [m2/cm2]" ; + float fates_allom_latosa_slp(fates_pft) ; + fates_allom_latosa_slp:units = "unitless" ; + fates_allom_latosa_slp:long_name = "Leaf area to sap area ratio, slope (optional)" ; + float fates_allom_lmode(fates_pft) ; + fates_allom_lmode:units = "index" ; + fates_allom_lmode:long_name = "leaf biomass allometry function index" ; + float fates_allom_sai_scaler(fates_pft) ; + fates_allom_sai_scaler:units = "m2/gC" ; + fates_allom_sai_scaler:long_name = "allometric ratio of SAI to target bleaf" ; + float fates_allom_smode(fates_pft) ; + fates_allom_smode:units = "index" ; + fates_allom_smode:long_name = "sapwood allometry function index" ; + float fates_allom_stmode(fates_pft) ; + fates_allom_stmode:units = "index" ; + fates_allom_stmode:long_name = "storage allometry function index" ; + float fates_branch_turnover(fates_pft) ; + fates_branch_turnover:units = "yr-1" ; + fates_branch_turnover:long_name = "turnover time of branches" ; + float fates_c2b(fates_pft) ; + fates_c2b:units = "ratio" ; + fates_c2b:long_name = "Carbon to biomass multiplier of bulk structural tissues" ; + float fates_displar(fates_pft) ; + fates_displar:units = "unitless" ; + fates_displar:long_name = "Ratio of displacement height to canopy top height" ; + float fates_fire_alpha_SH(fates_pft) ; + fates_fire_alpha_SH:units = "NA" ; + fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, Equation 16 Thonicke et al 2010" ; + float fates_fire_bark_scaler(fates_pft) ; + fates_fire_bark_scaler:units = "fraction" ; + fates_fire_bark_scaler:long_name = "the thickness of a cohorts bark as a fraction of its dbh" ; + float fates_fire_crown_depth_frac(fates_pft) ; + fates_fire_crown_depth_frac:units = "fraction" ; + fates_fire_crown_depth_frac:long_name = "the depth of a cohorts crown as a fraction of its height" ; + float fates_fire_crown_kill(fates_pft) ; + fates_fire_crown_kill:units = "NA" ; + fates_fire_crown_kill:long_name = "fire parameter, see equation 22 in Thonicke et al 2010" ; + float fates_fr_fcel(fates_pft) ; + fates_fr_fcel:units = "fraction" ; + fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; + float fates_fr_flab(fates_pft) ; + fates_fr_flab:units = "fraction" ; + fates_fr_flab:long_name = "Fine root litter labile fraction" ; + float fates_fr_flig(fates_pft) ; + fates_fr_flig:units = "fraction" ; + fates_fr_flig:long_name = "Fine root litter lignin fraction" ; + float fates_froot_cn_ratio(fates_pft) ; + fates_froot_cn_ratio:units = "gC/gN" ; + fates_froot_cn_ratio:long_name = "Fine root C:N" ; + float fates_grperc(fates_pft) ; + fates_grperc:units = "unitless" ; + fates_grperc:long_name = "Growth respiration factor" ; + float fates_hydr_avuln_gs(fates_pft) ; + fates_hydr_avuln_gs:units = "unitless" ; + fates_hydr_avuln_gs:long_name = "shape parameter for stomatal control of water vapor exiting leaf" ; + float fates_hydr_p50_gs(fates_pft) ; + fates_hydr_p50_gs:units = "MPa" ; + fates_hydr_p50_gs:long_name = "water potential at 50% loss of stomatal conductance" ; + float fates_hydr_p_taper(fates_pft) ; + fates_hydr_p_taper:units = "unitless" ; + fates_hydr_p_taper:long_name = "xylem taper exponent" ; + float fates_hydr_rfrac_stem(fates_pft) ; + fates_hydr_rfrac_stem:units = "fraction" ; + fates_hydr_rfrac_stem:long_name = "fraction of total tree resistance from troot to canopy" ; + float fates_hydr_rs2(fates_pft) ; + fates_hydr_rs2:units = "mm" ; + fates_hydr_rs2:long_name = "absorbing root radius" ; + float fates_hydr_srl(fates_pft) ; + fates_hydr_srl:units = "m g-1" ; + fates_hydr_srl:long_name = "specific root length" ; + float fates_leaf_BB_slope(fates_pft) ; + fates_leaf_BB_slope:units = "unitless" ; + fates_leaf_BB_slope:long_name = "stomatal slope parameter, as per Ball-Berry" ; + float fates_leaf_c3psn(fates_pft) ; + fates_leaf_c3psn:units = "flag" ; + fates_leaf_c3psn:long_name = "Photosynthetic pathway (1=c3, 0=c4)" ; + float fates_leaf_clumping_index(fates_pft) ; + fates_leaf_clumping_index:units = "fraction (0-1)" ; + fates_leaf_clumping_index:long_name = "factor describing how much self-occlusion of leaf scattering elements decreases light interception" ; + float fates_leaf_cn_ratio(fates_pft) ; + fates_leaf_cn_ratio:units = "gC/gN" ; + fates_leaf_cn_ratio:long_name = "Leaf C:N" ; + float fates_leaf_diameter(fates_pft) ; + fates_leaf_diameter:units = "m" ; + fates_leaf_diameter:long_name = "Characteristic leaf dimension" ; + float fates_leaf_jmaxha(fates_pft) ; + fates_leaf_jmaxha:units = "J/mol" ; + fates_leaf_jmaxha:long_name = "activation energy for jmax" ; + float fates_leaf_jmaxhd(fates_pft) ; + fates_leaf_jmaxhd:units = "J/mol" ; + fates_leaf_jmaxhd:long_name = "deactivation energy for jmax" ; + float fates_leaf_jmaxse(fates_pft) ; + fates_leaf_jmaxse:units = "J/mol/K" ; + fates_leaf_jmaxse:long_name = "entropy term for jmax" ; + float fates_leaf_long(fates_pft) ; + fates_leaf_long:units = "yr" ; + fates_leaf_long:long_name = "Leaf longevity (ie turnover timescale)" ; + float fates_leaf_slatop(fates_pft) ; + fates_leaf_slatop:units = "m^2/gC" ; + fates_leaf_slatop:long_name = "Specific Leaf Area (SLA) at top of canopy, projected area basis" ; + float fates_leaf_stor_priority(fates_pft) ; + fates_leaf_stor_priority:units = "unitless" ; + fates_leaf_stor_priority:long_name = "factor governing priority of replacing storage with NPP" ; + float fates_leaf_tpuha(fates_pft) ; + fates_leaf_tpuha:units = "J/mol" ; + fates_leaf_tpuha:long_name = "activation energy for tpu" ; + float fates_leaf_tpuhd(fates_pft) ; + fates_leaf_tpuhd:units = "J/mol" ; + fates_leaf_tpuhd:long_name = "deactivation energy for tpu" ; + float fates_leaf_tpuse(fates_pft) ; + fates_leaf_tpuse:units = "J/mol/K" ; + fates_leaf_tpuse:long_name = "entropy term for tpu" ; + float fates_leaf_vcmax25top(fates_pft) ; + fates_leaf_vcmax25top:units = "umol CO2/m^2/s" ; + fates_leaf_vcmax25top:long_name = "maximum carboxylation rate of Rub. at 25C, canopy top" ; + float fates_leaf_vcmaxha(fates_pft) ; + fates_leaf_vcmaxha:units = "J/mol" ; + fates_leaf_vcmaxha:long_name = "activation energy for vcmax" ; + float fates_leaf_vcmaxhd(fates_pft) ; + fates_leaf_vcmaxhd:units = "J/mol" ; + fates_leaf_vcmaxhd:long_name = "deactivation energy for vcmax" ; + float fates_leaf_vcmaxse(fates_pft) ; + fates_leaf_vcmaxse:units = "J/mol/K" ; + fates_leaf_vcmaxse:long_name = "entropy term for vcmax" ; + float fates_leaf_xl(fates_pft) ; + fates_leaf_xl:units = "unitless" ; + fates_leaf_xl:long_name = "Leaf/stem orientation index" ; + float fates_lf_fcel(fates_pft) ; + fates_lf_fcel:units = "fraction" ; + fates_lf_fcel:long_name = "Leaf litter cellulose fraction" ; + float fates_lf_flab(fates_pft) ; + fates_lf_flab:units = "fraction" ; + fates_lf_flab:long_name = "Leaf litter labile fraction" ; + float fates_lf_flig(fates_pft) ; + fates_lf_flig:units = "fraction" ; + fates_lf_flig:long_name = "Leaf litter lignin fraction" ; + float fates_maintresp_reduction_curvature(fates_pft) ; + fates_maintresp_reduction_curvature:units = "unitless (0-1)" ; + fates_maintresp_reduction_curvature:long_name = "curvature of MR reduction as f(carbon storage), 1=linear, 0=very curved" ; + float fates_maintresp_reduction_intercept(fates_pft) ; + fates_maintresp_reduction_intercept:units = "unitless (0-1)" ; + fates_maintresp_reduction_intercept:long_name = "intercept of MR reduction as f(carbon storage), 0=no throttling, 1=max throttling" ; + float fates_mort_bmort(fates_pft) ; + fates_mort_bmort:units = "1/yr" ; + fates_mort_bmort:long_name = "background mortality rate" ; + float fates_mort_freezetol(fates_pft) ; + fates_mort_freezetol:units = "NA" ; + fates_mort_freezetol:long_name = "minimum temperature tolerance (NOT USED)" ; + float fates_mort_hf_sm_threshold(fates_pft) ; + fates_mort_hf_sm_threshold:units = "unitless" ; + fates_mort_hf_sm_threshold:long_name = "soil moisture (btran units) at which drought mortality begins for non-hydraulic model" ; + float fates_mort_scalar_coldstress(fates_pft) ; + fates_mort_scalar_coldstress:units = "1/yr" ; + fates_mort_scalar_coldstress:long_name = "maximum mortality rate from cold stress" ; + float fates_mort_scalar_cstarvation(fates_pft) ; + fates_mort_scalar_cstarvation:units = "1/yr" ; + fates_mort_scalar_cstarvation:long_name = "maximum mortality rate from carbon starvation" ; + float fates_mort_scalar_hydrfailure(fates_pft) ; + fates_mort_scalar_hydrfailure:units = "1/yr" ; + fates_mort_scalar_hydrfailure:long_name = "maximum mortality rate from hydraulic failure" ; + float fates_pft_used(fates_pft) ; + fates_pft_used:units = "0 = off (dont use), 1 = on (use)" ; + fates_pft_used:long_name = "Switch to turn on and off PFTs (also see fates_initd for cold-start)" ; + float fates_phen_evergreen(fates_pft) ; + fates_phen_evergreen:units = "logical flag" ; + fates_phen_evergreen:long_name = "Binary flag for evergreen leaf habit" ; + float fates_phen_season_decid(fates_pft) ; + fates_phen_season_decid:units = "logical flag" ; + fates_phen_season_decid:long_name = "Binary flag for seasonal-deciduous leaf habit" ; + float fates_phen_stress_decid(fates_pft) ; + fates_phen_stress_decid:units = "logical flag" ; + fates_phen_stress_decid:long_name = "Binary flag for stress-deciduous leaf habit" ; + float fates_prescribed_mortality_canopy(fates_pft) ; + fates_prescribed_mortality_canopy:units = "1/yr" ; + fates_prescribed_mortality_canopy:long_name = "mortality rate of canopy trees for prescribed physiology mode" ; + float fates_prescribed_mortality_understory(fates_pft) ; + fates_prescribed_mortality_understory:units = "1/yr" ; + fates_prescribed_mortality_understory:long_name = "mortality rate of understory trees for prescribed physiology mode" ; + float fates_prescribed_npp_canopy(fates_pft) ; + fates_prescribed_npp_canopy:units = "gC / m^2 / yr" ; + fates_prescribed_npp_canopy:long_name = "NPP per unit crown area of canopy trees for prescribed physiology mode" ; + float fates_prescribed_npp_understory(fates_pft) ; + fates_prescribed_npp_understory:units = "gC / m^2 / yr" ; + fates_prescribed_npp_understory:long_name = "NPP per unit crown area of understory trees for prescribed physiology mode" ; + float fates_prescribed_recruitment(fates_pft) ; + fates_prescribed_recruitment:units = "n/yr" ; + fates_prescribed_recruitment:long_name = "recruitment rate for prescribed physiology mode" ; + float fates_recruit_hgt_min(fates_pft) ; + fates_recruit_hgt_min:units = "m" ; + fates_recruit_hgt_min:long_name = "the minimum height (ie starting height) of a newly recruited plant" ; + float fates_recruit_initd(fates_pft) ; + fates_recruit_initd:units = "stems/m2" ; + fates_recruit_initd:long_name = "initial seedling density for a cold-start near-bare-ground simulation" ; + float fates_rholnir(fates_pft) ; + fates_rholnir:units = "fraction" ; + fates_rholnir:long_name = "Leaf reflectance: near-IR" ; + float fates_rholvis(fates_pft) ; + fates_rholvis:units = "fraction" ; + fates_rholvis:long_name = "Leaf reflectance: visible" ; + float fates_rhosnir(fates_pft) ; + fates_rhosnir:units = "fraction" ; + fates_rhosnir:long_name = "Stem reflectance: near-IR" ; + float fates_rhosvis(fates_pft) ; + fates_rhosvis:units = "fraction" ; + fates_rhosvis:long_name = "Stem reflectance: visible" ; + float fates_root_long(fates_pft) ; + fates_root_long:units = "yr" ; + fates_root_long:long_name = "root longevity (alternatively, turnover time)" ; + float fates_roota_par(fates_pft) ; + fates_roota_par:units = "1/m" ; + fates_roota_par:long_name = "CLM rooting distribution parameter" ; + float fates_rootb_par(fates_pft) ; + fates_rootb_par:units = "1/m" ; + fates_rootb_par:long_name = "CLM rooting distribution parameter" ; + float fates_seed_alloc(fates_pft) ; + fates_seed_alloc:units = "fraction" ; + fates_seed_alloc:long_name = "fraction of available carbon balance allocated to seeds" ; + float fates_seed_alloc_mature(fates_pft) ; + fates_seed_alloc_mature:units = "fraction" ; + fates_seed_alloc_mature:long_name = "fraction of available carbon balance allocated to seeds in mature plants (adds to fates_seed_alloc)" ; + float fates_seed_dbh_repro_threshold(fates_pft) ; + fates_seed_dbh_repro_threshold:units = "cm" ; + fates_seed_dbh_repro_threshold:long_name = "the diameter (if any) where the plant will start extra clonal allocation to the seed pool (NOT USED YET)" ; + float fates_seed_decay_turnover(fates_pft) ; + fates_seed_decay_turnover:units = "1/yr" ; + fates_seed_decay_turnover:long_name = "turnover time for seeds with respect to germination" ; + float fates_seed_germination_timescale(fates_pft) ; + fates_seed_germination_timescale:units = "1/yr" ; + fates_seed_germination_timescale:long_name = "turnover time for seeds with respect to decay" ; + float fates_seed_rain(fates_pft) ; + fates_seed_rain:units = "KgC/m2/yr" ; + fates_seed_rain:long_name = "External seed rain from outside site (non-mass conserving)" ; + float fates_smpsc(fates_pft) ; + fates_smpsc:units = "mm" ; + fates_smpsc:long_name = "Soil water potential at full stomatal closure" ; + float fates_smpso(fates_pft) ; + fates_smpso:units = "mm" ; + fates_smpso:long_name = "Soil water potential at full stomatal opening" ; + float fates_taulnir(fates_pft) ; + fates_taulnir:units = "fraction" ; + fates_taulnir:long_name = "Leaf transmittance: near-IR" ; + float fates_taulvis(fates_pft) ; + fates_taulvis:units = "fraction" ; + fates_taulvis:long_name = "Leaf transmittance: visible" ; + float fates_tausnir(fates_pft) ; + fates_tausnir:units = "fraction" ; + fates_tausnir:long_name = "Stem transmittance: near-IR" ; + float fates_tausvis(fates_pft) ; + fates_tausvis:units = "fraction" ; + fates_tausvis:long_name = "Stem transmittance: visible" ; + float fates_trim_inc(fates_pft) ; + fates_trim_inc:units = "m2/m2" ; + fates_trim_inc:long_name = "Arbitrary incremental change in trimming function." ; + float fates_trim_limit(fates_pft) ; + fates_trim_limit:units = "m2/m2" ; + fates_trim_limit:long_name = "Arbitrary limit to reductions in leaf area with stress" ; + float fates_wood_density(fates_pft) ; + fates_wood_density:units = "g/cm3" ; + fates_wood_density:long_name = "mean density of woody tissue in plant" ; + float fates_woody(fates_pft) ; + fates_woody:units = "logical flag" ; + fates_woody:long_name = "Binary woody lifeform flag" ; + float fates_z0mr(fates_pft) ; + fates_z0mr:units = "unitless" ; + fates_z0mr:long_name = "Ratio of momentum roughness length to canopy top height" ; + float fates_base_mr_20(fates_scalar) ; + fates_base_mr_20:units = "gC/gN/s" ; + fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; + float fates_bbopt_c3(fates_scalar) ; + fates_bbopt_c3:units = "umol H2O/m**2/s" ; + fates_bbopt_c3:long_name = "Ball-Berry minimum unstressed leaf conductance for C3" ; + float fates_bbopt_c4(fates_scalar) ; + fates_bbopt_c4:units = "umol H2O/m**2/s" ; + fates_bbopt_c4:long_name = "Ball-Berry minimum unstressed leaf conductance for C4" ; + float fates_canopy_closure_thresh(fates_scalar) ; + fates_canopy_closure_thresh:units = "unitless" ; + fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; + float fates_cohort_fusion_tol(fates_scalar) ; + fates_cohort_fusion_tol:units = "unitless" ; + fates_cohort_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; + float fates_comp_excln(fates_scalar) ; + fates_comp_excln:units = "none" ; + fates_comp_excln:long_name = "weighting factor (exponent on dbh) for canopy layer exclusion and promotion" ; + float fates_cwd_fcel(fates_scalar) ; + fates_cwd_fcel:units = "unitless" ; + fates_cwd_fcel:long_name = "Cellulose fraction for CWD" ; + float fates_cwd_flig(fates_scalar) ; + fates_cwd_flig:units = "unitless" ; + fates_cwd_flig:long_name = "Lignin fraction of coarse woody debris" ; + float fates_fire_nignitions(fates_scalar) ; + fates_fire_nignitions:units = "/m2 (?)" ; + fates_fire_nignitions:long_name = "number of daily ignitions (nfires = nignitions*FDI*area_scaling)" ; + float fates_hydr_psi0(fates_scalar) ; + fates_hydr_psi0:units = "MPa" ; + fates_hydr_psi0:long_name = "sapwood water potential at saturation" ; + float fates_hydr_psicap(fates_scalar) ; + fates_hydr_psicap:units = "MPa" ; + fates_hydr_psicap:long_name = "sapwood water potential at which capillary reserves exhausted" ; + float fates_init_litter(fates_scalar) ; + fates_init_litter:units = "NA" ; + fates_init_litter:long_name = "Initialization value for litter pool in cold-start (NOT USED)" ; + float fates_logging_coll_under_frac(fates_scalar) ; + fates_logging_coll_under_frac:units = "fraction" ; + fates_logging_coll_under_frac:long_name = "Fraction of stems killed in the understory when logging generates disturbance" ; + float fates_logging_collateral_frac(fates_scalar) ; + fates_logging_collateral_frac:units = "fraction" ; + fates_logging_collateral_frac:long_name = "Fraction of large stems in upperstory that die from logging collateral damage" ; + float fates_logging_dbhmax_infra(fates_scalar) ; + fates_logging_dbhmax_infra:units = "cm" ; + fates_logging_dbhmax_infra:long_name = "Tree diameter, above which infrastructure from logging does not impact damage or mortality." ; + float fates_logging_dbhmin(fates_scalar) ; + fates_logging_dbhmin:units = "cm" ; + fates_logging_dbhmin:long_name = "Minimum dbh at which logging is applied" ; + float fates_logging_direct_frac(fates_scalar) ; + fates_logging_direct_frac:units = "fraction" ; + fates_logging_direct_frac:long_name = "Fraction of stems logged directly per event" ; + float fates_logging_event_code(fates_scalar) ; + fates_logging_event_code:units = "unitless" ; + fates_logging_event_code:long_name = "Integer code that options how logging events are structured" ; + float fates_logging_mechanical_frac(fates_scalar) ; + fates_logging_mechanical_frac:units = "fraction" ; + fates_logging_mechanical_frac:long_name = "Fraction of stems killed due infrastructure an other mechanical means" ; + float fates_mort_disturb_frac(fates_scalar) ; + fates_mort_disturb_frac:units = "fraction" ; + fates_mort_disturb_frac:long_name = "fraction of canopy mortality that results in disturbance (i.e. transfer of area from new to old patch)" ; + float fates_mort_understorey_death(fates_scalar) ; + fates_mort_understorey_death:units = "fraction" ; + fates_mort_understorey_death:long_name = "fraction of plants in understorey cohort impacted by overstorey tree-fall" ; + float fates_patch_fusion_tol(fates_scalar) ; + fates_patch_fusion_tol:units = "unitless" ; + fates_patch_fusion_tol:long_name = "minimum fraction in difference in profiles between patches" ; + float fates_phen_a(fates_scalar) ; + fates_phen_a:units = "none" ; + fates_phen_a:long_name = "GDD accumulation function, intercept parameter: gdd_thesh = a + b exp(c*ncd)" ; + float fates_phen_b(fates_scalar) ; + fates_phen_b:units = "none" ; + fates_phen_b:long_name = "GDD accumulation function, multiplier parameter: gdd_thesh = a + b exp(c*ncd)" ; + float fates_phen_c(fates_scalar) ; + fates_phen_c:units = "none" ; + fates_phen_c:long_name = "GDD accumulation function, exponent parameter: gdd_thesh = a + b exp(c*ncd)" ; + float fates_phen_chiltemp(fates_scalar) ; + fates_phen_chiltemp:units = "degrees C" ; + fates_phen_chiltemp:long_name = "chilling day counting threshold" ; + float fates_phen_coldtemp(fates_scalar) ; + fates_phen_coldtemp:units = "degrees C" ; + fates_phen_coldtemp:long_name = "temperature exceedance to flag a cold-day for temperature leaf drop" ; + float fates_phen_doff_time(fates_scalar) ; + fates_phen_doff_time:units = "days" ; + fates_phen_doff_time:long_name = "day threshold compared against days since leaves became off-allometry" ; + float fates_phen_drought_threshold(fates_scalar) ; + fates_phen_drought_threshold:units = "m3/m3" ; + fates_phen_drought_threshold:long_name = "liquid volume in soil layer, threashold for drought phenology" ; + float fates_phen_mindayson(fates_scalar) ; + fates_phen_mindayson:units = "days" ; + fates_phen_mindayson:long_name = "day threshold compared against days since leaves became on-allometry" ; + float fates_phen_ncolddayslim(fates_scalar) ; + fates_phen_ncolddayslim:units = "days" ; + fates_phen_ncolddayslim:long_name = "day threshold exceedance for temperature leaf-drop" ; + float fates_durat_slope ; + fates_durat_slope:units = "NA" ; + fates_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" ; + float fates_fdi_a ; + fates_fdi_a:units = "NA" ; + fates_fdi_a:long_name = "spitfire parameter (unknown) " ; + float fates_fdi_alpha ; + fates_fdi_alpha:units = "NA" ; + fates_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " ; + float fates_fdi_b ; + fates_fdi_b:units = "NA" ; + fates_fdi_b:long_name = "spitfire parameter (unknown) " ; + float fates_fire_wind_max ; + fates_fire_wind_max:units = "m/min" ; + fates_fire_wind_max:long_name = "maximum wind speed expected by the fire model" ; + float fates_fuel_energy ; + fates_fuel_energy:units = "kJ/kg" ; + fates_fuel_energy:long_name = "pitfire parameter, heat content of fuel" ; + float fates_max_durat ; + fates_max_durat:units = "minutes" ; + fates_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; + float fates_miner_damp ; + fates_miner_damp:units = "NA" ; + fates_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " ; + float fates_miner_total ; + fates_miner_total:units = "fraction" ; + fates_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" ; + float fates_part_dens ; + fates_part_dens:units = "kg/m2" ; + fates_part_dens:long_name = "spitfire parameter, oven dry particle density, Table A1 Thonicke et al 2010" ; + +// global attributes: + :history = "This file was made from FatesPFTIndexSwapper.py \n", + " Input File = fates_params_13pfts.c180315.nc \n", + " Indices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 13] \n", + " Wed Feb 28 13:43:44 PST 2018 Values from Jennifer Holms 13pft test file fates_params.c170929_13pfts.nc were then manually converted over into positions 2-13, position 1 kept the tropical broadleaf evergreen. Wed Mar 7 15:53:33 PST 2018 (RGK) added fates_logging_dbhmax_infra, fates_maintresp_reduction_curvature, fates_maintresp_reduction_intercept, and fates_leaf_clumping_index. CHanged fates_clone_alloc to fates_seed_alloc_mature. Updated minimum grass sizes per J Shuman notes. Set grass AGB intercepts and latosa to zero. Updated clumping to have more substanteated starter values per suggestions by Shawn Serbin.\n", + " Thu Mar 15 13:48:11 PDT 2018 Added C4 plants via suggestions by @huitang_earth.\n", + " Mon Mar 19 19:05:44 EDT 2018 forced all plants to be evergreen till carbon-imbalances are fixed.\n", + " Mon Mar 19 19:05:44 EDT 2018 added entry for fates_history_height_bin_edges.\n", + " Thu Apr 12 14:18:46 PDT 2018 updated names on CN recruitment parameters. -- fates_params_14pft.c180412.nc -- \n", + " This file was made then modified wih FatesPFTIndexSwapper.py to reduce to 2 tropical pfts again. \n", + " Indices = [1, 1]" ; +data: + + fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, + 80, 90, 100 ; + + fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; + + fates_FBD = 4, 15.4, 16.8, 19.6, 999, 4 ; + + fates_SAV = 66, 13, 3.58, 0.98, 0.2, 66 ; + + fates_alpha_FMC = 0.0050769, 0.001, 0.0002754, 7.54e-05, 1.54e-05, 999 ; + + fates_history_height_bin_edges = 0, 0.1, 0.3, 1, 3, 10 ; + + fates_low_moisture_Coeff = 1.15, 1.12, 1.09, 0.98, 0.8, 1.15 ; + + fates_low_moisture_Slope = 0.62, 0.62, 0.72, 0.85, 0.8, 0.62 ; + + fates_max_decomp = 1, 0.52, 0.383, 0.383, 0.19, 999 ; + + fates_mid_moisture = 0.8, 0.72, 0.51, 0.38, 1, 0.8 ; + + fates_mid_moisture_Coeff = 3.2, 2.35, 1.47, 1.06, 0.8, 3.2 ; + + fates_mid_moisture_Slope = 3.2, 2.35, 1.47, 1.06, 0.8, 3.2 ; + + fates_min_moisture = 0.24, 0.18, 0.12, 0, 0, 0.24 ; + + fates_hydr_avuln_node = + 2, 2, + 2, 2, + 2, 2, + 2, 2 ; + + fates_hydr_epsil_node = + 12, 12, + 10, 10, + 10, 10, + 8, 8 ; + + fates_hydr_fcap_node = + 0, 0, + 0.08, 0.08, + 0.08, 0.08, + 0, 0 ; + + fates_hydr_kmax_node = + -999, -999, + 3, 3, + -999, -999, + -999, -999 ; + + fates_hydr_p50_node = + -2.25, -2.25, + -2.25, -2.25, + -2.25, -2.25, + -2.25, -2.25 ; + + fates_hydr_pinot_node = + -999, -999, + -999, -999, + -999, -999, + -999, -999 ; + + fates_hydr_pitlp_node = + -1.67, -1.67, + -1.4, -1.4, + -1.4, -1.4, + -1.2, -1.2 ; + + fates_hydr_resid_node = + 0.25, 0.25, + 0.325, 0.325, + 0.325, 0.325, + 0.15, 0.15 ; + + fates_hydr_thetas_node = + 0.65, 0.65, + 0.65, 0.65, + 0.65, 0.65, + 0.75, 0.75 ; + + fates_CWD_frac = 0.045, 0.075, 0.21, 0.67 ; + + fates_pftname = + "broadleaf_evergreen_tropical_tree ", + "broadleaf_evergreen_tropical_tree " ; + + fates_rootprof_beta = + 0.976, 0.976, + _, _ ; + + fates_alloc_storage_cushion = 2, 2 ; + + fates_allom_agb1 = 0.06896, 0.06896 ; + + fates_allom_agb2 = 0.572, 0.572 ; + + fates_allom_agb3 = 1.94, 1.94 ; + + fates_allom_agb4 = 0.931, 0.931 ; + + fates_allom_agb_frac = 0.6, 0.6 ; + + fates_allom_amode = 1, 1 ; + + fates_allom_blca_expnt_diff = 0, 0 ; + + fates_allom_cmode = 1, 1 ; + + fates_allom_d2bl1 = 0.07, 0.07 ; + + fates_allom_d2bl2 = 1.3, 1.3 ; + + fates_allom_d2bl3 = 0.55, 0.55 ; + + fates_allom_d2ca_coefficient_max = 0.6568464, 0.6568464 ; + + fates_allom_d2ca_coefficient_min = 0.3381119, 0.3381119 ; + + fates_allom_d2h1 = 0.64, 0.64 ; + + fates_allom_d2h2 = 0.37, 0.37 ; + + fates_allom_d2h3 = -999.9, -999.9 ; + + fates_allom_dbh_maxheight = 150, 150 ; + + fates_allom_fmode = 1, 1 ; + + fates_allom_hmode = 1, 1 ; + + fates_allom_l2fr = 1, 1 ; + + fates_allom_latosa_int = 0.001, 0.001 ; + + fates_allom_latosa_slp = 0, 0 ; + + fates_allom_lmode = 1, 1 ; + + fates_allom_sai_scaler = 0.0012, 0.0012 ; + + fates_allom_smode = 1, 1 ; + + fates_allom_stmode = 1, 1 ; + + fates_branch_turnover = 50, 50 ; + + fates_c2b = 2, 2 ; + + fates_displar = 0.67, 0.67 ; + + fates_fire_alpha_SH = 0.2, 0.2 ; + + fates_fire_bark_scaler = 0.07, 0.07 ; + + fates_fire_crown_depth_frac = 0.5, 0.5 ; + + fates_fire_crown_kill = 0.775, 0.775 ; + + fates_fr_fcel = 0.5, 0.5 ; + + fates_fr_flab = 0.25, 0.25 ; + + fates_fr_flig = 0.25, 0.25 ; + + fates_froot_cn_ratio = 42, 42 ; + + fates_grperc = 0.11, 0.11 ; + + fates_hydr_avuln_gs = 2.5, 2.5 ; + + fates_hydr_p50_gs = -1.5, -1.5 ; + + fates_hydr_p_taper = 0.333, 0.333 ; + + fates_hydr_rfrac_stem = 0.625, 0.625 ; + + fates_hydr_rs2 = 0.0001, 0.0001 ; + + fates_hydr_srl = 25, 25 ; + + fates_leaf_BB_slope = 8, 8 ; + + fates_leaf_c3psn = 1, 1 ; + + fates_leaf_clumping_index = 0.85, 0.85 ; + + fates_leaf_cn_ratio = 30, 30 ; + + fates_leaf_diameter = 0.04, 0.04 ; + + fates_leaf_jmaxha = 43540, 43540 ; + + fates_leaf_jmaxhd = 152040, 152040 ; + + fates_leaf_jmaxse = 495, 495 ; + + fates_leaf_long = 1.5, 1.5 ; + + fates_leaf_slatop = 0.012, 0.012 ; + + fates_leaf_stor_priority = 0.8, 0.8 ; + + fates_leaf_tpuha = 53100, 53100 ; + + fates_leaf_tpuhd = 150650, 150650 ; + + fates_leaf_tpuse = 490, 490 ; + + fates_leaf_vcmax25top = 50, 50 ; + + fates_leaf_vcmaxha = 65330, 65330 ; + + fates_leaf_vcmaxhd = 149250, 149250 ; + + fates_leaf_vcmaxse = 485, 485 ; + + fates_leaf_xl = 0.1, 0.1 ; + + fates_lf_fcel = 0.5, 0.5 ; + + fates_lf_flab = 0.25, 0.25 ; + + fates_lf_flig = 0.25, 0.25 ; + + fates_maintresp_reduction_curvature = 0.01, 0.01 ; + + fates_maintresp_reduction_intercept = 1, 1 ; + + fates_mort_bmort = 0.014, 0.014 ; + + fates_mort_freezetol = 2.5, 2.5 ; + + fates_mort_hf_sm_threshold = 1e-06, 1e-06 ; + + fates_mort_scalar_coldstress = 3, 3 ; + + fates_mort_scalar_cstarvation = 0.6, 0.6 ; + + fates_mort_scalar_hydrfailure = 0.6, 0.6 ; + + fates_pft_used = 1, 1 ; + + fates_phen_evergreen = 1, 1 ; + + fates_phen_season_decid = 0, 0 ; + + fates_phen_stress_decid = 0, 0 ; + + fates_prescribed_mortality_canopy = 0.0194, 0.0194 ; + + fates_prescribed_mortality_understory = 0.025, 0.025 ; + + fates_prescribed_npp_canopy = 0.4, 0.4 ; + + fates_prescribed_npp_understory = 0.03125, 0.03125 ; + + fates_prescribed_recruitment = 0.02, 0.02 ; + + fates_recruit_hgt_min = 1.25, 1.25 ; + + fates_recruit_initd = 0.2, 0.2 ; + + fates_rholnir = 0.45, 0.45 ; + + fates_rholvis = 0.1, 0.1 ; + + fates_rhosnir = 0.39, 0.39 ; + + fates_rhosvis = 0.16, 0.16 ; + + fates_root_long = 1, 1 ; + + fates_roota_par = 7, 7 ; + + fates_rootb_par = 1, 1 ; + + fates_seed_alloc = 0.1, 0.1 ; + + fates_seed_alloc_mature = 0, 0 ; + + fates_seed_dbh_repro_threshold = 150, 150 ; + + fates_seed_decay_turnover = 0.51, 0.51 ; + + fates_seed_germination_timescale = 0.5, 0.5 ; + + fates_seed_rain = 0.28, 0.28 ; + + fates_smpsc = -255000, -255000 ; + + fates_smpso = -66000, -66000 ; + + fates_taulnir = 0.25, 0.25 ; + + fates_taulvis = 0.05, 0.05 ; + + fates_tausnir = 0.001, 0.001 ; + + fates_tausvis = 0.001, 0.001 ; + + fates_trim_inc = 0.03, 0.03 ; + + fates_trim_limit = 0.3, 0.3 ; + + fates_wood_density = 0.7, 0.7 ; + + fates_woody = 1, 1 ; + + fates_z0mr = 0.055, 0.055 ; + + fates_base_mr_20 = 2.52e-06 ; + + fates_bbopt_c3 = 10000 ; + + fates_bbopt_c4 = 40000 ; + + fates_canopy_closure_thresh = 0.8 ; + + fates_cohort_fusion_tol = 0.05 ; + + fates_comp_excln = 3 ; + + fates_cwd_fcel = 0.76 ; + + fates_cwd_flig = 0.24 ; + + fates_fire_nignitions = 15 ; + + fates_hydr_psi0 = 0 ; + + fates_hydr_psicap = -0.6 ; + + fates_init_litter = 0.05 ; + + fates_logging_coll_under_frac = 0.55983 ; + + fates_logging_collateral_frac = 0.05 ; + + fates_logging_dbhmax_infra = 35 ; + + fates_logging_dbhmin = 50 ; + + fates_logging_direct_frac = 0.15 ; + + fates_logging_event_code = -30 ; + + fates_logging_mechanical_frac = 0.05 ; + + fates_mort_disturb_frac = 1 ; + + fates_mort_understorey_death = 0.55983 ; + + fates_patch_fusion_tol = 0.05 ; + + fates_phen_a = -68 ; + + fates_phen_b = 638 ; + + fates_phen_c = -0.001 ; + + fates_phen_chiltemp = 5 ; + + fates_phen_coldtemp = 7.5 ; + + fates_phen_doff_time = 100 ; + + fates_phen_drought_threshold = 0.15 ; + + fates_phen_mindayson = 30 ; + + fates_phen_ncolddayslim = 5 ; + + fates_durat_slope = -11.06 ; + + fates_fdi_a = 17.62 ; + + fates_fdi_alpha = 0.00037 ; + + fates_fdi_b = 243.12 ; + + fates_fire_wind_max = 45.718 ; + + fates_fuel_energy = 18000 ; + + fates_max_durat = 240 ; + + fates_miner_damp = 0.41739 ; + + fates_miner_total = 0.055 ; + + fates_part_dens = 513 ; +} diff --git a/tools/FatesPFTIndexSwapper.py b/tools/FatesPFTIndexSwapper.py index af901b3d18..aa6b25eb73 100755 --- a/tools/FatesPFTIndexSwapper.py +++ b/tools/FatesPFTIndexSwapper.py @@ -155,10 +155,9 @@ def main(argv): print('Creating Variable: ',key) # code.interact(local=locals()) - out_var = fp_out.createVariable(key,'f',(fp_in.variables.get(key).dimensions)) + in_var = fp_in.variables.get(key) - out_var.units = in_var.units - out_var.long_name = in_var.long_name + # Idenfity if this variable has pft dimension pft_dim_found = -1 @@ -172,10 +171,13 @@ def main(argv): # Copy over the input data # Tedious, but I have to permute through all combinations of dimension position if( pft_dim_len == 0 ): + out_var = fp_out.createVariable(key,'f',(fp_in.variables.get(key).dimensions)) out_var.assignValue(float(fp_in.variables.get(key).data)) elif(pft_dim_found==-1): + out_var = fp_out.createVariable(key,'f',(fp_in.variables.get(key).dimensions)) out_var[:] = in_var[:] elif( (pft_dim_found==0) & (pft_dim_len==1) ): # 1D fates_pft + out_var = fp_out.createVariable(key,'f',(fp_in.variables.get(key).dimensions)) tmp_out = np.zeros([num_pft_out]) for id,ipft in enumerate(donor_pft_indices): tmp_out[id] = fp_in.variables.get(key).data[ipft-1] @@ -183,20 +185,34 @@ def main(argv): elif( (pft_dim_found==1) & (pft_dim_len==2) ): # 2D hdyro_organ - fate_pft + out_var = fp_out.createVariable(key,'f',(fp_in.variables.get(key).dimensions)) dim2_len = fp_in.dimensions.get(fp_in.variables.get(key).dimensions[0]) tmp_out = np.zeros([dim2_len,num_pft_out]) for id,ipft in enumerate(donor_pft_indices): for idim in range(0,dim2_len): tmp_out[idim,id] = fp_in.variables.get(key).data[idim,ipft-1] out_var[:] = tmp_out + + elif( (pft_dim_found==0) & (pft_dim_len==2) ): # fates_pft - string_length + out_var = fp_out.createVariable(key,'c',(fp_in.variables.get(key).dimensions)) + dim2_len = fp_in.dimensions.get(fp_in.variables.get(key).dimensions[1]) + out_var[:] = np.empty([num_pft_out,dim2_len], dtype="S{}".format(dim2_len)) + for id,ipft in enumerate(donor_pft_indices): + out_var[id] = fp_in.variables.get(key).data[ipft-1] + else: print('This variable has a dimensioning that we have not considered yet.') print('Please add this condition to the logic above this statement.') print('Aborting') + for idim, name in enumerate(fp_in.variables.get(key).dimensions): + print("idim: {}, name: {}".format(idim,name)) exit(2) - fp_out.history = "This file was made from FatesPFTIndexSwapper.py \n Input File = {} \n Indices = {}"\ - .format(input_fname,donor_pft_indices) + out_var.units = in_var.units + out_var.long_name = in_var.long_name + + fp_out.history = "This file was made from FatesPFTIndexSwapper.py \n Input File = {} \n Indices = {}"\ + .format(input_fname,donor_pft_indices) #var_out.mode = var.mode #fp.flush() diff --git a/tools/ncvarsort.py b/tools/ncvarsort.py new file mode 100644 index 0000000000..ffd7c0916c --- /dev/null +++ b/tools/ncvarsort.py @@ -0,0 +1,84 @@ +from netCDF4 import Dataset +import sys +import os + +# program sorts the variables based on the provided list, and pulls them one at a time +# from an existing file and adds them to a new file in the sorted order. +# input/output based on code here: https://gist.github.com/guziy/8543562 + +def clobber(filename): + try: + print('replacing file: '+filename) + os.remove(filename) + except: + print('file does not exist: '+filename) + +### modify the paths below to point to the new and old file names +fnamein = 'fates_params_default.nc' +fnameout = 'fates_params_default_sorted.nc' + +# open the input dataset +dsin = Dataset(fnamein) + +# make empty lists to hold the variable names in. the first of these is a list of sub-lists, +# one for each type of variable (based on dimensionality). +# the second is the master list that will contain all variables. +varnames_list = [[],[],[],[],[],[],[],[],[]] +varnames_list_sorted = [] + +# sort the variables by dimensionality, but mix the PFT x other dimension in with the regular PFT-indexed variables +dimtype_sortorder_dict = {(u'fates_history_height_bins',):0, + (u'fates_history_size_bins',):1, + (u'fates_history_age_bins',):2, + (u'fates_scalar',):3, + (u'fates_pft', u'fates_string_length'):4, + (u'fates_pft',):5, + (u'fates_variants', u'fates_pft'):5, + (u'fates_hydr_organs', u'fates_pft'):5, + (u'fates_litterclass',):6, + (u'fates_NCWD',):7, + ():8} + +# go through each of the variables and assign it to one of the sub-lists based on its dimensionality +for v_name, varin in dsin.variables.iteritems(): + sortorder = dimtype_sortorder_dict[varin.dimensions] + # if a KeyError, it means that the parameter has a dimension which isn't in dimtype_sortorder_dict. need to add it. + varnames_list[sortorder].append(v_name) + +# go through each of the lists and sort the variable names alphabetically, +# and put them into a master list of all variables. +for i in range(len(varnames_list)): + varnames_list[i] = sorted(varnames_list[i], key=lambda L: (L.lower(), L)) + varnames_list_sorted.extend(varnames_list[i]) + +# open the output filename, deleting it if it exists already. +clobber(fnameout) +dsout = Dataset(fnameout, "w", format="NETCDF3_CLASSIC") + +#Copy dimensions +for dname, the_dim in dsin.dimensions.iteritems(): + print dname, len(the_dim) + dsout.createDimension(dname, len(the_dim) if not the_dim.isunlimited() else None) + +print + +# go through each variable in the order of the sorted master list, and copy the variable +# as well as all metadata to the new file. +for i in range(len(varnames_list_sorted)): + v_name = varnames_list_sorted[i] + varin = dsin.variables[v_name] + outVar = dsout.createVariable(v_name, varin.datatype, varin.dimensions) + print v_name + + # Copy variable attributes + outVar.setncatts({k: varin.getncattr(k) for k in varin.ncattrs()}) + + # copy data from input file to output file + outVar[:] = varin[:] + +# copy global attributes +dsout.setncatts({k: dsin.getncattr(k) for k in dsin.ncattrs()}) + +# close the output file +dsout.close() +dsin.close()