AtChem / AtChem2

Atmospheric chemistry box-model for the MCM
MIT License
59 stars 22 forks source link

Fixed input and output of constant photolysis rates #467

Closed AlfredMayhew closed 2 years ago

AlfredMayhew commented 2 years ago

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[bot] commented 2 years ago

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%) :arrow_up:
unittests 31.62% <0.00%> (+0.01%) :arrow_up:

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%) :arrow_up:
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 commented 2 years ago

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

spco commented 2 years ago

Looks good to me!