diff --git a/data-raw/input_params.csv b/data-raw/input_params.csv index 26bfd6354..c32367e32 100644 --- a/data-raw/input_params.csv +++ b/data-raw/input_params.csv @@ -13,7 +13,6 @@ ocean,twi,n,n,y,1.25E+07,m3 s-1,Ocean warm-intermediate exchange ocean,tid,n,n,y,2.00E+08,m3 s-1,Ocean intermediate-deep exchange ocean,preind_surface_c,n,n,n,900,Pg C,Initial surface ocean carbon ocean,preind_interdeep_c,n,n,n,37100,Pg C,Initial intermediate + deep ocean carbon -simpleNbox,atmos_co2,n,n,y,588.071,Pg C,Initial atmospheric CO2 simpleNbox,C0,n,n,y,277.15,Pg C,Initial atmospheric C pool simpleNbox,pf.veg_c,y,n,n,55,Pg C,Initial vegetation C pool simpleNbox,nonpf.veg_c,y,n,n,495,Pg C,Initial vegetation C pool diff --git a/data/inputstable.rda b/data/inputstable.rda index c7df81fca..454460aca 100644 Binary files a/data/inputstable.rda and b/data/inputstable.rda differ diff --git a/inst/input/hector_picontrol.ini b/inst/input/hector_picontrol.ini index f43df54d6..11dd564cb 100644 --- a/inst/input/hector_picontrol.ini +++ b/inst/input/hector_picontrol.ini @@ -33,7 +33,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6, CO2 radiative forcing question is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 diff --git a/inst/input/hector_ssp119.ini b/inst/input/hector_ssp119.ini index 38124d6c5..b5db9cad3 100644 --- a/inst/input/hector_ssp119.ini +++ b/inst/input/hector_ssp119.ini @@ -34,7 +34,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6; CO2 radiative forcing is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 ;pf.npp_flux0=5.6 ; cf. Figure 3 in Chen et al. 2017 10.1088/1748-9326/aa8978 @@ -180,7 +179,7 @@ RF_misc[1750]=0 ;------------------------------------------------------------------------ [temperature] S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6) -diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details +diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6) ; Optional global temperature constraint diff --git a/inst/input/hector_ssp126.ini b/inst/input/hector_ssp126.ini index 417a3a6d2..2ded73eb6 100644 --- a/inst/input/hector_ssp126.ini +++ b/inst/input/hector_ssp126.ini @@ -34,7 +34,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6; CO2 radiative forcing is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 ;pf.npp_flux0=5.6 ; cf. Figure 3 in Chen et al. 2017 10.1088/1748-9326/aa8978 @@ -180,7 +179,7 @@ RF_misc[1750]=0 ;------------------------------------------------------------------------ [temperature] S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6) -diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details +diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6) ; Optional global temperature constraint diff --git a/inst/input/hector_ssp245.ini b/inst/input/hector_ssp245.ini index 2bd7259af..2f170eb22 100644 --- a/inst/input/hector_ssp245.ini +++ b/inst/input/hector_ssp245.ini @@ -34,7 +34,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6; CO2 radiative forcing is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 ;pf.npp_flux0=5.6 ; cf. Figure 3 in Chen et al. 2017 10.1088/1748-9326/aa8978 @@ -180,7 +179,7 @@ RF_misc[1750]=0 ;------------------------------------------------------------------------ [temperature] S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6) -diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details +diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6) ; Optional global temperature constraint diff --git a/inst/input/hector_ssp370.ini b/inst/input/hector_ssp370.ini index 2a0782ba3..8df3619ee 100644 --- a/inst/input/hector_ssp370.ini +++ b/inst/input/hector_ssp370.ini @@ -34,7 +34,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6; CO2 radiative forcing is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 ;pf.npp_flux0=5.6 ; cf. Figure 3 in Chen et al. 2017 10.1088/1748-9326/aa8978 @@ -180,7 +179,7 @@ RF_misc[1750]=0 ;------------------------------------------------------------------------ [temperature] S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6) -diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details +diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6) ; Optional global temperature constraint diff --git a/inst/input/hector_ssp434.ini b/inst/input/hector_ssp434.ini index f4fecdf68..dcb3c17a6 100644 --- a/inst/input/hector_ssp434.ini +++ b/inst/input/hector_ssp434.ini @@ -34,7 +34,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6; CO2 radiative forcing is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 ;pf.npp_flux0=5.6 ; cf. Figure 3 in Chen et al. 2017 10.1088/1748-9326/aa8978 @@ -180,7 +179,7 @@ RF_misc[1750]=0 ;------------------------------------------------------------------------ [temperature] S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6) -diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details +diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6) ; Optional global temperature constraint diff --git a/inst/input/hector_ssp460.ini b/inst/input/hector_ssp460.ini index ff0e1ff53..8ffc4ff48 100644 --- a/inst/input/hector_ssp460.ini +++ b/inst/input/hector_ssp460.ini @@ -34,7 +34,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6; CO2 radiative forcing is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 ;pf.npp_flux0=5.6 ; cf. Figure 3 in Chen et al. 2017 10.1088/1748-9326/aa8978 @@ -180,7 +179,7 @@ RF_misc[1750]=0 ;------------------------------------------------------------------------ [temperature] S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6) -diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details +diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6) ; Optional global temperature constraint diff --git a/inst/input/hector_ssp534-over.ini b/inst/input/hector_ssp534-over.ini index a969ad43e..674b1362d 100644 --- a/inst/input/hector_ssp534-over.ini +++ b/inst/input/hector_ssp534-over.ini @@ -34,7 +34,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6; CO2 radiative forcing is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 ;pf.npp_flux0=5.6 ; cf. Figure 3 in Chen et al. 2017 10.1088/1748-9326/aa8978 @@ -180,7 +179,7 @@ RF_misc[1750]=0 ;------------------------------------------------------------------------ [temperature] S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6) -diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details +diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6) ; Optional global temperature constraint diff --git a/inst/input/hector_ssp585.ini b/inst/input/hector_ssp585.ini index 75a27fc14..289113367 100644 --- a/inst/input/hector_ssp585.ini +++ b/inst/input/hector_ssp585.ini @@ -34,7 +34,6 @@ preind_interdeep_c=37100 ; intermediate and deep ocean C, IPCC AR6 Figure 5.12 ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=590.33 ; initial atmospheric carbon pool Pg C of CO2 size used in spin up, consistent with C0 C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6; CO2 radiative forcing is calibrated to this value npp_flux0=56.2 ; preindustrial net primary production, Pg C/yr from Ito et al. 2011 ;pf.npp_flux0=5.6 ; cf. Figure 3 in Chen et al. 2017 10.1088/1748-9326/aa8978 @@ -180,7 +179,7 @@ RF_misc[1750]=0 ;------------------------------------------------------------------------ [temperature] S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6) -diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details +diff=1.042 ; ocean heat diffusivity, cm2/s calibrated to historical observations see PR 789 for details qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6) ; Optional global temperature constraint diff --git a/src/simpleNbox.cpp b/src/simpleNbox.cpp index 91b9481b8..399b75429 100644 --- a/src/simpleNbox.cpp +++ b/src/simpleNbox.cpp @@ -69,9 +69,9 @@ SimpleNbox::SimpleNbox() : CarbonCycleModel(8), masstot(0.0) { // earth_c keeps track of how much fossil C is pulled out // so that we can do a mass-balance check throughout the run // 2020-02-05 With the introduction of non-negative 'fluxpool' class - // we can't start earth_c at zero. Value of 5500 is set to avoid - // overdrawing in RCP 8.5 - earth_c.set(5500, U_PGC, false, D_EARTHC); + // we can't start earth_c at zero. Value of 6400 is set to avoid + // overdrawing in esm-flat20 + earth_c.set(6400, U_PGC, false, D_EARTHC); // We keep a running total of LUC emissions from (and uptake to) vegetation // This is used in slowparameval() to calculate npp_luc_adjust @@ -246,17 +246,7 @@ void SimpleNbox::setData(const std::string &varName, const message_data &data) { } try { // Initial pools - if (varNameParsed == D_ATMOSPHERIC_CO2) { - // Hector input files specify initial atmospheric CO2 in terms of - // the carbon pool, rather than the CO2 concentration. Since we - // don't have a place to store the initial carbon pool, we convert - // it to initial concentration and store that. It will be converted - // back to carbon content when the state variables are set up in - // prepareToRun. - H_ASSERT(data.date == Core::undefinedIndex(), "date not allowed"); - H_ASSERT(biome == SNBOX_DEFAULT_BIOME, "atmospheric C must be global"); - set_c0(data.getUnitval(U_PGC).value(U_PGC) * PGC_TO_PPMVCO2); - } else if (varNameParsed == D_PREINDUSTRIAL_CO2) { + if (varNameParsed == D_PREINDUSTRIAL_CO2) { H_ASSERT(data.date == Core::undefinedIndex(), "date not allowed"); H_ASSERT(biome == SNBOX_DEFAULT_BIOME, "preindustrial CO2 must be global"); diff --git a/tests/testthat/input/luc_pulse.ini b/tests/testthat/input/luc_pulse.ini index 901ef82d0..e0aea8d30 100644 --- a/tests/testthat/input/luc_pulse.ini +++ b/tests/testthat/input/luc_pulse.ini @@ -30,7 +30,6 @@ tid=200000000 ; 2.0e8 intermediate-deep exchange, m3/s ; - the nppv, nppd, and litterd partitioning parameters ; - beta and q10_rh -atmos_co2=588.071 ; Pg C in CO2, from Murakami et al. (2010) C0=277.15 ; preindustrial CO2 from table 7.SM.1 IPCC AR6 ;boreal.veg_c=100 ; e.g. ;tropical.veg_c=450