-
Notifications
You must be signed in to change notification settings - Fork 317
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
FATES tests fail with MIMICS active #1636
Comments
ligninnratioavg is declared in CNVegCarbonFluxType.F90 |
CNDriverMod.F90 has subroutine CNDriverSummarizeFluxes where we call both EDBGCDynMod.F90 has equivalent subroutine EDBGCDynSummary where we only call |
We calculate ligninnratioavg in subr. Summary_carbonflux in module CNVegCarbonFluxType and do not call this subroutine when FATES is active, as explained in my previous post:
The formula uses column copies of leafc_to_litter_patch and frootc_to_litter_patch. Neither the column nor the patch copies are available with FATES active as far as I can tell. So I think we may need a refactor to make these variables available when FATES is active. |
Though FATES doesn't do nitrogen, right? Maybe then for now we set |
Previously I've set |
This should work. Let me know values by pft, and I will give it a try. Then we can iterate on my implementation as needed. |
I think we can start with lignin and N values from Table 1 in this paper. Let me know if there's uncertainty in how to map the pfts listed here to the CLM pfts |
Thanks @wwieder, I will look into this today. I wanted to include a helpful comment @rgknox made at stand-up yesterday: @rgknox pls correct me if I misunderstood. |
Correction: The above fix is for when use_fates = .true. and it leaves the more complex refactor for later. |
@wwieder |
cc'ing @ckoven and @rosiealice |
Agreed, this is a good conversation to have. |
@wwieder I guess it'd be useful to know if there is anything more granular that MIMICS wants to know about its litter inputs than we currently resolve, just so that we can figure out how to resolve that when the time comes. Since nobody is currently dedicating time to connecting the FATES nutrient code to CLM, I think it can wait, and yes, we should probably disallow running FATES with mimics. And then I'd recommend that once a dedicated effort is made to reconnect FATES to CLM with nutrients, that we make sure that effort does so in a MIMICS-consistent way. |
The quick answer to what FATES-MIMICS tests need to pass is calculations of:
I got both FATES and carbon_only tests to pass by declaring local copies (in MIMICS) of I will open a PR with my initial modifications soon. After you see my changes, let me know if it's still preferable to disallow running FATES with MIMICS. |
@slevisconsulting never in a million years did I think that we'd couple a C only version of MIMICS with FATES so quickly. @rosiealice for PARTEH here are my ideas. Medium term: I'm imagining there will need to be some logic for how we handle N competition that will be tricky and somewhat HLM dependent? Are you targeting an ELM configuration to develop this with? If so maybe CLM should mirror this approach to facilitate the FATES-HLM coupling, as our current sequential demand-based approach leaves much to be desired? Long term: Ideally, we'd be able to come up with a clever way for FATES to simulate below ground allocation, especially related to root exudation, that would modify soil biogeochemical behavior and N mineralization rates. This is a pretty ambitious project, however, both scientifically and on the SE side that would likely take some coordination and funding. |
Hi Will, This all sounds sensible. I'll defer to @rgknox on the details of the ELM configuration. Noting that Terje Berntsen has just got a big soil BGC project funded in Oslo. Also in the long term, it might be useful to coordinate with him and Elin on any developments they are planning to avoid reinventing the wheel. I will try and figure this out. |
Just a note here that when we do fully couple MIMICS & FATES with N cycling, I think we need to pass ligninNratioAvg from MIMICS to FATES via the FATES bc_in structure. Do I have that right? MIMICS calculates a fraction of N in lignins, instead of leaving it a constant? And we need to pass that info to FATES so it generates the litter fractions accordingly. |
MIMICS calculated litter quality as a ratio of lignin:N in total litterfall. Where this gets complicated, especially with FATES, is with CWD fluxes. The important information to pass to MIMICS would be column averaged N and lignin (as a fraction of total litterfall) fluxes? Does this answer your question, @rgknox? |
yeah, so I had it backwards. Its FATES' job to calculate the column level C:N ratio of lignin tissues and pass that to MIMICS. One more question though: Are any organs excluded from this average? I see in the CLM code that it diagnoses this ratio from leaves, fine-roots and CWD. Like, for instance in fates, we have small branches that would contribute to fine litter pools but not CWD. Or should we just perform a mass weighted average of our C:N ratio for all lignin tissues in the litter pool? |
It's even simpler that that, @rgknox, the C:N ratio of all litterfall and the lignin concentration of all litterfall. MIMICS then calculates lignin:N to use internally. The wood classes in FATES introduce a complication here. You handle your own decomposition of branch classes internally, right, with the collective output going back to structural litter in the HLM? If so, I think this is what MIMICS should be counting from CLM already (it's actually the litter quality associated with the flux of CWD_TO_LITTER that's being used for the CTSM/src/biogeochem/CNVegCarbonFluxType.F90 Line 4492 in 157f719
If this is accurate, we'd similarly need the aggregate information of total C, total N, and lignin fraction of the analogous (lumped) CWD_TO_LITTER flux from FATES. |
I hope this isn't redundant. I will show formulas, because I'm not fluent in the terminology...
|
Brief summary of bug
On izumi I get the error:
SoilBiogeochemDecompCascadeMIMICSMod.F90 line 852: Reference to undefined POINTER
On cheyenne the error feels more helpful:
SoilBiogeochemDecompCascadeMIMICSMod.F90 line 1111: Index '1' of dimension 1 of array 'ligninnratioavg' above upper bound of 0
ERS_D_Mmpi-serial_Ld5.1x1_brazil.I2000Clm50FatesRs.cheyenne_gnu.clm-FatesColdDef
ERS_D_Ld5.f10_f10_mg37.I2000Clm50Fates.izumi_nag.clm-FatesColdDef.0202-170916iz_nag
General bug information
CTSM version you are using: ctsm5.1.dev073-79-geba82445d
Configurations affected: soil_decomp_method = 'MIMICSWieder2015'
The text was updated successfully, but these errors were encountered: