From 93e82dc41065f9a527237e0b10371f4f05bf8e37 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 26 Jul 2023 14:13:01 -0600 Subject: [PATCH 01/14] Add N_TO_FOOD outputs. --- src/biogeochem/CNVegNitrogenFluxType.F90 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index ce164b4c37..bd8f3ec64c 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -14,7 +14,7 @@ module CNVegNitrogenFluxType use SoilBiogeochemDecompCascadeConType , only : decomp_cascade_con use dynSubgridControlMod , only : get_do_grossunrep use CropReprPoolsMod , only : nrepr, repr_grain_min, repr_grain_max, repr_structure_min, repr_structure_max - use CropReprPoolsMod , only : get_repr_rest_fname, get_repr_longname + use CropReprPoolsMod , only : get_repr_hist_fname, get_repr_rest_fname, get_repr_longname use LandunitType , only : lun use ColumnType , only : col use PatchType , only : patch @@ -1024,6 +1024,18 @@ subroutine InitHistory(this, bounds) call hist_addfld1d (fname='NFERTILIZATION', units='gN/m^2/s', & avgflag='A', long_name='fertilizer added', & ptr_patch=this%fert_patch) + + this%repr_grainn_to_food_patch(begp:endp,:) = spval + do k = repr_grain_min, repr_grain_max + data1dptr => this%repr_grainn_to_food_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_FOOD + fname=get_repr_hist_fname(k)//'N_TO_FOOD', & + units='gN/m^2/s', & + avgflag='A', & + long_name=get_repr_longname(k)//' N to food', & + ptr_patch=data1dptr) + end do end if if (use_crop .and. .not. use_fun) then From 2cd833912c09b6ec4b6632cdc381d2ac3437bc6d Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 26 Jul 2023 15:16:15 -0600 Subject: [PATCH 02/14] Add N_TO_SEED outputs. --- src/biogeochem/CNVegNitrogenFluxType.F90 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index bd8f3ec64c..1154e0d198 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -1026,6 +1026,7 @@ subroutine InitHistory(this, bounds) ptr_patch=this%fert_patch) this%repr_grainn_to_food_patch(begp:endp,:) = spval + this%repr_grainn_to_seed_patch(begp:endp,:) = spval do k = repr_grain_min, repr_grain_max data1dptr => this%repr_grainn_to_food_patch(:,k) call hist_addfld1d ( & @@ -1035,6 +1036,14 @@ subroutine InitHistory(this, bounds) avgflag='A', & long_name=get_repr_longname(k)//' N to food', & ptr_patch=data1dptr) + data1dptr => this%repr_grainn_to_seed_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_SEED + fname=get_repr_hist_fname(k)//'N_TO_SEED', & + units='gN/m^2/s', & + avgflag='A', & + long_name=get_repr_longname(k)//' N to seed', & + ptr_patch=data1dptr) end do end if From f737631d6b51a9fc81443ed07780beb7b2587bfb Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 26 Jul 2023 15:16:59 -0600 Subject: [PATCH 03/14] Make N_TO_FOOD and N_TO_SEED outputs default inactive. --- src/biogeochem/CNVegNitrogenFluxType.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index 1154e0d198..59b2fd2f56 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -1035,7 +1035,8 @@ subroutine InitHistory(this, bounds) units='gN/m^2/s', & avgflag='A', & long_name=get_repr_longname(k)//' N to food', & - ptr_patch=data1dptr) + ptr_patch=data1dptr, & + default='inactive') data1dptr => this%repr_grainn_to_seed_patch(:,k) call hist_addfld1d ( & ! e.g., GRAINN_TO_SEED @@ -1043,7 +1044,8 @@ subroutine InitHistory(this, bounds) units='gN/m^2/s', & avgflag='A', & long_name=get_repr_longname(k)//' N to seed', & - ptr_patch=data1dptr) + ptr_patch=data1dptr, & + default='inactive') end do end if From 8ae1ecb29eec5394c8cb3dd827d12e56cc7092c8 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 26 Jul 2023 16:13:34 -0600 Subject: [PATCH 04/14] Fix indentation of a block. --- src/biogeochem/CNVegNitrogenFluxType.F90 | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index 59b2fd2f56..c831921a0d 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -1027,26 +1027,26 @@ subroutine InitHistory(this, bounds) this%repr_grainn_to_food_patch(begp:endp,:) = spval this%repr_grainn_to_seed_patch(begp:endp,:) = spval - do k = repr_grain_min, repr_grain_max - data1dptr => this%repr_grainn_to_food_patch(:,k) - call hist_addfld1d ( & - ! e.g., GRAINN_TO_FOOD - fname=get_repr_hist_fname(k)//'N_TO_FOOD', & - units='gN/m^2/s', & - avgflag='A', & - long_name=get_repr_longname(k)//' N to food', & - ptr_patch=data1dptr, & - default='inactive') - data1dptr => this%repr_grainn_to_seed_patch(:,k) - call hist_addfld1d ( & - ! e.g., GRAINN_TO_SEED - fname=get_repr_hist_fname(k)//'N_TO_SEED', & - units='gN/m^2/s', & - avgflag='A', & - long_name=get_repr_longname(k)//' N to seed', & - ptr_patch=data1dptr, & - default='inactive') - end do + do k = repr_grain_min, repr_grain_max + data1dptr => this%repr_grainn_to_food_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_FOOD + fname=get_repr_hist_fname(k)//'N_TO_FOOD', & + units='gN/m^2/s', & + avgflag='A', & + long_name=get_repr_longname(k)//' N to food', & + ptr_patch=data1dptr, & + default='inactive') + data1dptr => this%repr_grainn_to_seed_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_SEED + fname=get_repr_hist_fname(k)//'N_TO_SEED', & + units='gN/m^2/s', & + avgflag='A', & + long_name=get_repr_longname(k)//' N to seed', & + ptr_patch=data1dptr, & + default='inactive') + end do end if if (use_crop .and. .not. use_fun) then From 01731b7137dca6de345787cc45762fc294204956 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 26 Jul 2023 16:16:33 -0600 Subject: [PATCH 05/14] Add N_TO_FOOD perharv and ann. --- .../testmods_dirs/clm/crop/user_nl_clm | 2 +- src/biogeochem/CNPhenologyMod.F90 | 12 ++++ src/biogeochem/CNVegNitrogenFluxType.F90 | 59 +++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm index dc22a973b2..d00094de3d 100644 --- a/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm @@ -10,7 +10,7 @@ hist_fincl2 += 'DYN_COL_SOIL_ADJUSTMENTS_C' ! Annual crop variables on per-sowing/per-harvest axes, per PFT. -hist_fincl3 = 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV' +hist_fincl3 = 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'GRAINN_TO_FOOD_PERHARV', 'GRAINN_TO_FOOD_ANN', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV' hist_nhtfrq(3) = 17520 hist_mfilt(3) = 1 hist_type1d_pertape(3) = 'PFTS' diff --git a/src/biogeochem/CNPhenologyMod.F90 b/src/biogeochem/CNPhenologyMod.F90 index c2a66511f7..f7c7b543ee 100644 --- a/src/biogeochem/CNPhenologyMod.F90 +++ b/src/biogeochem/CNPhenologyMod.F90 @@ -1901,10 +1901,12 @@ subroutine CropPhenology(num_pcropp, filter_pcropp , & crop_inst%harvest_reason_thisyr_patch(p,s) = -1._r8 do k = repr_grain_min, repr_grain_max cnveg_carbonflux_inst%repr_grainc_to_food_perharv_patch(p,s,k) = 0._r8 + cnveg_nitrogenflux_inst%repr_grainn_to_food_perharv_patch(p,s,k) = 0._r8 end do end do do k = repr_grain_min, repr_grain_max cnveg_carbonflux_inst%repr_grainc_to_food_thisyr_patch(p,k) = 0._r8 + cnveg_nitrogenflux_inst%repr_grainn_to_food_thisyr_patch(p,k) = 0._r8 end do next_rx_sdate(p) = crop_inst%rx_sdates_thisyr_patch(p,1) end if @@ -2979,6 +2981,7 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & real(r8) :: cropseedc_deficit_to_restore ! amount of crop seed C deficit that will be restored from this grain pool (gC/m2) real(r8) :: cropseedn_deficit_to_restore ! amount of crop seed N deficit that will be restored from this grain pool (gN/m2) real(r8) :: repr_grainc_to_food_thispool ! amount added to / subtracted from repr_grainc_to_food for the pool in question (gC/m2/s) + real(r8) :: repr_grainn_to_food_thispool ! amount added to / subtracted from repr_grainn_to_food for the pool in question (gN/m2/s) !----------------------------------------------------------------------- associate( & @@ -3028,6 +3031,8 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & livestemn_to_litter => cnveg_nitrogenflux_inst%livestemn_to_litter_patch , & ! Output: [real(r8) (:) ] livestem N to litter (gN/m2/s) repr_grainn_to_food => cnveg_nitrogenflux_inst%repr_grainn_to_food_patch , & ! Output: [real(r8) (:,:) ] grain N to food (gN/m2/s) + repr_grainn_to_food_perharv => cnveg_nitrogenflux_inst%repr_grainn_to_food_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain N to food per harvest (gN/m2) + repr_grainn_to_food_thisyr => cnveg_nitrogenflux_inst%repr_grainn_to_food_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain N to food harvested this calendar year (gN/m2) repr_grainn_to_seed => cnveg_nitrogenflux_inst%repr_grainn_to_seed_patch , & ! Output: [real(r8) (:,:) ] grain N to seed (gN/m2/s) repr_structuren_to_cropprod => cnveg_nitrogenflux_inst%repr_structuren_to_cropprod_patch, & ! Output: [real(r8) (:,:) ] reproductive structure N to crop product pool (gN/m2/s) repr_structuren_to_litter => cnveg_nitrogenflux_inst%repr_structuren_to_litter_patch, & ! Output: [real(r8) (:,:) ] reproductive structure N to litter (gN/m2/s) @@ -3105,8 +3110,15 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & repr_grainc_to_food_thisyr(p,k) = repr_grainc_to_food_thisyr(p,k) & + repr_grainc_to_food_perharv(p,h,k) end if + repr_grainn_to_food_thispool = npool_to_reproductiven(p,k) - repr_grainn_to_seed(p,k) repr_grainn_to_food(p,k) = t1 * reproductiven(p,k) & + npool_to_reproductiven(p,k) - repr_grainn_to_seed(p,k) + if (reproductiven(p,k) + repr_grainn_to_food_thispool * dt > 0._r8) then + repr_grainn_to_food_perharv(p,h,k) = reproductiven(p,k) & + + repr_grainn_to_food_thispool * dt + repr_grainn_to_food_thisyr(p,k) = repr_grainn_to_food_thisyr(p,k) & + + repr_grainn_to_food_perharv(p,h,k) + end if end do do k = repr_structure_min, repr_structure_max diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index c831921a0d..eb48e2539b 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -6,6 +6,7 @@ module CNVegNitrogenFluxType use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools use clm_varpar , only : nlevdecomp_full, nlevdecomp, i_litr_min, i_litr_max use clm_varpar , only : nvegnpool + use clm_varpar , only : mxharvests use clm_varcon , only : spval, ispval, dzsoi_decomp use clm_varctl , only : use_nitrif_denitrif, use_crop use CNSharedParamsMod , only : use_fun, use_matrixcn @@ -132,6 +133,8 @@ module CNVegNitrogenFluxType ! litterfall fluxes real(r8), pointer :: livestemn_to_litter_patch (:) ! patch livestem N to litter (gN/m2/s) real(r8), pointer :: repr_grainn_to_food_patch (:,:) ! patch grain N to food for prognostic crop (gN/m2/s) [patch, repr_grain_min:repr_grain_max] + real(r8), pointer :: repr_grainn_to_food_perharv_patch (:,:,:) ! grain N to food for prognostic crop accumulated by harvest (gN/m2) [patch, harvest, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over each growing season, to be instantaneously at the end of each calendar year, to provide output that's easier to work with. + real(r8), pointer :: repr_grainn_to_food_thisyr_patch (:,:) ! grain N to food for prognostic crop accumulated this calendar year (gN/m2) [patch, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over an entire calendar year, to be saved instantaneously at the end of each calendar year, to provide output that's easier to work with. real(r8), pointer :: repr_structuren_to_cropprod_patch (:,:) ! patch reproductive structure N to crop product pool for prognostic crop (gN/m2/s) [patch, repr_structure_min:repr_structure_max] real(r8), pointer :: repr_structuren_to_litter_patch (:,:) ! patch reproductive structure N to litter for prognostic crop (gN/m2/s) [patch, repr_structure_min:repr_structure_max] real(r8), pointer :: leafn_to_biofueln_patch (:) ! patch leaf N to biofuel N (gN/m2/s) @@ -465,6 +468,8 @@ subroutine InitAllocate(this, bounds) allocate(this%npool_to_reproductiven_storage_patch(begp:endp, nrepr)); this%npool_to_reproductiven_storage_patch (:,:) = nan allocate(this%livestemn_to_litter_patch (begp:endp)) ; this%livestemn_to_litter_patch (:) = nan allocate(this%repr_grainn_to_food_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_food_patch (:,:) = nan + allocate(this%repr_grainn_to_food_perharv_patch(begp:endp, 1:mxharvests, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_food_perharv_patch (:,:,:) = nan + allocate(this%repr_grainn_to_food_thisyr_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_food_thisyr_patch (:,:) = nan allocate(this%repr_structuren_to_cropprod_patch(begp:endp, repr_structure_min:repr_structure_max)) this%repr_structuren_to_cropprod_patch(:,:) = nan allocate(this%repr_structuren_to_litter_patch(begp:endp, repr_structure_min:repr_structure_max)) @@ -1026,6 +1031,8 @@ subroutine InitHistory(this, bounds) ptr_patch=this%fert_patch) this%repr_grainn_to_food_patch(begp:endp,:) = spval + this%repr_grainn_to_food_perharv_patch(begp:endp,:,:) = spval + this%repr_grainn_to_food_thisyr_patch(begp:endp,:) = spval this%repr_grainn_to_seed_patch(begp:endp,:) = spval do k = repr_grain_min, repr_grain_max data1dptr => this%repr_grainn_to_food_patch(:,k) @@ -1046,6 +1053,25 @@ subroutine InitHistory(this, bounds) long_name=get_repr_longname(k)//' N to seed', & ptr_patch=data1dptr, & default='inactive') + data2dptr => this%repr_grainn_to_food_perharv_patch(:,:,k) + call hist_addfld2d ( & + ! e.g., GRAINN_TO_FOOD_PERHARV + fname=get_repr_hist_fname(k)//'N_TO_FOOD_PERHARV', & + units='gN/m^2', & + type2d='mxharvests', & + avgflag='I', & + long_name=get_repr_longname(k)//' N to food per harvest; should only be output annually', & + ptr_patch=data2dptr, & + default='inactive') + data1dptr => this%repr_grainn_to_food_thisyr_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_FOOD_ANN + fname=get_repr_hist_fname(k)//'N_TO_FOOD_ANN', & + units='gN/m^2', & + avgflag='I', & + long_name=get_repr_longname(k)//' N to food harvested per calendar year; should only be output annually', & + ptr_patch=data1dptr, & + default='inactive') end do end if @@ -1446,6 +1472,7 @@ subroutine Restart (this, bounds, ncid, flag ) logical :: readvar ! determine if variable is on initial file character(len=256) :: varname real(r8), pointer :: data1dptr(:) ! temp. pointer for slicing larger arrays + real(r8), pointer :: data2dptr(:,:) ! temp. pointer for slicing larger arrays !------------------------------------------------------------------------ if (use_crop) then @@ -1472,6 +1499,38 @@ subroutine Restart (this, bounds, ncid, flag ) units='gN/m2/s', & interpinic_flag='interp', readvar=readvar, data=data1dptr) end do + + ! Read or write variable(s) with mxharvests dimension + ! BACKWARDS_COMPATIBILITY(wjs/ssr, 2022-06-10) See note in CallRestartvarDimOK() + if (CallRestartvarDimOK(ncid, flag, 'mxharvests')) then + do k = repr_grain_min, repr_grain_max + data2dptr => this%repr_grainn_to_food_perharv_patch(:,:,k) + ! e.g., grainn_to_food_perharv + varname = get_repr_rest_fname(k)//'n_to_food_perharv' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + dim2name='mxharvests', & + switchdim=.true., & + long_name=get_repr_longname(k)//' N to food per harvest; should only be output annually', & + units='gN/m2', & + readvar=readvar, & + scale_by_thickness=.false., & + interpinic_flag='interp', data=data2dptr) + end do + end if + + do k = repr_grain_min, repr_grain_max + data1dptr => this%repr_grainn_to_food_thisyr_patch(:,k) + ! e.g., grainn_to_food_thisyr + varname = get_repr_rest_fname(k)//'n_to_food_thisyr' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + long_name=get_repr_longname(k)//' N to food per calendar year; should only be output annually', & + units='gN/m2', & + interpinic_flag='interp', readvar=readvar, data=data1dptr) + end do end if if (use_crop) then From bf9f4d8052885ec7c539f4312b181ddf8318c4a3 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Sat, 7 Oct 2023 11:49:25 -0600 Subject: [PATCH 06/14] Update history_fields .rst files. --- .../history_fields_fates.rst | 33 +------- .../history_fields_nofates.rst | 79 +++++++++++++++++-- 2 files changed, 75 insertions(+), 37 deletions(-) diff --git a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst index ea7c23d22a..b7361a5d59 100644 --- a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst +++ b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst @@ -26,15 +26,6 @@ AnnET - Annual ET BCDEP - total BC deposition (dry+wet) from atmosphere kg/m^2/s T BTRAN - transpiration beta factor unitless T BTRANMN - daily minimum of transpiration beta factor unitless T -CH4PROD - Gridcell total production of CH4 gC/m2/s T -CH4_EBUL_TOTAL_SAT - ebullition surface CH4 flux; (+ to atm) mol/m2/s F -CH4_EBUL_TOTAL_UNSAT - ebullition surface CH4 flux; (+ to atm) mol/m2/s F -CH4_SURF_AERE_SAT - aerenchyma surface CH4 flux for inundated area; (+ to atm) mol/m2/s T -CH4_SURF_AERE_UNSAT - aerenchyma surface CH4 flux for non-inundated area; (+ to atm) mol/m2/s T -CH4_SURF_DIFF_SAT - diffusive surface CH4 flux for inundated / lake area; (+ to atm) mol/m2/s T -CH4_SURF_DIFF_UNSAT - diffusive surface CH4 flux for non-inundated area; (+ to atm) mol/m2/s T -CH4_SURF_EBUL_SAT - ebullition surface CH4 flux for inundated / lake area; (+ to atm) mol/m2/s T -CH4_SURF_EBUL_UNSAT - ebullition surface CH4 flux for non-inundated area; (+ to atm) mol/m2/s T COL_CTRUNC - column-level sink for C truncation gC/m^2 F COL_NTRUNC - column-level sink for N truncation gN/m^2 F COSZEN - cosine of solar zenith angle none F @@ -61,7 +52,6 @@ DWT_PROD10C_GAIN - landcover change-driven add DWT_PROD10N_GAIN - landcover change-driven addition to 10-yr wood product pool gN/m^2/s F DWT_WOODPRODC_GAIN - landcover change-driven addition to wood product pools gC/m^2/s T DWT_WOODPRODN_GAIN - landcover change-driven addition to wood product pools gN/m^2/s T -DYN_COL_ADJUSTMENTS_CH4 - Adjustments in ch4 due to dynamic column areas; only makes sense at the column level: should n gC/m^2 F DYN_COL_SOIL_ADJUSTMENTS_C - Adjustments in soil carbon due to dynamic column areas; only makes sense at the column level: gC/m^2 F DYN_COL_SOIL_ADJUSTMENTS_N - Adjustments in soil nitrogen due to dynamic column areas; only makes sense at the column level gN/m^2 F DYN_COL_SOIL_ADJUSTMENTS_NH4 - Adjustments in soil NH4 due to dynamic column areas; only makes sense at the column level: sho gN/m^2 F @@ -147,8 +137,8 @@ FATES_LEAF_ALLOC - allocation to leaves in kg FATES_LITTER_IN - litter flux in kg carbon per m2 per second kg m-2 s-1 T FATES_LITTER_OUT - litter flux out in kg carbon (exudation, fragmentation, seed decay) kg m-2 s-1 T FATES_LSTEMMAINTAR - live stem maintenance autotrophic respiration in kg carbon per m2 per second kg m-2 s-1 T -FATES_MAINT_RESP - maintenance respiration in kg carbon per m2 land area per second, secondary patches kg m-2 s-1 T -FATES_MAINT_RESP_SECONDARY - maintenance respiration in kg carbon per m2 land area per second kg m-2 s-1 T +FATES_MAINT_RESP - maintenance respiration in kg carbon per m2 land area per second kg m-2 s-1 T +FATES_MAINT_RESP_SECONDARY - maintenance respiration in kg carbon per m2 land area per second, secondary patches kg m-2 s-1 T FATES_MAINT_RESP_UNREDUCED - diagnostic maintenance respiration if the low-carbon-storage reduction is ignored kg m-2 s-1 F FATES_MORTALITY_CFLUX_CANOPY - flux of biomass carbon from live to dead pools from mortality of canopy plants in kg carbon pe kg m-2 s-1 T FATES_MORTALITY_CFLUX_USTORY - flux of biomass carbon from live to dead pools from mortality of understory plants in kg carbo kg m-2 s-1 T @@ -193,9 +183,6 @@ FATES_VEGC - total biomass in live plant FATES_VEGC_ABOVEGROUND - aboveground biomass in kg carbon per m2 land area kg m-2 T FATES_WOOD_PRODUCT - total wood product from logging in kg carbon per m2 land area kg m-2 T FCEV - canopy evaporation W/m^2 T -FCH4 - Gridcell surface CH4 flux to atmosphere (+ to atm) kgC/m2/s T -FCH4TOCO2 - Gridcell oxidation of CH4 to CO2 gC/m2/s T -FCH4_DFSAT - CH4 additional flux due to changing fsat, natural vegetated and crop landunits only kgC/m2/s T FCO2 - CO2 flux to atmosphere (+ to atm) kgCO2/m2/s F FCOV - fractional impermeable area unitless T FCTR - canopy transpiration W/m^2 T @@ -207,8 +194,6 @@ FGR_R - Rural heat flux into soil/s FGR_U - Urban heat flux into soil/snow including snow melt W/m^2 F FH2OSFC - fraction of ground covered by surface water unitless T FH2OSFC_NOSNOW - fraction of ground covered by surface water (if no snow present) unitless F -FINUNDATED - fractional inundated area of vegetated columns unitless T -FINUNDATED_LAG - time-lagged inundated fraction of vegetated columns unitless F FIRA - net infrared (longwave) radiation W/m^2 T FIRA_ICE - net infrared (longwave) radiation (ice landunits only) W/m^2 F FIRA_R - Rural net infrared (longwave) radiation W/m^2 T @@ -352,7 +337,6 @@ M_SOM_PAS_N_TO_LEACHING - passive soil organic N leac M_SOM_SLO_C_TO_LEACHING - slow soil organic ma C leaching loss gC/m^2/s F M_SOM_SLO_N_TO_LEACHING - slow soil organic ma N leaching loss gN/m^2/s F NDEP_TO_SMINN - atmospheric N deposition to soil mineral N gN/m^2/s T -NEM - Gridcell net adjustment to net carbon exchange passed to atm. for methane production gC/m2/s T NET_NMIN - net rate of N mineralization gN/m^2/s T NFIX_TO_SMINN - symbiotic/asymbiotic N fixation to soil mineral N gN/m^2/s T NSUBSTEPS - number of adaptive timesteps in CLM timestep unitless F @@ -360,7 +344,6 @@ OBU - Monin-Obukhov length OCDEP - total OC deposition (dry+wet) from atmosphere kg/m^2/s T PARVEGLN - absorbed par by vegetation at local noon W/m^2 T PBOT - atmospheric pressure at surface (downscaled to columns in glacier regions) Pa T -PCH4 - atmospheric partial pressure of CH4 Pa T PCO2 - atmospheric partial pressure of CO2 Pa T POTENTIAL_IMMOB - potential N immobilization gN/m^2/s T POT_F_DENIT - potential denitrification flux gN/m^2/s T @@ -413,7 +396,6 @@ QIRRIG_FROM_GW_UNCONFINED - water added through unconfi QIRRIG_FROM_SURFACE - water added through surface water irrigation mm/s T QIRRIG_SPRINKLER - water added via sprinkler irrigation mm/s F QOVER - total surface runoff (includes QH2OSFC) mm/s T -QOVER_LAG - time-lagged surface runoff for soil columns mm/s F QPHSNEG - net negative hydraulic redistribution flux mm/s F QRGWL - surface runoff at glaciers (liquid only), wetlands, lakes; also includes melted ice runoff fro mm/s T QRUNOFF - total liquid runoff not including correction for land use change mm/s T @@ -495,6 +477,7 @@ SNOFSRVD - direct vis reflected solar SNOFSRVI - diffuse vis reflected solar radiation from snow W/m^2 T SNOINTABS - Fraction of incoming solar absorbed by lower snow layers - T SNOLIQFL - top snow layer liquid water fraction (land) fraction F +SNOMELT_ACCUM - accumulated snow melt for z0 m T SNOOCMCL - mass of OC in snow column kg/m2 T SNOOCMSL - mass of OC in top snow layer kg/m2 T SNORDSL - top snow layer effective grain radius m^-6 F @@ -578,7 +561,6 @@ TLAI - total projected leaf area i TOPO_COL - column-level topographic height m F TOPO_COL_ICE - column-level topographic height (ice landunits only) m F TOTCOLC - total column carbon, incl veg and cpool but excl product pools gC/m^2 T -TOTCOLCH4 - total belowground CH4 (0 for non-lake special landunits in the absence of dynamic landunits) gC/m2 T TOTCOLN - total column-level N, excluding product pools gN/m^2 T TOTECOSYSC - total ecosystem carbon, incl veg but excl cpool and product pools gC/m^2 T TOTECOSYSN - total ecosystem N, excluding product pools gN/m^2 T @@ -641,7 +623,6 @@ WBT - 2 m Stull Wet Bulb WBT_R - Rural 2 m Stull Wet Bulb C T WBT_U - Urban 2 m Stull Wet Bulb C T WIND - atmospheric wind velocity magnitude m/s T -WTGQ - surface tracer conductance m/s T Wind - atmospheric wind velocity magnitude m/s F Z0HG - roughness length over ground, sensible heat (vegetated landunits only) m F Z0MG - roughness length over ground, momentum (vegetated landunits only) m F @@ -652,7 +633,6 @@ ZBOT - atmospheric reference heigh ZETA - dimensionless stability parameter unitless F ZII - convective boundary height m F ZWT - water table depth (natural vegetated and crop landunits only) m T -ZWT_CH4_UNSAT - depth of water table for methane production used in non-inundated area m T ZWT_PERCH - perched water table depth (natural vegetated and crop landunits only) m T num_iter - number of iterations unitless F QICE_FORC elevclas qice forcing sent to GLC mm/s F @@ -757,7 +737,7 @@ FATES_MORTALITY_PF fates_levpft PFT-level mortality rate in FATES_NPLANT_PF fates_levpft total PFT-level number of individuals per m2 land area m-2 T FATES_NPLANT_SEC_PF fates_levpft total PFT-level number of individuals per m2 land area, secondary patches m-2 T FATES_NPP_PF fates_levpft total PFT-level NPP in kg carbon per m2 land area per second kg m-2 s-1 T -FATES_NPP_SE_PF fates_levpft total PFT-level NPP in kg carbon per m2 land area per second, secondary patches kg m-2 yr-1 T +FATES_NPP_SE_PF fates_levpft total PFT-level NPP in kg carbon per m2 land area per second, secondary patches kg m-2 s-1 T FATES_RECRUITMENT_PF fates_levpft PFT-level recruitment rate in number of individuals per m2 land area per year m-2 yr-1 T FATES_STOREC_PF fates_levpft total PFT-level stored biomass in kg carbon per m2 land area kg m-2 T FATES_VEGC_PF fates_levpft total PFT-level biomass in kg of carbon per land area kg m-2 T @@ -1026,11 +1006,8 @@ ratio_k1 levdcmp ratio_k1 ratio_no3_co2 levdcmp ratio_no3_co2 ratio F soil_bulkdensity levdcmp soil_bulkdensity kg/m3 F soil_co2_prod levdcmp soil_co2_prod ug C / g soil / day F -CONC_CH4_SAT levgrnd CH4 soil Concentration for inundated / lake area mol/m3 F -CONC_CH4_UNSAT levgrnd CH4 soil Concentration for non-inundated area mol/m3 F FGR_SOIL_R levgrnd Rural downward heat flux at interface below each soil layer watt/m^2 F HK levgrnd hydraulic conductivity (natural vegetated and crop landunits only) mm/s F -O2_DECOMP_DEPTH_UNSAT levgrnd O2 consumption from HR and AR for non-inundated area mol/m3/s F SMP levgrnd soil matric potential (natural vegetated and crop landunits only) mm T SOILPSI levgrnd soil water potential in each soil layer MPa F TSOI levgrnd soil temperature (natural vegetated and crop landunits only) K T @@ -1056,8 +1033,6 @@ SNO_TK_ICE levsno Thermal conductivity (ice l SNO_T_ICE levsno Snow temperatures (ice landunits only) K F SNO_Z levsno Snow layer thicknesses m F SNO_Z_ICE levsno Snow layer thicknesses (ice landunits only) m F -CONC_O2_SAT levsoi O2 soil Concentration for inundated / lake area mol/m3 T -CONC_O2_UNSAT levsoi O2 soil Concentration for non-inundated area mol/m3 T FATES_FRAGMENTATION_SCALER_SL levsoi factor (0-1) by which litter/cwd fragmentation proceeds relative to max rate by soil layer T FATES_FROOTC_SL levsoi Total carbon in live plant fine-roots over depth kg m-3 T H2OSOI levsoi volumetric soil water (natural vegetated and crop landunits only) mm3/mm3 T diff --git a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst index 4e96f5fb91..3a30fece39 100644 --- a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst +++ b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst @@ -1,13 +1,13 @@ ============================= CTSM History Fields (nofates) ============================= - + CAUTION: Not all variables are relevant / present for all CTSM cases. Key flags used in this CTSM case: -use_cn = T -use_crop = T -use_fates = F - +use_cn = T +use_crop = T +use_fates = F + =================================== ================ ============================================================================================== ================================================================= ======= CTSM History Fields ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -28,6 +28,9 @@ ANNMAX_RETRANSN - annual max of retranslocate ANNSUM_COUNTER - seconds since last annual accumulator turnover s F ANNSUM_NPP - annual sum of NPP gC/m^2/yr F ANNSUM_POTENTIAL_GPP - annual sum of potential GPP gN/m^2/yr F +APPAR_TEMP - 2 m apparent temperature C T +APPAR_TEMP_R - Rural 2 m apparent temperature C T +APPAR_TEMP_U - Urban 2 m apparent temperature C T AR - autotrophic respiration (MR + GR) gC/m^2/s T ATM_O3 - atmospheric ozone partial pressure mol/mol F ATM_TOPO - atmospheric surface height m T @@ -137,6 +140,12 @@ DEADSTEMN_XFER - dead stem N transfer DEADSTEMN_XFER_TO_DEADSTEMN - dead stem N growth from storage gN/m^2/s F DENIT - total rate of denitrification gN/m^2/s T DGNETDT - derivative of net ground heat flux wrt soil temp W/m^2/K F +DISCOI - 2 m Discomfort Index C T +DISCOIS - 2 m Stull Discomfort Index C T +DISCOIS_R - Rural 2 m Stull Discomfort Index C T +DISCOIS_U - Urban 2 m Stull Discomfort Index C T +DISCOI_R - Rural 2 m Discomfort Index C T +DISCOI_U - Urban 2 m Discomfort Index C T DISPLA - displacement height (vegetated landunits only) m F DISPVEGC - displayed veg carbon, excluding storage and cpool gC/m^2 T DISPVEGN - displayed vegetation nitrogen gN/m^2 T @@ -193,6 +202,9 @@ ELAI - exposed one-sided leaf area EMG - ground emissivity proportion F EMV - vegetation emissivity proportion F EOPT - Eopt coefficient for VOC calc non F +EPT - 2 m Equiv Pot Temp K T +EPT_R - Rural 2 m Equiv Pot Temp K T +EPT_U - Urban 2 m Equiv Pot Temp K T ER - total ecosystem respiration, autotrophic + heterotrophic gC/m^2/s T ERRH2O - total water conservation error mm T ERRH2OSNO - imbalance in snow depth (liquid water) mm T @@ -296,6 +308,13 @@ FSR - reflected solar radiation FSRND - direct nir reflected solar radiation W/m^2 T FSRNDLN - direct nir reflected solar radiation at local noon W/m^2 T FSRNI - diffuse nir reflected solar radiation W/m^2 T +FSRSF - reflected solar radiation W/m^2 T +FSRSFND - direct nir reflected solar radiation W/m^2 T +FSRSFNDLN - direct nir reflected solar radiation at local noon W/m^2 T +FSRSFNI - diffuse nir reflected solar radiation W/m^2 T +FSRSFVD - direct vis reflected solar radiation W/m^2 T +FSRSFVDLN - direct vis reflected solar radiation at local noon W/m^2 T +FSRSFVI - diffuse vis reflected solar radiation W/m^2 T FSRVD - direct vis reflected solar radiation W/m^2 T FSRVDLN - direct vis reflected solar radiation at local noon W/m^2 T FSRVI - diffuse vis reflected solar radiation W/m^2 T @@ -310,6 +329,14 @@ F_DENIT - denitrification flux F_N2O_DENIT - denitrification N2O flux gN/m^2/s T F_N2O_NIT - nitrification N2O flux gN/m^2/s T F_NIT - nitrification flux gN/m^2/s T +FireComp_BC - fire emissions flux of BC kg/m2/sec F +FireComp_OC - fire emissions flux of OC kg/m2/sec F +FireComp_SO2 - fire emissions flux of SO2 kg/m2/sec F +FireEmis_TOT - Total fire emissions flux gC/m2/sec F +FireEmis_ZTOP - Top of vertical fire emissions distribution m F +FireMech_SO2 - fire emissions flux of SO2 kg/m2/sec F +FireMech_bc_a1 - fire emissions flux of bc_a1 kg/m2/sec F +FireMech_pom_a1 - fire emissions flux of pom_a1 kg/m2/sec F GAMMA - total gamma for VOC calc non F GAMMAA - gamma A for VOC calc non F GAMMAC - gamma C for VOC calc non F @@ -333,6 +360,9 @@ GRAINC_TO_FOOD - grain C to food GRAINC_TO_FOOD_ANN - grain C to food harvested per calendar year; should only be output annually gC/m^2 F GRAINC_TO_SEED - grain C to seed gC/m^2/s T GRAINN - grain N gN/m^2 T +GRAINN_TO_FOOD - grain N to food gN/m^2/s F +GRAINN_TO_FOOD_ANN - grain N to food harvested per calendar year; should only be output annually gN/m^2 F +GRAINN_TO_SEED - grain N to seed gN/m^2/s F GRESP_STORAGE - growth respiration storage gC/m^2 F GRESP_STORAGE_TO_XFER - growth respiration shift storage to transfer gC/m^2/s F GRESP_XFER - growth respiration transfer gC/m^2 F @@ -373,6 +403,7 @@ INT_SNOW_ICE - accumulated swe (ice landun IWUELN - local noon intrinsic water use efficiency umolCO2/molH2O T JMX25T - canopy profile of jmax umol/m2/s T Jmx25Z - maximum rate of electron transport at 25 Celcius for canopy layers umol electrons/m2/s T +KBM1 - natural logarithm of Z0MG_P/Z0HG_P unitless F LAI240 - 240hr average of leaf area index m^2/m^2 F LAISHA - shaded projected leaf area index m^2/m^2 T LAISUN - sunlit projected leaf area index m^2/m^2 T @@ -854,6 +885,7 @@ SNOFSRVD - direct vis reflected solar SNOFSRVI - diffuse vis reflected solar radiation from snow W/m^2 T SNOINTABS - Fraction of incoming solar absorbed by lower snow layers - T SNOLIQFL - top snow layer liquid water fraction (land) fraction F +SNOMELT_ACCUM - accumulated snow melt for z0 m T SNOOCMCL - mass of OC in snow column kg/m2 T SNOOCMSL - mass of OC in top snow layer kg/m2 T SNORDSL - top snow layer effective grain radius m^-6 F @@ -913,6 +945,13 @@ SOM_SLO_N_1m - SOM_SLO N to 1 meter SOM_SLO_N_TO_SOM_ACT_N - decomp. of slow soil organic ma N to active soil organic N gN/m^2 F SOM_SLO_N_TO_SOM_PAS_N - decomp. of slow soil organic ma N to passive soil organic N gN/m^2 F SR - total soil respiration (HR + root resp) gC/m^2/s T +SSRE_FSR - surface snow effect on reflected solar radiation W/m^2 T +SSRE_FSRND - surface snow effect on direct nir reflected solar radiation W/m^2 T +SSRE_FSRNDLN - surface snow effect on direct nir reflected solar radiation at local noon W/m^2 T +SSRE_FSRNI - surface snow effect on diffuse nir reflected solar radiation W/m^2 T +SSRE_FSRVD - surface snow radiatve effect on direct vis reflected solar radiation W/m^2 T +SSRE_FSRVDLN - surface snow radiatve effect on direct vis reflected solar radiation at local noon W/m^2 T +SSRE_FSRVI - surface snow radiatve effect on diffuse vis reflected solar radiation W/m^2 T STORAGE_CDEMAND - C use from the C storage pool gC/m^2 F STORAGE_GR - growth resp for growth sent to storage for later display gC/m^2/s F STORAGE_NDEMAND - N demand during the offset period gN/m^2 F @@ -922,6 +961,12 @@ SUPPLEMENT_TO_SMINN - supplemental N supply SWBGT - 2 m Simplified Wetbulb Globe Temp C T SWBGT_R - Rural 2 m Simplified Wetbulb Globe Temp C T SWBGT_U - Urban 2 m Simplified Wetbulb Globe Temp C T +SWMP65 - 2 m Swamp Cooler Temp 65% Eff C T +SWMP65_R - Rural 2 m Swamp Cooler Temp 65% Eff C T +SWMP65_U - Urban 2 m Swamp Cooler Temp 65% Eff C T +SWMP80 - 2 m Swamp Cooler Temp 80% Eff C T +SWMP80_R - Rural 2 m Swamp Cooler Temp 80% Eff C T +SWMP80_U - Urban 2 m Swamp Cooler Temp 80% Eff C T SWdown - atmospheric incident solar radiation W/m^2 F SWup - upwelling shortwave radiation W/m^2 F SoilAlpha - factor limiting ground evap unitless F @@ -936,6 +981,9 @@ TBUILD_MAX - prescribed maximum interior TEMPAVG_T2M - temporary average 2m air temperature K F TEMPMAX_RETRANSN - temporary annual max of retranslocated N pool gN/m^2 F TEMPSUM_POTENTIAL_GPP - temporary annual sum of potential GPP gC/m^2/yr F +TEQ - 2 m Equiv Temp K T +TEQ_R - Rural 2 m Equiv Temp K T +TEQ_U - Urban 2 m Equiv Temp K T TFLOOR - floor temperature K F TG - ground temperature K T TG_ICE - ground temperature (ice landunits only) K F @@ -943,6 +991,12 @@ TG_R - Rural ground temperature TG_U - Urban ground temperature K F TH2OSFC - surface water temperature K T THBOT - atmospheric air potential temperature (downscaled to columns in glacier regions) K T +THIC - 2 m Temp Hum Index Comfort C T +THIC_R - Rural 2 m Temp Hum Index Comfort C T +THIC_U - Urban 2 m Temp Hum Index Comfort C T +THIP - 2 m Temp Hum Index Physiology C T +THIP_R - Rural 2 m Temp Hum Index Physiology C T +THIP_U - Urban 2 m Temp Hum Index Physiology C T TKE1 - top lake level eddy thermal conductivity W/(mK) T TLAI - total projected leaf area index m^2/m^2 T TOPO_COL - column-level topographic height m F @@ -1027,6 +1081,9 @@ VPD2M - 2m vapor pressure deficit VPD_CAN - canopy vapor pressure deficit kPa T Vcmx25Z - canopy profile of vcmax25 predicted by LUNA model umol/m2/s T WASTEHEAT - sensible heat flux from heating/cooling sources of urban waste heat W/m^2 T +WBA - 2 m Wet Bulb C T +WBA_R - Rural 2 m Wet Bulb C T +WBA_U - Urban 2 m Wet Bulb C T WBT - 2 m Stull Wet Bulb C T WBT_R - Rural 2 m Stull Wet Bulb C T WBT_U - Urban 2 m Stull Wet Bulb C T @@ -1043,12 +1100,15 @@ XSMRPOOL - temporary photosynthate C p XSMRPOOL_LOSS - temporary photosynthate C pool loss gC/m^2 F XSMRPOOL_RECOVER - C flux assigned to recovery of negative xsmrpool gC/m^2/s T Z0HG - roughness length over ground, sensible heat (vegetated landunits only) m F +Z0HG_P - patch roughness length over ground, sensible heat m F Z0HV - roughness length over vegetation, sensible heat m F Z0MG - roughness length over ground, momentum (vegetated landunits only) m F +Z0MG_P - patch roughness length over ground, momentum m F Z0MV - roughness length over vegetation, momentum m F Z0MV_DENSE - roughness length over vegetation, momentum, for dense canopy m F Z0M_TO_COUPLER - roughness length, momentum: gridcell average sent to coupler m F Z0QG - roughness length over ground, latent heat (vegetated landunits only) m F +Z0QG_P - patch roughness length over ground, latent heat m F Z0QV - roughness length over vegetation, latent heat m F ZBOT - atmospheric reference height m T ZETA - dimensionless stability parameter unitless F @@ -1270,6 +1330,7 @@ W_SCALAR levsoi Moisture (dryness) inhibiti GDDACCUM_PERHARV mxharvests At-harvest accumulated growing degree days past planting date for crop; should only be output ddays F GDDHARV_PERHARV mxharvests Growing degree days (gdd) needed to harvest; should only be output annually ddays F GRAINC_TO_FOOD_PERHARV mxharvests grain C to food per harvest; should only be output annually gC/m^2 F +GRAINN_TO_FOOD_PERHARV mxharvests grain N to food per harvest; should only be output annually gN/m^2 F HARVEST_REASON_PERHARV mxharvests Reason for each crop harvest; should only be output annually 1 = mature; 2 = max season length; 3 = incorrect Dec. 31 sowing; F HDATES mxharvests actual crop harvest dates; should only be output annually day of year F HUI_PERHARV mxharvests At-harvest accumulated heat unit index for crop; should only be output annually ddays F @@ -1278,11 +1339,13 @@ SOWING_REASON_PERHARV mxharvests Reason for sowing of each c SYEARS_PERHARV mxharvests actual sowing years for crops harvested this year; should only be output annually year F SDATES mxsowings actual crop sowing dates; should only be output annually day of year F SOWING_REASON mxsowings Reason for each crop sowing; should only be output annually unitless F -ALBD numrad surface albedo (direct) proportion F +ALBD numrad surface albedo (direct) proportion T +ALBDSF numrad diagnostic snow-free surface albedo (direct) proportion T ALBGRD numrad ground albedo (direct) proportion F ALBGRI numrad ground albedo (indirect) proportion F -ALBI numrad surface albedo (indirect) proportion F +ALBI numrad surface albedo (indirect) proportion T +ALBISF numrad diagnostic snow-free surface albedo (indirect) proportion T VEGWP nvegwcs vegetation water matric potential for sun/sha canopy,xyl,root segments mm T VEGWPLN nvegwcs vegetation water matric potential for sun/sha canopy,xyl,root at local noon mm T VEGWPPD nvegwcs predawn vegetation water matric potential for sun/sha canopy,xyl,root mm T -=================================== ================ ============================================================================================== ================================================================= ======= +=================================== ================ ============================================================================================== ================================================================= ======= From eeab40d176e93cde9d92d6f1c810ffc5b2f1fd37 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Tue, 10 Oct 2023 13:27:08 -0600 Subject: [PATCH 07/14] Add GRAINN_TO_FOOD to first history file in crop testmod. --- cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm index d00094de3d..d7e6cb3189 100644 --- a/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm @@ -1,7 +1,7 @@ hist_fincl1 += 'GDD0', 'GDD8', 'GDD10', 'GDD020', 'GDD820', 'GDD1020', 'GDDACCUM', 'GDDTSOI', 'A5TMIN', 'A10TMIN', - 'HUI' + 'HUI', 'GRAINN_TO_FOOD' ! The main point of including this field is to test the SUM history field infrastructure ! This is in the crop testmods because this field is mainly useful in transient crop runs From d0c44a15333595ad8ac90e31efa5da511685d1aa Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Tue, 17 Oct 2023 13:24:13 -0600 Subject: [PATCH 08/14] Added TO_SEED _ANN and _PERHARV outputs. --- .../testmods_dirs/clm/crop/user_nl_clm | 2 +- src/biogeochem/CNPhenologyMod.F90 | 19 ++++++- src/biogeochem/CNVegCarbonFluxType.F90 | 23 +++++++++ src/biogeochem/CNVegNitrogenFluxType.F90 | 49 ++++++++++++++++++- 4 files changed, 90 insertions(+), 3 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm index d7e6cb3189..70727986d7 100644 --- a/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm @@ -10,7 +10,7 @@ hist_fincl2 += 'DYN_COL_SOIL_ADJUSTMENTS_C' ! Annual crop variables on per-sowing/per-harvest axes, per PFT. -hist_fincl3 = 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'GRAINN_TO_FOOD_PERHARV', 'GRAINN_TO_FOOD_ANN', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV' +hist_fincl3 = 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'GRAINN_TO_FOOD_PERHARV', 'GRAINN_TO_FOOD_ANN', 'GRAINC_TO_SEED_PERHARV', 'GRAINC_TO_SEED_ANN', 'GRAINN_TO_SEED_PERHARV', 'GRAINN_TO_SEED_ANN', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV' hist_nhtfrq(3) = 17520 hist_mfilt(3) = 1 hist_type1d_pertape(3) = 'PFTS' diff --git a/src/biogeochem/CNPhenologyMod.F90 b/src/biogeochem/CNPhenologyMod.F90 index 2877aeb5c0..b6845fb7f6 100644 --- a/src/biogeochem/CNPhenologyMod.F90 +++ b/src/biogeochem/CNPhenologyMod.F90 @@ -1902,12 +1902,16 @@ subroutine CropPhenology(num_pcropp, filter_pcropp , & crop_inst%harvest_reason_thisyr_patch(p,s) = -1._r8 do k = repr_grain_min, repr_grain_max cnveg_carbonflux_inst%repr_grainc_to_food_perharv_patch(p,s,k) = 0._r8 + cnveg_carbonflux_inst%repr_grainc_to_seed_perharv_patch(p,s,k) = 0._r8 cnveg_nitrogenflux_inst%repr_grainn_to_food_perharv_patch(p,s,k) = 0._r8 + cnveg_nitrogenflux_inst%repr_grainn_to_seed_perharv_patch(p,s,k) = 0._r8 end do end do do k = repr_grain_min, repr_grain_max cnveg_carbonflux_inst%repr_grainc_to_food_thisyr_patch(p,k) = 0._r8 + cnveg_carbonflux_inst%repr_grainc_to_seed_thisyr_patch(p,k) = 0._r8 cnveg_nitrogenflux_inst%repr_grainn_to_food_thisyr_patch(p,k) = 0._r8 + cnveg_nitrogenflux_inst%repr_grainn_to_seed_thisyr_patch(p,k) = 0._r8 end do next_rx_sdate(p) = crop_inst%rx_sdates_thisyr_patch(p,1) end if @@ -3023,6 +3027,8 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & repr_grainc_to_food_perharv => cnveg_carbonflux_inst%repr_grainc_to_food_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain C to food per harvest (gC/m2) repr_grainc_to_food_thisyr => cnveg_carbonflux_inst%repr_grainc_to_food_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain C to food harvested this calendar year (gC/m2) repr_grainc_to_seed => cnveg_carbonflux_inst%repr_grainc_to_seed_patch , & ! Output: [real(r8) (:,:) ] grain C to seed (gC/m2/s) + repr_grainc_to_seed_perharv => cnveg_carbonflux_inst%repr_grainc_to_seed_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain C to seed per harvest (gC/m2) + repr_grainc_to_seed_thisyr => cnveg_carbonflux_inst%repr_grainc_to_seed_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain C to seed harvested this calendar year (gC/m2) repr_structurec_to_cropprod => cnveg_carbonflux_inst%repr_structurec_to_cropprod_patch, & ! Output: [real(r8) (:,:) ] reproductive structure C to crop product pool (gC/m2/s) repr_structurec_to_litter => cnveg_carbonflux_inst%repr_structurec_to_litter_patch, & ! Output: [real(r8) (:,:) ] reproductive structure C to litter (gC/m2/s) leafc_to_biofuelc => cnveg_carbonflux_inst%leafc_to_biofuelc_patch , & ! Output: [real(r8) (:) ] leaf C to biofuel C (gC/m2/s) @@ -3035,6 +3041,8 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & repr_grainn_to_food_perharv => cnveg_nitrogenflux_inst%repr_grainn_to_food_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain N to food per harvest (gN/m2) repr_grainn_to_food_thisyr => cnveg_nitrogenflux_inst%repr_grainn_to_food_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain N to food harvested this calendar year (gN/m2) repr_grainn_to_seed => cnveg_nitrogenflux_inst%repr_grainn_to_seed_patch , & ! Output: [real(r8) (:,:) ] grain N to seed (gN/m2/s) + repr_grainn_to_seed_perharv => cnveg_nitrogenflux_inst%repr_grainn_to_seed_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain N to seed per harvest (gN/m2) + repr_grainn_to_seed_thisyr => cnveg_nitrogenflux_inst%repr_grainn_to_seed_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain N to seed harvested this calendar year (gN/m2) repr_structuren_to_cropprod => cnveg_nitrogenflux_inst%repr_structuren_to_cropprod_patch, & ! Output: [real(r8) (:,:) ] reproductive structure N to crop product pool (gN/m2/s) repr_structuren_to_litter => cnveg_nitrogenflux_inst%repr_structuren_to_litter_patch, & ! Output: [real(r8) (:,:) ] reproductive structure N to litter (gN/m2/s) leafn_to_biofueln => cnveg_nitrogenflux_inst%leafn_to_biofueln_patch , & ! Output: [real(r8) (:) ] leaf N to biofuel N (gN/m2/s) @@ -3096,10 +3104,19 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & cropseedc_deficit_to_restore = min(cropseedc_deficit_remaining, reproductivec(p,k)) cropseedc_deficit_remaining = cropseedc_deficit_remaining - cropseedc_deficit_to_restore repr_grainc_to_seed(p,k) = t1 * cropseedc_deficit_to_restore - + if (cropseedc_deficit_to_restore > 0._r8) then + repr_grainc_to_seed_perharv(p,h,k) = cropseedc_deficit_to_restore + repr_grainc_to_seed_thisyr(p,k) = repr_grainc_to_seed_thisyr(p,k) & + + repr_grainc_to_seed_perharv(p,h,k) + end if cropseedn_deficit_to_restore = min(cropseedn_deficit_remaining, reproductiven(p,k)) cropseedn_deficit_remaining = cropseedn_deficit_remaining - cropseedn_deficit_to_restore repr_grainn_to_seed(p,k) = t1 * cropseedn_deficit_to_restore + if (cropseedn_deficit_to_restore > 0._r8) then + repr_grainn_to_seed_perharv(p,h,k) = cropseedn_deficit_to_restore + repr_grainn_to_seed_thisyr(p,k) = repr_grainn_to_seed_thisyr(p,k) & + + repr_grainn_to_seed_perharv(p,h,k) + end if ! Send the remaining grain to the food product pool repr_grainc_to_food_thispool = cpool_to_reproductivec(p,k) - repr_grainc_to_seed(p,k) diff --git a/src/biogeochem/CNVegCarbonFluxType.F90 b/src/biogeochem/CNVegCarbonFluxType.F90 index e930543e25..bd8765db00 100644 --- a/src/biogeochem/CNVegCarbonFluxType.F90 +++ b/src/biogeochem/CNVegCarbonFluxType.F90 @@ -148,6 +148,8 @@ module CNVegCarbonFluxType real(r8), pointer :: leafc_to_biofuelc_patch (:) ! leaf C to biofuel C (gC/m2/s) real(r8), pointer :: livestemc_to_biofuelc_patch (:) ! livestem C to biofuel C (gC/m2/s) real(r8), pointer :: repr_grainc_to_seed_patch (:,:) ! grain C to seed for prognostic crop(gC/m2/s) [patch, repr_grain_min:repr_grain_max] + real(r8), pointer :: repr_grainc_to_seed_perharv_patch (:,:,:) ! grain C to seed for prognostic crop accumulated by harvest (gC/m2) [patch, harvest, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over each growing season, to be instantaneously at the end of each calendar year, to provide output that's easier to work with. + real(r8), pointer :: repr_grainc_to_seed_thisyr_patch (:,:) ! grain C to seed for prognostic crop accumulated this calendar year (gC/m2) [patch, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over an entire calendar year, to be saved instantaneously at the end of each calendar year, to provide output that's easier to work with. ! maintenance respiration fluxes real(r8), pointer :: cpool_to_resp_patch (:) ! CNflex excess C maintenance respiration (gC/m2/s) @@ -672,6 +674,8 @@ subroutine InitAllocate(this, bounds, carbon_type, alloc_full_veg) allocate(this%leafc_to_biofuelc_patch (begp:endp)) ; this%leafc_to_biofuelc_patch (:) = nan allocate(this%livestemc_to_biofuelc_patch (begp:endp)) ; this%livestemc_to_biofuelc_patch (:) = nan allocate(this%repr_grainc_to_seed_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainc_to_seed_patch (:,:) = nan + allocate(this%repr_grainc_to_seed_perharv_patch(begp:endp, 1:mxharvests, repr_grain_min:repr_grain_max)) ; this%repr_grainc_to_seed_perharv_patch (:,:,:) = nan + allocate(this%repr_grainc_to_seed_thisyr_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainc_to_seed_thisyr_patch (:,:) = nan allocate(this%reproductivec_xfer_to_reproductivec_patch(begp:endp, nrepr)) this%reproductivec_xfer_to_reproductivec_patch(:,:) = nan allocate(this%cpool_reproductive_gr_patch (begp:endp, nrepr)) ; this%cpool_reproductive_gr_patch (:,:) = nan @@ -954,6 +958,7 @@ subroutine InitHistory(this, bounds, carbon_type) end do this%repr_grainc_to_food_thisyr_patch(begp:endp,:) = spval + this%repr_grainc_to_seed_thisyr_patch(begp:endp,:) = spval do k = repr_grain_min, repr_grain_max data1dptr => this%repr_grainc_to_food_thisyr_patch(:,k) call hist_addfld1d ( & @@ -964,6 +969,15 @@ subroutine InitHistory(this, bounds, carbon_type) long_name=get_repr_longname(k)//' C to food harvested per calendar year; should only be output annually', & ptr_patch=data1dptr, & default='inactive') + data1dptr => this%repr_grainc_to_seed_thisyr_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINC_TO_SEED_ANN + fname=get_repr_hist_fname(k)//'C_TO_SEED_ANN', & + units='gC/m^2', & + avgflag='I', & + long_name=get_repr_longname(k)//' C to seed harvested per calendar year; should only be output annually', & + ptr_patch=data1dptr, & + default='inactive') end do this%leafc_to_biofuelc_patch(begp:endp) = spval @@ -3730,6 +3744,15 @@ subroutine RestartBulkOnly ( this, bounds, ncid, flag ) long_name=get_repr_longname(k)//' C to food per calendar year; should only be output annually', & units='gC/m2', & interpinic_flag='interp', readvar=readvar, data=data1dptr) + data1dptr => this%repr_grainc_to_seed_thisyr_patch(:,k) + ! e.g., grainc_to_seed_thisyr + varname = get_repr_rest_fname(k)//'c_to_seed_thisyr' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + long_name=get_repr_longname(k)//' C to seed per calendar year; should only be output annually', & + units='gC/m2', & + interpinic_flag='interp', readvar=readvar, data=data1dptr) end do do k = 1, nrepr diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index 64f56a0d6b..5de48e4284 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -140,6 +140,8 @@ module CNVegNitrogenFluxType real(r8), pointer :: leafn_to_biofueln_patch (:) ! patch leaf N to biofuel N (gN/m2/s) real(r8), pointer :: livestemn_to_biofueln_patch (:) ! patch livestem N to biofuel N (gN/m2/s) real(r8), pointer :: repr_grainn_to_seed_patch (:,:) ! patch grain N to seed for prognostic crop (gN/m2/s) [patch, repr_grain_min:repr_grain_max] + real(r8), pointer :: repr_grainn_to_seed_perharv_patch (:,:,:) ! grain N to seed for prognostic crop accumulated by harvest (gN/m2) [patch, harvest, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over each growing season, to be instantaneously at the end of each calendar year, to provide output that's easier to work with. + real(r8), pointer :: repr_grainn_to_seed_thisyr_patch (:,:) ! grain N to seed for prognostic crop accumulated this calendar year (gN/m2) [patch, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over an entire calendar year, to be saved instantaneously at the end of each calendar year, to provide output that's easier to work with. real(r8), pointer :: leafn_to_litter_patch (:) ! patch leaf N litterfall (gN/m2/s) real(r8), pointer :: leafn_to_retransn_patch (:) ! patch leaf N to retranslocated N pool (gN/m2/s) real(r8), pointer :: frootn_to_retransn_patch (:) ! patch fine root N to retranslocated N pool (gN/m2/s) @@ -487,6 +489,8 @@ subroutine InitAllocate(this, bounds, alloc_full_veg) allocate(this%leafn_to_biofueln_patch (begp:endp)) ; this%leafn_to_biofueln_patch (:) = nan allocate(this%livestemn_to_biofueln_patch (begp:endp)) ; this%livestemn_to_biofueln_patch (:) = nan allocate(this%repr_grainn_to_seed_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_seed_patch (:,:) = nan + allocate(this%repr_grainn_to_seed_perharv_patch(begp:endp, 1:mxharvests, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_seed_perharv_patch (:,:,:) = nan + allocate(this%repr_grainn_to_seed_thisyr_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_seed_thisyr_patch (:,:) = nan allocate(this%reproductiven_xfer_to_reproductiven_patch(begp:endp, nrepr)) this%reproductiven_xfer_to_reproductiven_patch(:,:) = nan allocate(this%reproductiven_storage_to_xfer_patch(begp:endp, nrepr)) ; this%reproductiven_storage_to_xfer_patch (:,:) = nan @@ -1044,11 +1048,13 @@ subroutine InitHistory(this, bounds) this%repr_grainn_to_food_perharv_patch(begp:endp,:,:) = spval this%repr_grainn_to_food_thisyr_patch(begp:endp,:) = spval this%repr_grainn_to_seed_patch(begp:endp,:) = spval + this%repr_grainn_to_seed_perharv_patch(begp:endp,:,:) = spval + this%repr_grainn_to_seed_thisyr_patch(begp:endp,:) = spval do k = repr_grain_min, repr_grain_max data1dptr => this%repr_grainn_to_food_patch(:,k) call hist_addfld1d ( & ! e.g., GRAINN_TO_FOOD - fname=get_repr_hist_fname(k)//'N_TO_FOOD', & + fname=get_repr_hist_fname(k)//'N_TO_FOOD (not scientifically)', & units='gN/m^2/s', & avgflag='A', & long_name=get_repr_longname(k)//' N to food', & @@ -1082,6 +1088,25 @@ subroutine InitHistory(this, bounds) long_name=get_repr_longname(k)//' N to food harvested per calendar year; should only be output annually', & ptr_patch=data1dptr, & default='inactive') + data2dptr => this%repr_grainn_to_seed_perharv_patch(:,:,k) + call hist_addfld2d ( & + ! e.g., GRAINN_TO_SEED_PERHARV + fname=get_repr_hist_fname(k)//'N_TO_SEED_PERHARV', & + units='gN/m^2', & + type2d='mxharvests', & + avgflag='I', & + long_name=get_repr_longname(k)//' N to seed per harvest; should only be output annually', & + ptr_patch=data2dptr, & + default='inactive') + data1dptr => this%repr_grainn_to_seed_thisyr_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_SEED_ANN + fname=get_repr_hist_fname(k)//'N_TO_SEED_ANN', & + units='gN/m^2', & + avgflag='I', & + long_name=get_repr_longname(k)//' N to seed harvested per calendar year; should only be output annually', & + ptr_patch=data1dptr, & + default='inactive') end do end if @@ -1527,6 +1552,19 @@ subroutine Restart (this, bounds, ncid, flag ) readvar=readvar, & scale_by_thickness=.false., & interpinic_flag='interp', data=data2dptr) + data2dptr => this%repr_grainn_to_seed_perharv_patch(:,:,k) + ! e.g., grainn_to_seed_perharv + varname = get_repr_rest_fname(k)//'n_to_seed_perharv' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + dim2name='mxharvests', & + switchdim=.true., & + long_name=get_repr_longname(k)//' N to seed per harvest; should only be output annually', & + units='gN/m2', & + readvar=readvar, & + scale_by_thickness=.false., & + interpinic_flag='interp', data=data2dptr) end do end if @@ -1540,6 +1578,15 @@ subroutine Restart (this, bounds, ncid, flag ) long_name=get_repr_longname(k)//' N to food per calendar year; should only be output annually', & units='gN/m2', & interpinic_flag='interp', readvar=readvar, data=data1dptr) + data1dptr => this%repr_grainn_to_seed_thisyr_patch(:,k) + ! e.g., grainn_to_seed_thisyr + varname = get_repr_rest_fname(k)//'n_to_seed_thisyr' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + long_name=get_repr_longname(k)//' N to seed per calendar year; should only be output annually', & + units='gN/m2', & + interpinic_flag='interp', readvar=readvar, data=data1dptr) end do end if From b95b986e3c5df0c622c8a9fd1bde197cf8a155d0 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 25 Oct 2023 10:14:34 -0600 Subject: [PATCH 09/14] Fix in-progress attempt to add note to N_TO_FOOD longnames. --- src/biogeochem/CNVegNitrogenFluxType.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index 5de48e4284..dec8237d86 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -1054,7 +1054,7 @@ subroutine InitHistory(this, bounds) data1dptr => this%repr_grainn_to_food_patch(:,k) call hist_addfld1d ( & ! e.g., GRAINN_TO_FOOD - fname=get_repr_hist_fname(k)//'N_TO_FOOD (not scientifically)', & + fname=get_repr_hist_fname(k)//'N_TO_FOOD', & units='gN/m^2/s', & avgflag='A', & long_name=get_repr_longname(k)//' N to food', & From 205848bca27a5172e169225c7d4dda63ed5e7ddd Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 25 Oct 2023 10:15:09 -0600 Subject: [PATCH 10/14] Add "not scientifically supported" to reproductive N hist field longnames. --- src/biogeochem/CNVegNitrogenFluxType.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index dec8237d86..cdfab748f3 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -1057,7 +1057,7 @@ subroutine InitHistory(this, bounds) fname=get_repr_hist_fname(k)//'N_TO_FOOD', & units='gN/m^2/s', & avgflag='A', & - long_name=get_repr_longname(k)//' N to food', & + long_name=get_repr_longname(k)//' N to food (not scientifically supported)', & ptr_patch=data1dptr, & default='inactive') data1dptr => this%repr_grainn_to_seed_patch(:,k) @@ -1066,7 +1066,7 @@ subroutine InitHistory(this, bounds) fname=get_repr_hist_fname(k)//'N_TO_SEED', & units='gN/m^2/s', & avgflag='A', & - long_name=get_repr_longname(k)//' N to seed', & + long_name=get_repr_longname(k)//' N to seed (not scientifically supported)', & ptr_patch=data1dptr, & default='inactive') data2dptr => this%repr_grainn_to_food_perharv_patch(:,:,k) @@ -1076,7 +1076,7 @@ subroutine InitHistory(this, bounds) units='gN/m^2', & type2d='mxharvests', & avgflag='I', & - long_name=get_repr_longname(k)//' N to food per harvest; should only be output annually', & + long_name=get_repr_longname(k)//' N to food per harvest; should only be output annually (not scientifically supported)', & ptr_patch=data2dptr, & default='inactive') data1dptr => this%repr_grainn_to_food_thisyr_patch(:,k) @@ -1085,7 +1085,7 @@ subroutine InitHistory(this, bounds) fname=get_repr_hist_fname(k)//'N_TO_FOOD_ANN', & units='gN/m^2', & avgflag='I', & - long_name=get_repr_longname(k)//' N to food harvested per calendar year; should only be output annually', & + long_name=get_repr_longname(k)//' N to food harvested per calendar year; should only be output annually (not scientifically supported)', & ptr_patch=data1dptr, & default='inactive') data2dptr => this%repr_grainn_to_seed_perharv_patch(:,:,k) @@ -1095,7 +1095,7 @@ subroutine InitHistory(this, bounds) units='gN/m^2', & type2d='mxharvests', & avgflag='I', & - long_name=get_repr_longname(k)//' N to seed per harvest; should only be output annually', & + long_name=get_repr_longname(k)//' N to seed per harvest; should only be output annually (not scientifically supported)', & ptr_patch=data2dptr, & default='inactive') data1dptr => this%repr_grainn_to_seed_thisyr_patch(:,k) @@ -1104,7 +1104,7 @@ subroutine InitHistory(this, bounds) fname=get_repr_hist_fname(k)//'N_TO_SEED_ANN', & units='gN/m^2', & avgflag='I', & - long_name=get_repr_longname(k)//' N to seed harvested per calendar year; should only be output annually', & + long_name=get_repr_longname(k)//' N to seed harvested per calendar year; should only be output annually (not scientifically supported)', & ptr_patch=data1dptr, & default='inactive') end do From ae8f46a22d853f4daa952651af2119bcafd4cef2 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 25 Oct 2023 12:00:41 -0600 Subject: [PATCH 11/14] Move GRAINC_TO_SEED_ANN to same place as GRAINC_TO_SEED. --- src/biogeochem/CNVegCarbonFluxType.F90 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/biogeochem/CNVegCarbonFluxType.F90 b/src/biogeochem/CNVegCarbonFluxType.F90 index bd8765db00..d6f5375b5d 100644 --- a/src/biogeochem/CNVegCarbonFluxType.F90 +++ b/src/biogeochem/CNVegCarbonFluxType.F90 @@ -958,7 +958,6 @@ subroutine InitHistory(this, bounds, carbon_type) end do this%repr_grainc_to_food_thisyr_patch(begp:endp,:) = spval - this%repr_grainc_to_seed_thisyr_patch(begp:endp,:) = spval do k = repr_grain_min, repr_grain_max data1dptr => this%repr_grainc_to_food_thisyr_patch(:,k) call hist_addfld1d ( & @@ -969,15 +968,6 @@ subroutine InitHistory(this, bounds, carbon_type) long_name=get_repr_longname(k)//' C to food harvested per calendar year; should only be output annually', & ptr_patch=data1dptr, & default='inactive') - data1dptr => this%repr_grainc_to_seed_thisyr_patch(:,k) - call hist_addfld1d ( & - ! e.g., GRAINC_TO_SEED_ANN - fname=get_repr_hist_fname(k)//'C_TO_SEED_ANN', & - units='gC/m^2', & - avgflag='I', & - long_name=get_repr_longname(k)//' C to seed harvested per calendar year; should only be output annually', & - ptr_patch=data1dptr, & - default='inactive') end do this%leafc_to_biofuelc_patch(begp:endp) = spval @@ -991,6 +981,7 @@ subroutine InitHistory(this, bounds, carbon_type) ptr_patch=this%livestemc_to_biofuelc_patch) this%repr_grainc_to_seed_patch(begp:endp,:) = spval + this%repr_grainc_to_seed_thisyr_patch(begp:endp,:) = spval do k = repr_grain_min, repr_grain_max data1dptr => this%repr_grainc_to_seed_patch(:,k) call hist_addfld1d ( & @@ -1000,6 +991,15 @@ subroutine InitHistory(this, bounds, carbon_type) avgflag='A', & long_name=get_repr_longname(k)//' C to seed', & ptr_patch=data1dptr) + data1dptr => this%repr_grainc_to_seed_thisyr_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINC_TO_SEED_ANN + fname=get_repr_hist_fname(k)//'C_TO_SEED_ANN', & + units='gC/m^2', & + avgflag='I', & + long_name=get_repr_longname(k)//' C to seed harvested per calendar year; should only be output annually', & + ptr_patch=data1dptr, & + default='inactive') end do end if From af4a6889c36f9759a7637b0cd57050eed341a28a Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 25 Oct 2023 12:02:56 -0600 Subject: [PATCH 12/14] Added *C_TO_SEED_PERHARV hist fields. --- src/biogeochem/CNVegCarbonFluxType.F90 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/biogeochem/CNVegCarbonFluxType.F90 b/src/biogeochem/CNVegCarbonFluxType.F90 index d6f5375b5d..c7aa3469e2 100644 --- a/src/biogeochem/CNVegCarbonFluxType.F90 +++ b/src/biogeochem/CNVegCarbonFluxType.F90 @@ -981,6 +981,7 @@ subroutine InitHistory(this, bounds, carbon_type) ptr_patch=this%livestemc_to_biofuelc_patch) this%repr_grainc_to_seed_patch(begp:endp,:) = spval + this%repr_grainc_to_seed_perharv_patch(begp:endp,:,:) = spval this%repr_grainc_to_seed_thisyr_patch(begp:endp,:) = spval do k = repr_grain_min, repr_grain_max data1dptr => this%repr_grainc_to_seed_patch(:,k) @@ -991,6 +992,16 @@ subroutine InitHistory(this, bounds, carbon_type) avgflag='A', & long_name=get_repr_longname(k)//' C to seed', & ptr_patch=data1dptr) + data2dptr => this%repr_grainc_to_seed_perharv_patch(:,:,k) + call hist_addfld2d ( & + ! e.g., GRAINC_TO_SEED_PERHARV + fname=get_repr_hist_fname(k)//'C_TO_SEED_PERHARV', & + units='gC/m^2', & + type2d='mxharvests', & + avgflag='I', & + long_name=get_repr_longname(k)//' C to seed per harvest; should only be output annually', & + ptr_patch=data2dptr, & + default='inactive') data1dptr => this%repr_grainc_to_seed_thisyr_patch(:,k) call hist_addfld1d ( & ! e.g., GRAINC_TO_SEED_ANN From 1e2c520fe41e4f4f36d0c79d97b7168a14a1ea01 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 3 Nov 2023 07:48:18 -0600 Subject: [PATCH 13/14] Updated history_fields*.rst files. --- .../history_fields_fates.rst | 2 ++ .../history_fields_nofates.rst | 20 ++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst index 32f1a353d9..ec10de5080 100644 --- a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst +++ b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst @@ -739,6 +739,8 @@ FATES_NPLANT_SEC_PF fates_levpft total PFT-level number of i FATES_NPP_PF fates_levpft total PFT-level NPP in kg carbon per m2 land area per second kg m-2 s-1 T FATES_NPP_SE_PF fates_levpft total PFT-level NPP in kg carbon per m2 land area per second, secondary patches kg m-2 s-1 T FATES_RECRUITMENT_PF fates_levpft PFT-level recruitment rate in number of individuals per m2 land area per year m-2 yr-1 T +FATES_SEEDS_IN_GRIDCELL_PF fates_levpft Site-level seed mass input from neighboring gridcells per pft kg F +FATES_SEEDS_OUT_GRIDCELL_PF fates_levpft Site-level seed mass output to neighboring gridcells per pft kg F FATES_STOREC_PF fates_levpft total PFT-level stored biomass in kg carbon per m2 land area kg m-2 T FATES_VEGC_PF fates_levpft total PFT-level biomass in kg of carbon per land area kg m-2 T FATES_VEGC_SE_PF fates_levpft total PFT-level biomass in kg of carbon per land area, secondary patches kg m-2 T diff --git a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst index ee2548b6c5..b1ff4d70bd 100644 --- a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst +++ b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst @@ -4,9 +4,9 @@ CTSM History Fields (nofates) CAUTION: Not all variables are relevant / present for all CTSM cases. Key flags used in this CTSM case: -use_cn = T -use_crop = T -use_fates = F +use_cn = T +use_crop = T +use_fates = F =================================== ================ ============================================================================================== ================================================================= ======= CTSM History Fields @@ -359,10 +359,12 @@ GRAINC - grain C (does not equal yie GRAINC_TO_FOOD - grain C to food gC/m^2/s T GRAINC_TO_FOOD_ANN - grain C to food harvested per calendar year; should only be output annually gC/m^2 F GRAINC_TO_SEED - grain C to seed gC/m^2/s T +GRAINC_TO_SEED_ANN - grain C to seed harvested per calendar year; should only be output annually gC/m^2 F GRAINN - grain N gN/m^2 T -GRAINN_TO_FOOD - grain N to food gN/m^2/s F -GRAINN_TO_FOOD_ANN - grain N to food harvested per calendar year; should only be output annually gN/m^2 F -GRAINN_TO_SEED - grain N to seed gN/m^2/s F +GRAINN_TO_FOOD - grain N to food (not scientifically supported) gN/m^2/s F +GRAINN_TO_FOOD_ANN - grain N to food harvested per calendar year; should only be output annually (not scientificall gN/m^2 F +GRAINN_TO_SEED - grain N to seed (not scientifically supported) gN/m^2/s F +GRAINN_TO_SEED_ANN - grain N to seed harvested per calendar year; should only be output annually (not scientificall gN/m^2 F GRESP_STORAGE - growth respiration storage gC/m^2 F GRESP_STORAGE_TO_XFER - growth respiration shift storage to transfer gC/m^2/s F GRESP_XFER - growth respiration transfer gC/m^2 F @@ -1330,7 +1332,9 @@ W_SCALAR levsoi Moisture (dryness) inhibiti GDDACCUM_PERHARV mxharvests At-harvest accumulated growing degree days past planting date for crop; should only be output ddays F GDDHARV_PERHARV mxharvests Growing degree days (gdd) needed to harvest; should only be output annually ddays F GRAINC_TO_FOOD_PERHARV mxharvests grain C to food per harvest; should only be output annually gC/m^2 F -GRAINN_TO_FOOD_PERHARV mxharvests grain N to food per harvest; should only be output annually gN/m^2 F +GRAINC_TO_SEED_PERHARV mxharvests grain C to seed per harvest; should only be output annually gC/m^2 F +GRAINN_TO_FOOD_PERHARV mxharvests grain N to food per harvest; should only be output annually (not scientifically supported) gN/m^2 F +GRAINN_TO_SEED_PERHARV mxharvests grain N to seed per harvest; should only be output annually (not scientifically supported) gN/m^2 F HARVEST_REASON_PERHARV mxharvests Reason for each crop harvest; should only be output annually 1 = mature; 2 = max season length; 3 = incorrect Dec. 31 sowing; F HDATES mxharvests actual crop harvest dates; should only be output annually day of year F HUI_PERHARV mxharvests At-harvest accumulated heat unit index for crop; should only be output annually ddays F @@ -1339,6 +1343,8 @@ SOWING_REASON_PERHARV mxharvests Reason for sowing of each c SYEARS_PERHARV mxharvests actual sowing years for crops harvested this year; should only be output annually year F SDATES mxsowings actual crop sowing dates; should only be output annually day of year F SOWING_REASON mxsowings Reason for each crop sowing; should only be output annually unitless F +SWINDOW_ENDS mxsowings crop sowing window end dates; should only be output annually day of year F +SWINDOW_STARTS mxsowings crop sowing window start dates; should only be output annually day of year F ALBD numrad surface albedo (direct) proportion T ALBDSF numrad diagnostic snow-free surface albedo (direct) proportion T ALBGRD numrad ground albedo (direct) proportion F From 333c0d64ded98e8e0510f658fb60a9c893ae3a65 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 3 Nov 2023 07:57:28 -0600 Subject: [PATCH 14/14] Update ChangeLog and ChangeSum. --- doc/ChangeLog | 45 +++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 46 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 76286ce770..b3f1644af7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,49 @@ =============================================================== +Tag name: ctsm5.1.dev148 +Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) +Date: Fri Nov 3 07:56:43 MDT 2023 +One-line Summary: Add GRAINN outputs + +Purpose and description of changes +---------------------------------- + +In response to a user request for GRAINN_TO_FOOD outputs, this adds *_N_TO_FOOD(_ANN) and *_N_TO_SEED(_ANN) outputs for reproductive N pools. These are off by default, unlike their C counterparts. Note that the results are not scientifically supported, and tests have revealed unrealistic values. (Also adds GRAINC_TO_SEED_ANN output.) + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Testing summary: +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + cheyenne ---- OK (with some fieldlist diffs) + izumi ------- PASS (with some fieldlist diffs) + + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +* #2074 (https://github.com/ESCOMP/CTSM/pull/2074) + +=============================================================== +=============================================================== Tag name: ctsm5.1.dev147 Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) Date: Mon Oct 30 16:53:20 MDT 2023 diff --git a/doc/ChangeSum b/doc/ChangeSum index 5e4f816f64..40dc6a2b6a 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.1.dev148 samrabin 11/03/2023 Add GRAINN outputs ctsm5.1.dev147 samrabin 10/30/2023 Add sowing window input files ctsm5.1.dev146 glemieux 10/24/2023 FATES cross-grid seed dispersal ctsm5.1.dev145 slevis 10/19/2023 SNICAR snow albedo scheme updates