Skip to content

Draft: Plotting errors & other updates

This turned into a large pull request so apologies. To summarise the features it adds:

  • Refactor of the plot function to give better error messages when grids etc. can't be found. Also added some docstring info. This is the bulk of the merge request and the problems it addresses are detailed in issue #3.
  • Adds automatic running of tests to the list of CI jobs. This motivated several other changes in the below list.
  • Changes to the default parameters in pyicon_params.py to automatically save files elsewhere when not on levante.
  • Updated the test data set to one publicly available and containing variables on edges, cells and vertices (useful for future testing.) This also resolves issue #4. The dataset will be accessible for the next 1,000 days after which the link will need updating.
  • Fixes some problems with xr_crop_tgrid that became apparent when running the tests.
  • Fixes some problems with xr_calc_curl that became apparent when running the tests.
  • Updated conftest.py to include lazy and eagerly loaded datasets. Also updated the tests accordingly.
  • Updated the config_ckdtree/config_ckdtree_r2b4_oce_r0004.py script to save grids to the grid_path set by the user. This allows the script to run on non-levante systems, which is needed for running the automatic testing.
  • Ran autopep8 on all files changed to make things look nice.

At the moment the automatic testing happens in a container on my laptop. If the automatic testing is something we'd like to keep, we can ask DKRZ to provide us with a "runner" to run the tests instead. See https://docs.dkrz.de/doc/software%26services/gitlab-runner.html#dkrz-runners.

Merge request reports