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

Add FATES land use change module to pass LUH2 data to FATES #2076

Merged
merged 39 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
732e822
Add fates luh2 land use module
glemieux Jun 14, 2023
f90a681
add fates luh2 namelist definition and defaults
glemieux Jun 14, 2023
6fe7eec
update build namelist logic for fates luh mode
glemieux Jun 20, 2023
5a5db12
change call for setting time
glemieux Jun 21, 2023
90b6050
correct bad copies
glemieux Jun 21, 2023
9ce4ed9
Merge tag 'ctsm5.1.dev133' into fates-luh2
glemieux Aug 14, 2023
cc5c4ae
Merge tag 'ctsm5.1.dev135' into fates-luh2
glemieux Aug 22, 2023
93a18c8
Merge tag 'ctsm5.1.dev138' into fates-luh2
glemieux Oct 9, 2023
0a4b2cb
Merge tag 'ctsm5.1.dev152' into fates-luh2
glemieux Nov 15, 2023
3bbbc53
update fates setup loging to use remove_leading_and_trailing_quotes f…
glemieux Nov 15, 2023
96b827c
add test to check for namelist build error conditions
glemieux Nov 15, 2023
f795147
define LUH acronym
glemieux Nov 15, 2023
042b7ef
remove erroneous comment in use_fates_luh namelist option
glemieux Nov 15, 2023
87b149f
add clarifying comments for the fates landuse timeseries module
glemieux Nov 15, 2023
b061816
trim filename strings in control mod diagnostic output
glemieux Nov 15, 2023
90a297e
Merge tag 'ctsm5.1.dev155' into fates-luh2
glemieux Nov 29, 2023
1f44adf
update fates parameter file name in defaults
glemieux Nov 30, 2023
fd7373d
remove obsolete disturbance variables from base fates testmod
glemieux Nov 30, 2023
97a93b7
add landuse site level variables to default fates testmod
glemieux Nov 30, 2023
c245592
remove obsolete disturbance variables from excluded output of fates_s…
glemieux Nov 30, 2023
8c0b078
add luh2 testmod
glemieux Nov 30, 2023
a0f8ff9
change location of luh2 fates data and make sure default is available
glemieux Dec 1, 2023
bb23a70
replace use statements from the fluh_timeseries default setting
glemieux Dec 1, 2023
e2716ca
add build subdirectory for fates landuse timeseries default file
glemieux Dec 1, 2023
ffac03f
add fates to the build tag subdirectory name
glemieux Dec 1, 2023
be78a0b
add resolution to the add_default call for the fates landuse timeseries
glemieux Dec 1, 2023
3def7e3
correct descriptions and diagnostic write
glemieux Dec 1, 2023
e8b0508
correct hlm group name in namelist definition
glemieux Dec 2, 2023
1a1ec94
remove wood product flux from fates carbon balance check
glemieux Dec 12, 2023
7c2ec40
Merge tag 'ctsm5.1.dev159' into fates-luh2
glemieux Dec 13, 2023
67426be
update externals with fates landuse tag
glemieux Dec 14, 2023
225f092
Update the default fates paramfile
glemieux Dec 15, 2023
809ef08
Pass surfpft bounds as input argumment
glemieux Dec 15, 2023
aa463cf
add fates luh2 test to derecho
glemieux Dec 18, 2023
8bd8bfe
update changelog
glemieux Dec 19, 2023
225a510
Change LUH2 test to f09 so there won't be a LUH2 timeseries file for it
ekluzek Dec 31, 2023
6747e8c
Only get a default luh timeseries file if you need one, and ask for o…
ekluzek Dec 31, 2023
4e059c7
LUH file should be for 1850-2000, and add a case for constant until i…
ekluzek Dec 31, 2023
ebc5cd8
Update change files
ekluzek Dec 31, 2023
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
2 changes: 1 addition & 1 deletion Externals_CLM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local_path = src/fates
protocol = git
repo_url = https://github.com/NGEET/fates
tag = sci.1.68.2_api.31.0.0
tag = sci.1.70.0_api.32.0.0
required = True

