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

Command-line driver for MICM #326

Merged
merged 14 commits into from
Nov 21, 2023
Merged

Command-line driver for MICM #326

merged 14 commits into from
Nov 21, 2023

Conversation

boulderdaze
Copy link
Collaborator

@boulderdaze boulderdaze commented Oct 24, 2023

Closes #308

Created try-out example configurations with a single grid cell and a set of initial conditions from a CSV file

  • chapman
  • TS1
  • robertson
  • carbon bond 5

@boulderdaze boulderdaze changed the title Draft:micm driver that works for chapman config Draft:Command-line driver for MICM Oct 24, 2023
examples/CMakeLists.txt Outdated Show resolved Hide resolved
examples/configs/chapman/initial_conditions.csv Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2023

Codecov Report

Attention: 157 lines in your changes are missing coverage. Please review.

Comparison is base (aabe856) 96.07% compared to head (5bb1b36) 91.09%.

Files Patch % Lines
examples/example.cpp 0.00% 123 Missing ⚠️
include/micm/solver/state.inl 2.85% 34 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #326      +/-   ##
==========================================
- Coverage   96.07%   91.09%   -4.99%     
==========================================
  Files          37       38       +1     
  Lines        2852     3008     +156     
==========================================
  Hits         2740     2740              
- Misses        112      268     +156     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

CONC.O,0.566253459937848
CONC.O2,0.566253459937848
CONC.O3,0.566253459937848
ENV.temperature,287.45
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use environmental conditions for the stratosphere, say around z = 30 km?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would make slightly more sense for chapman

// solving until we finish
double elapsed_solve_time = 0;

while (elapsed_solve_time < time_step)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps also an option for multiple time steps would be nice at some point.

@K20shores
Copy link
Collaborator

@boulderdaze would you please add support for running carbon bond 5? There are conditions for the rate constants all the way back at this commit

@boulderdaze boulderdaze marked this pull request as ready for review November 17, 2023 20:36
@boulderdaze boulderdaze changed the title Draft:Command-line driver for MICM Command-line driver for MICM Nov 17, 2023
@boulderdaze
Copy link
Collaborator Author

@boulderdaze would you please add support for running carbon bond 5? There are conditions for the rate constants all the way back at this commit

Yes, carbon bond 5 configuration is added

Comment on lines 126 to 134
// Print only the first 10 if the number of elements are bigger than 10
if (variable_names_.size() > 10)
{
for(short i=0; i<10; i++)
{
std::cout << "," << std::setw(width) << variable_names_[i];
}
std::cout << std::setw(width) << "..." << std::endl;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should print everything. That way the output could be redirected to a file.

Comment on lines 159 to 167
// Print only the first 10 if the number of elements are bigger than 10
if (variable_names_.size() > 10)
{
for(short i=0; i<10; i++)
{
std::cout << std::scientific << "," << std::setw(width) << std::setprecision(2) << variables_[0][variable_map_[variable_names_[i]]];
}
std::cout << std::scientific << std::setw(width) << std::setprecision(2) << "...";
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, please print everything

Copy link
Collaborator

@mattldawson mattldawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@mattldawson mattldawson merged commit b9b2f88 into main Nov 21, 2023
58 checks passed
@mattldawson mattldawson deleted the command-line_driver branch November 21, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create simple command-line driver for MICM
5 participants