|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- module DrillingWatchModule
- use SimulationVariables
- contains
-
- ! subroutine DrillingWatchFromJson(parent)
- ! type(json_value),pointer :: parent
- ! type(json_core) :: json
- ! type(json_value),pointer :: p,pval
- ! logical::is_found
-
- ! ! 1. get related root
- ! call json%get(parent,'DrillingWatch',p)
-
- ! ! 2. get member of data type from node
- ! call json%get(p,'Depth',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%Depth)
- ! call json%get(p,'BitPosition',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%BitPosition)
- ! call json%get(p,'HookLoad',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%HookLoad)
- ! call json%get(p,'WeightOnBit',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%WeightOnBit)
- ! call json%get(p,'RPM',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%RPM)
- ! call json%get(p,'ROP',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%ROP)
- ! call json%get(p,'Torque',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%Torque)
- ! call json%get(p,'PumpPressure',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%PumpPressure)
- ! call json%get(p,'SPM1',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%SPM1)
- ! call json%get(p,'SPM2',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%SPM2)
- ! call json%get(p,'CasingPressure',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%CasingPressure)
- ! call json%get(p,'PercentFlow',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%PercentFlow)
- ! call json%get(p,'PitGainLose',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%PitGainLose)
- ! call json%get(p,'PitVolume',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%PitVolume)
- ! call json%get(p,'KillMudVolume',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%KillMudVolume)
- ! call json%get(p,'TripTankVolume',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%TripTankVolume)
- ! call json%get(p,'MudWeightIn',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%MudWeightIn)
- ! call json%get(p,'FillVolume',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%FillVolume)
- ! call json%get(p,'MudWeightOut',pval)
- ! call json%get(pval,data%Equipments%DrillingWatch%MudWeightOut)
- ! end subroutine
-
- subroutine DrillingWatchToJson(parent)
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p
-
- ! 1. create new node
- call json%create_object(p,'DrillingWatch')
-
- call json%add(p,"Depth",data%Equipments%DrillingWatch%Depth)
- call json%add(p,"BitPosition",data%Equipments%DrillingWatch%BitPosition)
- call json%add(p,"HookLoad",data%Equipments%DrillingWatch%HookLoad)
- call json%add(p,"WeightOnBit",data%Equipments%DrillingWatch%WeightOnBit)
- call json%add(p,"RPM",data%Equipments%DrillingWatch%RPM)
- call json%add(p,"ROP",data%Equipments%DrillingWatch%ROP)
- call json%add(p,"Torque",data%Equipments%DrillingWatch%Torque)
- call json%add(p,"PumpPressure",data%Equipments%DrillingWatch%PumpPressure)
- call json%add(p,"SPM1",data%Equipments%DrillingWatch%SPM1)
- call json%add(p,"SPM2",data%Equipments%DrillingWatch%SPM2)
- call json%add(p,"CasingPressure",data%Equipments%DrillingWatch%CasingPressure)
- call json%add(p,"PercentFlow",data%Equipments%DrillingWatch%PercentFlow)
- call json%add(p,"PitGainLose",data%Equipments%DrillingWatch%PitGainLose)
- call json%add(p,"PitVolume",data%Equipments%DrillingWatch%PitVolume)
- call json%add(p,"KillMudVolume",data%Equipments%DrillingWatch%KillMudVolume)
- call json%add(p,"TripTankVolume",data%Equipments%DrillingWatch%TripTankVolume)
- call json%add(p,"MudWeightIn",data%Equipments%DrillingWatch%MudWeightIn)
- call json%add(p,"FillVolume",data%Equipments%DrillingWatch%FillVolume)
- call json%add(p,"MudWeightOut",data%Equipments%DrillingWatch%MudWeightOut)
-
- call json%add(parent,p)
- end subroutine
-
- end module DrillingWatchModule
|