WIP: Adding the EcoSIM for ATS PK (#335)#337
Open
AndrewGraus wants to merge 8 commits into
Open
Conversation
Merging this into agraus/ecosim_pk without review. The review will be performed during the PR that will be requested from the feature branch to master as per repo policies and to facilitate the process.
Member
|
CI is working but will need updates to the GitHub action when we merge the EcoSIM TPLs build to the master of Amanzi. Also, there aren't any regression tests of the EcoSIM capabilities. What this shows at this point is it doesn't break any of the existing code. @smolins and @AndrewGraus are working on the regression tests now. |
The transport code has been uncommented and changed from the old system (total component concentration) to mole fraction. A new bool (microbe_bool) has been added which activates the transport code, so the code works even if transport is not in the PK tree. Added the shortwave incident radiation to give the coupler the ability to see the diurnial cycle if needed.
-EcoSIM now has canopy held snow which must be carried over between subsequent runs of the EcoSIM PK -Added a new dataset to ATS state named canopy_snow which has the shape (num_columns x num_pfts) so it holds the snow for each plant variety
-reverted to using the column size scheme to add the canopy snow data. This is a bit hacky as we should be looping over num_pfts, but as long as the number of cells in a column > 5 this won't cause any issues. -Bug fix for how the memory for canopy snow was allocated, the wrong size was used, and it was grabbing random data to pass back to EcoSIM.
Contributor
|
@jd-moulton @ecoon: @AndrewGraus has now added a test in the ecosim_pk branch of ats-regression-tests that can be used to help with the review. Should run for about a minute. We can add more tests as needed but some parts of the input spec for phenology options are being refined. |
EcoSIM requires a plant trait table that defines the PFT to parameter mapping. Originally this was just loaded from a default place in EcoSIM. - Modified the code to take in the parameter engine input file in the EcoISM PK - Loads the string into BGCProperties for use on the EcoSIM side
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contains the EcoSIM PK, and additional changes to CMake and header files. The EcoSIM PK replaces ATS surface balance and plant biogeochemistry with the models from EcoSIM:
https://github.com/jinyun1tang/EcoSIM
An in-depth user guide with how to install ATS with the EcoSIM TPL, and integrate the surface balance into the PK can be found here:
https://docs.google.com/document/d/157D910Ubuyw7tgoaSrVJ66M5D8bBelwTVE9CC7pv1LM/edit?tab=t.0#heading=h.rnmw1ogza2ln
Corresponding Amanzi pull request for the EcoSIM TPL can be found here:
amanzi/amanzi#952
Overview of coupling:
EcoSIM PK - The purpose of this interface is to gather data from ATS state to report to EcoSIM on the subsurface flow and energy. It also uses ATS to manage surface forcings including weather, radiation and phenology and package them for forcing EcoSIM as well.
BGC Engine - modeled after Alquimia's chemistry engine, the idea is this is meant to be flexible to use with other BGC codes similar to Alquimia and geochemical codes.
Contains data structures BGCProperties, BGCState, and BGCSizes which are constructed to be translatable between c++ and fortran90, modeled off the Alquimia data structures. The code related to these is stored in pks/ecosim/data.
EcoSIM uses the subsurface properties and forcings from ATS to run its own submodules for surface and subsurface water and energy balance, and sums the resulting fluxes for water and energy in the surface/subsurface to transfer back to ATS, with these fluxes being passed to ATS flow and energy PKs as sources/sinks
Processes controlled by EcoSIM:
In addition to passing aggregated fluxes, EcoSIM passes variables that are stored in ATS state. Some of these are stored for recall in between subsequent runs of EcoSIM within ATS or to restart, such as snow depth and canopy heat storage. Additionally, there are variables that are passed into ATS state to make use of ATS visualization and observation capabilities, such as evaporation flux components, transpiration, and snow temperature.
To Do:
EcoSIM needs to be informed of the Hydraulic conductivity. Currently, this is done on the EcoSIM side, but because ATS is running the hydrology model it would be more self-consistent to use ATS. I attempted to write an evaluator, but it is broken.
Vegetation type is not fully implemented and is being updated actively. Eventually, EcoSIM will allow more than one vegetation type per column. Some decisions need to be made about how that data will be formatted, and then the coupling will be updated to reflect that.
Transport - The EcoSIM PK can access concentrations and pass them to EcoSIM. However, EcoSIM's root nutrient absorption and biochemistry modules are not yet integrated, so transport has been removed from the PK tree for now.
Microbe biochemistry - Integrate the modules related to microbe biochemistry. Once integrated they will provide additional source/sinks to transport and flow for water and nutrient uptake, and any chemistry changes.
Full Plant Phenology - For now the phenology (LAI, vegetation type) needs to be input from data. However, EcoSIM has a full treatment of plant growth and phenology. The final step of the coupling will be to provide ATS access to this.