AtChem / AtChem2

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

Fix c-bind bug in update_p() #438

Closed spco closed 3 years ago

spco commented 3 years ago

Use assumed-size arrays (*) rather than assumed-shape (:) for the c-bind update_p() function, as the latter is not standards-compliant and does not offer consistent access to lbound. Older versions of gfortran did not raise this as an issue, possibly because they have different minimum standards.

This should close

Note that upgrading Ubuntu versions also changes the gfortran version: (from https://www.scivision.dev/major-gfortran-changes/)

Ubuntu 20.04 default: gfortran-9 Ubuntu 18.04 default: gfortran-7

which likely explains the difference in behaviour when upgrading. I can't find any information about what differences there are in this specific case though - the changelogs don't mention anything that looks relevant.

This should address #431 , #435 , and #437 . Could one or more of @ShenAlbert, @jjunum, @vinthony, @xiaoky97, @AlfredMayhew , or @Ekimmai please test this to see whether it fixes their issue?

codecov[bot] commented 3 years ago

Codecov Report

Merging #438 (6fb2683) into master (abf98ac) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #438   +/-   ##
=======================================
  Coverage   88.73%   88.73%           
=======================================
  Files          17       17           
  Lines        2264     2264           
=======================================
  Hits         2009     2009           
  Misses        255      255           
Flag Coverage Δ
build 62.49% <ø> (ø)
tests 87.89% <ø> (ø)
unittests 35.73% <ø> (ø)

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

Impacted Files Coverage Δ
src/solverFunctions.f90 91.25% <ø> (ø)

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 abf98ac...6fb2683. Read the comment docs.

AlfredMayhew commented 3 years ago

I've done a fresh install with this branch and it all seems to work. Thanks very much.

spco commented 3 years ago

Fantastic, thanks @AlfredMayhew . I will merge this. Hope that's useful for you going forwards 👍

Albert-Chemistry commented 3 years ago

Thank you @spco . I have also done a fresh install with this branch, and the test mechanism ran successfully. I will use observation data to test the model recently, and I hope to continue communicating with you if there are any problems. Thank you very much for your help.