Hi,
I have modified the code which can spill the drouge spill at regular specified intervals, it may even work for dynamic time step.
IF(INIT) THEN
OS_START_TIME = 2200 ! OIL SPILL START TIME IN SECONDS
OS_END_TIME = 3200 ! OIL SPILL END TIME IN SECONDS
TINTV = 300 ! SPILL INTERVAL
TTRESH = TINTV
NUM_GLO = 0
! NUM_MAX = 10
NUM_MAX = INT( SQRT( REAL( NFLOT_MAX/INT( (OS_END_TIME
& - OS_START_TIME)/DT + 1 ) ) ) )
NUM_LOC = 0
INIT = .FALSE.
ENDIF
!
IF( (AT.GE.OS_START_TIME) .AND. (AT.LE.OS_END_TIME)) THEN
! COORD_X=0.D0
! COORD_Y=0.D0
! NUM_MAX=INT(SQRT(REAL(NFLOT_MAX)))
ATCHECK = AT - OS_START_TIME
IF(ATCHECK .GE. TTRESH) THEN
TTRESH = TTRESH + TINTV ! INTERVAL INCREMENT
File Attachment:
File Name:
Oilspill.fFile Size: 9 KB
I have not yet tested the code, but I feel that the changes will help.
However NUM_MAX will have to be recalculated appropriately, by considering TINTV (Spill Interval).
NUM_MAX = INT( SQRT( REAL( NFLOT_MAX/INT( (OS_END_TIME
& - OS_START_TIME)/TINTV + 1 ) ) ) )
With Best Regards,
Gourish