Ignore:
Timestamp:
2012-08-02T13:49:20+02:00 (9 years ago)
Author:
cbricaud
Message:

diadct: correct bugs on directions. ticket 986

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/TOOLS/SECTIONS_DIADCT/src/compute_sections.f90

    r3294 r3438  
    370370        DO WHILE ( (  sec%listPoint(jseg)%I .NE.  endingPoint%I    & 
    371371                 .OR. sec%listPoint(jseg)%J .NE. endingPoint%J   ) & 
    372                  .AND. jseg .LT. nb_inmesh + 1 .AND. sec%listPoint(jseg)%I .GT. 0  )          
     372                 .AND. jseg .LT. nb_inmesh + 10 .AND. sec%listPoint(jseg)%I .GT. 0  )          
    373373    
    374374           ! a. find the 4 adjacent points (North, South, East, West) 
     
    429429           !-------------------- 
    430430           IF(      SouthPoint%I==endingPoint%I .AND. SouthPoint%J==endingPoint%J )THEN  
    431                jseg = jseg+1 ; sec%listPoint(jseg) = SouthPoint 
     431               sec%direction(jseg)=2 ; jseg = jseg+1 ; sec%listPoint(jseg) = SouthPoint 
    432432           ELSE IF( NorthPoint%I==endingPoint%I .AND. NorthPoint%J==endingPoint%J )THEN 
    433                jseg = jseg+1 ; sec%listPoint(jseg) = NorthPoint 
     433               sec%direction(jseg)=3 ; jseg = jseg+1 ; sec%listPoint(jseg) = NorthPoint 
    434434           ELSE IF(  WestPoint%I==endingPoint%I .AND.  WestPoint%J==endingPoint%J )THEN 
    435                jseg = jseg+1 ; sec%listPoint(jseg) = WestPoint 
     435               sec%direction(jseg)=0 ; jseg = jseg+1 ; sec%listPoint(jseg) = WestPoint 
    436436           ELSE IF(   EstPoint%I==endingPoint%I .AND.   EstPoint%J==endingPoint%J )THEN 
    437                jseg = jseg+1 ; sec%listPoint(jseg) = EstPoint 
     437               sec%direction(jseg)=1 ; jseg = jseg+1 ; sec%listPoint(jseg) = EstPoint 
    438438 
    439439           ELSE 
Note: See TracChangeset for help on using the changeset viewer.