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

decomp carbon pools are not calculated as expected #6458

Open
peterdschwartz opened this issue Jun 4, 2024 · 1 comment
Open

decomp carbon pools are not calculated as expected #6458

peterdschwartz opened this issue Jun 4, 2024 · 1 comment

Comments

@peterdschwartz
Copy link
Contributor

The code block in question is here:
ColumnDataType.F90 L7533

       if (use_pflotran .and. pf_cmode) then
          ! note: the follwoing should be useful to non-pflotran-coupled, but seems cause 1 BFB test unmatching.
          ! add up all vertical transport tendency terms and calculate total som leaching loss as the sum of these
          do l = 1, ndecomp_pools
             do fc = 1,num_soilc
                c = filter_soilc(fc)
                this%decomp_cpools_leached(c,l) = 0._r8
             end do
             do j = 1, nlev
                do fc = 1,num_soilc
                   c = filter_soilc(fc)
                   this%decomp_cpools_leached(c,l) = &
                     this%decomp_cpools_leached(c,l) + &
                     this%decomp_cpools_transport_tendency(c,j,l) * dzsoi_decomp(j)
                end do
             end do
             do fc = 1,num_soilc
                c = filter_soilc(fc)
                this%som_c_leached(c) = &
                   this%som_c_leached(c) + &
                   this%decomp_cpools_leached(c,l)
             end do
          end do
       end if

Above, the col_cf%decomp_cpools_leached and col_cf%som_c_leached are only calculated with pflotran. This is inconsistent with the corresponding Nitrogen and Phosphorus pools so this is likely a bug.

Removing the if block yields DIFFs in these tests:

  ERS.r05_r05.ICNPRDCTCBC.pm-cpu_intel.elm-cbudget (Overall: DIFF) details:
  SMS_Ln9.ne4pg2_oQU480.F2010.pm-cpu_intel.eam-outfrq9s (Overall: DIFF) details:
  SMS_Ly2_P1x1.1x1_smallvilleIA.IELMCNCROP.pm-cpu_intel.elm-fan (Overall: DIFF) details:
  SMS_Ly2_P1x1.1x1_smallvilleIA.IELMCNCROP.pm-cpu_intel.elm-force_netcdf_pio (Overall: DIFF) details:
  SMS_Ly2_P1x1.1x1_smallvilleIA.IELMCNCROP.pm-cpu_intel.elm-per_crop (Overall: DIFF) details:
  SMS_Ly2_P1x1_D.1x1_smallvilleIA.IELMCNCROP.pm-cpu_intel.elm-lulcc_sville (Overall: DIFF) details:
@peterdschwartz
Copy link
Contributor Author

peterdschwartz commented Jun 4, 2024

Level of diffs for some of the tests. The small absolute value may be due to initial conditions? Relative differences seem significant.

 **SMS_Ln9.ne4pg2_oQU480.F2010.pm-cpu_intel.eam-outfrq9s**
 RMS CMASS_BALANCE_ERROR              1.7722E-16          NORMALIZED  1.6872E+00
 RMS M_LITR1C_TO_LEACHING             1.0034E-24            NORMALIZED  4.3958E+00
 RMS M_LITR2C_TO_LEACHING             1.9482E-24            NORMALIZED  4.7792E+00
 RMS M_LITR3C_TO_LEACHING             1.0670E-24            NORMALIZED  4.8193E+00
**SMS_Ly2_P1x1.1x1_smallvilleIA.IELMCNCROP.pm-cpu_intel.elm-per_crop**
 RMS M_LITR1C_TO_LEACHING             6.2391E-20            NORMALIZED  2.0000E+00
 RMS M_LITR2C_TO_LEACHING             9.9899E-20            NORMALIZED  2.0000E+00
 RMS M_SOIL2C_TO_LEACHING             1.2005E-19            NORMALIZED  2.0000E+00
 RMS M_SOIL4C_TO_LEACHING             2.6632E-20            NORMALIZED  2.0000E+00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant