-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add TUV-x run function #223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! What are the differences between the fixed and the original configuration?
void RunTuvx(TUVX *tuvx, const double solar_zenith_angle, const double earth_sun_distance, | ||
double * const photolysis_rate_constants, double * const heating_rates, Error * const error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess const pointer to Error
is fine, but only this Error
parameter is marked by const
compared to the other functions that take Error
Error * const error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could make a follow-up task to go through all the code and use const
consistently and where it makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I like the idea
<DiagnosticConditionalJump> | ||
Memcheck:Cond | ||
fun:__tuvx_diagnostic_util_MOD_diagnostic_1d_dk | ||
fun:__tuvx_photolysis_rates_MOD_get | ||
fun:__tuvx_core_MOD_run | ||
fun:InternalRunTuvx | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valgrind was catching a conditional jump on uninitialized data that I couldn't really make sense of because the source code line that seemed to trigger it was a fortran function header. it seems to only be related to when we try to output diagnostics inside TUV-x, so I figured it wouldn't be a big deal to suppress the error. But, I could also make a separate issue to look into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. Yeah I agree. I don't think it wouldn't be a big deal for that case
The fixed configuration is where everything is specified in the json file, and the other test includes setting some grids and profiles through the API. Is this what you were asking? |
oh I was curious what's fixed in the new fixed configuration that are different from the old(?) configuration |
ah, I think it's pretty much the same as the old configuration. I just renamed it fixed because I added this other configuration where some of the data is changed by the user |
Adds the ability to run the TUV-x calculations through the C and Fortran APIs. This leaves the TUV-x Python wrapper for future work.