[externals_description]
Expand Down
21 changes: 17 additions & 4 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ sub setup_cmdl_fates_mode {
my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys",
"use_fates_cohort_age_tracking","use_fates_inventory_init","use_fates_fixed_biogeog",
"use_fates_nocomp","use_fates_sp","fates_inventory_ctrl_filename","use_fates_logging",
"fates_parteh_mode","use_fates_tree_damage","fates_seeddisp_cadence" );
"fates_parteh_mode","use_fates_tree_damage","fates_seeddisp_cadence","use_fates_luh","fluh_timeseries" );
# dis-allow fates specific namelist items with non-fates runs
foreach my $var ( @list ) {
if ( defined($nl->get_value($var)) ) {
Expand Down Expand Up @@ -4370,7 +4370,7 @@ sub setup_logic_fates {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fates_paramfile', 'phys'=>$nl_flags->{'phys'});
my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys",
"use_fates_inventory_init","use_fates_fixed_biogeog","use_fates_nocomp","fates_seeddisp_cadence",
"use_fates_logging","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage" );
"use_fates_logging","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage","use_fates_luh" );
foreach my $var ( @list ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'use_fates'=>$nl_flags->{'use_fates'},
'use_fates_sp'=>$nl_flags->{'use_fates_sp'} );
Expand Down Expand Up @@ -4398,21 +4398,34 @@ sub setup_logic_fates {
# spit-fire can't be on with FATES SP mode is active
if ( $nl->get_value('fates_spitfire_mode') > 0 ) {
$log->fatal_error('fates_spitfire_mode can NOT be set to greater than 0 when use_fates_sp is true');
}
}
}
}
my $var = "use_fates_inventory_init";
if ( defined($nl->get_value($var)) ) {
if ( &value_is_true($nl->get_value($var)) ) {
$var = "fates_inventory_ctrl_filename";
my $fname = substr $nl->get_value($var), 1, -1; # ignore first and last positions of string because those are quote characters
my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) );
if ( ! defined($nl->get_value($var)) ) {
$log->fatal_error("$var is required when use_fates_inventory_init is set" );
} elsif ( ! -f "$fname" ) {
$log->fatal_error("$fname does NOT point to a valid filename" );
}
}
}
my $var = "use_fates_luh";
if ( defined($nl->get_value($var)) ) {
if ( &value_is_true($nl->get_value($var)) ) {
$var = "fluh_timeseries";
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'phys'=>$nl_flags->{'phys'}, 'hgrid'=>$nl_flags->{'res'}, 'sim_year_range'=>$nl_flags->{'sim_year_range'}, nofail=>1 );
my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) );
if ( ! defined($nl->get_value($var)) ) {
$log->fatal_error("$var is required when use_fates_luh is set" );
ekluzek marked this conversation as resolved.
Show resolved Hide resolved
} elsif ( ! -f "$fname" ) {
$log->fatal_error("$fname does NOT point to a valid filename" );
}
}
}
}
}

Expand Down
12 changes: 11 additions & 1 deletion bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- FATES default parameter file -->
<!-- ================================================================== -->

<fates_paramfile>lnd/clm2/paramdata/fates_params_api.25.5.0_12pft_c230628.nc</fates_paramfile>
<fates_paramfile>lnd/clm2/paramdata/fates_params_api.32.0.0_12pft_c231215.nc</fates_paramfile>

<!-- ================================================================== -->
<!-- Default surface roughness parameterization -->
Expand Down Expand Up @@ -1572,6 +1572,15 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1
<flanduse_timeseries hgrid="10x15" sim_year_range="1850-2100" ssp_rcp="SSP5-3.4"
use_crop=".false." >lnd/clm2/surfdata_map/release-clm5.0.18/landuse.timeseries_10x15_SSP5-3.4_16pfts_Irrig_CMIP6_simyr1850-2100_c190228.nc</flanduse_timeseries>

<!-- Land Use Harmonization unified data sets for dynamic FATES land use change -->

<fluh_timeseries hgrid="4x5" sim_year_range="1850-2000" use_fates=".true."
>lnd/clm2/surfdata_map/fates-sci.1.68.3_api.31.0.0_tools.1.0.1/LUH2_states_transitions_management.timeseries_4x5_hist_simyr1850-2015_c231101.nc</fluh_timeseries>

<!-- This one is just for testing until Issue #2304 is resolved -->
<fluh_timeseries hgrid="4x5" sim_year_range="constant" use_fates=".true."
>lnd/clm2/surfdata_map/fates-sci.1.68.3_api.31.0.0_tools.1.0.1/LUH2_states_transitions_management.timeseries_4x5_hist_simyr1850-2015_c231101.nc</fluh_timeseries>

