- Apr 27, 2024
-
-
Lionel GUEZ authored
Move dummy argument `i_slice` of function `comp_ishape` to last position. Because we are going to add a default value.
-
- Nov 28, 2023
-
-
Lionel GUEZ authored
-
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`.
-
- Jul 13, 2023
-
-
Lionel GUEZ authored
-
- Jun 23, 2023
-
-
Lionel GUEZ authored
-
Lionel GUEZ authored
-
Lionel GUEZ authored
This was polluting standard output. So we have to add the shapefile path when it is not found.
-
Lionel GUEZ authored
OSError is more specific than SystemExit. It is better to have a more specific exception when we want to catch it.
-
Lionel GUEZ authored
Invert order of dummy arguments orientation and layer of method `get_reader`. Take the same order than in the path. `orientation` was at the end because, at first, in commit d858fb72, it was an optional argument.
-
- Jun 02, 2023
-
-
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.
-
- Apr 13, 2023
-
-
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.
-
Lionel GUEZ authored
-
- Apr 11, 2023
-
-
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.
-
- Apr 08, 2023
-
-
Lionel GUEZ authored
-
- Apr 07, 2023
-
-
Lionel GUEZ authored
-
Lionel GUEZ authored
-
Lionel GUEZ authored
-
Lionel GUEZ authored
In function `comp_ishape`, check that `eddy_index` is in the right range.
-
Lionel GUEZ authored
-
Lionel GUEZ authored
Preparation for a check in `comp_ishape`.
-
- Mar 21, 2023
-
-
Lionel GUEZ authored
On second thought, I find the default value confusing. We are reverting commit b328ab6f.
-
- Feb 20, 2023
-
-
Lionel GUEZ authored
-
Lionel GUEZ authored
Allow missing `ishape_last.txt` in method `comp_ishape`. This is useful is an SHPC is missing an orientation.
-
Lionel GUEZ authored
-
Lionel GUEZ authored
-
- Oct 10, 2022
-
-
Lionel GUEZ authored
-
- Sep 26, 2022
-
-
Lionel GUEZ authored
Superceded by class `SHPC_class`.
-
- Sep 16, 2022
-
-
Lionel GUEZ authored
-
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.
-
Lionel GUEZ authored
Note that orientation = None is passed to `get_ishape_last` where it becomes `self.def_orient`.
-
Lionel GUEZ authored
Move function `comp_ishape` to method of SHPC class.
-
Lionel GUEZ authored
-
- Sep 09, 2022
-
-
Lionel GUEZ authored
Several scripts allow `ishape_last.txt` not to exist. For example `eddy_dump.py`.
-
Lionel GUEZ authored
The code is adapted from `filter.py`.
-
- Sep 08, 2022
-
-
Lionel GUEZ authored
-
Lionel GUEZ authored
Especially, we want to allow missing layer `max_speed_contour` when running script `plot_eddy_contours.py`.
-
- Sep 06, 2022
-
-
Lionel GUEZ authored
The motivation is to manage an SHPC directory without opening first all the files inside. The class allows to open files dynamically and remember already opened files.
-
Lionel GUEZ authored
-
Lionel GUEZ authored
`slice` is a built-in class of Python.
-
- Aug 31, 2022
-
-
Lionel GUEZ authored
If `date < handler["d_init"]` then the result of the function is silently wrong.
-