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

[Chemistry] Adding Chemical Production/Loss Processes to Canopy-App in Some Way #59

Open
drnimbusrain opened this issue May 2, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@drnimbusrain
Copy link
Member

There is an idea by Zach to add more complex canopy chemistry and related processes (e.g., CRFs, soil processes, etc.) to canopy-app by use of python-based surrogate/ML tools to avoid computational slowdown. This high-level idea could be achieved by calling python random forest or gradient-boosted (XGBoost) tools from the main canopy-app Fortran routines.

@zmoon Can you elaborate a bit more on ideas to help push this forward?

@zmoon
Copy link
Member

zmoon commented May 9, 2023

The idea would be to run a 1-D canopy-chemistry model like ACCESS or FORCAsT for many different conditions (meteo and background chemical state, canopy parameters, etc.). Then train a ML model, e.g. random forest or XGBoost, to predict something X, e.g. terpene in-canopy chemical processed fraction. Then in canopy-app Fortran, the trained model can be loaded 1 and used to calculate X.

Footnotes

  1. e.g. https://github.com/christophkeller/fortran2xgb

@drnimbusrain drnimbusrain added the enhancement New feature or request label May 11, 2023
@drnimbusrain drnimbusrain changed the title Adding Surrogate/ML Driven Processes to Canopy-App Adding Chemical Processes to Canopy-App in Some Way May 25, 2023
@drnimbusrain
Copy link
Member Author

@zmoon What about the ACCESS Box model approach...it would be awesome if you could help with this component (and radiation) in the future!! Thanks..

@zmoon
Copy link
Member

zmoon commented May 25, 2023

What are you suggesting to do with the box model? Use to make the training data instead of 1-D canopy-chem model?

@drnimbusrain drnimbusrain changed the title Adding Chemical Processes to Canopy-App in Some Way [Chemistry] Adding Chemical Processes to Canopy-App in Some Way Sep 6, 2023
@drnimbusrain
Copy link
Member Author

drnimbusrain commented Sep 13, 2023

What are you suggesting to do with the box model? Use to make the training data instead of 1-D canopy-chem model?

Realized, I never responded. Yes, use ACCESS to train of course, but I think you already suggested that.

Overall, I think this ML approach is a way forward rather than implementing a relatively lean chemical model/solver into canopy-app, but I am concerned with the robustness and ability to train to get correct fractions. Plus, I am always concerned with having to retrain model for the virtually unlimited, and always changing environmental conditions.

@drnimbusrain
Copy link
Member Author

drnimbusrain commented Sep 13, 2023

@MaggieMarvin I wonder if you are interested in helping with this part, in conjunction with advancing the biogenic emissions. For example, how were you planning on integrating canopy-app with your F0AM model (understood that its in MATLAB)?

Could this work be included to advance a relatively simple chemistry or run across a range of conditions where the outputs are used to train ML in canopy-app? See Zach's initial comments above. Ultimately, I wonder if the F0AM model could be easily run across range of conditions (e.g., background chemistry, weather, canopy etc.) to get the 'X' that Zach has referred to above. You probably would be doing this anyway for your canopy-app comparisons/evaluations using F0AM model.

@drnimbusrain drnimbusrain added the help wanted Extra attention is needed label Sep 13, 2023
@MaggieMarvin
Copy link
Collaborator

Yes, this sounds interesting to me! I was thinking of using emission output from canopy-app as input for F0AM to produce mixing ratios on a point by point basis. Emissions are unofficially supported, since F0AM is a 0-D model, but could be approximated as a 0th order reaction. There's a possibility of representing deposition too. And yes, F0AM can be run across a range of conditions, or we could use it to test some simple chemistry - it's very easy to change existing mechanisms or build new ones with F0AM.

@drnimbusrain drnimbusrain changed the title [Chemistry] Adding Chemical Processes to Canopy-App in Some Way [Chemistry] Adding Chemical Production/Loss Processes to Canopy-App in Some Way Sep 15, 2023
@drnimbusrain
Copy link
Member Author

Ultimately, @MaggieMarvin, comparison/offline coupling with F0AM is a great start, and somehow we would like to expand use of simplified chemical solvers pertinent to the canopy so that we can in some way approximate the chemical production/losses at each level in canopy-app. This will be pivotal in its offline mode, but also may be useful when coupled into larger UFS at some point.

@drnimbusrain
Copy link
Member Author

@drnimbusrain
Copy link
Member Author

Could also add simple, efficient chemistry scheme to canopy-app directly, as has been done in LES canopy studies:
Clifton et al. (2022): https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2022MS003078
Fuentes et al. (2022): https://www.sciencedirect.com/science/article/abs/pii/S1352231022001595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants