edoddridge / aronnax

An idealised isopycnal model that can be run either with n+1/2 layers, or with n layers and variable bathymetry.
http://aronnax.readthedocs.io/en/latest/
MIT License
23 stars 5 forks source link

Refactor Fortran code into modules in src/ directory #181

Closed edoddridge closed 6 years ago

edoddridge commented 6 years ago

The main Fortran program was getting very long and unwieldy. This PR breaks the code into thematically grouped modules and places them in the src/ directory. This should make it easier to locate pieces of code in the future. The Makefile has been updated to deal with the increased complexity of the compilation.

While making this change I became frustrated with the test suite stopping at the first difference it found, and so I fixed #136 while refactoring.

The standalone compile step in .travis.yml no longer worked, and so I added the -Werror flag to the test options and removed the compilation.

codecov[bot] commented 6 years ago

Codecov Report

Merging #181 into master will decrease coverage by 0.13%. The diff coverage is 95.35%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #181      +/-   ##
=========================================
- Coverage   95.53%   95.4%   -0.14%     
=========================================
  Files           5      17      +12     
  Lines        1344    1327      -17     
  Branches       74      74              
=========================================
- Hits         1284    1266      -18     
  Misses         43      43              
- Partials       17      18       +1
Impacted Files Coverage Δ
src/barotropic_mode.f90 100% <100%> (ø)
src/bernoulli.f90 100% <100%> (ø)
src/vorticity.f90 100% <100%> (ø)
src/momentum.f90 100% <100%> (ø)
src/advection_schemes.f90 100% <100%> (ø)
src/end_run.f90 58.82% <58.82%> (ø)
src/enforce_thickness.f90 63.63% <63.63%> (ø)
src/aronnax.f90 89.69% <89.69%> (ø)
src/state_deriv.f90 91.66% <91.66%> (ø)
src/boundaries.f90 93.65% <93.65%> (ø)
... and 16 more

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 d6e05bb...c08dfab. Read the comment docs.

edoddridge commented 6 years ago

The decrease in coverage is very small (-0.14%) and all of the misses are lines that print error messages. I'm therefore inclined to merge even though this slightly reduces code coverage.