-
Notifications
You must be signed in to change notification settings - Fork 318
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
Remove the CN (non CENTURY) version of Carbon-Nitrogen soil biogeochemistry code and its testing #1356
Comments
What gets more involved is removing the "cn" option from build-namelist, and also deciding if we should keep the namelist variables: use_lch4, use_nitrif_denitrif, use_vertsoilc, use_century_decomp. From what @wwieder is recommending it sounds like use_century_decomp and use_vertsoilc should certainly be removed as an option and hardcoded to be assumed on. I suspect that doing that might make other code simplifications possible. There's a little bit of code that goes into allowing both single layer Carbon and multi-layer Carbon layers for example. There are also at least 22 constants on the parameter file that could be removed if CN was removed. I'm not sure if the other two namelist items (use_lch4, and use_nitrif_denitrif) would be useful to keep around or not. If we did want to keep them around, we should add a test for them (since the CN tests would be removed). The only one of them invoked in our tests right now is use_lch4 which is turned off for the testmod smallville_dynlakes_monthly. There is also a test mod for non-vertically resolved and non-nirification-dentrification NoVSNoNI so that should likely be modified to cover whatever namelist items are left to still invoke. |
This could take some time to unwind (and for me to wrap my head around). Is this the start of implementing the revisions of the namelist discussion we were having with @rgknox a few months back? I'm not sure where this discussion or notes are. |
@wwieder I put the next label so that we could discuss next week. And no this unfortunately is separate from the namelist discussion we had. The start of that is issue #942. The document is here: https://docs.google.com/spreadsheets/d/1wwI_RuQ87FNk4PdrSLtlplisEMTRqDCxFeqG6Wbxt_c The one thing that might be entwined with that is that if we remove the use_century_decomp namelist item it should be replaced with an option to control soildecomp that would have century as the only option. |
In a meeting @wwieder thought that we probably should hardcode methane and nitrif_denitif on, when we remove the CN option. There doesn't seem a reason to have the ability to turn it off. |
We are going to ramp up the need to do this, so that @slevisconsulting doesn't have to work on the old CN code for changes coming in. His first version will just make CN tests expected fails. |
OK in ctsm5.1.dev043 these tests will fail: ERP_D_Ld9.f19_g17.I2000Clm50Cn.cheyenne_intel.clm-drydepnomegan The error that's shown with the DEBUG tests is a subscript error as follows. Production tests just die with an abort.
|
I think it's OK for those tests to just be dropped since there are other drydepnomegan tests as well as threading ERP tests. The others test mods are just default configurations. |
I've done partial work on this. I need to discuss this again for the rest. I'm not sure about getting rid of use_lch4, use_nitrif_denitrif now because of Fates. And use_vertsoilc seems to be useful in issue #1395. I also think I should start replacing use_century_decomp with soildecomp_method that is a character string, that then uses an integer internally. |
@ekluzek this makes sense to me. let's discuss farther after the CESM workshop. |
From today's ctsm-software:
|
Based on email discussion with @rgknox @ekluzek @ckoven - methane will need to be on if use_nitrif_dentrif is on. So if our plan is to hard-code / implicitly assume use_nitrif_dentrif to true, then we should also hard-code / implicitly assume methane is on. @ckoven says that this block should be changed to do the endrun rather than setting things to 0: CTSM/src/soilbiogeochem/SoilBiogeochemNitrifDenitrifMod.F90 Lines 297 to 303 in 84e970f
though that will be irrelevant if we always turn methane on. |
The endrun can be added back in, but only if it allows FATES to work. |
So Fates cases default to having use_nitrif_denitrif=.false. and it changes answers if you turn it on. So I'm going to file that as a separate issue, and we'll remove use_nitrif_denitrif as a separate thing. |
So this is problematic for the test ERS_Lm25.1x1_smallvilleIA.IHistClm50BgcCropQianRs.cheyenne_gnu.clm-smallville_dynlakes_monthly which turns methane off, because dynamic lakes can't run with methane on. One way to do this would be to create a Sp test for this case, but this specific test is built around smallville which requires both BGC and Crop. So I think the way around this for now is to allow methane and nitrif_denitrif to be off for this case, but add a warning about it. Later we can replace this test with a Sp version of it. |
…beginning of the year see ESCOMP#1356
Copying written comments from today's ctsm software meeting so that we do not forget:
|
Oh, I just saw a note above Aug 25, 2021 that says that a specific test would have a problem. The underlying problem is that dynamic lakes can't run with methane on? If that's the case we could do BGC and dynamic lakes, which sounds like a problem. The suggestion at the end of the issue is that we turn off the gridcell methane balance checks (which we have already done), but there is also an issue for time-step 0 (#1868) for the ch4 balance check error there. This could be resolved when #2084 comes in, or we could do something explicit for it in the meantime. |
Remove the option to run the non-CENTURY and vertically resolved BGC code. This code isn't really being used, validated, or kept up to date. None of the current supported versions of the physics use it the default (clm4_5, clm5_0, nor clm5_1). There are also concerns for its scientific validity especially as compared to the full BGC version. The only advantage is it's simpler and faster, but because it isn't and hasn't been tuned in any of the current model physics versions it likely is just adding complexity.
This could be as simple as removing the following file from soilbiogeochemistry:
SoilBiogeochemDecompCascadeCNMod.F90
as well as the "CN" compsets and tests:
I2000Clm50Cn
I1850Clm45Cn
ERP_D_Ld9" grid="f19_g17" compset="I2000Clm50Cn" testmods="clm/drydepnomegan
ERP_P36x2_D_Ld5" grid="f10_f10_mg37" compset="I1850Clm45Cn" testmods="clm/default
ERP_P36x2_D_Ld5" grid="f10_f10_mg37" compset="I2000Clm50Cn" testmods="clm/default
SMS" grid="f19_g17" compset="I2000Clm50Cn" testmods="clm/default
SMS_D_Ld1" grid="f19_g17" compset="I1850Clm45Cn" testmods="clm/default
SMS_P48x1_D_Ld5" grid="f10_f10_mg37" compset="I2000Clm50Cn" testmods="clm/default
Doing that would be quite straightforward.
The text was updated successfully, but these errors were encountered: