Skip to content

Commit

Permalink
Make history fields descriptive instead of labeling by number
Browse files Browse the repository at this point in the history
  • Loading branch information
slevis-lmwg committed Jun 26, 2021
1 parent 65ab798 commit f179d0a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
16 changes: 6 additions & 10 deletions src/biogeochem/CNVegCarbonFluxType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@ subroutine InitHistory(this, bounds, carbon_type)
!
! !LOCAL VARIABLES:
integer :: k,l,ii,jj
character(1) :: k_str
character(8) :: vr_suffix
character(10) :: active
integer :: begp,endp
Expand Down Expand Up @@ -2894,11 +2893,10 @@ subroutine InitHistory(this, bounds, carbon_type)
ptr_patch=this%dwt_slash_cflux_patch, default='inactive')

do k = i_litr_min, i_litr_max
write(k_str,'(I1)') k ! convert 1-digit integer to string
this%dwt_frootc_to_litr_c_col(begc:endc,:,k) = spval
data2dptr => this%dwt_frootc_to_litr_c_col(begc:endc,:,k)
fieldname = 'DWT_FROOTC_TO_LITR_'//k_str//'_C'
longname = 'fine root to litter_'//k_str//' due to landcover change'
fieldname = 'DWT_FROOTC_TO_LITR_'//trim(decomp_cascade_con%decomp_pool_name_short(k))//'_C'
longname = 'fine root to '//trim(decomp_cascade_con%decomp_pool_name_long(k))//' litter due to landcover change'
call hist_addfld_decomp (fname=fieldname, units='gC/m^2/s', type2d='levdcmp', &
avgflag='A', long_name=longname, &
ptr_col=data2dptr, default='inactive')
Expand Down Expand Up @@ -3073,11 +3071,10 @@ subroutine InitHistory(this, bounds, carbon_type)
ptr_patch=this%dwt_slash_cflux_patch, default='inactive')

do k = i_litr_min, i_litr_max
write(k_str,'(I1)') k ! convert 1-digit integer to string
this%dwt_frootc_to_litr_c_col(begc:endc,:,k) = spval
data2dptr => this%dwt_frootc_to_litr_c_col(begc:endc,:,k)
fieldname = 'C13_DWT_FROOTC_TO_LITR_'//k_str//'_C'
longname = 'C13 fine root to litter_'//k_str//' due to landcover change'
fieldname = 'C13_DWT_FROOTC_TO_LITR_'//trim(decomp_cascade_con%decomp_pool_name_short(k))//'_C'
longname = 'C13 fine root to '//trim(decomp_cascade_con%decomp_pool_name_long(k))//' litter due to landcover change'
call hist_addfld_decomp (fname=fieldname, units='gC/m^2/s', type2d='levdcmp', &
avgflag='A', long_name=longname, &
ptr_col=data2dptr, default='inactive')
Expand Down Expand Up @@ -3234,11 +3231,10 @@ subroutine InitHistory(this, bounds, carbon_type)
ptr_patch=this%dwt_slash_cflux_patch, default='inactive')

do k = i_litr_min, i_litr_max
write(k_str,'(I1)') k ! convert 1-digit integer to string
this%dwt_frootc_to_litr_c_col(begc:endc,:,k) = spval
data2dptr => this%dwt_frootc_to_litr_c_col(begc:endc,:,k)
fieldname = 'C14_DWT_FROOTC_TO_LITR_'//k_str//'_C'
longname = 'C14 fine root to litter_'//k_str//' due to landcover change'
fieldname = 'C14_DWT_FROOTC_TO_LITR_'//trim(decomp_cascade_con%decomp_pool_name_short(k))//'_C'
longname = 'C14 fine root to '//trim(decomp_cascade_con%decomp_pool_name_long(k))//' litter due to landcover change'
call hist_addfld_decomp (fname=fieldname, units='gC/m^2/s', type2d='levdcmp', &
avgflag='A', long_name=longname, &
ptr_col=data2dptr, default='inactive')
Expand Down
6 changes: 2 additions & 4 deletions src/biogeochem/CNVegNitrogenFluxType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,6 @@ subroutine InitHistory(this, bounds)
integer :: begp, endp
integer :: begc, endc
integer :: begg, endg
character(1) :: k_str
character(10) :: active
character(24) :: fieldname
character(100) :: longname
Expand Down Expand Up @@ -1013,11 +1012,10 @@ subroutine InitHistory(this, bounds)
ptr_patch=this%dwt_conv_nflux_patch, default='inactive')

do k = i_litr_min, i_litr_max
write(k_str,'(I1)') k ! convert 1-digit integer to string
this%dwt_frootn_to_litr_n_col(begc:endc,:,k) = spval
data2dptr => this%dwt_frootn_to_litr_n_col(begc:endc,:,k)
fieldname = 'DWT_FROOTN_TO_LITR_'//k_str//'_N'
longname = 'fine root N to litter_'//k_str//' due to landcover change'
fieldname = 'DWT_FROOTN_TO_LITR_'//trim(decomp_cascade_con%decomp_pool_name_short(k))//'_N'
longname = 'fine root N to '//trim(decomp_cascade_con%decomp_pool_name_long(k))//' litter due to landcover change'
call hist_addfld_decomp (fname=fieldname, units='gN/m^2/s', type2d='levdcmp', &
avgflag='A', long_name=longname, &
ptr_col=data2dptr, default='inactive')
Expand Down
12 changes: 6 additions & 6 deletions src/soilbiogeochem/SoilBiogeochemDecompCascadeBGCMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ subroutine init_decompcascade_bgc(bounds, soilbiogeochem_state_inst, soilstate_i
floating_cn_ratio_decomp_pools(i_met_lit) = .true.
decomp_cascade_con%decomp_pool_name_restart(i_met_lit) = 'litr1'
decomp_cascade_con%decomp_pool_name_history(i_met_lit) = 'LITR1'
decomp_cascade_con%decomp_pool_name_long(i_met_lit) = 'litter 1'
decomp_cascade_con%decomp_pool_name_short(i_met_lit) = 'L1'
decomp_cascade_con%decomp_pool_name_long(i_met_lit) = 'metabolic'
decomp_cascade_con%decomp_pool_name_short(i_met_lit) = 'MET'
is_litter(i_met_lit) = .true.
is_soil(i_met_lit) = .false.
is_cwd(i_met_lit) = .false.
Expand All @@ -369,8 +369,8 @@ subroutine init_decompcascade_bgc(bounds, soilbiogeochem_state_inst, soilstate_i
floating_cn_ratio_decomp_pools(i_cel_lit) = .true.
decomp_cascade_con%decomp_pool_name_restart(i_cel_lit) = 'litr2'
decomp_cascade_con%decomp_pool_name_history(i_cel_lit) = 'LITR2'
decomp_cascade_con%decomp_pool_name_long(i_cel_lit) = 'litter 2'
decomp_cascade_con%decomp_pool_name_short(i_cel_lit) = 'L2'
decomp_cascade_con%decomp_pool_name_long(i_cel_lit) = 'cellulosic'
decomp_cascade_con%decomp_pool_name_short(i_cel_lit) = 'CEL'
is_litter(i_cel_lit) = .true.
is_soil(i_cel_lit) = .false.
is_cwd(i_cel_lit) = .false.
Expand All @@ -384,8 +384,8 @@ subroutine init_decompcascade_bgc(bounds, soilbiogeochem_state_inst, soilstate_i
floating_cn_ratio_decomp_pools(i_lig_lit) = .true.
decomp_cascade_con%decomp_pool_name_restart(i_lig_lit) = 'litr3'
decomp_cascade_con%decomp_pool_name_history(i_lig_lit) = 'LITR3'
decomp_cascade_con%decomp_pool_name_long(i_lig_lit) = 'litter 3'
decomp_cascade_con%decomp_pool_name_short(i_lig_lit) = 'L3'
decomp_cascade_con%decomp_pool_name_long(i_lig_lit) = 'lignin'
decomp_cascade_con%decomp_pool_name_short(i_lig_lit) = 'LIG'
is_litter(i_lig_lit) = .true.
is_soil(i_lig_lit) = .false.
is_cwd(i_lig_lit) = .false.
Expand Down

0 comments on commit f179d0a

Please sign in to comment.