Simulation Core
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

501 řádky
18 KiB

  1. SUBROUTINE NormalCirculation_StartUp() ! is called in module FluidFlowMain
  2. USE MudSystemVARIABLES
  3. use CTanksVariables
  4. USE CMudPropertiesVariables
  5. Use GeoElements_FluidModule
  6. Use KickVariables
  7. Use CUnityOutputs
  8. Use CShoeVariables
  9. USE Pumps_VARIABLES
  10. implicit none
  11. ! temporary varibales for solving pressure jerks -- 1399-11-09
  12. !Pump1BlownInTimeStep = 0
  13. !Pump2BlownInTimeStep = 0
  14. !Pump3BlownInTimeStep = 0
  15. !Pump1BlownStarted = .FALSE.
  16. !Pump2BlownStarted = .FALSE.
  17. !Pump3BlownStarted = .FALSE.
  18. MudSystem%Pump1BlownCount = 0
  19. MudSystem%Pump2BlownCount = 0
  20. MudSystem%Pump3BlownCount = 0
  21. MudSystem%DeltaWellCap=0.
  22. MudSystem%WellCapOld = 0.
  23. MudSystem%AnnCapOld=0.
  24. MudSystem%DeltaAnnCap=0.
  25. MPumps%Total_Stroke_Counter_For_Plot = 0.0
  26. MudSystem%DeltaT_Mudline=0.1 !second
  27. Call Set_FlowKellyDisconnect(.false.)
  28. Call Set_FlowPipeDisconnect(.false.)
  29. !HZ_ADD= 0.d0
  30. MudSystem%Flow_timeCounter= 0
  31. MudSystem%MudSys_timeCounter= 0
  32. MudSystem%FluidFlowCounter = 0
  33. !========================================================================
  34. ! MUD CIRCULATION STARTUP
  35. !========================================================================
  36. MudSystem%FormationLostPressure= Shoe%LeakOff * Shoe%ShoeDepth
  37. MudSystem%ShoeFractured= .false.
  38. MudSystem%UGBOSuccessionCounter = 0 ! also in starup
  39. MudSystem%UGBOSuccessionCounterOld = 0 ! also in starup
  40. MudSystem%ChokeLineFlowRate= 0.0
  41. MudSystem%StringFlowRate= 0.0
  42. MudSystem%AnnulusFlowRate= 0.0
  43. MudSystem%MudVolume_InjectedFromAnn= 0.D0
  44. MudSystem%MudVolume_InjectedToBH= 0.D0
  45. MudSystem%DensityMixTol= 0.1 !(ppg)
  46. MudSystem%CuttingDensityMixTol= 0.5
  47. MudSystem%NewPipeFilling= 1
  48. MudSystem%UtubeFilling= 1
  49. MudSystem%UtubeEmptyVolume= 0.0
  50. MudSystem%UtubeMode1Activated= .false.
  51. MudSystem%UtubeMode2Activated= .false.
  52. MudSystem%UtubePossibility= .false.
  53. !KickMigration_2SideBit = .FALSE.
  54. MudSystem%KickDx= (Reservoir%AutoMigrationRate/3600.)*MudSystem%DeltaT_Mudline !AutoMigrationRate (ft/h)= ft per DeltaT_Mudline
  55. MudSystem%NewInfluxElementCreated= 0
  56. MudSystem%NewInfluxNumber= 0
  57. !KickVolumeinAnnulus= 0.0
  58. MudSystem%KickDeltaVinAnnulus= 0.0
  59. GasKickPumpFlowRate= 0.0
  60. MudSystem%FirstMudSet= 0
  61. MudSystem%FirstSetUtube1=0
  62. MudSystem%FirstSetUtube2=0
  63. MudSystem%SuctionMud=1
  64. MudSystem%ImudCount= 1
  65. imud=1
  66. MudSystem%iLoc= 1 ! for Kick
  67. MudSystem%Suction_Density_MudSystem= MudProperties%ActiveDensity
  68. MudSystem%SuctionDensity_Old= MudProperties%ActiveDensity ! initial(ppg)
  69. MudSystem%StringDensity_Old= MudProperties%ActiveDensity ! initial(ppg)
  70. MudSystem%AnnulusSuctionDensity_Old= MudProperties%ActiveDensity ! initial(ppg)
  71. MudSystem%ChokeLineDensity_Old= MudProperties%ActiveDensity ! initial(ppg)
  72. MudSystem%TotalAddedVolume= 0.
  73. MudSystem%xx=0.
  74. END SUBROUTINE NormalCirculation_StartUp
  75. SUBROUTINE MudSystem_StartUp()
  76. USE CMudPropertiesVariables
  77. USE MudSystemVARIABLES
  78. USE CDataDisplayConsoleVariables
  79. USE CHOKEVARIABLES
  80. USE Pumps_VARIABLES
  81. USE CBopStackVariables
  82. USE CPumpsVariables
  83. use CTanksVariables
  84. USE KickVariables
  85. implicit none
  86. CALL MUDLINE_LOSS_INPUTS()
  87. !MPumps%Total_Pump_GPM=10. ! Initial Value
  88. MUD%Q=0. ! Initial Value
  89. MudSystem%Q_flow32=0.
  90. MudSystem%Q_flow33=0.
  91. MudSystem%Q_flow34=0.
  92. MudSystem%Q_flow35=0.
  93. MudSystem%DeltaT_Mudline=0.1 !second
  94. GasKickPumpFlowRate= 0.
  95. MudSystem%BellNippleVolume= 0.
  96. MudSystem%BellNippleDensity= 0.
  97. MudSystem%MudBucketVolume= 0.
  98. MudSystem%MudBucketDensity= 0.
  99. MudSystem%BellNippleDumpVolume= 0.
  100. !BellNippleDumpRate= 0.
  101. !BellNippleToPitsRate= 0.0
  102. MudSystem%MudChecked= .true.
  103. MudSystem%condition32Final= .TRUE.
  104. MudSystem%condition33Final= .TRUE.
  105. MudSystem%condition34Final= .TRUE.
  106. MudSystem%PressureGauge75= 0.0
  107. MudSystem%PressureGauge76 = 0.0
  108. !!======================================================================
  109. !! TRIP TANK
  110. !!======================================================================
  111. MudSystem%TripTank_MinVol_Allowded= 50.*42. !(bbl to gal, initial value)
  112. MudSystem%TripTank_MaxVol_Allowded= 50. *42. !(bbl to gal, initial value)
  113. MudSystem%ActiveTankFloorArea= (MudProperties%ActiveTotalTankCapacityGal) / (7.48051948*100./12.) ! (ft^2) - Tank Height= 100 inch , 12=inch to ft 7.48051948=gal to ft^3
  114. MudSystem%TripTankFloorArea= (50.*42.) / (7.48051948*100./12.) ! (ft^2) - 50.*42.=Trip Tank Capacity in BBl*42= Gal , Tank Height= 100 inch , 12=inch to ft 7.48051948=gal to ft^3
  115. MudSystem%TripTank_Vol= MudProperties%InitialTripTankMudVolumeGal !(gal)
  116. MudSystem%TripTank_Dens= 1.
  117. DataDisplayConsole%TripTankGauge=0.
  118. MudSystem%ReturnToTrip_Q= 1.
  119. MudSystem%ActiveToTrip_Q= 1.
  120. MudSystem%TripTankPump_Q= .8
  121. MudSystem%ReturnToTrip_Dens=1.0 ! ppg(lbm/gal)
  122. MudSystem%ActiveToTrip_Dens=1.0
  123. !!======================================================================
  124. !! MUD VOLUME TOTALIZER
  125. !!======================================================================
  126. MudSystem%Mp1Density= 0.0 !(VALVE82)
  127. MudSystem%Mp2Density= 0.0 !(VALVE83)
  128. MudSystem%Mp3Density= 0.0 !(VALVE84)
  129. MudSystem%ReserveTankVolume= MudProperties%ReserveMudVolumeGal ! initial volume (gal)
  130. MudSystem%ReserveTankDensity= MudProperties%ReserveDensity ! initial
  131. MudSystem%CementTankVolumeCalc= Tank%CementTankVolume !movaghat--- initial volume (gal)
  132. MudSystem%CementTankDensityCalc= Tank%CementTankDensity !movaghat--- initial
  133. MudSystem%PumpsDumpVolume=0.0
  134. MudSystem%PumpsDumpFlowRate= 0.0
  135. MudSystem%ActiveTankVolume= MudProperties%ActiveMudVolumeGal ! initial volume (gal)
  136. MudSystem%RefrencePitVolume= MudSystem%ActiveTankVolume/42. !(bbl)
  137. MudSystem%RefrencePitVolume_DrillWatch= MudSystem%ActiveTankVolume/42. !(bbl)
  138. MudSystem%MVT_MinVol_Allowded= 0.
  139. MudSystem%MVT_MaxVol_Allowded= 0.
  140. MudSystem%MudTank1_vol= MudProperties%ActiveMudVolumeGal/3. ! (gal)
  141. MudSystem%MudTank2_vol= MudProperties%ActiveMudVolumeGal/3. ! (gal)
  142. MudSystem%MudTank3_vol= MudProperties%ActiveMudVolumeGal/3. ! (gal)
  143. MudSystem%ActiveTankSettled= MudProperties%ActiveSettledContentsGal ! (gal)
  144. MudSystem%MudTank4_vol= MudProperties%InitialTripTankMudVolumeGal ! (gal)
  145. MudSystem%TripTankVolumeCalc= MudProperties%InitialTripTankMudVolumeGal ! initial volume (gal)
  146. MudSystem%ActiveTankDensity= MudProperties%ActiveDensity ! initial(ppg)
  147. MudSystem%TripTankDensityCalc= Tank%TripTankDensity ! initial(ppg)
  148. MudSystem%ChokeManifoldDumpVolume= 0.0
  149. MudSystem%PitGainLossZero= 0.
  150. MudSystem%PitGainLossZero_Old= MudSystem%PitGainLossZero
  151. MudSystem%MVTCoarseKnob_Old= DataDisplayConsole%MVTCoarseKnob
  152. MudSystem%MVTFineKnob_Old= DataDisplayConsole%MVTFineKnob
  153. MudSystem%FirstSet_Time= .true.
  154. MudSystem%PedalMeter= MudProperties%PedalFlowMeter !1600. !(gpm)
  155. MudSystem%ReturnFlowRate=0.
  156. MudSystem%TotalStrokes1MFFI =0.
  157. MudSystem%TotalStrokes2MFFI =0.
  158. MudSystem%TotalStrokesPump1=0.
  159. MudSystem%TotalStrokesPump2=0.
  160. MudSystem%GraphTotalStrokes=0.
  161. Choke%TotalStrokes1 =0.
  162. Choke%TotalStrokes2 =0.
  163. end
  164. SUBROUTINE MUDLINE_LOSS_INPUTS()
  165. USE MudSystemVARIABLES
  166. USE CBopStackVariables
  167. USE CPumpsVariables
  168. implicit none
  169. INTEGER I
  170. !===========================================================================
  171. ! MUDLINE MINOR LOSSES INPUT
  172. !===========================================================================
  173. MudSystem%NO_MudMinors=4
  174. ALLOCATE (MudSystem%MudMinors(MudSystem%NO_MudMinors,4))
  175. ! ID(INCH) LF CV NOTE(BAR) DESCRIPTION
  176. MudSystem%MudMinors(1,1)= PumpsSpecification%MudPump1Output
  177. MudSystem%MudMinors(1,2:4)= (/1.5*8., 0., 0./) !elbow (MLnumber=1,,PumpsToString)
  178. MudSystem%MudMinors(2,1)= PumpsSpecification%MudPump1Output
  179. MudSystem%MudMinors(2,2:4)= (/1.5*6., 0., 0./) !elbow (MLnumber=2,,STGaugeToString)
  180. MudSystem%MudMinors(3,1:4)= (/0., 0., 0., 0./) !elbow (MLnumber=3,,WellToPits)
  181. MudSystem%MudMinors(4,1)= BopStackSpecification%ChokeLineId
  182. MudSystem%MudMinors(4,2:4)= (/1.5*7., 0., 0./) !elbow (MLnumber=4,,WellToChokeManifold)
  183. ALLOCATE (MudSystem%MINORDIAMETER_MUDLINE(MudSystem%NO_MudMinors),MudSystem%AREAMINOR_MUDLINE(MudSystem%NO_MudMinors),MudSystem%LF_MUDLINE(MudSystem%NO_MudMinors),MudSystem%CV_MUDLINE(MudSystem%NO_MudMinors) &
  184. ,MudSystem%NOTE_MUDLINE(MudSystem%NO_MudMinors))
  185. DO I=1,MudSystem%NO_MudMinors
  186. MudSystem%MINORDIAMETER_MUDLINE(I)=MudSystem%MudMinors(I,1)
  187. MudSystem%LF_MUDLINE(I)=MudSystem%MudMinors(I,2)
  188. MudSystem%CV_MUDLINE(I)=MudSystem%MudMinors(I,3)
  189. MudSystem%NOTE_MUDLINE(I)=MudSystem%MudMinors(I,4)
  190. MudSystem%AREAMINOR_MUDLINE(I)=PII*(MudSystem%MINORDIAMETER_MUDLINE(I)*0.0254)**2/4. !D(in), AREA(m^2)
  191. ENDDO
  192. !===========================================================================
  193. ! MUDLINE PIPNING LOSSES INPUT
  194. !===========================================================================
  195. MudSystem%NO_PIPINGSMUDLINE=4
  196. ALLOCATE (MudSystem%PIPINGS_MUDLINE(MudSystem%NO_PIPINGSMUDLINE,3))
  197. ! ID(INCH) L(FEET) ROUGHNESS(MM)=e DESCRIPTION
  198. MudSystem%PIPINGS_MUDLINE(1,1)= PumpsSpecification%MudPump1Output
  199. MudSystem%PIPINGS_MUDLINE(1,2:3)= (/265., 0.03/) !(MLnumber=1,,PumpsToString)
  200. MudSystem%PIPINGS_MUDLINE(2,1)= PumpsSpecification%MudPump1Output
  201. MudSystem%PIPINGS_MUDLINE(2,2:3)= (/100., 0.03/) !(MLnumber=2,,STGaugeToString)
  202. MudSystem%PIPINGS_MUDLINE(3,1:3)= (/0., 0., 0./) !(MLnumber=3,,WellToPits)
  203. MudSystem%PIPINGS_MUDLINE(4,1)= BopStackSpecification%ChokeLineId
  204. MudSystem%PIPINGS_MUDLINE(4,2)= BopStackSpecification%ChokeLineLength
  205. MudSystem%PIPINGS_MUDLINE(4,3)= 0.03 !(MLnumber=4,,WellToChokeManifold)
  206. MudSystem%Area_ChokeLineFt= PII*((BopStackSpecification%ChokeLineId/12.)**2)/4. !D(in), AREA(ft^2)
  207. MudSystem%ChokeLine_VolumeCapacity= MudSystem%Area_ChokeLineFt* BopStackSpecification%ChokeLineLength* 7.48051948 ! (gal)
  208. ALLOCATE (MudSystem%DIAM_MUDLINE_INCH(MudSystem%NO_PIPINGSMUDLINE), &
  209. MudSystem%AREA_MUDLINE(MudSystem%NO_PIPINGSMUDLINE),MudSystem%LENGT_MUDLINE(MudSystem%NO_PIPINGSMUDLINE),MudSystem%ROUGHNESS_MUDLINE(MudSystem%NO_PIPINGSMUDLINE),MudSystem%RELROUGH_MUDLINE(MudSystem%NO_PIPINGSMUDLINE))
  210. DO I=1,MudSystem%NO_PIPINGSMUDLINE
  211. MudSystem%DIAM_MUDLINE_INCH(I)=MudSystem%PIPINGS_MUDLINE(I,1)
  212. MudSystem%LENGT_MUDLINE(I)=MudSystem%PIPINGS_MUDLINE(I,2)
  213. MudSystem%ROUGHNESS_MUDLINE(I)=MudSystem%PIPINGS_MUDLINE(I,3)
  214. MudSystem%AREA_MUDLINE(I)=PII*(MudSystem%DIAM_MUDLINE_INCH(I)*0.0254)**2/4 !D(in), AREA(m^2)
  215. MudSystem%RELROUGH_MUDLINE(I)=MudSystem%ROUGHNESS_MUDLINE(I)/(MudSystem%DIAM_MUDLINE_INCH(I)*25.4) !e/D
  216. !DIAM_MUDLINE_MM(I)=DIAM_MUDLINE_MM(I)*.001 ! (m)
  217. MudSystem%LENGT_MUDLINE(I)=MudSystem%LENGT_MUDLINE(I)*.3048 ! (m)
  218. ENDDO
  219. !===========================================================================
  220. ! MUDLINE STATIC LOSSES INPUT
  221. !===========================================================================
  222. ! Height are in (meter)
  223. MudSystem%Pumps_Height= 0.
  224. MudSystem%STpipeGauge_Height= 2. !(m)
  225. MudSystem%Pits_Height= 1. !(m)
  226. MudSystem%ChokeManifold_Height= 1.*0.3048 !(ft to meter)
  227. MudSystem%WellChokeExit_Height= BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight
  228. END
  229. SUBROUTINE MUDLINE_LOSSES(MLnumber)
  230. USE MudSystemVARIABLES
  231. implicit none
  232. integer I
  233. INTEGER MLnumber
  234. !===============================PIPE LOSS===================================
  235. MUD(MLnumber)%Re_MUDline=MUD(MLnumber)%Q*6.30902e-5*MudSystem%DIAM_MUDLINE_INCH(MLnumber)*0.0254/(MudSystem%AREA_MUDLINE(MLnumber)*MUD(MLnumber)%nu) !<<<<<< nu: DOROST SHAVAD.ALAN DAR STARTUP SET SHODE
  236. !write(*,*) 'MUD(MLnumber)%Re_MUDline=' , MUD(MLnumber)%Re_MUDline
  237. ! Q*6.30902e-5 for (gpm) to (m^3/sec)
  238. if ( MUD(MLnumber)%Re_MUDline<Re_cr) then
  239. MUD(MLnumber)%fric=64/ MUD(MLnumber)%Re_MUDline
  240. else
  241. MUD(MLnumber)%fric=1/(-1.8*log10((MudSystem%RELROUGH_MUDLINE(MLnumber)/3.7)**1.11+6.9/ MUD(MLnumber)%Re_MUDline))**2
  242. endif
  243. MUD(MLnumber)%fricloss=((MUD(MLnumber)%fric*(wdens*MUD(MLnumber)%Mud_SG*MudSystem%LENGT_MUDLINE(MLnumber)*(MUD(MLnumber)%Q*6.30902e-5/MudSystem%AREA_MUDLINE(MLnumber))**2))/(2*MudSystem%DIAM_MUDLINE_INCH(MLnumber)*0.0254))/6895
  244. !==============================MINOR LOSS===================================
  245. if (MudSystem%LF_MUDLINE(MLnumber)/=0) then
  246. MUD(MLnumber)%minlosspa_MUDLINE=MudSystem%LF_MUDLINE(MLnumber)*wdens*MUD(MLnumber)%Mud_SG*(MUD(MLnumber)%Q*6.30902e-5/MudSystem%AREAMINOR_MUDLINE(MLnumber))**2/2 !(Pa)
  247. MUD(MLnumber)%minloss_MUDLINE= MUD(MLnumber)%minlosspa_MUDLINE/6895 !(psi)
  248. elseif (MudSystem%CV_MUDLINE(MLnumber)/=0) then
  249. MUD(MLnumber)%minlosspa_MUDLINE=1000*MUD(MLnumber)%Mud_SG*((11.7*MUD(MLnumber)%Q*6.30902e-5*3600)/(MudSystem%CV_MUDLINE(MLnumber)))**2 !(pa)
  250. MUD(MLnumber)%minloss_MUDLINE= MUD(MLnumber)%minlosspa_MUDLINE/6895 !(psi)
  251. else
  252. MUD(MLnumber)%minlosspa_MUDLINE=MudSystem%NOTE_MUDLINE(MLnumber)*1e5 !(pa)
  253. MUD(MLnumber)%minloss_MUDLINE= MUD(MLnumber)%minlosspa_MUDLINE/6895 !(psi)
  254. endif
  255. !==========================STATIC & KINETIC LOSS=============================
  256. MudSystem%String_Height= 50.*0.3048 !<<<<<<<<<<<<<<< (foot) to (meter). az khanom tarmigh
  257. MUD(1)%static_loss=(MudSystem%String_Height- MudSystem%Pumps_Height)*0.0 !(MLnumber=1,,PumpsToString)
  258. MUD(2)%static_loss=(MudSystem%String_Height- MudSystem%STpipeGauge_Height)*MUD(2)%Mud_SG*wdens*gravity/6895 ! (psi) (MLnumber=2,,STGaugeToString)
  259. MUD(3)%static_loss=0. !(MLnumber=1,,WellToPits)
  260. MUD(4)%static_loss=(MudSystem%ChokeManifold_Height- MudSystem%WellChokeExit_Height)*MUD(4)%Mud_SG*wdens*gravity/6895 !(MLnumber=4,,WellToChokeManifold)
  261. ! RAM(RNUMBER)%kinetic_loss1=MUD(MLnumber)%Mud_SG*MUD(MLnumber)%Mud_Density*(RAM(RNUMBER)%Q*6.30902e-5/((1/4.)*pi*(.72*0.254e-1)**2))**2/(2*6895) !(psi)
  262. !============================TOTAL LOSS=======================================
  263. MUD(MLnumber)%total_loss= MUD(MLnumber)%fricloss+ MUD(MLnumber)%minloss_MUDLINE+ MUD(MLnumber)%static_loss!+ RAM(RNUMBER)%kinetic_loss1 !(psi)
  264. END
  265. SUBROUTINE DEALLOCATE_ARRAYS_MudSystem()
  266. USE MudSystemVARIABLES
  267. implicit none
  268. !===========================================================================
  269. ! RAMLINE MINOR LOSSES INPUT
  270. !===========================================================================
  271. if (allocated(MudSystem%MudMinors)) DEALLOCATE (MudSystem%MudMinors)
  272. !===========================================================================
  273. ! RAMLINE PIPNING LOSSES INPUT
  274. !===========================================================================
  275. if (allocated(MudSystem%MINORDIAMETER_MUDLINE)) DEALLOCATE (MudSystem%MINORDIAMETER_MUDLINE)
  276. if (allocated(MudSystem%AREAMINOR_MUDLINE)) DEALLOCATE (MudSystem%AREAMINOR_MUDLINE)
  277. if (allocated(MudSystem%LF_MUDLINE)) DEALLOCATE (MudSystem%LF_MUDLINE)
  278. if (allocated(MudSystem%CV_MUDLINE)) DEALLOCATE (MudSystem%CV_MUDLINE)
  279. if (allocated(MudSystem%NOTE_MUDLINE)) DEALLOCATE (MudSystem%NOTE_MUDLINE)
  280. !===========================================================================
  281. ! ANNULAR MINOR LOSSES INPUT
  282. !===========================================================================
  283. if (allocated(MudSystem%PIPINGS_MUDLINE)) DEALLOCATE (MudSystem%PIPINGS_MUDLINE)
  284. !===========================================================================
  285. ! ANNULAR PIPNING LOSSES INPUT
  286. !===========================================================================
  287. if (allocated(MudSystem%DIAM_MUDLINE_INCH)) DEALLOCATE (MudSystem%DIAM_MUDLINE_INCH)
  288. if (allocated(MudSystem%AREA_MUDLINE)) DEALLOCATE (MudSystem%AREA_MUDLINE)
  289. if (allocated(MudSystem%LENGT_MUDLINE)) DEALLOCATE (MudSystem%LENGT_MUDLINE)
  290. if (allocated(MudSystem%ROUGHNESS_MUDLINE)) DEALLOCATE (MudSystem%ROUGHNESS_MUDLINE)
  291. if (allocated(MudSystem%RELROUGH_MUDLINE)) DEALLOCATE (MudSystem%RELROUGH_MUDLINE)
  292. END
  293. subroutine AddDynamicArray(array, value)
  294. implicit none
  295. REAL, allocatable, intent(inout) :: array(:)
  296. REAL, intent(in) :: value
  297. REAL, allocatable :: tempArr(:)
  298. integer :: i, isize
  299. !if(allocated(array)) then
  300. ! isize = size(array)
  301. ! allocate(tempArr(isize+1))
  302. ! do i=1,isize
  303. ! tempArr(i) = array(i)
  304. ! end do
  305. ! tempArr(isize+1) = value
  306. ! deallocate(array)
  307. ! call move_alloc(tempArr, array)
  308. !else
  309. ! allocate(array(1))
  310. ! array(1) = value
  311. !end if
  312. end subroutine