Skip to content
Snippets Groups Projects
  1. Jun 22, 2021
    • Lionel GUEZ's avatar
      Plot a single orientation in `plot_traj.py` · 8e3e0e10
      Lionel GUEZ authored
      We are reverting commit b926e1b7 because now there are two SHPC input
      directories for visible eddies, two SHPC for interpolated eddies and
      edgelists in differents directories for the two orientations. Handling
      the command line arguments would be awkward.
      8e3e0e10
  2. Jun 15, 2021
  3. May 25, 2021
  4. May 20, 2021
  5. Mar 11, 2021
  6. Feb 12, 2021
  7. Feb 05, 2021
    • Lionel GUEZ's avatar
      Polish · e1743a2e
      Lionel GUEZ authored
      e1743a2e
    • Lionel GUEZ's avatar
      Add time option · fae8de64
      Lionel GUEZ authored
      Print time measurements only when time option is
      activated. Motivation: we need reproducibility for the automated test.
      fae8de64
    • Lionel GUEZ's avatar
      Add option save · 92bc155d
      Lionel GUEZ authored
      For the test of the script in `tests.json`. Normally, we would save to
      pdf, but pdf format includes a date stamp. So pdf is not convenient
      for testing. So we include the format value in argument save and we
      save to png for the automated test.
      92bc155d
  8. Feb 04, 2021
  9. Feb 03, 2021
  10. Jan 06, 2021
    • Lionel GUEZ's avatar
      Add timings · 3db476e7
      Lionel GUEZ authored
      3db476e7
    • Lionel GUEZ's avatar
      Bug fix: adapt the central longitude · ca88694a
      Lionel GUEZ authored
      Adapt the central longitude of the projection, depending on window or
      position of chosen node. Else we can have arrows crossing the whole projection.
      ca88694a
    • Lionel GUEZ's avatar
      Polish · 3c67d186
      Lionel GUEZ authored
      3c67d186
    • Lionel GUEZ's avatar
      Plot all components intersecting window · 45f68732
      Lionel GUEZ authored
      With window option, the script used to plot all components in the
      subgraph containing the nodes in the window. So the components stopped
      at nodes inside the window. Now we do better: we plot all the
      components intersecting the window. These components may extend beyond
      the window. This is in particular better if a component has a
      connecting part outside of the window. In the old script, this
      component would have been plotted as two components.
      
      We achieve this by adding components intersecting the window in the
      `component_list` attribute of the graph. And we modify the function
      `plot_all_components`: it no longer calls
      `nx.weakly_connected_components`: it just plots all the components in
      `component_list`.
      
      We only call `nx.weakly_connected_components` through the function
      `assign_all_components` if the script is run without the window or
      node options.
      45f68732
    • Lionel GUEZ's avatar
      Function to expand `component_list` of graph · a5c171f6
      Lionel GUEZ authored
      Rename `get_component` to `add_component`. This function now adds a
      component to the graph attribute `component_list` instead of returning
      the component as a separate object. The function also adds the
      component attribute to each node in the added component.
      
      The idea is that we may want to add components in successive steps if
      we study successive windows.
      a5c171f6
    • Lionel GUEZ's avatar
      f6209185
    • Lionel GUEZ's avatar
      Add graph attribute `component_list` · 1abc661c
      Lionel GUEZ authored
      Rename `assign_components` to `assign_all_components`. Move this
      function from file `report_graph.py` to file `plot_traj.py` because we
      are going to use it there (it is as yet not used
      anywhere). `assign_all_components` stores `component_list` as a graph
      attribute instead of returning it as a separate object. More robust
      and convenient.
      
      Also, in the node attribute component, store the component instead of
      its index in `component_list`. More robust and convenient. This does
      not use more storage space since component is just a reference to the
      set object.
      1abc661c
    • Lionel GUEZ's avatar
      Plot with Cartopy · 7253351b
      Lionel GUEZ authored
      This is necessary for a global domain and a plot on a region crossing
      the first longitude in the input SSH files. Plotting with Cartopy
      requires giving up the function `nx.draw_networkx`, since this
      function does not pass through the transform keyword. So we have to
      call the Matplotlib functions directly: scatter,
      `patches.FancyArrowPatch` and annotate.
      7253351b
    • Lionel GUEZ's avatar
      Add window option · bbd94ddc
      Lionel GUEZ authored
      This is necessary for a global domain: plotting the global domain is
      too long.
      bbd94ddc
  11. Dec 26, 2020
  12. Sep 15, 2020
    • Lionel GUEZ's avatar
      Rewrite `plot_traj.py` · 0fa6853f
      Lionel GUEZ authored
      Add options: plot a single component; label the leafs, the splits or
      the merges, or all eddies, instead of the roots. Add functions for
      easier hacking.
      0fa6853f
  13. Sep 11, 2020
    • Lionel GUEZ's avatar
      Annotate all the ancestors · cb8c8e56
      Lionel GUEZ authored
      The previous version annotated a single ancestor, and it was not
      necessarily the ancestor with the oldest date. Moreover, this revision
      is probably quicker: no need for subgraph and topological sort.
      cb8c8e56
    • Lionel GUEZ's avatar
      Polish · d8017f69
      Lionel GUEZ authored
      d8017f69
    • Lionel GUEZ's avatar
      Remove test on `__name__` · caa042e4
      Lionel GUEZ authored
      Now useless.
      caa042e4
    • Lionel GUEZ's avatar
      Define attributes of nodes · e2df5ef9
      Lionel GUEZ authored
      Define attribute `coordinates` of nodes instead of separated
      dictionary pos. Use function `report_graph.read_eddy_graph` to define
      the attributes of nodes. So we do not need the functions
      `compute_ishape` and `get_coord` any longer. Note that, for visible
      eddies, `plot_traj.py` used to loop on nodes of the graph and access
      corresponding shapes, while `report_graph.read_eddy_graph` loops on
      the shapes and accesses corresponding nodes. This is probably quicker.
      e2df5ef9
    • Lionel GUEZ's avatar
      Add argument edgelist to `read_eddy_graph` · bb16628b
      Lionel GUEZ authored
      Because, in hacking mode, we want to be able to import `report_graph`
      and use function `report_graph.read_eddy_graph` from any directory.
      bb16628b
  14. Sep 09, 2020
    • Lionel GUEZ's avatar
      Make `compute_ishape` more robust · cde2f92f
      Lionel GUEZ authored
      I encountered the case where `n[0] < k1` with the result of
      `test_overlap`. The results were silently wrong: Python does not
      complain that `ishape_last` is indexed with a negative value.
      cde2f92f
    • Lionel GUEZ's avatar
      Polish · 4d80f25c
      Lionel GUEZ authored
      4d80f25c
  15. Jul 24, 2020
Loading