<!-- Fixation and Uptake of Nitrogen Model (FUN2.0) -->
<use_fun phys="clm5_1" use_cn=".true." use_nitrif_denitrif=".true.">.true.</use_fun>
<use_fun phys="clm5_0" use_cn=".true." use_nitrif_denitrif=".true.">.true.</use_fun>
Expand Down Expand Up @@ -2755,6 +2764,7 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1
<use_fates_logging use_fates=".true.">.false.</use_fates_logging>
<use_fates_inventory_init use_fates=".true.">.false.</use_fates_inventory_init>
<use_fates_sp use_fates=".true.">.false.</use_fates_sp>
<use_fates_luh use_fates=".true.">.false.</use_fates_luh>
<fates_parteh_mode use_fates=".true.">1</fates_parteh_mode>
<fates_seeddisp_cadence use_fates=".true.">0</fates_seeddisp_cadence>

Expand Down
16 changes: 16 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,22 @@ Full pathname to the inventory initialization control file.
(Only relevant if FATES is on).
</entry>

<!-- This may eventually migrate to the dynamic_subgrid group-->
<entry id="use_fates_luh" type="logical" category="physics"
group="clm_inparm" valid_values="" >
If TRUE, enable use of land use harmonization (LUH) state and transition data from luh_timeseries file.
(Also, only valid for use_fates = true and is incompatible with transient runs currently.)
</entry>

<!-- This could eventually be included in the "dynamic_subgrid" -->
<entry id="fluh_timeseries" type="char*256" category="datasets"
input_pathname="abs" group="clm_inparm" valid_values="" >
Full pathname of unified land use harmonization (LUH) data file. This causes the land-use
types to vary over time.
(Required, if use_fates_luh=T)
(Only relevant if FATES is on).
</entry>

