-
Notifications
You must be signed in to change notification settings - Fork 38
WIP: Adding the EcoSIM for ATS PK #335
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
Open
AndrewGraus
wants to merge
589
commits into
amanzi:agraus/ecosim_pk
Choose a base branch
from
AndrewGraus:master
base: agraus/ecosim_pk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Added runtime options for turning on Albedo modification and prescribed phenology. Albedo modification appears to be working but phenology currently needs more debugging.
This is an update to clean up some of the code and document the ATS side better. Cleaned up some old templates and code related to Alquimia. No actual code was modified.
Cleaned up the data structures, and condensed some of the files as well.
This update adds several datasets to the ATS-EcoSIM datastructures for carry over and analysis. This includes variables needed to carry over canopy properties between timesteps, and place EcoSIM fluxes into ATS's state for plotting purposes. The datesets are: canopy longwave radiation boundary latent heat flux boundary sensible heat flux canopy surface water evapotranspiration evaporation from bare ground evaporation from litter evaporation from snow sublimation from snow Note this update just makes the variables visible to ATS, but it has not been linked to ATS state yet. There will be a similar update on the EcoSIM side.
This adds datasets to ATS that hold the various components of the flux including evaporation, transpiration, and snow temperature.
The versions should now be compatible. Some minor edits needed to be made outside of the merge, due to capitalization changes of some header files, and renaming of the requireAtCurrent/Next functions. This code compiles, but currently is not running due to some changes to transport in the input files.
This commit fixes the ATS-EcoSIM coupling to be compatible with ATS 1.6. The major change post- merge is concentrations are now accessed via mole_fraction instead of total_component_concentration.
This commit contains alot of comment cleanup, and a first pass at adding documentation to the header in the ATS style.
This is a fix for a bug I found in the area. Prior to this the computation was done by length of the side which only works for rectangular cells. Changed it to actually use the area of the ATS column instead.
moved the ecosim_wrapper to the ecosim side, and deleted it from the ATS side. I also removed some old testing files that are no longer needed. The CMake files have also been changed to reflect this.
The water content is in mols because we only currently need the density to convert water content to m in EcoSIM it makes more sense to just use the molar densitSwitching density to molar density
In prior versions of the coupler the ATS SEB PK was used. Now that EcoSIM is doing the SEB we no longer need to use ATSs SEB PK. However fully removing it requiured changing the initialization so that the EcoSIM PK owns those variables. Additionally, transport is access but not used currently. So I commneted out transport sections until we actually need to test transport
Changed parameters for the EcoSIM PK parameter file to be more consistent with capitalization.
This update changes the coupling data structures to replace evapotranspiration with transpiration, and add an individual key for the canopy evaporation component. From now on total evapotranspiration should be done in ATS by explicitly summing transpiration and evaporation components with a custom evaluator.
The coupling interface has been updated to correctly add in rock density to the data structures. Additionally all of the custom evaluators have been modified. Bulk density and matric pressure have been removed as the bulk density calculation is done in EcoSIM now, and the matric pressure is substituted for capillary pressure. For now hydraulic conductivity is still present, but not in use yet as I try to decide on a final way to get hydraulic conductivity correct.
When building off Lijing's Sondgrass model I found an odd issue. precipitation_rain was not being initialized correctly. Needed to add the necesary evaluator calls for precipiation_rain. The question is why did this work before?
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.
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:
https://github.com/amanzi/amanzi/pull/945
Overview of coupling:
EcoSIM PK - The purpose of this interface is to gather data from ATS state to report to EcoSIM on the state of 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:
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 will need some tweaks. 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.