Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

spinup with MIMICS in CTSM #1451

Closed
wwieder opened this issue Aug 4, 2021 · 12 comments
Closed

spinup with MIMICS in CTSM #1451

wwieder opened this issue Aug 4, 2021 · 12 comments
Assignees
Labels
enhancement new capability or improved behavior of existing capability science Enhancement to or bug impacting science

Comments

@wwieder
Copy link
Contributor

wwieder commented Aug 4, 2021

We need to determine the most efficient way to handle spinup of soil C pools with MIMICS in CTSM #1318 that also reuses available code, where possible. I don't think the at AD spinup used in the century-BGC approach is appropriate for the MIMICS given the non-linear feedbacks between microbial biomass pools and litter/SOM pools. In initial conversations with @slevisconsulting and @klindsay28 we've identified the following options to explore farther to use the:

  1. sasu spinup from the matrix. This may require spinning up the microbial biomass pools (which equilibrate rapidly) and using fixed microbial biomass to pools to spinup 'shadow' littter and soil C pools, similar to what done for nutrients in ocean BGC.
  2. newton-krylov solver that @klindsay28 has implemented for MARBL
  3. approach used by Ying-Ping Wang for his vertically resolved implementation of MIMICS (this will require lots of new code...)

This seems like a good place for us to record thoughts, ideas, and progress on this topic.

@slevis-lmwg
Copy link
Contributor

slevis-lmwg commented Aug 4, 2021

The presence of other matrix solvers in use in the CTSM also came up in our conversation.

The following subroutines call Tridiagonal:
ch4_tran solves for (1) conc_ch4_rel, (2) conc_o2_rel.
LakeTemperature solves for the lake and soisno temperature profile.
soilwater_zengdecker2009 solves for dwat2.
SoilBiogeochemLittVertTransp solves for conc_trcr.

Other:
subroutine SoilTemperature calls BandDiagonal for t_soisno.
subroutine SNICAR_RT sets up it's own tridiagonal solution locally for flx_abs_lcl.
subroutine soilwater_moisture_form has an unused call to private procedure TridiagonalCol for dwat.

I see that the new matrix solver replaces the above mentioned call Tridiagonal in SoilBiogeochemLittVertTransp.

@slevis-lmwg
Copy link
Contributor

Including here for reference...
Ying-Ping's code:
/glade/work/slevis/cable_mimics/vsoilmic05f_ms25.f90
To spin up the mimics system of equations he uses the following numerical recipes calls:

do ns=1,ms  ! soil layer loop
call ludcmp
call ludksb

After spin-up, he solves the mimics system of equations daily using Runge-Kutta. Next he solves the soil bgc once per year in subroutine bioturb with a tridiagonal solver.

@slevis-lmwg
Copy link
Contributor

Putting my response to our email thread here:

@wwieder yes, it would likely help to include Yiqi and Ying-Ping in one of our meetings and/or this github issue.

My main question for Ying-Ping is why he chose ludcmp + ludksb for the mimics spin-up while using subr. tridiag for the annual soil bgc timestep. I may of course be missing something trivial given my inexperience with matrix solvers. But this seems relevant if we are considering using CTSM's matrix solver (Yiqi's or Tridiagonal) for both steps.

Otherwise, I think you're right that our work putting MIMICS in the same structure as the existing bgc code (#1318) should allow seamless use of the matrix setup in SoilBiogeochemLittVertTranspMod.F90.

@slevis-lmwg
Copy link
Contributor

slevis-lmwg commented Nov 15, 2021

While I tie loose ends in #1318
I started cold-start simulations to assess model behavior at 1x1_brazil:

  • init_stock_1: completed 700+ yrs, annual output, initial C soil pools 200 gC/m3, microbes, litter, cwd = 1 gC/m3 each
  • init_stock_10: completed 700+ yrs, annual output, initial C stocks soil pools 200 gC/m3, microbes, litter, cwd = 10 gC/m3

These two simulations start different but quickly end up looking very similar:
oli_mic_c_2000-2550_layers_1-5
met_lit_c_2000-2550_layers_1,2,5,6,11
avl_som_c_2000-2550_layers_1,2,5,6,9
The x-axis shows time from 2000 to 2550 (simulation started in 1850).

