Skip to content
Snippets Groups Projects
  • Lionel GUEZ's avatar
    3289c070
    Move files around · 3289c070
    Lionel GUEZ authored
    We are trying to define clearly the directories and what Fortran files
    they should contain:
    
    - `Inst_eddies`: May only contain program units which make up the
    program `inst_eddies`. If a program unit does not go into
    `inst_eddies`, it should not be here. Not all program units going into
    `inst_eddies` must be here: some could be in directory Common.
    
    - `Inst_eddies/Tests`: Main programs of unit tests for procedures in
    directory `Inst_eddies`. Plus procedures used only in these unit tests.
    
    - `Overlap`: May only contain program units which make up the program
    `eddy_graph`. If a program unit does not go into `eddy_graph`, it
    should not be here. Not all program units going into `eddy_graph` must
    be here: some could be in directory Common.
    
    - `Overlap/Tests`: Main programs of unit tests for procedures in
    directory `Overlap`. Plus procedures used only in these unit tests.
    
    - Common: Procedures that are used in both programs `inst_eddies` and
    `eddy_graph`.
    
    - Common/Tests: Main programs of unit tests for procedures in
    directory `Common`. Plus procedures used only in these unit
    tests. Plus procedures used in unit tests of both `Inst_eddies` and
    `Overlap` directories but not used in either program `inst_eddies` nor
    `eddy_graph`.
    3289c070
    History
    Move files around
    Lionel GUEZ authored
    We are trying to define clearly the directories and what Fortran files
    they should contain:
    
    - `Inst_eddies`: May only contain program units which make up the
    program `inst_eddies`. If a program unit does not go into
    `inst_eddies`, it should not be here. Not all program units going into
    `inst_eddies` must be here: some could be in directory Common.
    
    - `Inst_eddies/Tests`: Main programs of unit tests for procedures in
    directory `Inst_eddies`. Plus procedures used only in these unit tests.
    
    - `Overlap`: May only contain program units which make up the program
    `eddy_graph`. If a program unit does not go into `eddy_graph`, it
    should not be here. Not all program units going into `eddy_graph` must
    be here: some could be in directory Common.
    
    - `Overlap/Tests`: Main programs of unit tests for procedures in
    directory `Overlap`. Plus procedures used only in these unit tests.
    
    - Common: Procedures that are used in both programs `inst_eddies` and
    `eddy_graph`.
    
    - Common/Tests: Main programs of unit tests for procedures in
    directory `Common`. Plus procedures used only in these unit
    tests. Plus procedures used in unit tests of both `Inst_eddies` and
    `Overlap` directories but not used in either program `inst_eddies` nor
    `eddy_graph`.
ccw_orient.f90 762 B
module ccw_orient_m

  implicit none

contains

  subroutine ccw_orient(c)

    ! Revert orientation of contour if area is negative. We are
    ! choosing the GeoJSon convention: counterclockwise external ring,
    ! over the ESRI shapefile convention, which is opposite. The main
    ! point is probably to follow a convention rather than let the
    ! polygon have random order.

    use derived_types, only: ssh_contour

    type(ssh_contour), intent(inout):: c

    !---------------------------------------------------------------------

    if (c%area < 0) then
       ! Reverse orientation:
       c%polyline%points = c%polyline%points(:, c%polyline%n_points:1:- 1)
       c%area = - c%area
    end if

  end subroutine ccw_orient

end module ccw_orient_m