diff --git a/.gitmodules b/.gitmodules
index c6b16d384f..dcf9de5638 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -27,8 +27,8 @@
#
[submodule "fates"]
path = src/fates
-url = https://github.com/NGEET/fates
-fxtag = sci.1.78.3_api.36.1.0
+url = https://github.com/NorESMhub/fates
+fxtag = sci.1.78.3_api.36.1.0_noresm_v1
fxrequired = AlwaysRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NCAR/fates-release
diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm
index cfdb4e9278..6362b5c643 100755
--- a/bld/CLMBuildNamelist.pm
+++ b/bld/CLMBuildNamelist.pm
@@ -978,7 +978,7 @@ sub setup_cmdl_bgc {
# Set soil matrix (which is needed later for spinup)
$var = "use_soil_matrixcn";
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var,
- , 'use_fates'=>$nl_flags->{'use_fates'},
+ , 'use_fates'=>$nl_flags->{'use_fates'},
, 'soil_decomp_method'=>$nl_flags->{'soil_decomp_method'},
, 'phys'=>$nl_flags->{'phys'}, clm_accelerated_spinup=>$nl_flags->{'clm_accelerated_spinup'} );
if ( &value_is_true($nl->get_value($var)) ) {
@@ -1214,7 +1214,7 @@ sub setup_cmdl_spinup {
if ( &value_is_true($nl_flags->{'use_cn'}) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition,
$defaults, $nl, "spinup_state", clm_accelerated_spinup=>$nl_flags->{'clm_accelerated_spinup'},
- use_cn=>$nl_flags->{'use_cn'}, use_fates=>$nl_flags->{'use_fates'},
+ use_cn=>$nl_flags->{'use_cn'}, use_fates=>$nl_flags->{'use_fates'},
use_soil_matrixcn=>$nl_flags->{"use_soil_matrixcn"} );
if ( $nl->get_value("spinup_state") ne 0 ) {
$nl_flags->{'bgc_spinup'} = "on";
@@ -4148,12 +4148,8 @@ sub setup_logic_megan {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'megan_factors_file');
}
if ( defined($nl->get_value('megan_specifier')) ||
- defined($nl->get_value('megan_factors_file')) ) {
+ defined($nl->get_value('megan_factors_file')) ) {
check_megan_spec( $opts, $nl, $definition );
- if ( &value_is_true( $nl_flags->{'use_fates'} ) ) {
- $log->warning("MEGAN can NOT be on when FATES is also on.\n" .
- " Use the '-no-megan' option when '-bgc fates' is activated");
- }
}
}
@@ -4966,7 +4962,7 @@ sub setup_logic_exice {
# excess ice streams, must be set before initial conditions
#
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;
- add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice', 'phys'=>$physv->as_string());
+ add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice', 'phys'=>$physv->as_string());
my $use_exice = $nl->get_value( 'use_excess_ice' );
# Put use_exice into nl_flags so can be referenced later
if ( value_is_true($use_exice) ) {
diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml
index 54d3afd5c1..fe0817fd6a 100644
--- a/bld/namelist_files/namelist_defaults_ctsm.xml
+++ b/bld/namelist_files/namelist_defaults_ctsm.xml
@@ -553,8 +553,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
-lnd/clm2/paramdata/fates_params_api.36.1.0_14pft_c241003.nc
-
+
+lnd/clm2/paramdata/fates_params_api.36.1.0_14pft_c241003_megan.nc
@@ -1908,10 +1908,10 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2
lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240908.nc
-lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240908.nc
-lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_360x720cru_SSP2-4.5_1850-2100_78pfts_c240908.nc
-Specifies CTSM physics
+Specifies CTSM physics
"""
@@ -105,11 +105,6 @@ def buildnml(case, caseroot, compname):
"clm5_0_QIAN": "clm5_0_GSWP3v1",
"clm5_0_NLDAS2": "clm5_0_GSWP3v1",
"clm5_0_ERA5": "clm5_0_GSWP3v1",
- "clm5_1_1PT": "clm5_1_GSWP3v1",
- "clm5_1_QIAN": "clm5_1_GSWP3v1",
- "clm5_1_NLDAS2": "clm5_1_GSWP3v1",
- "clm5_1_ERA5": "clm5_1_GSWP3v1",
- "clm5_1_CRUv7": "clm5_1_GSWP3v1",
"clm6_0_1PT": "clm6_0_GSWP3v1",
"clm6_0_QIAN": "clm6_0_GSWP3v1",
"clm6_0_NLDAS2": "clm6_0_GSWP3v1",
@@ -136,13 +131,9 @@ def buildnml(case, caseroot, compname):
# to the CAM version)
tuning_based_on = {
"clm6_0_GSWP3v1": "clm5_0_GSWP3v1",
- "clm5_1_GSWP3v1": "clm5_0_GSWP3v1",
"clm6_0_cam6.0": "clm5_0_cam6.0",
"clm6_0_cam5.0": "clm5_0_cam6.0",
"clm6_0_cam4.0": "clm5_0_cam6.0",
- "clm5_1_cam6.0": "clm5_0_cam6.0",
- "clm5_1_cam5.0": "clm5_0_cam6.0",
- "clm5_1_cam4.0": "clm5_0_cam6.0",
"clm5_0_cam5.0": "clm5_0_cam6.0",
"clm5_0_cam4.0": "clm5_0_cam6.0",
"clm4_5_cam6.0": "clm5_0_cam6.0",
diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml
index 2a568eb7dc..2506b8954a 100644
--- a/cime_config/config_component.xml
+++ b/cime_config/config_component.xml
@@ -15,7 +15,6 @@
clm4.5:
clm5.0:
- clm5.1:
clm6.0:
Satellite phenology:
@@ -79,7 +78,7 @@
UNSET
- clm5_0_cam6.0,clm5_0_cam7.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_GSWP3v1,clm5_0_CRUv7,clm5_0_QIAN,clm5_0_1PT,clm5_0_NLDAS2,clm5_0_ERA5,clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_QIAN,clm4_5_cam6.0,clm4_5_cam7.0,clm4_5_cam5.0,clm4_5_cam4.0,clm4_5_1PT,clm4_5_NLDAS2,clm4_5_ERA5,clm5_1_CRUv7,clm5_1_GSWP3v1,clm5_1_cam6.0,clm5_1_QIAN,clm5_1_1PT,clm5_1_NLDAS2,clm5_1_ERA5,clm6_0_CRUv7,clm6_0_GSWP3v1,clm6_0_cam6.0,clm6_0_cam7.0,clm6_0_cam5.0,clm6_0_cam4.0,clm6_0_QIAN,clm6_0_1PT,clm6_0_NLDAS2,clm6_0_ERA5
+ clm5_0_cam6.0,clm5_0_cam7.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_GSWP3v1,clm5_0_CRUv7,clm5_0_QIAN,clm5_0_1PT,clm5_0_NLDAS2,clm5_0_ERA5,clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_QIAN,clm4_5_cam6.0,clm4_5_cam7.0,clm4_5_cam5.0,clm4_5_cam4.0,clm4_5_1PT,clm4_5_NLDAS2,clm4_5_ERA5,clm6_0_CRUv7,clm6_0_GSWP3v1,clm6_0_cam6.0,clm6_0_cam7.0,clm6_0_cam5.0,clm6_0_cam4.0,clm6_0_QIAN,clm6_0_1PT,clm6_0_NLDAS2,clm6_0_ERA5
@@ -114,14 +113,6 @@
clm5_0_1PT
clm5_0_NLDAS2
clm5_0_ERA5
-
- clm5_1_GSWP3v1
- INVALID_USE_CLM60_NOT_CLM51
- clm5_1_cam4.0
- clm5_1_cam5.0
- clm5_1_cam6.0
- INVALID_USE_CLM60_NOT_CLM51_FOR_CAM70
- INVALID_USE_CLM60_NOT_CLM51_FOR_CPLHIST
clm6_0_CRUv7
clm6_0_CRUv7
@@ -148,7 +139,7 @@
char
- clm4_5,clm5_0,clm5_1,clm6_0
+ clm4_5,clm5_0,clm6_0
run_component_cpl
env_run.xml
If CTSM will set the dust settings in drv_flds_in (TRUE), or if ATM (i.e. CAM) will - DO NOT EDIT (set by compset name)
@@ -256,9 +244,9 @@
-bgc sp
-bgc bgc
-bgc bgc -crop
- -bgc fates -no-megan
- -bgc fates -no-megan
- -bgc fates -no-megan
+ -bgc fates -nomeg
+ -bgc fates
+ -bgc fates
-bgc bgc -dynamic_vegetation
@@ -367,12 +355,10 @@
- $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/fates_sp
- $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/fates_sp
- $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_deck
- $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/fates_sp
- $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/fates_nocomp
- $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_nociso_deck
+ $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/fates_sp
+ $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/fates_nocomp
+ $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_deck
+ $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_nociso_deck
$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_deck
$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_nociso_deck
$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_deck
diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml
index e5d716384a..8ab6254029 100644
--- a/cime_config/config_compsets.xml
+++ b/cime_config/config_compsets.xml
@@ -14,7 +14,7 @@
Where for the CAM specific compsets below the following is supported
TIME = Time period (e.g. 2000, HIST, SSP585...)
ATM = [CAM40, CAM50, CAM60]
- LND = [CLM45, CLM50, CLM51, CLM60, SLND]
+ LND = [CLM45, CLM50, CLM60, SLND]
ICE = [CICE, DICE, SICE]
OCN = [DOCN, ,AQUAP, SOCN]
ROF = [RTM, SROF]
@@ -344,12 +344,6 @@
-
-
- IHistClm51Sp
- HIST_DATM%GSWP3v1_CLM51%SP_SICE_SOCN_MOSART_SGLC_SWAV
-
-
IHistClm60SpRs
HIST_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV
@@ -407,7 +401,7 @@
HIST_DATM%QIA_CLM60%BGC_SICE_SOCN_SROF_SGLC_SWAV
-
@@ -610,7 +604,7 @@
2000_DATM%CRUv7_CLM45%SP-VIC_SICE_SOCN_RTM_SGLC_SWAV
-
@@ -660,12 +654,6 @@
-
-
- I1850Clm51BgcCropG
- 1850_DATM%GSWP3v1_CLM51%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV
-
-
diff --git a/cime_config/config_pes.xml b/cime_config/config_pes.xml
index 01b25ab7c0..17e2947d7f 100644
--- a/cime_config/config_pes.xml
+++ b/cime_config/config_pes.xml
@@ -7,34 +7,34 @@
none
- -1
- -1
- -1
- -1
- -1
- -1
- -1
- -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
@@ -44,34 +44,34 @@
none
- -1
- -9
- -9
- -9
- -9
- -9
- -9
- -9
+ -1
+ -9
+ -9
+ -9
+ -9
+ -9
+ -9
+ -9
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
- 0
- -1
- -1
- -1
- -1
- -1
- -1
- -1
+ 0
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
@@ -91,24 +91,24 @@
-4
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
- 0
- -1
- -1
- -1
- -1
- -1
-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1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
- 0
- -2
- -2
- -2
- -2
- -2
- -2
- -2
+ 0
+ -2
+ -2
+ -2
+ -2
+ -2
+ -2
+ -2
@@ -2126,35 +2126,35 @@
none
- -1
- -1
- -1
- -1
- -1
- -1
- -1
- -1
- -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml
index f9d45ab17b..db00b605b6 100644
--- a/cime_config/testdefs/testlist_clm.xml
+++ b/cime_config/testdefs/testlist_clm.xml
@@ -14,6 +14,7 @@
matrixcn: Tests exercising the matrix-CN capability
-->
+
@@ -123,14 +124,12 @@
-
-
+
-
@@ -198,7 +197,7 @@
-
+
@@ -751,7 +750,7 @@
-
+
@@ -865,7 +864,7 @@
-
+
@@ -904,7 +903,7 @@
-
+
@@ -914,7 +913,7 @@
-
+
@@ -970,15 +969,13 @@
-
-
+
-
-
+
@@ -1447,7 +1444,7 @@
-
+
@@ -1457,7 +1454,7 @@
-
+
@@ -1465,10 +1462,10 @@
-
+
-
+
@@ -1476,7 +1473,7 @@
-
+
@@ -1487,7 +1484,7 @@
-
+
@@ -1528,13 +1525,13 @@
-
+
-
+
@@ -1564,7 +1561,7 @@
-
+
@@ -1574,7 +1571,7 @@
-
+
@@ -1612,7 +1609,7 @@
-
+
@@ -1710,7 +1707,7 @@
-
+
@@ -1738,7 +1735,7 @@
-
+
@@ -1747,7 +1744,7 @@
-
+
@@ -1939,7 +1936,7 @@
-
+
@@ -1949,7 +1946,7 @@
-
+
@@ -1957,7 +1954,7 @@
-
+
@@ -2031,7 +2028,6 @@
-
@@ -2069,23 +2065,65 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2098,18 +2136,29 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -2118,32 +2167,35 @@
-
+
+
-
+
+
-
+
+
@@ -2361,7 +2413,7 @@
-
+
@@ -2427,7 +2479,7 @@
-
+
@@ -2436,7 +2488,7 @@
-
+
@@ -2580,7 +2632,7 @@
-
+
@@ -2589,7 +2641,7 @@
-
+
@@ -2680,7 +2732,7 @@
-
+
@@ -2689,7 +2741,7 @@
-
+
@@ -2700,7 +2752,6 @@
-
@@ -2730,7 +2781,6 @@
-
@@ -2757,21 +2807,22 @@
-
+
+
-
+
-
+
@@ -3740,5 +3791,253 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cime_config/testdefs/testmods_dirs/clm/Fates/shell_commands b/cime_config/testdefs/testmods_dirs/clm/Fates/shell_commands
index 41a2342a51..5c06a9b93d 100644
--- a/cime_config/testdefs/testmods_dirs/clm/Fates/shell_commands
+++ b/cime_config/testdefs/testmods_dirs/clm/Fates/shell_commands
@@ -1,2 +1 @@
-./xmlchange CLM_BLDNML_OPTS="-no-megan" --append
./xmlchange BFBFLAG="TRUE"
diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/shell_commands
index 20db712f77..2b9889d32e 100644
--- a/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/shell_commands
+++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/shell_commands
@@ -1,3 +1,2 @@
-./xmlchange CLM_BLDNML_OPTS="-no-megan" --append
./xmlchange BFBFLAG="TRUE"
./xmlchange CLM_FORCE_COLDSTART="on"
\ No newline at end of file
diff --git a/src/biogeochem/MEGANFactorsMod.F90 b/src/biogeochem/MEGANFactorsMod.F90
index 661bfbdde2..1f5caedbe6 100644
--- a/src/biogeochem/MEGANFactorsMod.F90
+++ b/src/biogeochem/MEGANFactorsMod.F90
@@ -58,9 +58,9 @@ subroutine megan_factors_get( comp_name, factors, class_n, molecwght )
!
! !ARGUMENTS:
character(len=*),intent(in) :: comp_name ! MEGAN compound name
- real(r8), intent(out) :: factors(npfts) ! vegitation type factors for the compound of intrest
- integer, intent(out) :: class_n ! MEGAN class number for the compound of intrest
- real(r8), intent(out) :: molecwght ! molecular weight of the compound of intrest
+ real(r8), intent(out) :: factors(npfts) ! vegetation type factors for the compound of interest
+ integer, intent(out) :: class_n ! MEGAN class number for the compound of interest
+ real(r8), intent(out) :: molecwght ! molecular weight of the compound of interest
!
! LOCAL VARS:
integer :: hashkey, ndx
diff --git a/src/biogeochem/VOCEmissionMod.F90 b/src/biogeochem/VOCEmissionMod.F90
index 400b6d5561..74afda8980 100644
--- a/src/biogeochem/VOCEmissionMod.F90
+++ b/src/biogeochem/VOCEmissionMod.F90
@@ -416,6 +416,7 @@ subroutine VOCEmission (bounds, num_soilp, filter_soilp, &
!
! !USES:
use subgridAveMod , only : p2g
+ use clm_varctl , only : use_fates
!
! !ARGUMENTS:
type(bounds_type) , intent(in) :: bounds
@@ -451,6 +452,7 @@ subroutine VOCEmission (bounds, num_soilp, filter_soilp, &
real(r8) :: par240_sha ! temporary
integer :: class_num, n_meg_comps, imech, imeg, ii
+ integer :: patchpft ! to transfer FATES PFT space into CLM PFT space.
character(len=16) :: mech_name
type(shr_megan_megcomp_t), pointer :: meg_cmp
real(r8) :: cp, alpha, Eopt, topt ! for history output
@@ -497,7 +499,7 @@ subroutine VOCEmission (bounds, num_soilp, filter_soilp, &
fsun240 => canopystate_inst%fsun240_patch , & ! Input: [real(r8) (:) ] sunlit fraction of canopy last 240 hrs
elai => canopystate_inst%elai_patch , & ! Input: [real(r8) (:) ] one-sided leaf area index with burying by snow
elai240 => canopystate_inst%elai240_patch , & ! Input: [real(r8) (:) ] one-sided leaf area index with burying by snow last 240 hrs
-
+ ci_fates => canopystate_inst%ci_patch , & !Input: [real(r8) (:) ] FATES-calculated internalleaf ci
cisun_z => photosyns_inst%cisun_z_patch , & ! Input: [real(r8) (:,:) ] sunlit intracellular CO2 (Pa)
cisha_z => photosyns_inst%cisha_z_patch , & ! Input: [real(r8) (:,:) ] shaded intracellular CO2 (Pa)
@@ -581,33 +583,45 @@ subroutine VOCEmission (bounds, num_soilp, filter_soilp, &
! set emis factor
! if specified, set EF for isoprene with mapped values
+ if(use_fates)then
+ patchpft = canopystate_inst%voc_pftindex_patch(p)
+ else
+ patchpft = patch%itype(p)
+ endif
+
if ( trim(meg_cmp%name) == 'isoprene' .and. shr_megan_mapped_emisfctrs) then
- epsilon = get_map_EF(patch%itype(p),g, vocemis_inst)
+ epsilon = get_map_EF(patchpft,g, vocemis_inst)
else
- epsilon = meg_cmp%emis_factors(patch%itype(p))
+ epsilon = meg_cmp%emis_factors(patchpft)
end if
+
class_num = meg_cmp%class_number
! Activity factor for PPFD
gamma_p = get_gamma_P(par_sun, par24_sun, par240_sun, par_sha, par24_sha, par240_sha, &
fsun(p), fsun240(p), forc_solad240(p),forc_solai240(p), LDF(class_num), cp, alpha)
-
+
! Activity factor for T
gamma_t = get_gamma_T(t_veg240(p), t_veg24(p),t_veg(p), ct1(class_num), ct2(class_num),&
- betaT(class_num),LDF(class_num), Ceo(class_num), Eopt, topt, patch%itype(p))
+ betaT(class_num),LDF(class_num), Ceo(class_num), Eopt, topt, patchpft)
! Activity factor for Leaf Age
- gamma_a = get_gamma_A(patch%itype(p), elai240(p),elai(p),class_num)
+ gamma_a = get_gamma_A(patchpft, elai240(p),elai(p),class_num)
! Activity factor for CO2 (only for isoprene)
if (trim(meg_cmp%name) == 'isoprene') then
co2_ppmv = 1.e6_r8*forc_pco2(g)/forc_pbot(c)
- gamma_c = get_gamma_C(cisun_z(p,1),cisha_z(p,1),forc_pbot(c),fsun(p), co2_ppmv)
+ if(use_fates)then
+ gamma_c = get_gamma_C(ci_fates(p),ci_fates(p),forc_pbot(c),fsun(p), co2_ppmv)
+ else
+ gamma_c = get_gamma_C(cisun_z(p,1),cisha_z(p,1),forc_pbot(c),fsun(p), co2_ppmv)
+ endif
+
else
gamma_c = 1._r8
end if
-
+
! Calculate total scaling factor
gamma = gamma_l * gamma_sm * gamma_a * gamma_p * gamma_T * gamma_c
@@ -618,7 +632,6 @@ subroutine VOCEmission (bounds, num_soilp, filter_soilp, &
! assign to arrays for history file output (not weighted by landfrac)
meg_out(imeg)%flux_out(p) = meg_out(imeg)%flux_out(p) &
+ epsilon * gamma * megemis_units_factor*1.e-3_r8 ! Kg/m2/sec
-
if (imeg==1) then
!
gamma_out(p)=gamma
@@ -692,7 +705,6 @@ function get_map_EF(ivt_in, g_in, vocemis_inst)
! vocemis_inst%efisop_patch ! Output: [real(r8) (:,:)] emission factors for isoprene for each patch [ug m-2 h-1]
get_map_EF = 0._r8
-
if ( ivt_in == ndllf_evr_tmp_tree &
.or. ivt_in == ndllf_evr_brl_tree) then !fineleaf evergreen
get_map_EF = vocemis_inst%efisop_grc(2,g_in)
@@ -710,7 +722,7 @@ function get_map_EF(ivt_in, g_in, vocemis_inst)
else if (ivt_in >= nc3crop) then !crops
get_map_EF = vocemis_inst%efisop_grc(6,g_in)
end if
-
+
end function get_map_EF
!-----------------------------------------------------------------------
diff --git a/src/biogeophys/CanopyStateType.F90 b/src/biogeophys/CanopyStateType.F90
index 4bfc08fc80..f4cf3f17d2 100644
--- a/src/biogeophys/CanopyStateType.F90
+++ b/src/biogeophys/CanopyStateType.F90
@@ -46,12 +46,14 @@ module CanopyStateType
real(r8) , pointer :: hbot_patch (:) ! patch canopy bottom (m)
real(r8) , pointer :: z0m_patch (:) ! patch momentum roughness length (m)
real(r8) , pointer :: displa_patch (:) ! patch displacement height (m)
+ real(r8) , pointer :: ci_patch (:) ! Internal leaf CO2 concentration for MEGAN
real(r8) , pointer :: fsun_patch (:) ! patch sunlit fraction of canopy
real(r8) , pointer :: fsun24_patch (:) ! patch 24hr average of sunlit fraction of canopy
real(r8) , pointer :: fsun240_patch (:) ! patch 240hr average of sunlit fraction of canopy
real(r8) , pointer :: dleaf_patch (:) ! patch characteristic leaf width (diameter) [m]
- ! for non-ED/FATES this is the same as pftcon%dleaf()
+ ! for non-ED/FATES this is the same as pftcon%dleaf()
+ integer , pointer :: voc_pftindex_patch (:) ! FATES specific MEGAN pft index.
real(r8) , pointer :: rscanopy_patch (:) ! patch canopy stomatal resistance (s/m) (ED specific)
real(r8) , pointer :: vegwp_patch (:,:) ! patch vegetation water matric potential (mm)
@@ -139,11 +141,13 @@ subroutine InitAllocate(this, bounds)
allocate(this%hbot_patch (begp:endp)) ; this%hbot_patch (:) = nan
allocate(this%z0m_patch (begp:endp)) ; this%z0m_patch (:) = nan
allocate(this%displa_patch (begp:endp)) ; this%displa_patch (:) = nan
+ allocate(this%ci_patch (begp:endp)) ; this%ci_patch (:) = nan
allocate(this%fsun_patch (begp:endp)) ; this%fsun_patch (:) = nan
allocate(this%fsun24_patch (begp:endp)) ; this%fsun24_patch (:) = nan
allocate(this%fsun240_patch (begp:endp)) ; this%fsun240_patch (:) = nan
allocate(this%dleaf_patch (begp:endp)) ; this%dleaf_patch (:) = nan
+ allocate(this%voc_pftindex_patch (begp:endp)) ; this%voc_pftindex_patch (:) = 0
allocate(this%rscanopy_patch (begp:endp)) ; this%rscanopy_patch (:) = nan
! allocate(this%gccanopy_patch (begp:endp)) ; this%gccanopy_patch (:) = 0.0_r8
allocate(this%vegwp_patch (begp:endp,1:nvegwcs)) ; this%vegwp_patch (:,:) = nan
diff --git a/src/fates b/src/fates
index 825579d0b4..f2ea09eaee 160000
--- a/src/fates
+++ b/src/fates
@@ -1 +1 @@
-Subproject commit 825579d0b406fe99344591b5ed8356e5c7aeebec
+Subproject commit f2ea09eaee1a028d9d72007a37774892ad1b397d
diff --git a/src/soilbiogeochem/CNSoilMatrixMod.F90 b/src/soilbiogeochem/CNSoilMatrixMod.F90
index 56c1f11b5c..d4115ef659 100644
--- a/src/soilbiogeochem/CNSoilMatrixMod.F90
+++ b/src/soilbiogeochem/CNSoilMatrixMod.F90
@@ -5,18 +5,19 @@ module CNSoilMatrixMod
! The matrix model of CLM5.0 was developed by Yiqi Luo EcoLab members,
! Drs. Xingjie Lu, Yuanyuan Huang and Zhengguang Du, at Northern Arizona University
!----------------------------------------------------------------------------------
- !
+ !
! DESCRIPTION:
! Module for CLM5.0BGC matrices
- ! The matrix equation
+ ! The matrix equation
! Xn+1 = Xn + I*dt + (A*K(ksi) - Kfire - tri/dz)*Xn*dt
! Or
! Xn+1 = Xn + I*dt + (A*K(ksi) - Kfire - V)*Xn*dt
-
+
! !USES:
use shr_kind_mod , only : r8 => shr_kind_r8
use shr_log_mod , only : errMsg => shr_log_errMsg
- use decompMod , only : bounds_type
+ use spmdMod , only : masterproc
+ use decompMod , only : bounds_type
use abortutils , only : endrun
use clm_time_manager , only : get_step_size, is_end_curr_month,get_curr_date,update_DA_nstep
use clm_time_manager , only : is_first_restart_step,is_beg_curr_year,is_end_curr_year,is_first_step_of_this_run_segment
@@ -31,11 +32,11 @@ module CNSoilMatrixMod
use SoilBiogeochemCarbonStateType , only : soilbiogeochem_carbonstate_type
use SoilBiogeochemCarbonFluxType , only : soilbiogeochem_carbonflux_type
use SoilBiogeochemNitrogenStateType , only : soilbiogeochem_nitrogenstate_type
- use SoilBiogeochemNitrogenFluxType , only : soilbiogeochem_nitrogenflux_type
+ use SoilBiogeochemNitrogenFluxType , only : soilbiogeochem_nitrogenflux_type
use CNSharedParamsMod , only : CNParamsShareInst
- use SoilStateType , only : soilstate_type
+ use SoilStateType , only : soilstate_type
use clm_varctl , only : spinup_matrixcn, hist_wrt_matrixcn_diag, nyr_forcing, nyr_SASU, iloop_avg
- use ColumnType , only : col
+ use ColumnType , only : col
use GridcellType , only : grc
use clm_varctl , only : use_c13, use_c14, iulog
use perf_mod , only : t_startf, t_stopf
@@ -64,23 +65,25 @@ subroutine CNSoilMatrixInit( )
! !LOCAL VARIABLES:
!-----------------------------------------------------------------------
- if ( use_soil_matrixcn ) then
- write(iulog,*) 'CN Soil matrix solution is on'
- write(iulog,*) '*****************************'
- if ( spinup_matrixcn ) then
- write(iulog,*) ' Matrix spinup is on'
- write(iulog,*) ' *******************'
- write(iulog,*) ' nyr_forcing = ', nyr_forcing
- write(iulog,*) ' nyr_SASU = ', nyr_SASU
- write(iulog,*) ' iloop_avg = ', iloop_avg
- end if
- if ( hist_wrt_matrixcn_diag )then
- write(iulog,*) ' Extra matrix solution tracability output is turned on'
+ if ( masterproc) then
+ if ( use_soil_matrixcn ) then
+ write(iulog,*) 'CN Soil matrix solution is on'
+ write(iulog,*) '*****************************'
+ if ( spinup_matrixcn ) then
+ write(iulog,*) ' Matrix spinup is on'
+ write(iulog,*) ' *******************'
+ write(iulog,*) ' nyr_forcing = ', nyr_forcing
+ write(iulog,*) ' nyr_SASU = ', nyr_SASU
+ write(iulog,*) ' iloop_avg = ', iloop_avg
+ end if
+ if ( hist_wrt_matrixcn_diag )then
+ write(iulog,*) ' Extra matrix solution tracability output is turned on'
+ else
+ write(iulog,*) ' no extra matrix solution tracability output'
+ end if
else
- write(iulog,*) ' no extra matrix solution tracability output'
+ write(iulog,*) 'CN Soil matrix solution is off'
end if
- else
- write(iulog,*) 'CN Soil matrix solution is off'
end if
end subroutine CNSoilMatrixInit
@@ -113,11 +116,11 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
! !LOCAL VARIABLES:
integer :: fc,j,i, l,k ! indices
- integer :: c !
+ integer :: c !
real(r8):: dt ! time step (seconds)
real(r8):: epsi,fire_delta ! small number
- integer :: begc,endc ! bounds
+ integer :: begc,endc ! bounds
real(r8),dimension(bounds%begc:bounds%endc,nlevdecomp*(ndecomp_cascade_transitions-ndecomp_cascade_outtransitions)) :: a_ma_vr,na_ma_vr
real(r8),dimension(bounds%begc:bounds%endc,1:ndecomp_pools_vr,1) :: soilmatrixc_cap,soilmatrixc13_cap,soilmatrixc14_cap,soilmatrixn_cap
@@ -144,23 +147,23 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
!-----------------------------------------------------------------------
begc = bounds%begc; endc = bounds%endc
-
+
! SHR_ASSERT_ALL((ubound(cn_decomp_pools) == (/endc,nlevdecomp,ndecomp_pools/)) , errMsg(sourcefile, __LINE__))
associate( &
cs_soil => soilbiogeochem_carbonstate_inst , & ! In/Output
ns_soil => soilbiogeochem_nitrogenstate_inst , & ! In/Output
- cs13_soil => c13_soilbiogeochem_carbonstate_inst, & ! In/Output
- cs14_soil => c14_soilbiogeochem_carbonstate_inst, & ! In/Output
- cf13_soil => c13_soilbiogeochem_carbonflux_inst, & ! In/Output
- cf14_soil => c14_soilbiogeochem_carbonflux_inst, & ! In/Output
+ cs13_soil => c13_soilbiogeochem_carbonstate_inst, & ! In/Output
+ cs14_soil => c14_soilbiogeochem_carbonstate_inst, & ! In/Output
+ cf13_soil => c13_soilbiogeochem_carbonflux_inst, & ! In/Output
+ cf14_soil => c14_soilbiogeochem_carbonflux_inst, & ! In/Output
fpi_vr => soilbiogeochem_state_inst%fpi_vr_col ,&!Input:[real(r8)(:,:)]fraction of potential immobilization (no units)
cascade_donor_pool => decomp_cascade_con%cascade_donor_pool ,&!Input:[integer(:)]which pool is C taken from for a given decomposition step
- cascade_receiver_pool => decomp_cascade_con%cascade_receiver_pool ,&!Input:[integer(:)]which pool is C added to for a given decomposition step
+ cascade_receiver_pool => decomp_cascade_con%cascade_receiver_pool ,&!Input:[integer(:)]which pool is C added to for a given decomposition step
floating_cn_ratio_decomp_pools=> decomp_cascade_con%floating_cn_ratio_decomp_pools ,&!Input:[logical(:)]TRUE => pool has fixed C:N ratio
initial_cn_ratio => decomp_cascade_con%initial_cn_ratio ,&!Input:[real(r8)(:)]c:n ratio for initialization of pools
rf_decomp_cascade => soilbiogeochem_carbonflux_inst%rf_decomp_cascade_col ,&!Input:[real(r8)(:,:,:)]respired fraction in decomposition step (frac)
- pathfrac_decomp_cascade => soilbiogeochem_carbonflux_inst%pathfrac_decomp_cascade_col,&!Input:[real(r8)(:,:,:)]what fraction of C leaving a given pool passes
+ pathfrac_decomp_cascade => soilbiogeochem_carbonflux_inst%pathfrac_decomp_cascade_col,&!Input:[real(r8)(:,:,:)]what fraction of C leaving a given pool passes
! through a given transition (frac)
is_cwd => decomp_cascade_con%is_cwd ,&!Input:[logical(:)]TRUE => pool is a cwd pool
is_litter => decomp_cascade_con%is_litter ,&!Input:[logical(:)]TRUE => pool is a litter pool
@@ -222,7 +225,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
list_fire_AKVfire=> decomp_cascade_con%list_fire_AKVfire,&!In/Output:[Integer(:)] Saves mapping indices from Kfire to (A*K+V-Kfire) in the addition subroutine SPMP_ABC
list_AK_AKVfire => decomp_cascade_con%list_AK_AKVfire ,&!In/Output:[Integer(:)] Saves mapping indices from A*K to (A*K+V-Kfire) in the addition subroutine SPMP_ABC
list_AK_AKV => decomp_cascade_con%list_AK_AKV ,&!In/Output:[Integer(:)] Saves mapping indices from A*K to (A*K+V) in the addition subroutine SPMP_AB
- list_V_AKV => decomp_cascade_con%list_V_AKV &!In/Output:[Integer(:)] Saves mapping indices from V to (A*K+V) in the addition subroutine SPMP_AB
+ list_V_AKV => decomp_cascade_con%list_V_AKV &!In/Output:[Integer(:)] Saves mapping indices from V to (A*K+V) in the addition subroutine SPMP_AB
)
! set time steps
@@ -230,7 +233,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
dt = real( get_step_size(), r8 )
Ntrans = (ndecomp_cascade_transitions-ndecomp_cascade_outtransitions)*nlevdecomp
- epsi = 1.e-8_r8
+ epsi = 1.e-8_r8
isbegofyear = is_beg_curr_year()
@@ -254,13 +257,13 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
cn_decomp_pools(c,j,l) = initial_cn_ratio(l)
end do
end do
- end if
+ end if
end do
call t_stopf('CN Soil matrix-init. matrix')
call t_startf('CN Soil matrix-assign matrix-a-na')
- ! Calculate non-diagonal entries (a_ma_vr and na_ma_vr) in transfer coefficient matrix A
+ ! Calculate non-diagonal entries (a_ma_vr and na_ma_vr) in transfer coefficient matrix A
do k = 1, ndecomp_cascade_transitions
if(cascade_receiver_pool(k) .ne. 0)then !transition to atmosphere
do j = 1, nlevdecomp
@@ -289,10 +292,10 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
do j = 1, nlevdecomp
do fc = 1,num_soilc
c = filter_soilc(fc)
- matrix_Cinter%V(c,j+(i-1)*nlevdecomp) = cs_soil%decomp_cpools_vr_col(c,j,i)
- Cinter_old(c,j+(i-1)*nlevdecomp) = cs_soil%decomp_cpools_vr_col(c,j,i)
+ matrix_Cinter%V(c,j+(i-1)*nlevdecomp) = cs_soil%decomp_cpools_vr_col(c,j,i)
+ Cinter_old(c,j+(i-1)*nlevdecomp) = cs_soil%decomp_cpools_vr_col(c,j,i)
!Cinter_old is saved for accumulation of C transfer calculation and C flux (hr and fire) adjustment
- matrix_Ninter%V(c,j+(i-1)*nlevdecomp) = ns_soil%decomp_npools_vr_col(c,j,i)
+ matrix_Ninter%V(c,j+(i-1)*nlevdecomp) = ns_soil%decomp_npools_vr_col(c,j,i)
Ninter_old(c,j+(i-1)*nlevdecomp) = ns_soil%decomp_npools_vr_col(c,j,i)
!Ninter_old is saved for accumulation of N transfer calculation
end do
@@ -338,7 +341,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
end do
! Save the C and N pool size at begin of each year, which are used to calculate C and N capacity at end of each year.
call t_startf('CN Soil matrix-assign matrix-decomp0')
- if (is_beg_curr_year())then
+ if (is_beg_curr_year())then
iyr = iyr + 1
if(mod(iyr-1,nyr_forcing) .eq. 0)then
iloop = iloop + 1
@@ -368,7 +371,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
end where
end if
if(use_c14)then
- where(cs14_soil%decomp0_cpools_vr_col .lt. epsi*c14ratio)
+ where(cs14_soil%decomp0_cpools_vr_col .lt. epsi*c14ratio)
cs14_soil%decomp0_cpools_vr_col = epsi*c14ratio
end where
end if
@@ -378,7 +381,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
end if
end if
call t_stopf('CN Soil matrix-assign matrix-decomp0')
-
+
! Set C transfer matrix Ac from a_ma_vr
call t_startf('CN Soil matrix-matrix mult1-lev3-SetValueAK1')
call AKsoilc%SetValueA(begc,endc,num_soilc,filter_soilc,a_ma_vr,A_i,A_j,Ntrans,init_readyAsoilc,list_Asoilc,RI_a,CI_a)
@@ -465,7 +468,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
trcr_ntendency(c,ilev,idecomp) = trcr_ntendency(c,ilev,idecomp) + AVsoil%M(c,i)*matrix_Ninter%V(c,AVsoil%CI(i)) / dt
end do
end do
-
+
call matrix_Cinter%SPMM_AX(num_soilc,filter_soilc,AKallsoilc)
call matrix_Ninter%SPMM_AX(num_soilc,filter_soilc,AKallsoiln)
@@ -497,8 +500,8 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
matrix_Cinter13%V(c,j) = matrix_Cinput13%V(c,j) + matrix_Cinter13%V(c,j)
end do
end do
- end if
-
+ end if
+
! Update soil C14 pool size: X(matrix_Cinter14) = X(matrix_Cinter14) + (A*K + AVsoil + AKfiresoil) * X(matrix_Cinter14) + I(matrix_Cinput14)
if ( use_c14)then
do j = 1, ndecomp_pools_vr
@@ -525,7 +528,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
end do
end do
end do
-
+
if( use_c13 ) then
do i=1,ndecomp_pools
do j = 1,nlevdecomp
@@ -551,7 +554,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
call t_stopf('CN Soil matrix-assign back')
if(use_soil_matrixcn .and. (hist_wrt_matrixcn_diag .or. spinup_matrixcn))then
-
+
! Accumulate C transfers during a whole calendar year to calculate the C and N capacity
do j=1,ndecomp_pools*nlevdecomp
do fc = 1,num_soilc
@@ -584,21 +587,21 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
! if(use_c14)then
! call cf14_soil%AKallsoilc%SetValueCopySM (num_soilc,filter_soilc,AKallsoilc)
! end if
- ! Calculate all the soil C transfers in current time step.
+ ! Calculate all the soil C transfers in current time step.
! After this step, AKallsoilc represents all the C transfers (gC/m3/step)
call Xdiagsoil%SetValueDM(begc,endc,num_soilc,filter_soilc,Cinter_old(begc:endc,1:ndecomp_pools_vr))
call AKallsoilc%SPMM_AK(num_soilc,filter_soilc,Xdiagsoil)
-
+
if(use_c13)then
call Xdiagsoil%SetValueDM(begc,endc,num_soilc,filter_soilc,C13inter_old(begc:endc,1:ndecomp_pools_vr))
call cf13_soil%AKallsoilc%SPMM_AK(num_soilc,filter_soilc,Xdiagsoil)
end if
-
+
if(use_c14)then
call Xdiagsoil%SetValueDM(begc,endc,num_soilc,filter_soilc,C14inter_old(begc:endc,1:ndecomp_pools_vr))
call cf14_soil%AKallsoilc%SPMM_AK(num_soilc,filter_soilc,Xdiagsoil)
end if
-
+
! Calculate all the soil N transfers in current time step
! After this step, AKallsoiln represents all the N transfers (gN/m3/step)
call Xdiagsoil%SetValueDM(begc,endc,num_soilc,filter_soilc,Ninter_old(begc:endc,1:ndecomp_pools_vr))
@@ -700,17 +703,17 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
c = filter_soilc(fc)
if (abs(cs_soil%tran_acc(c,i,i)) .le. epsi)then !avoid inversion nan
cs_soil%tran_acc(c,i,i) = 1.e+36_r8
- end if
+ end if
end do
end do
-
+
if(use_c13)then
do i=1,ndecomp_pools_vr
do fc = 1,num_soilc
c = filter_soilc(fc)
if (abs(cs13_soil%tran_acc(c,i,i)) .le. epsi)then !avoid inversion nan
cs13_soil%tran_acc(c,i,i) = 1.e+36_r8
- end if
+ end if
end do
end do
end if
@@ -721,7 +724,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
c = filter_soilc(fc)
if (abs(cs14_soil%tran_acc(c,i,i)) .le. epsi)then !avoid inversion nan
cs14_soil%tran_acc(c,i,i) = 1.e+36_r8
- end if
+ end if
end do
end do
end if
@@ -731,11 +734,11 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
c = filter_soilc(fc)
if (abs(ns_soil%tran_nacc(c,i,i)) .le. epsi)then
ns_soil%tran_nacc(c,i,i) = 1.e+36_r8
- end if
+ end if
end do
end do
- ! Calculate capacity
+ ! Calculate capacity
do fc = 1,num_soilc
c = filter_soilc(fc)
call inverse(cs_soil%tran_acc(c,1:ndecomp_pools_vr,1:ndecomp_pools_vr),AKinv(1:ndecomp_pools_vr,1:ndecomp_pools_vr),ndecomp_pools_vr)
@@ -771,7 +774,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
end do
end do
end do
-
+
do i = 1,ndecomp_pools
do j = 1,nlevdecomp
@@ -812,7 +815,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
! If spin up is on, the capacity replaces the pool size with capacity.
! Copy the capacity into a 3D variable, and be ready to write to history files.
- do i=1,ndecomp_pools
+ do i=1,ndecomp_pools
do j = 1,nlevdecomp
do fc = 1,num_soilc
c = filter_soilc(fc)
@@ -870,7 +873,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
end do
end do
end do
-
+
if(spinup_matrixcn)call update_DA_nstep()
if(iloop .eq. iloop_avg .and. iyr .eq. nyr_forcing)iloop = 0
if(iyr .eq. nyr_forcing)iyr = 0
@@ -905,7 +908,7 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, num_actfirec, filter_act
call t_stopf('CN Soil matrix-calc. C capacity')
end if !is out_matrix
- end associate
+ end associate
end subroutine CNSoilMatrix
!-----------------------------------------------------------------------
@@ -935,6 +938,5 @@ subroutine CNSoilMatrixRest( ncid, flag )
!------------------------------------------------------------------------
end subroutine CNSoilMatrixRest
-
-end module CNSoilMatrixMod
+end module CNSoilMatrixMod
diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90
index cff7679e9d..1f83d29603 100644
--- a/src/utils/clmfates_interfaceMod.F90
+++ b/src/utils/clmfates_interfaceMod.F90
@@ -1485,6 +1485,7 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, &
z0m => canopystate_inst%z0m_patch , & ! Output: [real(r8) (:) ] momentum roughness length (m)
displa => canopystate_inst%displa_patch, &
dleaf_patch => canopystate_inst%dleaf_patch, &
+ voc_pftindex => canopystate_inst%voc_pftindex_patch, &
snow_depth => waterdiagnosticbulk_inst%snow_depth_col, &
frac_sno_eff => waterdiagnosticbulk_inst%frac_sno_eff_col, &
frac_veg_nosno_alb => canopystate_inst%frac_veg_nosno_alb_patch)
@@ -1608,7 +1609,7 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, &
z0m(col%patchi(c)+1:col%patchf(c)) = 0.0_r8
displa(col%patchi(c)+1:col%patchf(c)) = 0.0_r8
dleaf_patch(col%patchi(c)+1:col%patchf(c)) = 0.0_r8
-
+ voc_pftindex(col%patchi(c)+1:col%patchf(c)) = 0
frac_veg_nosno_alb(col%patchi(c):col%patchf(c)) = 0.0_r8
! Set the bareground patch indicator
@@ -1670,6 +1671,7 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, &
z0m(p) = this%fates(nc)%bc_out(s)%z0m_pa(ifp)
displa(p) = this%fates(nc)%bc_out(s)%displa_pa(ifp)
dleaf_patch(p) = this%fates(nc)%bc_out(s)%dleaf_pa(ifp)
+ voc_pftindex(p) = this%fates(nc)%bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp)
end do ! veg pach
if(abs(areacheck - 1.0_r8).gt.1.e-9_r8)then
@@ -2575,8 +2577,8 @@ subroutine wrap_photosynthesis(this, nc, bounds, fn, filterp, &
rssun => photosyns_inst%rssun_patch , &
rssha => photosyns_inst%rssha_patch, &
psnsun => photosyns_inst%psnsun_patch, &
- psnsha => photosyns_inst%psnsha_patch)
-
+ psnsha => photosyns_inst%psnsha_patch, &
+ ci => canopystate_inst%ci_patch)
do s = 1, this%fates(nc)%nsites
c = this%f2hmap(nc)%fcolumn(s)
@@ -2643,7 +2645,7 @@ subroutine wrap_photosynthesis(this, nc, bounds, fn, filterp, &
this%fates(nc)%bc_in(s)%filter_photo_pa(ifp) = 3
rssun(p) = this%fates(nc)%bc_out(s)%rssun_pa(ifp)
rssha(p) = this%fates(nc)%bc_out(s)%rssha_pa(ifp)
-
+ ci(p) = this%fates(nc)%bc_out(s)%ci_pa(ifp)
! These fields are marked with a bad-value flag
photosyns_inst%psnsun_patch(p) = spval
photosyns_inst%psnsha_patch(p) = spval