# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CBopStack.f90" module CBopStack use SimulationVariables use json_module implicit none public contains subroutine BopStackFromJson(parent) use json_module,IK =>json_ik type(json_value),pointer :: parent type(json_core) :: json type(json_value),pointer :: p,pitem,pval logical::is_found integer::i,n_children CHARACTER(KIND=JSON_CK, LEN=:), ALLOCATABLE :: val call json%get(parent,'BopStack',p) call json%get(p,'AboveAnnularHeight',pval) call json%get(pval,data%Configuration%BopStack%AboveAnnularHeight) call json%get(p,'AnnularPreventerHeight',pval) call json%get(pval,data%Configuration%BopStack%AnnularPreventerHeight) call json%get(p,'UpperRamHeight',pval) call json%get(pval,data%Configuration%BopStack%UpperRamHeight) call json%get(p,'LowerRamHeight',pval) call json%get(pval,data%Configuration%BopStack%LowerRamHeight) call json%get(p,'BlindRamHeight',pval) call json%get(pval,data%Configuration%BopStack%BlindRamHeight) call json%get(p,'KillHeight',pval) call json%get(pval,data%Configuration%BopStack%KillHeight) call json%get(p,'KillOpen',pval) call json%get(pval,data%Configuration%BopStack%KillOpen) call json%get(p,'KillClose',pval) call json%get(pval,data%Configuration%BopStack%KillClose) call json%get(p,'GroundLevel',pval) call json%get(pval,data%Configuration%BopStack%GroundLevel) call json%get(p,'LowerRamOpen',pval) call json%get(pval,data%Configuration%BopStack%LowerRamOpen) call json%get(p,'LowerRamClose',pval) call json%get(pval,data%Configuration%BopStack%LowerRamClose) call json%get(p,'ChokeOpen',pval) call json%get(pval,data%Configuration%BopStack%ChokeOpen) call json%get(p,'ChokeClose',pval) call json%get(pval,data%Configuration%BopStack%ChokeClose) call json%get(p,'BlindRamOpen',pval) call json%get(pval,data%Configuration%BopStack%BlindRamOpen) call json%get(p,'BlindRamClose',pval) call json%get(pval,data%Configuration%BopStack%BlindRamClose) call json%get(p,'UpperRamOpen',pval) call json%get(pval,data%Configuration%BopStack%UpperRamOpen) call json%get(p,'UpperRamClose',pval) call json%get(pval,data%Configuration%BopStack%UpperRamClose) call json%get(p,'AnnularPreventerOpen',pval) call json%get(pval,data%Configuration%BopStack%AnnularPreventerOpen) call json%get(p,'AnnularPreventerClose',pval) call json%get(pval,data%Configuration%BopStack%AnnularPreventerClose) call json%get(p,'RamStringDrag',pval) call json%get(pval,data%Configuration%BopStack%RamStringDrag) call json%get(p,'AnnularStringDrag',pval) call json%get(pval,data%Configuration%BopStack%AnnularStringDrag) call json%get(p,'ChokeLineLength',pval) call json%get(pval,data%Configuration%BopStack%ChokeLineLength) call json%get(p,'ChokeLineId',pval) call json%get(pval,data%Configuration%BopStack%ChokeLineId) end subroutine subroutine BopStackToJson(parent) type(json_value),pointer :: parent type(json_core) :: json type(json_value),pointer :: p ! 1. create new node call json%create_object(p,'BopStack') ! 2. add member of data type to new node call json%add(p,"AboveAnnularHeight",data%Configuration%BopStack%AboveAnnularHeight) call json%add(p,"AnnularPreventerClose",data%Configuration%BopStack%AnnularPreventerClose) call json%add(p,"AnnularPreventerHeight",data%Configuration%BopStack%AnnularPreventerHeight) call json%add(p,"AnnularPreventerOpen",data%Configuration%BopStack%AnnularPreventerOpen) call json%add(p,"AnnularStringDrag",data%Configuration%BopStack%AnnularStringDrag) call json%add(p,"BlindRamClose",data%Configuration%BopStack%BlindRamClose) call json%add(p,"BlindRamHeight",data%Configuration%BopStack%BlindRamHeight) call json%add(p,"BlindRamOpen",data%Configuration%BopStack%BlindRamOpen) call json%add(p,"ChokeClose",data%Configuration%BopStack%ChokeClose) call json%add(p,"ChokeLineId",data%Configuration%BopStack%ChokeLineId) call json%add(p,"ChokeLineLength",data%Configuration%BopStack%ChokeLineLength) call json%add(p,"ChokeOpen",data%Configuration%BopStack%ChokeOpen) call json%add(p,"GroundLevel",data%Configuration%BopStack%GroundLevel) call json%add(p,"KillClose",data%Configuration%BopStack%KillClose) call json%add(p,"KillHeight",data%Configuration%BopStack%KillHeight) call json%add(p,"KillOpen",data%Configuration%BopStack%KillOpen) call json%add(p,"LowerRamClose",data%Configuration%BopStack%LowerRamClose) call json%add(p,"LowerRamHeight",data%Configuration%BopStack%LowerRamHeight) call json%add(p,"LowerRamOpen",data%Configuration%BopStack%LowerRamOpen) call json%add(p,"RamStringDrag",data%Configuration%BopStack%RamStringDrag) call json%add(p,"UpperRamClose",data%Configuration%BopStack%UpperRamClose) call json%add(p,"UpperRamHeight",data%Configuration%BopStack%UpperRamHeight) call json%add(p,"UpperRamOpen",data%Configuration%BopStack%UpperRamOpen) ! 3. add new node to parent call json%add(parent,p) end subroutine end module CBopStack