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

Fixed input and output of constant photolysis rates #467

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

AlfredMayhew
Copy link
Collaborator

Following discussion in #372.

I have also removed the ignoring of the first line in the photolysisConstant.config file, when read by inputFunctions.f90.

Changing the inputFunctions.f90 file as discussed in #372 resulted in issues with the outputFunctions.f90 file, which I believe I have also fixed.
It's worth noting that when using at least one constant J value only the constant J values are output in the photolysisRates.output file. I assumed this was by design since the photolysisConstant.config overrides other photolysis rates and sets them to 0 (even if they are specified as constrained), e.g. giving a value of 1E-5 for J1 in photolysisConstant.config and listing J2 in photolysisConstrained.config will result in a model where J1 = 1E-5 throughout and J2 = 0, regardless of what the J2 constraint file says.

Hopefully this is all OK and makes sense, let me know if there's anything else that needs changing.

@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #467 (3aa07fb) into master (afc3896) will increase coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #467      +/-   ##
==========================================
+ Coverage   55.37%   55.40%   +0.02%     
==========================================
  Files          17       17              
  Lines        2046     2045       -1     
==========================================
  Hits         1133     1133              
+ Misses        913      912       -1     
Flag Coverage Δ
build 52.27% <0.00%> (+0.03%) ⬆️
unittests 31.62% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/inputFunctions.f90 36.13% <0.00%> (+0.05%) ⬆️
src/outputFunctions.f90 50.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afc3896...3aa07fb. Read the comment docs.

@rs028 rs028 requested a review from spco February 11, 2022 12:27
@rs028
Copy link
Collaborator

rs028 commented Feb 11, 2022

Are we happy to merge this? Looks all right to me.

@@ -145,7 +145,7 @@ subroutine outputPhotolysisRates( t )
write (58, '(100A15) ') 't', (trim( constantPhotoNames(i) ), i = 1_NPI, numConstantPhotoRates)
firstTime = .false.
end if
write (58, '(100 (ES15.6E3)) ') t, (j(ck(i)), i = 1_NPI, numConstantPhotoRates)
write (58, '(100 (ES15.6E3)) ') t, (j(constantPhotoNumbers(i)), i = 1_NPI, numConstantPhotoRates)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good bug catch, thanks!

@spco
Copy link
Collaborator

spco commented Feb 11, 2022

Looks good to me!

@rs028 rs028 merged commit 118c485 into AtChem:master Feb 12, 2022
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.

None yet

3 participants