Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ChokeLineMain.f90 2.0 KiB

1 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. module ChokeLineMain
  2. implicit none
  3. public
  4. contains
  5. subroutine ChokeLine_Setup()
  6. use CSimulationVariables
  7. implicit none
  8. call OnSimulationInitialization%Add(ChokeLine_Init)
  9. call OnSimulationStop%Add(ChokeLine_Init)
  10. call OnChokeLineStep%Add(ChokeLine_Step)
  11. call OnChokeLineOutput%Add(ChokeLine_Output)
  12. call OnChokeLineMain%Add(ChokeLineMainBody)
  13. end subroutine
  14. subroutine ChokeLine_Init
  15. implicit none
  16. end subroutine ChokeLine_Init
  17. subroutine ChokeLine_Step
  18. CALL CHOKE_LINE
  19. end subroutine ChokeLine_Step
  20. subroutine ChokeLine_Output
  21. implicit none
  22. end subroutine ChokeLine_Output
  23. subroutine ChokeLineMainBody
  24. USE ifport
  25. USE ifmt
  26. USE CSimulationVariables
  27. ! USE BOP
  28. implicit none
  29. INTEGER :: ChokeLineDuration
  30. integer,dimension(8) :: ChokeLineStartTime , ChokeLineEndTime
  31. ! CALL BOP_StartUp()
  32. loop1: DO
  33. CALL DATE_AND_TIME(values=ChokeLineStartTime)
  34. CALL CHOKE_LINE
  35. CALL DATE_AND_TIME(values=chokeLineEndTime)
  36. chokeLineDuration = 3600000 * (chokeLineEndTime(5) - chokeLineStartTime(5)) + 60000 * (chokeLineEndTime(6) - chokeLineStartTime(6)) + 1000 * (chokeLineEndTime(7) - chokeLineStartTime(7)) + (chokeLineEndTime(8) - chokeLineStartTime(8))
  37. if (chokeLineDuration < 100) then
  38. call sleepqq(100 - chokeLineDuration)
  39. ELSE
  40. WRITE (*,*) 'chokeLine BOP run duration exceeded 100 ms and =', chokeLineDuration
  41. end if
  42. IF (IsStopped==.true.) THEN
  43. EXIT loop1
  44. ENDIF
  45. ENDDO loop1
  46. ! CALL DEALLOCATE_ARRAYS()
  47. end subroutine ChokeLineMainBody
  48. end module ChokeLineMain