module DrillingWatchModule use SimulationVariables contains subroutine DrillingWatchToJson(parent) type(json_value),pointer :: parent type(json_core) :: json type(json_value),pointer :: p integer :: i ! 1. create new node call json%create_object(p,'DrillingWatch') call json%add(p,"Depth",data%EquipmentControl%DrillingWatch%Depth) call json%add(p,"BitPosition",data%EquipmentControl%DrillingWatch%BitPosition) call json%add(p,"HookLoad",data%EquipmentControl%DrillingWatch%HookLoad) call json%add(p,"WeightOnBit",data%EquipmentControl%DrillingWatch%WeightOnBit) call json%add(p,"RPM",data%EquipmentControl%DrillingWatch%RPM) call json%add(p,"ROP",data%EquipmentControl%DrillingWatch%ROP) call json%add(p,"Torque",data%EquipmentControl%DrillingWatch%Torque) call json%add(p,"PumpPressure",data%EquipmentControl%DrillingWatch%PumpPressure) call json%add(p,"SPM1",data%EquipmentControl%DrillingWatch%SPM1) call json%add(p,"SPM2",data%EquipmentControl%DrillingWatch%SPM2) call json%add(p,"CasingPressure",data%EquipmentControl%DrillingWatch%CasingPressure) call json%add(p,"PercentFlow",data%EquipmentControl%DrillingWatch%PercentFlow) call json%add(p,"PitGainLose",data%EquipmentControl%DrillingWatch%PitGainLose) call json%add(p,"PitVolume",data%EquipmentControl%DrillingWatch%PitVolume) call json%add(p,"KillMudVolume",data%EquipmentControl%DrillingWatch%KillMudVolume) call json%add(p,"TripTankVolume",data%EquipmentControl%DrillingWatch%TripTankVolume) call json%add(p,"MudWeightIn",data%EquipmentControl%DrillingWatch%MudWeightIn) call json%add(p,"FillVolume",data%EquipmentControl%DrillingWatch%FillVolume) call json%add(p,"MudWeightOut",data%EquipmentControl%DrillingWatch%MudWeightOut) call json%add(parent,p) end subroutine end module DrillingWatchModule