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

Spatially varying forcing #227

Closed edoddridge closed 5 years ago

edoddridge commented 5 years ago

This PR implements forcing fields that can vary spatially with time and closes #226. The fields are provided as a series of snapshots, and the model selects the appropriate one based on the timestep and the provided parameters for moving between subsequent snapshots. The forcing fields can either be linearly interpolated to avoid jumps, or they can swap directly between snapshots at a particular timestep.

Two new test are introduced: one with interpolation, and one without. Both use a model domain that is rectangular, which adds to the number of tests with reduced symmetry.

The new functionality is documented, but I still need to update the aronnax.conf file in the base directory.

I also amended the test suite to fix the aspect ratio of the plots so that the domain really does show up as rectangular.

Todo:

codecov[bot] commented 5 years ago

Codecov Report

Merging #227 into master will decrease coverage by 0.34%. The diff coverage is 87.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #227      +/-   ##
==========================================
- Coverage   91.75%   91.41%   -0.35%     
==========================================
  Files          20       20              
  Lines        1808     1886      +78     
  Branches       95      100       +5     
==========================================
+ Hits         1659     1724      +65     
- Misses        124      134      +10     
- Partials       25       28       +3
Impacted Files Coverage Δ
src/aronnax.f90 94.18% <100%> (ø) :arrow_up:
aronnax/driver.py 94.01% <100%> (+0.15%) :arrow_up:
src/io.f90 95.34% <100%> (+0.6%) :arrow_up:
aronnax/core.py 91.66% <70.37%> (-3.64%) :arrow_down:
src/model_main.f90 94.85% <85.71%> (-1.82%) :arrow_down:

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 d65359f...e83cd40. Read the comment docs.