<entry id="use_luna" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on the LUNA model, to effect Photosynthesis by leaf Nitrogen
Expand Down
10 changes: 10 additions & 0 deletions bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,16 @@ sub cat_and_create_namelistinfile {
GLC_TWO_WAY_COUPLING=>"FALSE",
phys=>"clm4_5",
},
"useinventorybutnotfile" =>{ options=>"--res 0.9x1.25 --bgc fates --envxml_dir . --no-megan",
namelst=>"use_fates_luh=.true.",
GLC_TWO_WAY_COUPLING=>"FALSE",
phys=>"clm4_5",
},
"inventoryfileDNE" =>{ options=>"-bgc fates -envxml_dir . -no-megan",
namelst=>"use_fates_luh=.true., fluh_timeseries='zztop'",
GLC_TWO_WAY_COUPLING=>"FALSE",
phys=>"clm4_5",
},
"useMEGANwithFATES" =>{ options=>"-bgc fates -envxml_dir . -megan",
namelst=>"",
GLC_TWO_WAY_COUPLING=>"FALSE",
Expand Down
10 changes: 10 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2900,6 +2900,16 @@
<option name="wallclock">00:40:00</option>
</options>
</test>
<test name="ERS_D_Ld30" grid="f45_f45_mg37" compset="I2000Clm50FatesCruRsGs" testmods="clm/FatesColdLUH2">
<machines>
<machine name="cheyenne" compiler="intel" category="fates"/>
<machine name="derecho" compiler="intel" category="fates"/>
<machine name="izumi" compiler="nag" category="fates"/>
</machines>
<options>
<option name="wallclock">00:40:00</option>
</options>
</test>
<test name="ERS_D_Ld3" grid="f19_g17" compset="I2000Clm50FatesCruRsGs" testmods="clm/FatesCold">
<machines>
<machine name="cheyenne" compiler="intel" category="fates"/>
Expand Down
7 changes: 3 additions & 4 deletions cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC',
'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND',
'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_DISTURBANCE_RATE_P2P', 'FATES_DISTURBANCE_RATE_P2S',
'FATES_DISTURBANCE_RATE_S2S', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_HARVEST_CARBON_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_DISTURBANCE_RATE_LOGGING', 'FATES_DISTURBANCE_RATE_TREEFALL',
'FATES_DISTURBANCE_RATE_POTENTIAL', 'FATES_HARVEST_CARBON_FLUX',
'FATES_STOMATAL_COND', 'FATES_LBLAYER_COND', 'FATES_NPP', 'FATES_GPP',
'FATES_AUTORESP', 'FATES_GROWTH_RESP', 'FATES_MAINT_RESP', 'FATES_GPP_CANOPY',
'FATES_AUTORESP_CANOPY', 'FATES_GPP_USTORY', 'FATES_AUTORESP_USTORY',
Expand All @@ -28,4 +26,5 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_NEP', 'FATES_HET_RESP', 'FATES_FIRE_CLOSS', 'FATES_FIRE_FLUX_EL',
'FATES_CBALANCE_ERROR', 'FATES_ERROR_EL', 'FATES_LEAF_ALLOC',
'FATES_SEED_ALLOC', 'FATES_STEM_ALLOC', 'FATES_FROOT_ALLOC',
'FATES_CROOT_ALLOC', 'FATES_STORE_ALLOC'
'FATES_CROOT_ALLOC', 'FATES_STORE_ALLOC',
'FATES_PATCHAREA_LU', 'FATES_DISTURBANCE_RATE_MATRIX_LULU'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../FatesCold
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use_fates_luh = .true.
3 changes: 1 addition & 2 deletions cime_config/usermods_dirs/fates_sp/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ hist_fexcl1 = 'FATES_TRIMMING', 'FATES_COLD_STATUS', 'FATES_GDD', 'FATES_NCHILLD
'FATES_SEEDS_IN_EXTERN_EL', 'FATES_SEED_GERM_EL', 'FATES_SEED_DECAY_EL', 'FATES_STOREC', 'FATES_VEGC',
'FATES_SAPWOODC', 'FATES_FROOTC', 'FATES_REPROC', 'FATES_STRUCTC', 'FATES_NONSTRUCTC',
'FATES_VEGC_ABOVEGROUND', 'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_DISTURBANCE_RATE_P2P', 'FATES_DISTURBANCE_RATE_P2S', 'FATES_DISTURBANCE_RATE_S2S',
'FATES_DISTURBANCE_RATE_FIRE', 'FATES_DISTURBANCE_RATE_LOGGING', 'FATES_DISTURBANCE_RATE_TREEFALL',
'FATES_DISTURBANCE_RATE_POTENTIAL', 'FATES_HARVEST_CARBON_FLUX', 'FATES_GPP_CANOPY', 'FATES_AUTORESP_CANOPY',
'FATES_HARVEST_CARBON_FLUX', 'FATES_GPP_CANOPY', 'FATES_AUTORESP_CANOPY',
'FATES_GPP_USTORY', 'FATES_AUTORESP_USTORY', 'FATES_CROWNAREA_CL', 'FATES_DEMOTION_CARBONFLUX',
'FATES_PROMOTION_CARBONFLUX', 'FATES_MORTALITY_CFLUX_CANOPY', 'FATES_MORTALITY_CFLUX_USTORY',
'FATES_DDBH_CANOPY_SZ', 'FATES_DDBH_USTORY_SZ', 'FATES_BASALAREA_SZ',
Expand Down
4 changes: 2 additions & 2 deletions doc/.ChangeLog_template
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Does this tag change answers significantly for any of the following physics conf
[ ] clm4_5


Bugs fixed or introduced
------------------------
Bugs fixed
----------
[Remove any lines that don't apply. Remove entire section if nothing applies.]

CTSM issues fixed (include CTSM Issue #):
Expand Down
100 changes: 100 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,104 @@
===============================================================
Tag name: ctsm5.1.dev160
Originator(s): glemieux (Gregory Lemieux, LBNL, [email protected])
Date: Sat 30 Dec 2023 11:23:47 PM MST
One-line Summary: FATES landuse version 1

Purpose and description of changes
----------------------------------

This tag enables FATES to utilize the state and transitions data
from the Land Use Harmonization (https://luh.umd.edu/) data sets.
This data has been preprocessed using tooling provided by FATES via
a separate pull request (FATES#1032). A new module has been added
to the dyn_subgrid directory that largely adapts the dynHarvest
module to import and read this minimially processed data, which is
data is passed to fates.


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.)

[Put an [X] in the box for any configuration with significant answer changes.]

[ ] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed
----------
CTSM issues fixed (include CTSM Issue #):
#1077 -- Read in full LUH2 dataset for use by FATES
#2283 -- fates wood product flux not being correctly reported during CBalanceCheck endrun diagnostic output

Notes of particular relevance for users
---------------------------------------
Changes made to namelist defaults (e.g., changed parameter values):
New namelist item: fluh_timeseries and use_fates_luh

Notes of particular relevance for developers:
---------------------------------------------
Changes to tests or testing:
FATES landuse testmod, FatesColdLUH2, added

IMPORTANT NOTE ON BASELINES:
FATES baseline tests have a change in namelists because the fluh_timeseries file is listed in the baselines
but was removed in a last minute change. Compare to baseline other than that change are exact though.

Testing summary:
----------------

[PASS means all tests PASS; OK means tests PASS other than expected fails.]

build-namelist tests (if CLMBuildNamelist.pm has changed):

derecho - PASS (66 FATES tests differ because of new fates param file)

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- PASS

fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates-<FATES TAG>-<CTSM TAG>)
derecho ----- OK
izumi ------- OK


Answer changes
--------------

Changes answers relative to baseline: yes, for FATES only

Summarize any changes to answers, i.e.,
- what code configurations: FATES
- what platforms/compilers: ALL
- nature of change (roundoff; larger than roundoff/same climate; new climate): larger than roundoff

The fates tag update incorporates bug fixes and hydraulic mortality fixes, as well as the
restructured disturbance code necessary to accomodate the new landuse transitions capability.
As such, small differences were observed in testmods that engaged specific disturbance modes
or were long enough to trigger other default disturbances (e.g. fire)

Other details
-------------

List any externals directories updated (cime, rtm, mosart, cism, fates, etc.):
fates: sci.1.69.0_api.31.0.0 -> fates-sci.1.70.0_api.32.0.0

Pull Requests that document the changes (include PR ids):
https://github.com/ESCOMP/ctsm/pull/2076
https://github.com/NGEET/fates/pull/1040

===============================================================
===============================================================
Tag name: ctsm5.1.dev159
Originator(s): multiple (slevis (Sam Levis), afoster (Adrianna Foster), erik (Erik Kluzek), wwieder (Will Wieder), glemieux (Greg Lemieux), oleson (Keith Oleson), sacks (Bill Sacks), samrabin (Sam Rabin), santos (Sean Patrick Santos))
Date: Tue 12 Dec 2023 11:10:26 AM MST
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.1.dev160 glemieux 12/30/2023 FATES landuse version 1
ctsm5.1.dev159 multiple 12/12/2023 Various BFB fixes and updates
ctsm5.1.dev158 erik 12/07/2023 First tag with testing moved to Derecho and working PE-layouts for Derecho
ctsm5.1.dev157 samrabin 12/05/2023 Update Externals to work on Derecho
Expand Down
8 changes: 1 addition & 7 deletions src/biogeochem/CNBalanceCheckMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ subroutine CBalanceCheck(this, bounds, num_soilc, filter_soilc, &
real(r8) :: hrv_xsmrpool_amount_left_to_dribble(bounds%begg:bounds%endg)
real(r8) :: gru_conv_cflux_amount_left_to_dribble(bounds%begg:bounds%endg)
real(r8) :: dwt_conv_cflux_amount_left_to_dribble(bounds%begg:bounds%endg)
real(r8) :: fates_woodproduct_flux ! Total carbon wood products flux from FATES to CLM [gC/m2/s]

!-----------------------------------------------------------------------

Expand Down Expand Up @@ -309,11 +308,7 @@ subroutine CBalanceCheck(this, bounds, num_soilc, filter_soilc, &

s = clm_fates%f2hmap(ic)%hsites(c)


fates_woodproduct_flux = clm_fates%fates(ic)%bc_out(s)%hrv_deadstemc_to_prod10c + &
clm_fates%fates(ic)%bc_out(s)%hrv_deadstemc_to_prod100c

col_cinputs = fates_litter_flux(c) + fates_woodproduct_flux
col_cinputs = fates_litter_flux(c)

! calculate total column-level outputs
! fates has already exported burn losses and fluxes to the atm
Expand Down Expand Up @@ -372,7 +367,6 @@ subroutine CBalanceCheck(this, bounds, num_soilc, filter_soilc, &
write(iulog,*)'--- Inputs ---'
if( col%is_fates(c) ) then
write(iulog,*)'fates litter_flux = ',fates_litter_flux(c)*dt
write(iulog,*)'fates wood product flux = ',fates_woodproduct_flux*dt
else
write(iulog,*)'gpp = ',gpp(c)*dt
end if
Expand Down
Loading
Loading