Try init_stock_100?

PS. Used compset IHistClm50BgcQianRs (my attempts to run 1x1_brazil w a Clm51 compset failed).

@wwieder
Copy link
Contributor Author

wwieder commented Nov 15, 2021

Very, exciting, Sam.

I'm not sure how much it may help to increase the initial pools size, especially because stocks are zero below 1.5 m and will only 'fill' by diffusion (which will take some time). Hopefully the N-K spinup will help with this!

Can you point me to the directory where these simulations are?

@slevis-lmwg
Copy link
Contributor

Can you point me to the directory where these simulations are?

Exciting indeed :-)

In /glade/scratch/slevis/archive, look at cases

  • init_stock_1
  • init_stock_10

New runs in progress:

  • init_stock_1_f10 ...is the global run
  • init_stock_1_test ...should have name it BGC. Currently running 50 yrs of AD_SPINUP

@slevis-lmwg
Copy link
Contributor

New runs in progress:

  • init_stock_1_f10 ...is the global run
  • init_stock_1_test ...should have name it BGC. Currently running 50 yrs of AD_SPINUP

@wwieder these runs have stopped now, too.
200 yrs in the first one and 100 yrs (post spin-up) in the second one. We're supposed to compare the second one to init_stock_1:

  • in terms of pools, a quick look at metabolic litter tells me that there are sizable differences.
  • in terms of timing, BGC takes ~2.8 hrs/100 yrs, MIMICS takes ~3.6 hrs/100 yrs. Recall that I'm running 1x1_brazil, writing annual output and restarts every 10 yrs.

Feel free to look at output in /glade/scratch/slevis/archive/<case_name> and let me know if you'd like me to run longer or if there are other tests you'd like me to perform.

@wwieder
Copy link
Contributor Author

wwieder commented Nov 18, 2021

Hi Sam, You're right the size of the pools are quite different. I'm not expecting them to be identical, but in surface horizons it looks like SOMp and litter pools are ~10x larger with MIMICS than their analogous plots in the BGC model, suggesting turnover times (controlled by Vmax and Km) are too slow with the vertically resolved MIMICS results. I also was surprised to see how small the SOMc pools were in MIMCS, making we wonder if we're doing something incorrectly related to the allocation to or turnover from this pool?

@slevis-lmwg
Copy link
Contributor

slevis-lmwg commented Nov 19, 2021

The new simulation is far enough along to give us an idea, I think. See /glade/scratch/slevis/archive/init_stock_1/lnd/hist
The previous simulation is here now:
/glade/scratch/slevis/archive/init_stock_1/lnd/hist/clay_as_pct
I have looked only at the top soil layer:
chem_som_c has roughly tripled but avl_som_c and phys_som_c are less.
oli_mic_c has more than doubled.
cop_mic_c has increased by a factor of 4 or 5.
met_lit_c has roughly doubled.
str_lit_c has increased by about a factor of 1.5
@wwieder pls take a look and let me know if there are other tests you'd like to try. (No rush.)

@wwieder
Copy link
Contributor Author

wwieder commented Nov 19, 2021

thanks for the summary @slevisconsulting. I'll look more at this. all the changes you described make sense, and I think are desirable, but not the necessarily increases in litter pools. This is not what I'd expected.

@slevis-lmwg
Copy link
Contributor

Tangentially related to MIMICS spinup:
I wanted to keep handy this MIMICS timing table for future reference.

@samsrabin samsrabin added enhancement new capability or improved behavior of existing capability science Enhancement to or bug impacting science and removed enh - new science labels Aug 8, 2024
@ekluzek
Copy link
Collaborator

ekluzek commented Aug 14, 2024

Moving to a discussion.

@ESCOMP ESCOMP locked and limited conversation to collaborators Aug 14, 2024
@ekluzek ekluzek converted this issue into discussion #2693 Aug 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement new capability or improved behavior of existing capability science Enhancement to or bug impacting science
Projects
None yet
Development

No branches or pull requests

4 participants