Opened 12 years ago

Closed 12 years ago

#540 closed defect (Done)

Round-off problem in time-steping DO WHILE loop

Reported by: arango Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.6
Component: Nonlinear Version: 3.6
Keywords: Cc:

Description (last modified by arango)

Mark Hadfield reported a problem in the forum about a round-off problem in the time-stepping loop in main2d and main3d. As suggested, this loop is changed so the equality test is more robust:

      my_StepTime=0.0_r8
      MaxDT=MAXVAL(dt)

      STEP_LOOP : DO WHILE (my_StepTime.le.(RunInterval+0.5_r8*MaxDT))

        my_StepTime=my_StepTime+MaxDT

        ...

      END DO STEP_LOOP

Similar change is made to the TLM, RPM, and ADM versions of these routines. Many thanks to Mark for bringing this to my attention.

Change History (1)

comment:1 by arango, 12 years ago

Description: modified (diff)
Resolution: Done
Status: newclosed
Note: See TracTickets for help on using tickets.