Skip to content
Snippets Groups Projects
  1. Feb 07, 2020
    • Lionel GUEZ's avatar
      Bug fix: rank of MPI processes is 0-based · bf3c1053
      Lionel GUEZ authored
      Bug fix in procedure `dispatch_snapshot`: the rank of MPI processes is 0-based.
      
      Bug fix: remove `extr_map_outermost.nc`, which was not used since
      commit ad420d25.
      bf3c1053
    • Lionel GUEZ's avatar
      Use SHP triplets with several snapshots · d023fd3f
      Lionel GUEZ authored
      Organize better the directory `Input`: create sub-directories for regions.
      
      Big change: use SHP triplets that can contain several snapshots. So
      program `test_overlap` reads a single SHP triplet. The dates that
      `test_overlap` should read are now specified in the input
      namelist. SHP triplet directory must now contain a file named
      `contents.csv`. `test_overlap` reads `contents.csv` into variables k1
      and `ishape_last`. So there is no longer any need to read the number
      of entities in one of the shapefiles.
      
      For each region, concatenate SHP triplets for dates 2006/01/01 and
      2006/01/02.
      
      Read namelist from process 0 in program `test_send_recv`: it is
      simpler since it is the default setting of mpiexec and I do not see
      any drawback.
      
      In programs `test_read_snapshot` and `test_send_recv`, just hard code
      for now the ishapes we want to read in the SHP triplet.
      d023fd3f
  2. Jan 28, 2020
    • Lionel GUEZ's avatar
      Generalize `read_snapshot` · d18ad095
      Lionel GUEZ authored
      Generalize `read_snapshot`. Add dummy argments `ishape_first` and
      `ishape_last`. This allows getting a snaphot from a triplet of
      shapefiles containing several snapshots. Consequence: move the call to
      `shp_get_info_03` from `read_snapshot` to `test_overlap`,
      `test_read_snapshot` and `test_send_recv`.
      
      Remove opening and closing of shapefiles from procedure
      `get_snapshot`. Since a triplet of shapefiles can contain several
      snapshots, we do not want to open and close the same shapefiles
      several times from the same MPI process.
  3. Jan 10, 2020
    • Lionel GUEZ's avatar
      Complete `send_snapshot` and `recv_snapshot` · 9fb56f5f
      Lionel GUEZ authored
      Pass argument copy to `read_snapshot` rather than arguments periodic
      and `dist_lim`. Motivation: do not recompute copy at each call of
      `read_snapshot`. `read_snapshot` is going to be called many times in
      overlap program, with always the same value of copy. And we do not
      need the values of periodic and `dist_lim` separately in
      `read_snapshot`.
      
      Complete `send_snapshot` and `recv_snapshot` by sending and receiving
      an entire snapshot. So we need nlon, nlat and copy in `recv_snapshot`
      to allocate `extr_map`. It is better to pass arguments nlon, nlat and
      copy than sending and receiving the shape of `extr_map` with MPI, of
      course, since the shape is the same for all snapshots. In program
      `test_send_recv`, write the entire received snaphot.
      
      Bug fix in `Tests/CMakeLists.txt`: several targets missed
      `${netcdff_INCLUDE_DIR}`.
      
      Create procedure `write_snapshot` from code in main program
      `test_read_snapshot`, because we need to do this also in program
      `test_send_recv`. Note the dissymmetry with `read_snapshot`, which
      does not include the opening and closing of the shapefiles. That is
      because we anticipate calling `read_snapshot` several times with the
      same shapefiles in program overlap.
      
      Change order of dummy arguments of procedure `write_extr_map`. More
      convenient for calling it with keywords from `write_snapshot`.
      9fb56f5f
    • Lionel GUEZ's avatar
      Simplify cmake files · 4ca261bb
      Lionel GUEZ authored
      Simplify cmake files, taking advantage of improved packaging of
      libraries. This also much simplifies the configuration process: the
      user typically has only two directories to specify: `CMAKE_PREFIX_PATH` and
      `fortrangis_INCLUDE_DIR`. Also `Shapelib_03` no longer depends on EZMPI,
      since revision 129a0cc.
      
      Add test for `test_send_recv`.
      4ca261bb
  4. Dec 26, 2019
    • Lionel GUEZ's avatar
      Send and receive a whole eddy in `test_send_recv` · 0b01c42f
      Lionel GUEZ authored
      We need the dummy version of EZMPI for sequential programs linking
      with `Shapelib_03`.
      
      Replace `include_directories` by `target_include_directories` in
      `Tests/CMakeLists.txt`. Motivation: some targets do no use ezmpi. This
      implies adding directories to `target_include_directories` for
      `extraction_eddies`.
      
      In `send_snapshot` and `recv_snapshot`, send and receive a whole
      eddy. Read and write a snapshot in `test_send_recv`.
      0b01c42f
  5. Dec 19, 2019
    • Lionel GUEZ's avatar
      Use library EZMPI · a9f5fa95
      Lionel GUEZ authored
      In procedures `recv_snapshot` and `send_snapshot`, use library EZMPI
      instead of MPI directly.
      
      Rename `receive_snapshot` to `recv_snapshot` for consistency with MPI
      calls. In procedure `send_snapshot`, invert order of dummy arguments
      tag and dest for consistency with MPI calls.
      a9f5fa95
  6. Dec 18, 2019
  7. Nov 20, 2019
  8. Oct 30, 2019
  9. Oct 04, 2019
    • Lionel GUEZ's avatar
      Generalize `eddy_dump.py` · 8c9b7b72
      Lionel GUEZ authored
      In script `eddy_dump.py`, do not assume that there is a single date
      index. So find ishape by iterating through values of date index and
      eddy index.
      
      Add a test of overlap in `short_tests.json`.
      8c9b7b72
  10. Oct 03, 2019
    • Lionel GUEZ's avatar
      Bug fixes in `test_overlap` · e8a607ef
      Lionel GUEZ authored
      In procedure `write_eddy`, no need of special treatment for
      interpolated eddy: the outermost contours and max-speed contours are
      defined as null.
      
      Read name of input file on the command line in script `read_overlap.py`.
      
      Add tests with program `test_overlap` in `short_tests.json`.
      
      Bug fix in main unit `test_overlap`: we have to call
      `init_interpolated_eddy`.  In main unit `test_overlap`, change the
      initial value of `flow(2:max_delta)%number_eddies` for more clarity in
      the results. Bug fix in main unit `test_overlap`: valid isolated
      eddies of snasphot 2 are in `flow(max_delta + 1)`, not `flow(2)`.
      e8a607ef
  11. Oct 01, 2019
    • Lionel GUEZ's avatar
      Generalize `test_successive_overlap` · 51c86d55
      Lionel GUEZ authored
      Rename `test_successive_overlap` to `test_overlap`: we will also use
      it for non-successive overlap. Accordingly, add an input variable
      `max_delta` and change the size of flow to `max_delta` + 1. We read
      from snapshots `flow(1)` and `flow(max_delta + 1)`. For
      `flow(2:max_delta)`, we only need to define the component
      `number_eddies`.
      51c86d55
  12. Sep 27, 2019
  13. Sep 24, 2019
    • Lionel GUEZ's avatar
      Add tests for program `test_write_overlap` · 63016959
      Lionel GUEZ authored
      Change the order of dummy arguments of `write_overlap`.
      
      Add tests for program `test_write_overlap`. In program
      `test_write_overlap`, make the eddy identifiers distinct.
      63016959
    • Lionel GUEZ's avatar
      Create procedure `init_interpolated_eddy` · 9a4eaaa4
      Lionel GUEZ authored
      Create procedure `init_interpolated_eddy` so that initialization is
      not repeated needlessly at each call of `write_overlap`. (Problem was
      mentioned in message of commit 10f339d2.)
      9a4eaaa4
    • Lionel GUEZ's avatar
      Use `SHP_triplet` instead of Snapshot · 69200aca
      Lionel GUEZ authored
      Use `SHP_triplet` instead of Snapshot for the name of the directory
      containing the three shapefiles extremum, `outermost_contour` and
      `max_speed_contour`. This is meant as a general name, analogous to a
      new file type. Generally, the shapefiles may contain eddies at
      different dates, not just a snapshot.
      69200aca
  14. Sep 18, 2019
    • Lionel GUEZ's avatar
      Add options for the NAG compiler · c2f43bbe
      Lionel GUEZ authored
      Add options for the NAG compiler.
      
      Replace `target_include_directories` by `include_directories` in
      `Tests/CMakeLists.txt`. The file was becoming too long.
      
      Remove unused items in use statements.
      
      Bug fix in `Tests/Input/successive_overlap_region_5_nml.txt`: remove a comma.
      c2f43bbe
  15. Sep 06, 2019
    • Lionel GUEZ's avatar
      Replace `$test_old_dir` by `$src_dir/Tests/Input` · 845752bc
      Lionel GUEZ authored
      Bug fix in procedure overlap: procedure `interpolate_eddy` does not
      exist any longer.
      
      In tests, remove use of `$test_old_dir`, use data from
      `$src_dir/Tests/Input` instead. Motivation: run tests for the first
      time more easily.
      845752bc
  16. Sep 03, 2019
    • Lionel GUEZ's avatar
      Add main program `test_write_overlap` · 507614a4
      Lionel GUEZ authored
      Change order of dummy arguments of procedure
      `write_overlap`. Motivation: call with keywords in
      `test_write_overlap`.
      
      Add main program `test_write_overlap` and corresponding tests in
      `short_tests.json`.
      
      New script `triplet_dump.sh`.
      507614a4
  17. Sep 02, 2019
    • Lionel GUEZ's avatar
      Move the inner part of overlap to `write_overlap` · 10f339d2
      Lionel GUEZ authored
      Add `.cmake` files. The idea is to have a build system independent of
      the environment. This allows us to have a customized version of
      `ConfigureCompilerFlags.cmake` without the `-ffpe-trap=invalid`
      option.
      
      Move the inner part of procedure overlap to a separate procedure
      `write_overlap`. overlap was too complex with 6 nested constructs. The
      downside is that the initialization of `e` is repeated for every
      non-successive overlap. If necessary, we can later add an
      initialization on first entry (but an initialization at declaration is
      not possible). `write_overlap` has some consistency: all the arguments
      are `intent(in)`, scalars or small vectors of intrinsic type, and
      `write_overlap` only writes to files. All modifications to flow are
      done outside of `write_overlap`.
      10f339d2
  18. Aug 23, 2019
    • Lionel GUEZ's avatar
      Remove procedure `interpolate_eddy` · 90d6cbde
      Lionel GUEZ authored
      Remove procedure `interpolate_eddy`. I realized that the longitude of
      one of the overlapping eddies must be shifted. It seemed awkward to
      pass variable m from overlap as an argument to
      `interpolate_eddy`. Passing separately the useful components of
      overlapping eddies made the procedure bulky, not worth creating for
      three lines of computation.
      
      As a consequence, inline the interpolation of eddies in procedure
      overlap. An advantage is that part of the processing that was in
      `interpolate_eddy` can migrate out of the interpolation loop.
      
      As another consequence, remove program `test_interpolate_eddy` and
      correponding test.
      
      Upgrade procedure `candidate_overlap` to deal with non-successive
      overlap. Add dummy argument delta.
      90d6cbde
  19. Aug 21, 2019
    • Lionel GUEZ's avatar
      Read directory on command line · 6869f1f1
      Lionel GUEZ authored
      Make the program `test_interpolate_eddy` more comfortable to use by
      reading a directory on the command line.
      6869f1f1
    • Lionel GUEZ's avatar
      Create test for `interpolate_eddy` · 54614e19
      Lionel GUEZ authored
      Create main program `test_interpolate_eddy`. Add corresponding test in
      `short_tests.json`. Add corresponding input files.
      54614e19
    • Lionel GUEZ's avatar
      Change order of procedure arguments · 2fe69923
      Lionel GUEZ authored
      Move dummy arguments k and i of procedure `write_eddy` to the end of
      dummy argument list: keyword association more likely for these.
      
      Follow upgrade of `Shapelib_03`: move argument associated to dummy
      argument hshp of `shp_open_03` to the beginning of argument list.
      2fe69923
  20. Aug 20, 2019
    • Lionel GUEZ's avatar
      Create script `mkdir_run.sh` · 452c18cb
      Lionel GUEZ authored
      Create general script `mkdir_run.sh` to replace specific
      scripts `extraction_eddies.sh`, `test_read_snapshot.sh`,
      `test_read_eddy.sh` and to run `test_successive_overlap`.
      
      Replace `$input_dir` by `$src_dir/Tests/Input` in
      `*_tests.json`. Motivation: we also need `src_dir` to point to
      `mkdir_run.sh`.
      452c18cb
  21. Aug 19, 2019
    • Lionel GUEZ's avatar
      Code `interpolate_eddy` · 8da135e8
      Lionel GUEZ authored
      Changing my mind, `interpolate_eddy` only interpolates, it does not
      write the interpolated eddy, this seems clearer. So it can be a
      function instead of a subroutine and we call `write_eddy` from
      overlap. We need to add arguments `hshp_extremum`, `hshp_outermost`
      and `hshp_max_speed` to overlap. The main program
      `test_successive_overlap` now has to create shapefiles.
  22. Aug 14, 2019
    • Lionel GUEZ's avatar
      Circumvent gfortran bug in `CMakeLists.txt`. · ad047254
      Lionel GUEZ authored
      Prepare for overlap of eddies at non-successive dates:
      
      - add argument `delta_out` to procedure `candidate_overlap` (not yet
      used);
      - add procedure `interpolate_eddy` (empty for now);
      - rename `successive_overlap` to overlap because the procedure will handle both
      cases, successive dates and non-successive dates;
      - generalize procedure overlap to handle delta between dates.
      ad047254
  23. Aug 08, 2019
    • Lionel GUEZ's avatar
      In main program unit `test_successive_overlap`, do not print eddies · ff66ef80
      Lionel GUEZ authored
      for which `delta_out` == 1 and eddies for which `delta_in` == 1. This
      is redundant with information in file `edgelist.csv`. I have checked
      in test `Successive_overlap_global` that eddies for which `delta_out`
      == 1 correspond to column i1 (sorted, unique) and eddies for which
      `delta_in` == 1 correspond to column i2 (sorted, unique).
      ff66ef80
    • Lionel GUEZ's avatar
      Add script `eddy_dump.py`. · cc42c8a9
      Lionel GUEZ authored
      Take into account new policy in `filter.py`: the names of the three
      shapefiles are always the same and form a unit in a snaphot directory.
      
      Rename `compil_prod_dir`to `build_dir` in JSON test files. Add a test
      of `successive_overlap` with global grid, normal resolution.
      cc42c8a9
    • Lionel GUEZ's avatar
      Add script `eddy_dump.py`. · c7cd342d
      Lionel GUEZ authored
      Take into account new policy in `filter.py`: the names of the three
      shapefiles are always the same and form a unit in a snaphot directory.
      
      Rename `compil_prod_dir`to `build_dir` in JSON test files. Add a test
      of `successive_overlap` with global grid, normal resolution.
      c7cd342d
  24. Jun 21, 2019
  25. May 27, 2019
    • Lionel GUEZ's avatar
      Add TAGS rule in `CMakeLists.txt`. Do not rely on external · b55a165b
      Lionel GUEZ authored
      `settings.mk` in GNUmakefile.
      
      Bug fix in procedure `dispatch_snapshot`: an isolated eddy is a valid eddy.
      
      In script `plot_snapshot.py`, in function snaphot, replace argument ax
      with argument `new_figure` so the user does not have to call figure
      and `axes(projection = projection)`. Add argument light to function
      snapshot so we can call snapshot with light set to False for a second
      snapshot. Add a test to only read `h.nc` when we need it.
      
      In script `read_overlap.py`, print more information: number of nodes,
      number of edges, number of nodes with at least one successor, number
      of nodes with at least one predecessor, splitting events, merging
      events.
      
      In script `stat.py`, use the convention that shapefiles are grouped in
      a directory instead of identifying a set of shapefiles by the end of
      their basename.
      
      In main program `test_successive_overlap`, we know that `delta_in` for
      snapshot 1 and `delta_out` for snapshot 2 are `huge(0)` so do not test
      this. Print eddy identifiers in a single line. Add the printing of
      identifiers of isolated eddies.
      b55a165b
  26. May 21, 2019
  27. May 17, 2019
    • Lionel GUEZ's avatar
      In script `plot_snapshot.py`, add `ax` argument to function · 52884ddf
      Lionel GUEZ authored
      `snapshot`. Also, move calls to `ax.gridlines` and `ax.coastlines`
      inside function `snapshot`. These changes allow us to call `snapshot`
      in a new figure.
      
      Move `Region4/2006_01_01` to `Region4_2006_01_01` and
      `Region4/2006_01_02` to `Region4_2006_01_02`.
      
      Add a test of `successive_overlap` for a larger region, for which the
      identifying numbers of the connected eddies are not the same for all
      edges. Add corresponding input files.
      
      Bug fix in main program `test_successive_overlap`.
      52884ddf
    • Lionel GUEZ's avatar
      Reorganize the script `plot_snapshot.py` so that we can plot several · 5e0e0deb
      Lionel GUEZ authored
      snapshots in the same figure: useful for visualizing overlaps. So move
      lines plotting a snapshot inside a new function called
      snapshot and add option `--dashed`.
      
      Remove the option `-e` of `plot_snaphot.py` and add directory argument
      instead. The idea is that we now consider the three shapefiles as a
      whole, they should always be alone in a dedicated directory.
      
      Move the three shapefiles of `Tests/Input/Region_4/2006_01_02` to a
      dedicated directory.
      
      In `plot_snapshot.py`, netCDF variables for wind are now expected to be
      called ugos and vgos.
      
      Add a test for overlap of two different snapshots.
      5e0e0deb
  28. May 13, 2019
    • Lionel GUEZ's avatar
      We want to always group the three shapefiles, that is actually nine · 6784855a
      Lionel GUEZ authored
      files, that make up a snapshot into a directory that contains only
      these files. We hope that this will ease the handling of
      snapshots. For now, this is useful in program
      test_successive_overlap. So, in program extraction_eddies, create the
      shapefiles in a directory called Snapshot. As we cannot create the
      directory from Fortran (in Fortran 2003, it becomes possible in
      Fortran 2008), we have to wrap the Fortran executable in a shell
      script "extraction_eddies.sh". In the same way, read from a directory
      Snapshot_old in programs test_read_eddy and test_read_snapshot and
      create scripts "test_read_eddy.sh" and "test_read_snapshot.sh".
      
      Reference the shell scripts "extraction_eddies.sh",
      "test_read_eddy.sh" and "test_read_snapshot.sh" in JSON test files.
      
      In program test_successive_overlap, finally read two snapshots, from
      directories Snapshot_1 and Snapshot_2. Pass to successive_overlap the
      date of the second snapshot. Use new variables corner_deg and step_deg
      to avoid converting to rad twice.
      
      Create directory Snapshot in Tests/Input/Region_4/2006_01_01.
      6784855a
  29. May 06, 2019
  30. Apr 30, 2019
Loading