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

MIMICS into vertically resolved CTSM #1318

Merged
merged 80 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
9985a65
First commit of MIMICS in CTSM
slevis-lmwg Mar 27, 2021
131147e
Introduce MIMICS using SoilBiogeochemDecompCascadeBGCMod.F90 as template
slevis-lmwg Mar 31, 2021
d963ada
Updating SoilBiogeochemDecompCascadeMIMICSMod.F90 based on code review
slevis-lmwg Apr 2, 2021
5dd9ff2
Updating SoilBiogeochemDecompCascadeMIMICSMod.F90 based on meeting
slevis-lmwg Apr 3, 2021
8601f6e
Mainly changed "rate constants" to "rates" in the comments
slevis-lmwg Apr 13, 2021
0141a3e
Merge tag 'ctsm5.1.dev033' into vert_res_in_mimics
slevis-lmwg Apr 13, 2021
5995cc0
Add new and remove old TODO BFB refactor comments
slevis-lmwg Apr 14, 2021
e6833ea
Remove old TODO BFB refactor comment
slevis-lmwg Apr 14, 2021
446b587
Minor mods to ...DecompCascadeMIMICSMod based on refactor branch
slevis-lmwg Apr 18, 2021
32222a9
Merge tag 'ctsm5.1.dev043' into vert_res_in_mimics
slevis-lmwg Jun 4, 2021
2f67c21
Making ...CascadeMIMICSMod.F90 consistent w pre-MIMICS refactor
slevis-lmwg Jun 5, 2021
e962b0e
Ongoing work in SoilBiogeochemDecompCascadeMIMICSMod.F90
slevis-lmwg Jun 11, 2021
cda5d14
Merge tag 'ctsm5.1.dev048' into vert_res_in_mimics
slevis-lmwg Jul 11, 2021
487f5b3
Updates to MIMICSMod.F90 for consistency w corresponding BGC refactors
slevis-lmwg Jul 12, 2021
65d47da
Working on the tau calculations
slevis-lmwg Jul 12, 2021
39d51b6
Comment updates...
slevis-lmwg Jul 12, 2021
7662239
Updates from today's code review with @wwieder
slevis-lmwg Jul 14, 2021
0fde398
Updates based on new comments from @wwieder
slevis-lmwg Jul 15, 2021
030e9c5
Updates addressing comments in the PR
slevis-lmwg Jul 17, 2021
17fa68f
Minor updates
slevis-lmwg Jul 17, 2021
0860aa4
Rm unnecessary associate assignments as I look through the whole model
slevis-lmwg Jul 19, 2021
8715ec5
First draft of the ligninNratioAvg calculation
slevis-lmwg Jul 19, 2021
3ba4ad3
Made parameters of some two unit conversions
slevis-lmwg Jul 19, 2021
5222227
Working on the calculation of ligninNratioAve
slevis-lmwg Jul 22, 2021
ae3b11b
Closer to completing calculation of ligninNratioAve
slevis-lmwg Jul 23, 2021
d5d83e4
Some clean-up and corrections before starting on the nitrogen
slevis-lmwg Jul 23, 2021
0b91a02
Negligible changes but pushing to have access to latest during downtime
slevis-lmwg Jul 25, 2021
63cfa3d
Mods originally from @wwieder for the MIMICS nitrogen hooks
slevis-lmwg Aug 1, 2021
bf87bd3
Variable declarations and other loose ends from prev commit
slevis-lmwg Aug 5, 2021
3cf47eb
Adding use_mimics_decomp where needed in the fortran
slevis-lmwg Aug 6, 2021
043d8bc
Corrections and minor cleanup
slevis-lmwg Aug 7, 2021
ed35311
Code corrections from attempting to build (part 1)
slevis-lmwg Aug 9, 2021
fc2c33c
Merge tag 'ctsm5.1.dev051' into vert_res_in_mimics
slevis-lmwg Aug 9, 2021
ebadca9
Adding history variables for use with Newton-Krylov
slevis-lmwg Aug 9, 2021
5236864
Adding pathfrac_decomp_cascade to ctsm history
slevis-lmwg Aug 10, 2021
724cb82
Change to variable description as per code review suggestion
slevis-lmwg Aug 11, 2021
1f13e65
Code corrections from attempting to build (part 2)
slevis-lmwg Aug 12, 2021
dcf7689
Code corrections from attempting to build (part 3)
slevis-lmwg Aug 16, 2021
731475e
Merge branch 'hist_vars_for_newton_krylov' into vert_res_in_mimics
slevis-lmwg Aug 17, 2021
fefccc9
Code corrections from attempting to build (part 4)
slevis-lmwg Aug 18, 2021
dfe0688
Code corrections from attempting to build (part 5)
slevis-lmwg Aug 19, 2021
4e22c91
Adding rf_decomp_cascade to history
slevis-lmwg Aug 19, 2021
695f85c
Merge tag 'ctsm5.1.dev053' into hist_vars_for_newton_krylov
slevis-lmwg Aug 19, 2021
07c641b
user_nl_clm and shell_commands files for Newton-Krylov testing
slevis-lmwg Aug 21, 2021
2687cf1
Typo correction...
slevis-lmwg Aug 21, 2021
bae1162
Merge tag 'ctsm5.1.dev053' into vert_res_in_mimics
slevis-lmwg Aug 23, 2021
3033578
Merge branch 'hist_vars_for_newton_krylov' into vert_res_in_mimics
slevis-lmwg Aug 24, 2021
1c1a945
Made params consistent w current params file ctsm51_params.c210528.nc
slevis-lmwg Aug 25, 2021
ecadf73
Added use_mimics_decomp to the namelist
slevis-lmwg Aug 30, 2021
66d7b92
Introduced MIMICS test mod directory
slevis-lmwg Aug 31, 2021
3ff27f3
Debugging while running with use_mimics_decomp = .true.
slevis-lmwg Sep 4, 2021
ee6c401
Corrections to unit conversions based on meeting with @wwieder
slevis-lmwg Sep 13, 2021
680512e
C balance error seems resolved and replaced with N balance error
slevis-lmwg Sep 23, 2021
c522916
Now past the big N balance error but still getting small one
slevis-lmwg Sep 23, 2021
3ce2163
Small changes that seem necessary for N balance though still looking...
slevis-lmwg Oct 13, 2021
e037adf
Adding totmicn to the N balance; still not fixed though
slevis-lmwg Oct 19, 2021
e6d365c
Dimension p_decomp_cn_gain by pools instead of transitions
slevis-lmwg Oct 22, 2021
f3f7d0a
Eliminate max from a line and correct NaNs that resulted
slevis-lmwg Oct 25, 2021
80c0c2f
Updates discussed with @wwieder
slevis-lmwg Oct 25, 2021
520f4f9
The model now runs without balance or other errors
slevis-lmwg Oct 27, 2021
1faa673
Code simplification for improved clarity
slevis-lmwg Oct 27, 2021
e30d41e
Merge tag 'ctsm5.1.dev061' into vert_res_in_mimics
slevis-lmwg Nov 4, 2021
3b2073b
Minor corrections of mistakes that snuck through the dev061 merge
slevis-lmwg Nov 4, 2021
a399480
Change use_mimics_decomp -> mimics_decomp and coordinate w decomp_method
slevis-lmwg Nov 5, 2021
8166fd0
Updated params files and respective code
slevis-lmwg Nov 8, 2021
4eb3372
Add mimics tests, one to cheyenne and one to izumi test suites
slevis-lmwg Nov 8, 2021
019fe54
Update params files (var names/values), clean up various TODOs
slevis-lmwg Nov 15, 2021
3b94597
Revisions in response to Erik's code review and 1 or 2 remaining TODOs
slevis-lmwg Nov 16, 2021
3211e89
I should have removed this comment in the previous commit
slevis-lmwg Nov 16, 2021
e5f3ffd
Revert unnecessary changes in bld/listDefaultNamelist.pl
slevis-lmwg Nov 16, 2021
f6b3bf9
Correct the clay units by converting from % to fraction in MIMICS
slevis-lmwg Nov 18, 2021
2b071a3
Merge tag 'ctsm5.1.dev066' into vert_res_in_mimics
slevis-lmwg Dec 10, 2021
6205b30
First draft of updated ChangeLog
slevis-lmwg Dec 11, 2021
b69a4e7
Merge remote-tracking branch 'escomp/master' into vert_res_in_mimics
slevis-lmwg Jan 27, 2022
ab17157
Minor merge conflict caught by test-suite
slevis-lmwg Jan 27, 2022
c2a21bf
Update ChangeLog + add comment in SoilBiogeochemDecompCascadeMIMICSMod
slevis-lmwg Jan 28, 2022
99c3c30
Committing the three new timing calls that I added to time MIMICS
slevis-lmwg Jan 28, 2022
5451493
Updated ChangeLog/ChangeSum
slevis-lmwg Jan 29, 2022
eba8244
Added newton_krylov_spinup testmod and corresponding new test
slevis-lmwg Feb 2, 2022
be14cd1
Update changelog, tweak a few things, make sure issues mentioned have…
ekluzek Feb 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/biogeochem/CNCStateUpdate1Mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ subroutine CStateUpdateDynPatch(bounds, num_soilc_with_inactive, filter_soilc_wi
do j = 1,nlevdecomp
do fc = 1, num_soilc_with_inactive
c = filter_soilc_with_inactive(fc)
! TODO BFB refactor: In loops like this, we will run into trouble
! with MIMICS bc we will have 2 instead of 3 litter pools. Can
! address with if statements (NOT ideal) or
! turn these repetitive lines into a loop BUT to do that
! we need to turn dwt_frootc_to_litr_* into a 3d var.
! There are 3 such loops here, 2 in CNCStateUpdate2, and one
! in CNCStateUpdate1 and the pattern repeats in the
! corresponding N modules.
slevis-lmwg marked this conversation as resolved.
Show resolved Hide resolved
cs_soil%decomp_cpools_vr_col(c,j,i_met_lit) = cs_soil%decomp_cpools_vr_col(c,j,i_met_lit) + &
cf_veg%dwt_frootc_to_litr_met_c_col(c,j) * dt
cs_soil%decomp_cpools_vr_col(c,j,i_cel_lit) = cs_soil%decomp_cpools_vr_col(c,j,i_cel_lit) + &
Expand Down
9 changes: 8 additions & 1 deletion src/main/clm_varpar.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module clm_varpar
use shr_sys_mod , only: shr_sys_abort
use spmdMod , only: masterproc
use clm_varctl , only: use_extralakelayers, use_vertsoilc
use clm_varctl , only: use_century_decomp, use_c13, use_c14
use clm_varctl , only: use_century_decomp, use_mimics_decomp
use clm_varctl , only: use_c13, use_c14
use clm_varctl , only: iulog, use_crop, create_crop_landunit, irrigate
use clm_varctl , only: use_vichydro, rundef
use clm_varctl , only: soil_layerstruct_predefined
Expand Down Expand Up @@ -232,6 +233,9 @@ subroutine clm_varpar_init(actual_maxsoil_patches, actual_numcft)
if (use_century_decomp) then
ndecomp_pools = 6
ndecomp_cascade_transitions = 8
else if (use_mimics_decomp) then
ndecomp_pools = ?
ndecomp_cascade_transitions = ?
else
ndecomp_pools = 7
ndecomp_cascade_transitions = 7
Expand All @@ -241,6 +245,9 @@ subroutine clm_varpar_init(actual_maxsoil_patches, actual_numcft)
if (use_century_decomp) then
ndecomp_pools = 7
ndecomp_cascade_transitions = 10
else if (use_mimics_decomp) then
ndecomp_pools = ?
ndecomp_cascade_transitions = ?
else
ndecomp_pools = 8
ndecomp_cascade_transitions = 9
Expand Down
3 changes: 3 additions & 0 deletions src/soilbiogeochem/SoilBiogeochemDecompCascadeConType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module SoilBiogeochemDecompCascadeConType
character(len=8) , pointer :: decomp_pool_name_history(:) ! name of pool for history files
character(len=20) , pointer :: decomp_pool_name_long(:) ! name of pool for netcdf long names
character(len=8) , pointer :: decomp_pool_name_short(:) ! name of pool for netcdf short names
logical , pointer :: is_microbe(:) ! TRUE => pool is a microbe pool
logical , pointer :: is_litter(:) ! TRUE => pool is a litter pool
logical , pointer :: is_soil(:) ! TRUE => pool is a soil pool
logical , pointer :: is_cwd(:) ! TRUE => pool is a cwd pool
Expand Down Expand Up @@ -72,6 +73,7 @@ subroutine init_decomp_cascade_constants( use_century_decomp )
allocate(decomp_cascade_con%decomp_pool_name_history(ibeg:ndecomp_pools))
allocate(decomp_cascade_con%decomp_pool_name_long(ibeg:ndecomp_pools))
allocate(decomp_cascade_con%decomp_pool_name_short(ibeg:ndecomp_pools))
allocate(decomp_cascade_con%is_microbe(ibeg:ndecomp_pools))
allocate(decomp_cascade_con%is_litter(ibeg:ndecomp_pools))
allocate(decomp_cascade_con%is_soil(ibeg:ndecomp_pools))
allocate(decomp_cascade_con%is_cwd(ibeg:ndecomp_pools))
Expand All @@ -93,6 +95,7 @@ subroutine init_decomp_cascade_constants( use_century_decomp )
decomp_cascade_con%decomp_pool_name_restart(ibeg:ndecomp_pools) = ''
decomp_cascade_con%decomp_pool_name_long(ibeg:ndecomp_pools) = ''
decomp_cascade_con%decomp_pool_name_short(ibeg:ndecomp_pools) = ''
decomp_cascade_con%is_microbe(ibeg:ndecomp_pools) = .false.
decomp_cascade_con%is_litter(ibeg:ndecomp_pools) = .false.
decomp_cascade_con%is_soil(ibeg:ndecomp_pools) = .false.
decomp_cascade_con%is_cwd(ibeg:ndecomp_pools) = .false.
Expand Down
Loading