Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make certain history fields descriptive that have been labeled by number since #1340 #1413

Merged
merged 16 commits into from
Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cime_config/usermods_dirs/output_bgc/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
!----------------------------------------------------------------------------------

! h0 stream (monthly average, gridcell-level)
hist_fexcl1 += 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'SOILC_vr','SOILN_vr', 'CWDC_vr', 'LITR1C_vr', 'LITR2C_vr', 'LITR3C_vr', 'LITR1N_vr', 'LITR2N_vr', 'LITR3N_vr', 'CWDN_vr', 'SMIN_NO3_vr', 'CONC_O2_UNSAT', 'CONC_O2_SAT','SMIN_NH4_vr','SMINN_vr'
hist_fincl1 += 'LEAFC_TO_LITTER', 'FROOTC_TO_LITTER','LITR1C_TO_SOIL1C','LITR1N_TO_SOIL1N','LITR2C_TO_SOIL1C', 'LITR2N_TO_SOIL1N','LITR3C_TO_SOIL2C','LITR3N_TO_SOIL2N','DWT_WOOD_PRODUCTC_GAIN_PATCH'
hist_fexcl1 += 'PAS_SOMC_vr', 'PAS_SOMN_vr', 'SLO_SOMC_vr', 'SLO_SOMN_vr', 'ACT_SOMC_vr', 'ACT_SOMN_vr', 'SOILC_vr','SOILN_vr', 'CWDC_vr', 'MET_LITC_vr', 'CEL_LITC_vr', 'LIG_LITC_vr', 'MET_LITN_vr', 'CEL_LITN_vr', 'LIG_LITN_vr', 'CWDN_vr', 'SMIN_NO3_vr', 'CONC_O2_UNSAT', 'CONC_O2_SAT','SMIN_NH4_vr','SMINN_vr'
hist_fincl1 += 'LEAFC_TO_LITTER', 'FROOTC_TO_LITTER','MET_LITC_TO_PAS_SOMC','MET_LITN_TO_PAS_SOMN','CEL_LITC_TO_PAS_SOMC', 'CEL_LITN_TO_PAS_SOMN','LIG_LITC_TO_SLO_SOMC','LIG_LITN_TO_SLO_SOMN','DWT_WOOD_PRODUCTC_GAIN_PATCH'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheyenne test-suite now OK (with the changes to this file).

Izumi test-suite was already OK before.

Now only doc/source/users_guide/setting-up-and-running-a-case/master_list_file.rst (i.e. the documentation) is inconsistent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as with other files, SOIL1C needs to be ACT_SOM


! h1 stream (monthly average, finest sub-grid)
hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TOTVEGC', 'NPP_NUPTAKE', 'AR', 'HR', 'HTOP'
Expand All @@ -14,7 +14,7 @@ hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TOTVEGC', 'NPP_NUPTAKE', 'AR', 'HR', 'HTO
hist_fincl3 += 'GPP', 'NPP', 'AR', 'HR', 'DWT_CONV_CFLUX_PATCH', 'WOOD_HARVESTC', 'DWT_WOOD_PRODUCTC_GAIN_PATCH', 'SLASH_HARVESTC', 'COL_FIRE_CLOSS', 'FROOTC:I', 'HTOP'

! h3 stream (yearly average, gridcell-level)
hist_fincl4 += 'SOILC_vr', 'SOILN_vr', 'CWDC_vr', 'LITR1C_vr', 'LITR2C_vr', 'LITR3C_vr', 'LITR1N_vr', 'LITR2N_vr', 'LITR3N_vr','CWDN_vr', 'TOTLITC:I', 'TOT_WOODPRODC:I', 'TOTSOMC:I','TOTVEGC:I'
hist_fincl4 += 'SOILC_vr', 'SOILN_vr', 'CWDC_vr', 'MET_LITC_vr', 'CEL_LITC_vr', 'LIG_LITC_vr', 'MET_LITN_vr', 'CEL_LITN_vr', 'LIG_LITN_vr','CWDN_vr', 'TOTLITC:I', 'TOT_WOODPRODC:I', 'TOTSOMC:I','TOTVEGC:I'

! h4 stream (yearly average, landunit-level)
hist_fincl5 += 'TOTSOMC:I', 'TOTSOMC_1m:I', 'TOTECOSYSC:I', 'TOTVEGC:I', 'WOODC:I', 'TOTLITC:I', 'LIVECROOTC:I', 'DEADCROOTC:I', 'FROOTC:I'
Expand Down
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_'//trim(decomp_cascade_con%decomp_pool_name_history(k))//'_C'
longname = 'fine root to '//trim(decomp_cascade_con%decomp_pool_name_long(k))//' due to landcover change'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and elsewhere I have now removed the hardwired strings "LITR_" and "litter" and placed them in decomp_pool_name_history and decomp_pool_name_long.

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_'//trim(decomp_cascade_con%decomp_pool_name_history(k))//'_C'
longname = 'C13 fine root to '//trim(decomp_cascade_con%decomp_pool_name_long(k))//' 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_'//trim(decomp_cascade_con%decomp_pool_name_history(k))//'_C'
longname = 'C14 fine root to '//trim(decomp_cascade_con%decomp_pool_name_long(k))//' 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_'//trim(decomp_cascade_con%decomp_pool_name_history(k))//'_N'
longname = 'fine root N to '//trim(decomp_cascade_con%decomp_pool_name_long(k))//' 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
2 changes: 1 addition & 1 deletion src/main/clm_varpar.F90
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ subroutine clm_varpar_init(actual_maxsoil_patches, actual_numcft)
! in InitAllocate (in SoilBiogeochemStateType) which is called earlier than
! init_decompcascade_bgc where they might have otherwise been derived on the
! fly. For reference, if they were determined in init_decompcascade_bgc:
! ndecomp_pools would get the value of i_avl_som or i_cwd and
! ndecomp_pools would get the value of i_act_som or i_cwd and
! ndecomp_cascade_transitions would get the value of i_s3s1 or i_cwdl3
! depending on how use_fates is set.
if ( use_fates ) then
Expand Down
Loading