Skip to content
Snippets Groups Projects
  1. Apr 27, 2024
  2. Nov 28, 2023
    • Lionel GUEZ's avatar
      Follow PEP 8 - Code lay-out - Imports · 9ba7449c
      Lionel GUEZ authored
      9ba7449c
    • Lionel GUEZ's avatar
      Move functions to `util_eddies.py` · af3e3abd
      Lionel GUEZ authored
      Move functions `node_to_date_eddy` and `date_eddy_to_node` from script
      `report_graph.py` to script `util_eddies.py`. `util_eddies.py`
      contains more basic functions, it only imports
      shapefile. `report_graph.py` imports networkx. It was not convenient
      nor meaningful to require networkx for scripts that use
      `node_to_date_eddy` or `date_eddy_to_node`.
      af3e3abd
  3. Jul 13, 2023
  4. Jun 23, 2023
  5. Jun 02, 2023
    • Lionel GUEZ's avatar
      Check that `SHPC_dir` exists · 994d00c0
      Lionel GUEZ authored
      Check that `SHPC_dir` exists at initialization of instance of class
      SHPC. Before this commit, if `SHPC_dir` did not exist, there was an
      error trying to create `n_slices.txt`, which was less clear.
      994d00c0
  6. Apr 13, 2023
    • Lionel GUEZ's avatar
      Move second test on `ishape_last` inside the first · 716ca075
      Lionel GUEZ authored
      Move the second test on `self._ishape_last[i_slice][orientation]`
      inside the first test. Avoid the double test on
      `self._ishape_last[i_slice][orientation]` when
      `self._ishape_last[i_slice][orientation]` is not None on entry of the
      function. If `self._ishape_last[i_slice][orientation]` is not None on
      entry of the function then, necessarily, the assertion on
      `self._ishape_last[i_slice][orientation].size` and the definition of
      `self._e_max[i_slice][orientation]` have already been done because
      `self._ishape_last[i_slice][orientation]` and
      `self._e_max[i_slice][orientation]` are only defined from the function
      get_ishape_last.
      716ca075
    • Lionel GUEZ's avatar
      Check that `ishape_last` is not empty · 65c0e52b
      Lionel GUEZ authored
      65c0e52b
  7. Apr 11, 2023
    • Lionel GUEZ's avatar
      Return None if eddy index is greater than max · 86cf7b84
      Lionel GUEZ authored
      In function `comp_ishape`, return None instead of crashing if eddy
      index is greater than max. This allows the script
      `write_date_range.py` to work with an input SHPC containing a date
      without eddies.
      86cf7b84
  8. Apr 08, 2023
  9. Apr 07, 2023
  10. Mar 21, 2023
  11. Feb 20, 2023
  12. Oct 10, 2022
  13. Sep 26, 2022
  14. Sep 16, 2022
    • Lionel GUEZ's avatar
      Polish · 5d8ed590
      Lionel GUEZ authored
      5d8ed590
    • Lionel GUEZ's avatar
      Create `n_slices.txt` if not found · 486ba014
      Lionel GUEZ authored
      The immediate motivation comes from tests `Mat_v6_to_shapefiles` and
      `Plot_eddy_contours_Mat`. `Plot_eddy_contours_Mat` needs to open the
      SHPC in `Mat_v6_to_shapefiles`. `Mat_v6_to_shapefiles` does not create
      `n_slices.txt` and we do not want to create `n_slices.txt` in
      `inst_eddies_v6.py` because this script could be run in parallel for
      several slices. There is no simple way to create `n_slices.txt`
      automatically after runnning `inst_eddies_v6.py` in the test
      `Mat_v6_to_shapefiles`. We cannot use a redirection in a command of
      the test so something like `echo 0 > n_slices.txt` would not work.
      486ba014
    • Lionel GUEZ's avatar
      Define default orientation in `comp_ishape` · b328ab6f
      Lionel GUEZ authored
      Note that orientation = None is passed to `get_ishape_last` where it
      becomes `self.def_orient`.
      b328ab6f
    • Lionel GUEZ's avatar
      Move function `comp_ishape` to method · 76000cb7
      Lionel GUEZ authored
      Move function `comp_ishape` to method of SHPC class.
      76000cb7
    • Lionel GUEZ's avatar
      ed16ca4a
  15. Sep 09, 2022
  16. Sep 08, 2022
  17. Sep 06, 2022
  18. Aug 31, 2022
Loading