Add generic BGC interface into ACME land model#330
Add generic BGC interface into ACME land model#330daliwang merged 24 commits intoE3SM-Project:masterfrom wanggangsheng:wanggangsheng/lnd/bgc-interface
Conversation
|
@wanggangsheng and @rljacob. I have problem to merge wanggangsheng/lnd/bgc-interface with next after the CIME merge into origin/next. I was able to do this merge on Monday evening before CIME merge. wangd/ACME> git merge --no-ff wanggangsheng/lnd/bgc-interface https://gist.github.com/835b12488ffc6cae4e82 |
|
If you do "git status" what does it list for "Unmerged paths:" ? |
|
@rljacob Thanks. I will work to solve the CLMBuildNamelist.pm today. |
|
@bishtgautam & @daliwang: This PR is focused on bgc-interface and ensures clm-bgc could be run through the interface. The clm_pflotran code has also been tested on point-scale run. I will keep working on the clm_pflotran code based on bgc-interface after V1. |
|
"# Unmerged paths:# (use "git add/rm ..." as appropriate to mark resolution) @rljacob, I tried "git add components/mpas-o/model" and get the message: error: unable to index file components/mpas-o/model These two folders are there, but just empty? Any suggestion? |
|
Maybe @douglasjacobsen can help. |
|
@douglasjacobsen, can you offer some help? We need this PR for collaborations with BNL. |
|
@daliwang Yes. So, the thing you need to do is have the submodules checked out prior to performing the merge. And the submodules need to be checked out in the place they are going to be. (i.e. You should probably do the following (again before doing the merge): Then, if it lists conflicts again with |
|
@douglasjacobsen . Thanks. I will try to make the merge tonight and keep you posted on the progress. |
|
@rljacob and @douglasjacobsen. I merged the branch on my local repo. Where I can find the new information on create_test? The test scripts have been moved too? |
|
|
* wanggangsheng/lnd/bgc-interface: (24 commits) [CC], [NML], [BFB] LG-31, LG-80 Conflicts solved by Dali Wang 09/29/2015 components/mpas-o/model components/mpasli/model models/lnd/clm/bld/CLMBuildNamelist.pm
|
I forgot to say this: don't push any more changes to origin/next until we're done with the cime testing. You don't have to undo your recent merge. |
|
Looks like this will have to be reverted. The conflicts in CLMBuildNamelist.pm were not resolved correctly. The CIME-changes were discarded in favor of the old build system. |
|
I've fixed this by committing a new CLMBuildNamelist.pm directly to next. That should allow testing to run. Don't revert it but this branch will have to be updated when its merged to master. |
|
Is this an answer-changing commit? |
|
@rljacob: Though the commit message has both @wanggangsheng, can you confirm that this PR is BFB? |
|
Yes it should be one or the other. |
|
I did a force push on next to remove this and keep the changes @jgfouca checked in afterwards. You'll have to merge this to next again but wait until CIME clears. |
|
@rljacob. OK. I will merge it later. It is a BFB commit. |
|
@rljacob, @bishtgautam: @daliwang is right, this PR is BFB. |
* wanggangsheng/lnd/bgc-interface: (24 commits) [CC], [NML], [BFB] LG-31, LG-80 add control on re-calculate sminn_to_plant_vr clean-up code Simplify var list for CNDecompAlloc & CNAllocation2 Simplify var list for CNAllocation2 & CNDecompAlloc redo comments clean up code bgc_interface initialization clean up code correct ARGUMENT intent: in or inout add plant_ndemand_col(c) to CNNitrogenFluxType and clean up code Exclude Fire fluxes from pflotran external input accounting set initial t_soisno_col to its default value (274K) avoid NaN in pflotran fpi_vr calculation change CNDecompAlloc1 to CNDecompAlloc add restart variables for interface generic clm_bgc_interface add run CNDecompAlloc1 through clm_bgc_interface complete test run of clm_pf based on clm_bgc_interface Simplify clm_pflotran_interface based on clm_bgc_interface use clm_bgc_data instead of original CLM types in clm_pflotran_interface ... Conflicts: components/mpas-o/model components/mpasli/model models/lnd/clm/bld/CLMBuildNamelist.pm
|
@daliwang, the merge commit message on next has " [CC], [NML], [BFB]". It should only have one of [BFB] or [CC]. @wanggangsheng , edit the initial message at the top of this PR to remove [CC] if this is not climate changing. |
|
@rljacob. Removed [CC] tag. |
|
@rljacob and @jgfouca, I am not sure how to interpret the result on http://my.cdash.org/index.php?project=ACME_Climate&date=. My test on Titan are always good, but is it an OK to push this branch onto master, considering the result on CDASH? |
|
@daliwang , just worry about melvin and skybridge for now. Melvin has 1 expected fail, ERS.f45_g37.B1850C5. Skybridge has two expected fails, the aquaplanet stuff that I think Rob just fixed and SMS_D. So it looks like the only changes were to namelists, so you're good to merge. |
* wanggangsheng/lnd/bgc-interface: (24 commits) [NML], [BFB] LG-31, LG-80 ===================== add control on re-calculate sminn_to_plant_vr clean-up code Simplify var list for CNDecompAlloc & CNAllocation2 Simplify var list for CNAllocation2 & CNDecompAlloc redo comments clean up code bgc_interface initialization clean up code correct ARGUMENT intent: in or inout add plant_ndemand_col(c) to CNNitrogenFluxType and clean up code Exclude Fire fluxes from pflotran external input accounting set initial t_soisno_col to its default value (274K) avoid NaN in pflotran fpi_vr calculation change CNDecompAlloc1 to CNDecompAlloc add restart variables for interface generic clm_bgc_interface add run CNDecompAlloc1 through clm_bgc_interface complete test run of clm_pf based on clm_bgc_interface Simplify clm_pflotran_interface based on clm_bgc_interface use clm_bgc_data instead of original CLM types in clm_pflotran_interface ... Conflicts fixed by Dali Wang 10/06/2015 components/mpas-o/model components/mpasli/model models/lnd/clm/bld/CLMBuildNamelist.pm
|
@wanggangsheng : I'm trying to better understand the changes made in this PR.
Compared to the default call sequence, the source code in
Did I interpret the code modifications correctly? |
These code modifications are for implementing a generic BGC interface in ACME land model.
Three flags are added into the namelist group 'clm_inparm':
2.1. 'use_bgc_interface': runtime flag to turn on/off BGC interface.
2.2. 'use_clm_bgc': runtime flag to turn on/off running ALM soil BGC sub-model through BGC interface.
2.3. 'use_pflotran': runtime flag to turn on/off pflotran
New namelist group ('clm_pflotran_inparm') is created and two flags are added into 'clm_pflotran_inparm':
3.1. 'pflotran_prefix': pflotran file prefix.
3.2. 'plfotran_inputdir': pflotran input directory.
Major code changes include:
4.1. Three new F90 files are added into 'lnd/clm/src/main':
(1) clm_bgc_interface_data.F90: define and initialize clm_bgc_interface_data_type
(2) clm_bgc_interfaceMod.F90: include subroutines to implement BGC interface
(3) clm_pflotran_interfaceMod.F90: include subroutines to implement coupling of pflotran to ALM.
4.2. break down the subroutine 'CNEcosystemDynNoLeaching' into two subroutines:
(1) CNEcosystemDynNoLeaching1: called before running soil BGC sub-model
(2) CNEcosystemDynNoLeaching2: called after running soil BGC sub-model
4.3. break down the subroutine 'CNDecompAlloc' into two subroutines:
(1) CNDecompAlloc: the standalone ALM soil BGC module that keeps the majority of code in original 'CNDecompAlloc', only Phase-2 of CNAllocation (i.e., CNAllocation2_ResolveNPLimit) is called in this subroutine.
(2) CNDecompAlloc2: integration of net_nmin/pmin, gross_nmin/pmin to column level is moved from original CNDecompAlloc to this subroutine; Phase-3 of CNAllocation (i.e., CNAllocation3_PlantCNPAlloc) is implemetned in this subroutine. Additional calculations required by specific soil BGC sub-model may also be included in this subroutine, e.g, integration of plant N/P uptake to column level and calculation of fpg and fpi while pflotran is coupled to ALM.
4.4. break down the subroutine 'CNAllocation' into three subroutines
(1) CNAllocation1_PlantNPDemand: calculate plant N/P demand; called in CNEcosystemDynNoLeaching1.
(2) CNAllocation2_ResolveNPLimit: Resolve N/P Limitation; called in CNDecompAlloc
(3) CNAllocation3_PlantCNPAlloc: Plant C/N/P Allocation; called in CNDecompAlloc2
This PR will not be answer-changing if 'use_bgc_interface' and 'use_clm_bgc' are turned on.
[NML], [BFB]
LG-31, LG-80