Skip to content
Snippets Groups Projects
  1. Sep 02, 2021
    • Lionel GUEZ's avatar
      Add argument d to function `write_to_shp` · ec3e4807
      Lionel GUEZ authored
      Clearer, instead of accessing global variable d.
      ec3e4807
    • Lionel GUEZ's avatar
      Polish · 0220c96e
      Lionel GUEZ authored
      0220c96e
    • Lionel GUEZ's avatar
      Do not specify variable names · 79e3f538
      Lionel GUEZ authored
      No need since we want all the variables in the file.
      79e3f538
    • Lionel GUEZ's avatar
      Polish · 73af5652
      Lionel GUEZ authored
      73af5652
    • Lionel GUEZ's avatar
      Bug fix: take into account ghost eddies · 4df9e5c4
      Lionel GUEZ authored
      Bug fix: take into account ghost eddies in global Matlab adt
      files. Some eddies are duplicated in global adt files, at the border
      of the longitude domain. We should not use these ghost eddies. So
      R\'emi has added variables `id_anti_cell` and `id_cyclo_cell` in adt
      files. Read them. They should contain numbers from 1 to the number of
      eddies, with a step of 1, intersparsed with NaN values. Check that
      when reading the variables. Add an argument `cell_mask` to function
      `write_to_shp` that signals ghost eddies.
      4df9e5c4
    • Lionel GUEZ's avatar
      Bug fix: add default values for arguments · fa3870eb
      Lionel GUEZ authored
      Bug fix: add default values for arguments of function
      `write_to_shp`. This fixes the case when the adt file is missing. The
      bug comes from commit 28afccf5. For simplicity, we remove the empty
      list actual argument for cell, in the case of a missing file. Then we
      have to test in `write_to_shp` whether cell is None.
      fa3870eb
    • Lionel GUEZ's avatar
      Change order of arguments of `write_to_shp` · 01ad8d01
      Lionel GUEZ authored
      Move argument cyclone of function `write_to_shp` before argument
      cell. cyclone does not depend on `matlab_data`. We are preparing a bug
      fix for the case of a missing adt file.
      01ad8d01
    • Lionel GUEZ's avatar
      Rename function write to `write_to_shp` · a4c23961
      Lionel GUEZ authored
      The name write is too common.
      a4c23961
    • Lionel GUEZ's avatar
      Polish · 6b3fe80a
      Lionel GUEZ authored
      6b3fe80a
    • Lionel GUEZ's avatar
      Add arguments X, Y, ADT to function write · 28afccf5
      Lionel GUEZ authored
      Instead of using values of global variable `matlab_data` inside the
      function write. This is clearer. Especially since we already had an
      argument of write, cell, which is a value of `matlab_data`.
      28afccf5
  2. Jul 01, 2021
  3. Jun 22, 2021
  4. Jun 04, 2021
  5. May 25, 2021
  6. May 17, 2021
    • Lionel GUEZ's avatar
      Use subprocess instead of pty · d5754c38
      Lionel GUEZ authored
      Much simpler and more robust. This should also ease submitting the
      script to a batch scheduler. And we can now check the return code of
      Matlab.
      d5754c38
    • Lionel GUEZ's avatar
      Use option `-batch` · 88ec00d5
      Lionel GUEZ authored
      Take advantage of version 2019 of Matlab now available on Ciclad,
      which has option `-batch`. This clears the output and opens the way to
      subprocess instead of `pty.spawn`.
      88ec00d5
  7. Apr 30, 2021
  8. Apr 29, 2021
  9. Apr 03, 2021
    • Lionel GUEZ's avatar
      Bug fix: convert polyline to list · 6c850f50
      Lionel GUEZ authored
      Method poly of shapefile writer requires a list of lists, not a list
      of numpy arrays. This bug goes unnoticed in pyshp `2.1.0` but raises an
      exception with pyshp `2.1.3`.
      6c850f50
  10. Apr 02, 2021
  11. Mar 10, 2021
  12. Mar 09, 2021
  13. Mar 04, 2021
    • Lionel GUEZ's avatar
      Manage missing dates · 7a48e5fd
      Lionel GUEZ authored
      We just write a line in `ishape_last.txt`. Note that we cannot catch
      the error, which occurs inside Matlab, so we have to test for file
      existence beforehand.
      7a48e5fd
  14. Mar 03, 2021
  15. Feb 23, 2021
    • Lionel GUEZ's avatar
      Polish · 07870a84
      Lionel GUEZ authored
      07870a84
    • Lionel GUEZ's avatar
      Convert the mat file to v6 from inside Python · 59b96d45
      Lionel GUEZ authored
      Call the Matlab script from the Python script. We cannot do this with
      subprocess because Matlab requires a terminal. With subprocess, the
      Matlab script complains: "inappropriate ioctl for device". Note that
      we cannot test that the Matlab script worked normally because it exit
      with code 0 regardless: the exit instruction returns code 0.
      
      The idea here is that we do not want to store the converted v6 mat files.
      59b96d45
    • Lionel GUEZ's avatar
      Polish · d3f2dfea
      Lionel GUEZ authored
      d3f2dfea
  16. Feb 18, 2021
  17. Feb 16, 2021
Loading