{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# Make makefile" ] }, { "cell_type": "code", "execution_count": 72, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\tCSharp/OperationScenarios/Common/COperationScenariosVariables.f90 /\n", "\tTorqueDrag/TD_Modules/TD_WellGeometry.f90 /\n", "\tTorqueDrag/TD_Modules/TD_WellElements.f90 /\n", "\tTorqueDrag/TD_Modules/TD_StringConnectionData.f90 /\n", "\tTorqueDrag/TD_Modules/GeoElements_FluidModule.f90 /\n", "\tRop/sROP_Variables.f90 /\n", "\tRop/sROP_Other_Variables.f90 /\n", "\tFluidFlow/Flow_Startup_VARIABLES.f90 /\n", "\tCSharp/DownHole/CDownHoleTypes.f90 /\n", "\tEquipments/Drawworks/Drawworks_VARIABLES.f90 /\n", "\tEquipments/ChokeControl/CHOKE_VARIABLES.f90 /\n", "\tEquipments/TopDrive/TopDrive_VARIABLES.f90 /\n", "\tEquipments/RotaryTable/RTable_VARIABLES.f90 /\n", "\tEquipments/Pumps/Pumps_VARIABLES.f90 /\n", "\tCSharp/Warnings/CWarningsVariables.f90 /\n", "\tCSharp/StudentStation/CStudentStationVariables.f90 /\n", "\tCSharp/OperationScenarios/SoftwareInputsVariables.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/UnitySignalsVariables.f90 /\n", "\tCSharp/OperationScenarios/Permissions/PermissionsVariables.f90 /\n", "\tCSharp/OperationScenarios/Notifications/NotificationVariables.f90 /\n", "\tCSharp/Equipments/Tanks/CTanksVariables.f90 /\n", "\tCSharp/Equipments/DrillWatch/CDrillWatchVariables.f90 /\n", "\tCSharp/Equipments/ControlPanels/CTopDrivePanelVariables.f90 /\n", "\tCSharp/Equipments/ControlPanels/CStandPipeManifoldVariables.f90 /\n", "\tCSharp/Equipments/ControlPanels/CHookVariables.f90 /\n", "\tCSharp/Equipments/ControlPanels/CDrillingConsoleVariables.f90 /\n", "\tCSharp/Equipments/ControlPanels/CChokeManifoldVariables.f90 /\n", "\tCSharp/Equipments/ControlPanels/CChokeControlPanelVariables.f90 /\n", "\tCSharp/Equipments/ControlPanels/CBopControlPanelVariables.f90 /\n", "\tCSharp/BasicInputs/WellProfile/CWellSurveyDataVariables.f90 /\n", "\tCSharp/BasicInputs/WellProfile/CPathGenerationVariables.f90 /\n", "\tCSharp/BasicInputs/WellProfile/CCasingLinerChokeVariables.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CRigSizeVariables.f90 /\n", "\tCSharp/Common/CIActionReference.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CPowerVariables.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CHoistingVariables.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CBopStackVariables.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CAccumulatorVariables.f90 /\n", "\tCSharp/BasicInputs/Geology/CShoeVariables.f90 /\n", "\tCSharp/BasicInputs/Geology/CReservoirVariables.f90 /\n", "\tCSharp/BasicInputs/Geology/CFormationVariables.f90 /\n", "\tCSharp/BasicInputs/Bha/CStringConfigurationVariables.f90 /\n", "\tSimulation/Constants.f90 /\n", "\tCSharp/Equipments/MudPathFinding/CArrangement.f90 /\n", "\tCSharp/OperationScenarios/Unity/CUnityInputs.f90 /\n", "\tCSharp/Common/CCommonVariables.f90 /\n", "\tCommon/DynamicIntegerArray.f90 /\n", "\tRop/RopMain.f90 /\n", "\tCSharp/Equipments/ControlPanels/CEquipmentsConstants.f90 /\n", "\tCommon/DynamicRealArray.f90 /\n", "\tCSharp/Common/CTimerLegacy.f90 /\n", "\tCommon/DynamicDoubleArray.f90 /\n", "\tCSharp/Equipments/MudPathFinding/CPathChangeEvents.f90 /\n", "\tCommon/DynamicLogicalArray.f90 /\n", "\tCSharp/Common/CScaleRange.f90 /\n", "\tCSharp/Common/CTimer.f90 /\n", "\tCSharp/Common/CQuery.f90 /\n", "\tFluidFlow/FluidFlowMain.f90 /\n", "\tTorqueDrag/TD_Modules/TD_GeneralData.f90 /\n", "\tCSharp/BasicInputs/WellProfile/CWellSurveyData.f90 /\n", "\tCSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.f90 /\n", "\tCSharp/ErrorLog/CLog4.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CPumpsVariables.f90 /\n", "\tCSharp/ErrorLog/CLog1.f90 /\n", "\tCSharp/BasicInputs/CMudPropertiesVariables.f90 /\n", "\tCSharp/ErrorLog/CLog5.f90 /\n", "\tCSharp/ErrorLog/CError.f90 /\n", "\tCSharp/ErrorLog/CLog2.f90 /\n", "\tCSharp/ErrorLog/CLog3.f90 /\n", "\tSimulation/CSounds.f90 /\n", "\tCSharp/Common/CCommon.f90 /\n", "\tFluidFlow/Pressure_Display_VARIABLES.f90 /\n", "\tEquipments/BopStack/VARIABLES.f90 /\n", "\tFluidFlow/kick/Kick_VARIABLES.f90 /\n", "\tCSharp/OperationScenarios/Unity/CUnityOutputs.f90 /\n", "\tCSharp/DownHole/CDownHoleVariables.f90 /\n", "\tGeo/GeoMain.f90 /\n", "\tCSharp/Equipments/MudPathFinding/CPath.f90 /\n", "\tCSharp/Problems/CProblemDifinition.f90 /\n", "\tFluidFlow/Pressure_Distribution_VARIABLES.f90 /\n", "\tEquipments/MudSystem/MudSystem_Variables.f90 /\n", "\tTorqueDrag/TD_Modules/TD_DrillStem.f90 /\n", "\tCSharp/Equipments/MudPathFinding/CStack.f90 /\n", "\tCSharp/Problems/CDrillStemProblemsVariables.f90 /\n", "\tCSharp/Problems/COtherProblemsVariables.f90 /\n", "\tCSharp/Problems/CLostProblemsVariables.f90 /\n", "\tCSharp/Problems/CGaugesProblemsVariables.f90 /\n", "\tCSharp/Problems/CBitProblemsVariables.f90 /\n", "\tCSharp/Problems/CKickProblemsVariables.f90 /\n", "\tCSharp/Problems/CHoistingProblemsVariables.f90 /\n", "\tCSharp/Problems/CChokeProblemsVariables.f90 /\n", "\tCSharp/Problems/CPumpProblemsVariables.f90 /\n", "\tCSharp/Problems/CRotaryProblemsVariables.f90 /\n", "\tCSharp/Problems/CMudTreatmentProblemsVariables.f90 /\n", "\tCSharp/Problems/CBopProblemsVariables.f90 /\n", "\tSimulation/SimulationVariables.f90 /\n", "\tCSharp/Problems/CMudTreatmentProblems.f90 /\n", "\tCSharp/Problems/CChokeProblems.f90 /\n", "\tCSharp/Equipments/ControlPanels/CHook.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CRigSize.f90 /\n", "\tEquipments/BopStack/PipeRams1Main.f90 /\n", "\tCSharp/Problems/COtherProblems.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CAccumulator.f90 /\n", "\tCSharp/Problems/CRotaryProblems.f90 /\n", "\tCSharp/Problems/CDrillStemProblems.f90 /\n", "\tCSharp/BasicInputs/MudProperties.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CPower.f90 /\n", "\tEquipments/RotaryTable/RotaryTableMain.f90 /\n", "\tCSharp/Equipments/MudPathFinding/CManifolds.f90 /\n", "\tCSharp/Problems/CBopProblems.f90 /\n", "\tCSharp/DownHole/DownHole.f90 /\n", "\tCSharp/Problems/CHoistingProblems.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CHoisting.f90 /\n", "\tEquipments/Drawworks/DrawworksMain.f90 /\n", "\tCSharp/Problems/CLostProblems.f90 /\n", "\tCSharp/Problems/CBitProblems.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CBopStack.f90 /\n", "\tEquipments/BopStack/ChokeLineMain.f90 /\n", "\tEquipments/Pumps/PumpsMain.f90 /\n", "\tEquipments/BopStack/AnnularMain.f90 /\n", "\tCSharp/BasicInputs/WellProfile/CPathGeneration.f90 /\n", "\tCSharp/BasicInputs/Geology/CReservoir.f90 /\n", "\tCSharp/BasicInputs/Bha/CStringConfiguration.f90 /\n", "\tEquipments/BopStack/PipeRams2Main.f90 /\n", "\tEquipments/BopStack/BlindRamsMain.f90 /\n", "\tCSharp/Problems/CKickProblems.f90 /\n", "\tCSharp/OperationScenarios/Permissions/Permissions.f90 /\n", "\tCSharp/BasicInputs/Geology/CFormation.f90 /\n", "\tEquipments/BopStack/KillLineMain.f90 /\n", "\tCSharp/Problems/CGaugesProblems.f90 /\n", "\tCSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90 /\n", "\tCSharp/BasicInputs/Geology/CShoe.f90 /\n", "\tCSharp/Problems/CPumpProblems.f90 /\n", "\tCSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 /\n", "\tCSharp/OperationScenarios/SoftwareInputs.f90 /\n", "\tTorqueDrag/TD_ReadDataSubroutines/TD_DrillStemReadData.f90 /\n", "\tEquipments/Pumps/Pump_OffMode_Solver.f90 /\n", "\tTorqueDrag/TD_Forces/TD_DropArea/TD_ForceDownDRot.f90 /\n", "\tTorqueDrag/TD_Forces/TD_DropArea/TD_ForceDownD.f90 /\n", "\tFluidFlow/kick/Formation_Information.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/TD_WellElementsConfiguration.f90 /\n", "\tEquipments/MudSystem/Elements_Creation.f90 /\n", "\tEquipments/Drawworks/Drawworks_StartUp.f90 /\n", "\tTorqueDrag/TD_ReadDataSubroutines/TD_PipePropertiesReadData.f90 /\n", "\tTorqueDrag/TD_Forces/TD_CombinedMotionData.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/TVD_Calculator.f90 /\n", "\tTorqueDrag/TD_Forces/TD_StraightArea/TD_ForceUpSRot.f90 /\n", "\tRop/Bit_Specification.f90 /\n", "\tEquipments/Pumps/Pump3_MainSolver.f90 /\n", "\tEquipments/MudSystem/Kick_Expansion_and_Contraction.f90 /\n", "\tTorqueDrag/TD_Forces/TD_ForceCalculation.f90 /\n", "\tTorqueDrag/TD_Forces/TD_BuildArea/TD_ForceDownB.f90 /\n", "\tEquipments/Pumps/Pumps_TotalSolver.f90 /\n", "\tTorqueDrag/TD_Forces/TD_StrainCalculation.f90 /\n", "\tFluidFlow/Flow_Startup.f90 /\n", "\tEquipments/DrillingConsole_ScrLEDs.f90 /\n", "\tTorqueDrag/TD_Forces/TD_ViscousDragForce/TD_ViscousDragForce.f90 /\n", "\tTorqueDrag/TD_Forces/TD_StraightArea/TD_ForceUpS.f90 /\n", "\tTorqueDrag/TD_Forces/TD_StraightArea/TD_ForceDownS.f90 /\n", "\tEquipments/RotaryTable/RTable_StartUp.f90 /\n", "\tEquipments/MudSystem/Utube2_and_Trip_In.f90 /\n", "\tEquipments/MudSystem/Kick_Migration.f90 /\n", "\tTorqueDrag/TD_ReadDataSubroutines/TD_ForceReadData.f90 /\n", "\tTorqueDrag/TD_Forces/TD_StaticHookLoadCalculation.f90 /\n", "\tEquipments/MudSystem/Pump_and_Trip_In.f90 /\n", "\tEquipments/MudSystem/Deallocate_Normal_Circulation.f90 /\n", "\tEquipments/RotaryTable/RTable_OnModeSolver.f90 /\n", "\tEquipments/Pumps/Pump_OnMode_Solver.f90 /\n", "\tTorqueDrag/TD_ReadDataSubroutines/TD_WellElementsReadData.f90 /\n", "\tTorqueDrag/TD_ReadDataSubroutines/TD_MudPropertiesReadData.f90 /\n", "\tTorqueDrag/TD_Forces/TD_DropArea/TD_ForceUpDRot.f90 /\n", "\tEquipments/TopDrive/TopDrive_StartUp.f90 /\n", "\tEquipments/MudSystem/FillingWell_By_BellNipple.f90 /\n", "\tTorqueDrag/TD_Forces/TD_BuildArea/TD_ForceUpBRot.f90 /\n", "\tTorqueDrag/TD_Forces/TD_TorqueCalculation.f90 /\n", "\tTorqueDrag/TD_Forces/TD_BuildArea/TD_ForceDownBRot.f90 /\n", "\tEquipments/Drawworks/Drawworks_MainSolver.f90 /\n", "\tTorqueDrag/TD_Forces/TD_DropArea/TD_ForceUpD.f90 /\n", "\tTorqueDrag/TD_Forces/TD_BuildArea/TD_ForceUpB.f90 /\n", "\tEquipments/RotaryTable/RTable_OffModeSolver.f90 /\n", "\tTorqueDrag/TD_StartUp/TD_DrillStemStartUp.f90 /\n", "\tTorqueDrag/TD_Forces/TD_StraightArea/TD_ForceDownSRot.f90 /\n", "\tRop/JetImpactForce.f90 /\n", "\tTorqueDrag/TD_ReadDataSubroutines/TD_WellReadData.f90 /\n", "\tTorqueDrag/TD_Forces/TD_BouyancyFactor.f90 /\n", "\tFluidFlow/Frictional_Press_Drop_Calc.f90 /\n", "\tEquipments/TopDrive/TopDrive_Outputs.f90 /\n", "\tEquipments/Drawworks/DWFixModeMotion.f90 /\n", "\tCSharp/Equipments/ControlPanels/CBopControlPanel.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/UnitySignals.f90 /\n", "\tCSharp/BasicInputs/RigSpecifications/CPumps.f90 /\n", "\tCSharp/Equipments/ControlPanels/CChokeManifold.f90 /\n", "\tCSharp/Equipments/Tanks/CTanks.f90 /\n", "\tCSharp/Warnings/CWarnings.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/TD_BOPDiamCalculation.f90 /\n", "\tEquipments/Drawworks/Drawworks_Direction.f90 /\n", "\tEquipments/RotaryTable/RTable_Outputs.f90 /\n", "\tEquipments/Drawworks/DWMalfunction_MotorFailure.f90 /\n", "\tTorqueDrag/TD_Forces/TD_WeightOnBitCalculation.f90 /\n", "\tFluidFlow/String_Property_Calculator.f90 /\n", "\tFluidFlow/Annulus_Property_Calculator.f90 /\n", "\tEquipments/MudSystem/Trip_Out_andPump.f90 /\n", "\tEquipments/MudSystem/Utube1_and_Trip_In.f90 /\n", "\tEquipments/Pumps/Pump2_MainSolver.f90 /\n", "\tEquipments/Pumps/Pump1_MainSolver.f90 /\n", "\tFluidFlow/Utube.f90 /\n", "\tEquipments/BopStack/BOP.f90 /\n", "\tEquipments/BopStack/SHEAR_RAM.f90 /\n", "\tEquipments/BopStack/PIPE_RAM2.f90 /\n", "\tEquipments/BopStack/LOSS_INPUTS.f90 /\n", "\tEquipments/BopStack/ANNULAR.f90 /\n", "\tEquipments/BopStack/CHOKE_LINE.f90 /\n", "\tEquipments/BopStack/KILL_LINE.f90 /\n", "\tEquipments/BopStack/PIPE_RAM1.f90 /\n", "\tEquipments/BopStack/BOPstartup.f90 /\n", "\tCSharp/OperationScenarios/Notifications/Notofications.f90 /\n", "\tTorqueDrag/TD_StartUp/TD_StartUp.f90 /\n", "\tTorqueDrag/TD_Forces/TD_HookLoadCalculation.f90 /\n", "\tEquipments/TopDrive/TopDrive_Inputs.f90 /\n", "\tEquipments/TopDrive/TopDrive_Solver.f90 /\n", "\tCSharp/OperationScenarios/Notifications/Notifications.f90 /\n", "\tTorqueDrag/TorqueDragMain.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/MeshGeneration_FluidModule.f90 /\n", "\tEquipments/Pumps/Pumps_StartUp.f90 /\n", "\tEquipments/ChokeControl/CHOKE.f90 /\n", "\tEquipments/ChokeControl/AirPump_Choke_Subs.f90 /\n", "\tEquipments/MudSystem/MudSystemStartup.f90 /\n", "\tEquipments/TopDrive/TopDriveMain.f90 /\n", "\tEquipments/MudSystem/MudSystem.f90 /\n", "\tRop/ROP_MainCalculation.f90 /\n", "\tEquipments/Drawworks/Drawworks_Outputs.f90 /\n", "\tEquipments/RotaryTable/RTable_Inputs.f90 /\n", "\tEquipments/TopDrive/TopDrive_OffMode.f90 /\n", "\tEquipments/TopDrive/TopDrive_MainSolver.f90 /\n", "\tCSharp/OperationScenarios/Common/OperationScenarios.f90 /\n", "\tEquipments/ChokeControl/ChokeControlMain.f90 /\n", "\tEquipments/ChokeControl/ChokeStartup.f90 /\n", "\tEquipments/MudSystem/MudSystemMain.f90 /\n", "\tEquipments/Pumps/Pumps_Inputs.f90 /\n", "\tEquipments/Pumps/Pumps_Outputs.f90 /\n", "\tFluidFlow/Annulus_and_Openhole_Pressure_Distribution.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/TD_WellGeoConfiguration.f90 /\n", "\tEquipments/RotaryTable/RTable_MainSolver.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CSlipsEnum.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CUnlatchLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CTdsTorqueWrenchLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CInstallMudBucketPermission.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CFillupHeadPermission.f90 /\n", "\tCSharp/OperationScenarios/Notifications/COpenKellyCockLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CTdsPowerLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CSwingLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Enums/CTdsElevatorModesEnum.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CTdsSpineEnum.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CSwingTiltPermission.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CIrSafetyValvePermission.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CSwingOffPermission.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotification.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CMouseHoleEnum.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CFlowPipeDisconnectEnum.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Enums/CElevatorConnectionEnum.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CFlowKellyDisconnectEnum.f90 /\n", "\tCSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotification.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CTdsBackupClamp.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CTdsTongEnum.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CElevatorEnum.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CTongNotification.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CSafetyValveEnum.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CRemoveMudBucketPermission.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CInstallFillupHeadPermission.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CSwingEnum.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CKellyEnum.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CSwingDrillPermission.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CIrIbopPermission.f90 /\n", "\tCSharp/OperationScenarios/Permissions/CRemoveFillupHeadPermission.f90 /\n", "\tCSharp/OperationScenarios/Common/COperationScenariosSettings.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CTdsSwingEnum.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CIbopEnum.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CFillMouseHoleLedNotification.f90 /\n", "\tCSharp/OperationScenarios/UnitySignals/CTongEnum.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CIrIBopLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CTdsIbopLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CLatchLedNotification.f90 /\n", "\tCSharp/OperationScenarios/Notifications/CSlipsNotification.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.f90 /\n", "\tEquipments/MudSystem/Kick_Influx.f90 /\n", "\tEquipments/MudSystem/Disconnecting_Pipe.f90 /\n", "\tEquipments/Drawworks/Drawworks_Solver_OffMode.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/TD_RemoveComponents.f90 /\n", "\tFluidFlow/Horizontal_and_String_Pressure_Distribution.f90 /\n", "\tEquipments/Drawworks/Drawworks_INPUTS.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/TD_AddComponents.f90 /\n", "\tEquipments/Drawworks/Drawworks_Solver.f90 /\n", "\tEquipments/Pumps/Pumps_MainSolver.f90 /\n", "\tCSharp/OperationScenarios/Common/COperationScenariosMain.f90 /\n", "\tEquipments/MudSystem/Circulation_Code_Select.f90 /\n", "\tTorqueDrag/TD_DrillingSubs/TD_StringConnectionModes.f90 /\n", "\tFluidFlow/kick/Gas_Kick_Calculator.f90 /\n", "\tSimulator.f90 /\n", "\tTorqueDrag/TD_MainCalculations.f90 /\n", "\tFluidFlow/Well_Pressure_Data_Transfer.f90 /\n", "\tSimulationCore2.f90 /\n", "\tEquipments/MudSystem/Plot_Final_Mud_Elements.f90 /\n", "\tFluidFlow/Fluid_Flow_Solver.f90 /\n" ] } ], "source": [ "import re\n", "current_dir = 'C:\\\\Projects\\\\VSIM\\\\SimulationCore2\\\\'\n", "target_dir = 'x64\\\\Debug\\\\'\n", "depfilename = 'x64\\Debug\\SimulationCore2.dep'\n", "depfile = open(depfilename,'r')\n", "content = depfile.read()\n", "deptexts = content.split('\\n\\n')\n", "dependencies = {}\n", "moddeps = {}\n", "external_deps = []\n", "deptexts = [dt for dt in deptexts if dt!='']\n", "\n", "for depno,dept in enumerate(deptexts):\n", " headt,tailt = dept.split(': \\\\')\n", " headt,tailt = headt.strip(),tailt.strip()\n", " if headt.endswith('.mod'):\n", " ffile = tailt.replace(current_dir,'')\n", " mfiles = re.split(r' | \\\\\\n',headt)\n", " for mfile in mfiles:\n", " moddeps[mfile.strip()] = ffile\n", "for depno,dept in enumerate(deptexts):\n", " headt,tailt = dept.split(': \\\\')\n", " headt,tailt = headt.strip(),tailt.strip()\n", " if headt.endswith('.obj'):\n", " tails = re.split(r' \\\\\\n| ',tailt)\n", " tails = [t for t in tails if t!='']\n", " head = tails[0].replace(current_dir,'')\n", " deps = []\n", " for t in tails[1:]:\n", " mfile = t.replace(target_dir,'')\n", " # if 'json_' in mfile:\n", " # continue\n", " if mfile.strip() == '':\n", " print(f\"!!! t = '{t}', \")\n", " \n", " if mfile in moddeps:\n", " deps.append(moddeps[mfile])\n", " else:\n", " external_deps.append(mfile)\n", " # print(f\"{mfile} is not located\")\n", " if head in deps:\n", " deps.remove(head)\n", " # print(f\"making deps for {head}\")\n", " dependencies[head]=deps\n", "\n", "f = open('dependencies.txt','w')\n", "f.write(str(dependencies))\n", "f.close()\n", "\n", "from graphlib import TopologicalSorter\n", "ts = TopologicalSorter(dependencies)\n", "files = tuple(ts.static_order())\n", "for file in files:\n", " print(\"\\t\"+file.replace(\"\\\\\",\"/\")+\" /\")" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CSharp/Equipments/ControlPanels/CBopControlPanel.f90\n", "CSharp/Equipments/ControlPanels/CChokeControlPanel.f90\n", "CSharp/Equipments/ControlPanels/CChokeManifold.f90\n", "CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90\n", "CSharp/Equipments/ControlPanels/CDrillingConsole.f90\n", "CSharp/Equipments/ControlPanels/CEquipmentsConstants.f90\n", "CSharp/Equipments/ControlPanels/CHook.f90\n", "CSharp/Equipments/ControlPanels/CHookActions.f90\n", "CSharp/Equipments/ControlPanels/CStandPipeManifold.f90\n", "CSharp/Equipments/ControlPanels/CTopDrivePanel.f90\n" ] } ], "source": [ "dir = 'CSharp/Equipments/ControlPanels'\n", "import os\n", "os.listdir(dir)\n", "for f in os.listdir(dir):\n", " if f.endswith('Variables.f90'):\n", " continue\n", " print(dir+'/'+f)" ] }, { "cell_type": "code", "execution_count": 54, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n", " 'FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n", " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n", " 'CSharp\\\\BasicInputs\\\\MudProperties.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsole.f90',\n", " 'CSharp\\\\ErrorLog\\\\CLog1.f90',\n", " 'CSharp\\\\ErrorLog\\\\CError.f90',\n", " 'CSharp\\\\Warnings\\\\CWarnings.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Unity\\\\CUnityOutputs.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumps.f90',\n", " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CArrangement.f90',\n", " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CStack.f90',\n", " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CManifolds.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n", " 'Rop\\\\sROP_Variables.f90',\n", " 'Rop\\\\sROP_Other_Variables.f90',\n", " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n", " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n", " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n", " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n", " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n", " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n", " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n", " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n", " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n", " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n", " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n", " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n", " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n", " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n", " 'Simulation\\\\Constants.f90',\n", " 'Simulation\\\\SimulationVariables.f90',\n", " 'CSharp\\\\Common\\\\CIActionReference.f90',\n", " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n", " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n", " 'Equipments\\\\MudSystem\\\\MudSystem.f90',\n", " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n", " 'FluidFlow\\\\kick\\\\Gas_Kick_Calculator.f90',\n", " 'FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n", " 'CSharp\\\\ErrorLog\\\\CError.f90',\n", " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n", " 'Rop\\\\sROP_Variables.f90',\n", " 'Rop\\\\sROP_Other_Variables.f90',\n", " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n", " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n", " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n", " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n", " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n", " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n", " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n", " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n", " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n", " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n", " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n", " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n", " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n", " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n", " 'Simulation\\\\Constants.f90',\n", " 'Simulation\\\\SimulationVariables.f90',\n", " 'CSharp\\\\Common\\\\CIActionReference.f90',\n", " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n", " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n", " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n", " 'Rop\\\\sROP_Variables.f90',\n", " 'Rop\\\\sROP_Other_Variables.f90',\n", " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n", " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n", " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n", " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n", " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n", " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n", " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n", " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n", " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n", " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n", " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n", " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n", " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n", " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n", " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n", " 'Simulation\\\\Constants.f90',\n", " 'Simulation\\\\SimulationVariables.f90',\n", " 'CSharp\\\\Common\\\\CIActionReference.f90',\n", " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n", " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n", " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n", " 'Rop\\\\sROP_Variables.f90',\n", " 'Rop\\\\sROP_Other_Variables.f90',\n", " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n", " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n", " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n", " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n", " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n", " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n", " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n", " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n", " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n", " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n", " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n", " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n", " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n", " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n", " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n", " 'Simulation\\\\Constants.f90',\n", " 'Simulation\\\\SimulationVariables.f90',\n", " 'CSharp\\\\Common\\\\CIActionReference.f90',\n", " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n", " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n", " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n", " 'CSharp\\\\ErrorLog\\\\CError.f90',\n", " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n", " 'Rop\\\\sROP_Variables.f90',\n", " 'Rop\\\\sROP_Other_Variables.f90',\n", " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n", " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n", " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n", " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n", " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n", " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n", " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n", " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n", " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n", " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n", " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n", " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n", " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n", " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n", " 'Simulation\\\\Constants.f90',\n", " 'Simulation\\\\SimulationVariables.f90',\n", " 'CSharp\\\\Common\\\\CIActionReference.f90',\n", " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n", " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n", " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n", " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n", " 'CSharp\\\\BasicInputs\\\\MudProperties.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsole.f90',\n", " 'CSharp\\\\ErrorLog\\\\CLog1.f90',\n", " 'CSharp\\\\ErrorLog\\\\CError.f90',\n", " 'CSharp\\\\Warnings\\\\CWarnings.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Unity\\\\CUnityOutputs.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumps.f90',\n", " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CArrangement.f90',\n", " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CStack.f90',\n", " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CManifolds.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n", " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n", " 'Rop\\\\sROP_Variables.f90',\n", " 'Rop\\\\sROP_Other_Variables.f90',\n", " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n", " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n", " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n", " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n", " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n", " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n", " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n", " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n", " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n", " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n", " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n", " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n", " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n", " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n", " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n", " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n", " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n", " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n", " 'Simulation\\\\Constants.f90',\n", " 'Simulation\\\\SimulationVariables.f90',\n", " 'CSharp\\\\Common\\\\CIActionReference.f90',\n", " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n", " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n", " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n", " 'Equipments\\\\MudSystem\\\\MudSystem.f90',\n", " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90']" ] }, "execution_count": 54, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dependencies['FluidFlow\\\\Well_Pressure_Data_Transfer.f90']" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "assets={'USDT': {'Total': '5858.36917324', 'Free': 3879.35}, 'BUSD': {'Total': '-156.01984572', 'Free': 3877.23}}\n" ] } ], "source": [] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# FromJson" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\t\tcall json%get(p,'ElevatorConnectionPossible',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%ElevatorConnectionPossible)\n", "\t\tcall json%get(p,'JointConnectionPossible',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%JointConnectionPossible)\n", "\t\tcall json%get(p,'IsKellyBushingSetInTable',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%IsKellyBushingSetInTable)\n", "\t\tcall json%get(p,'ElevatorPickup',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%ElevatorPickup)\n", "\t\tcall json%get(p,'NearFloorPosition',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%NearFloorPosition)\n", "\t\tcall json%get(p,'SingleSetInMouseHole',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%SingleSetInMouseHole)\n", "\t\tcall json%get(p,'TdsConnectionPossible',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%TdsConnectionPossible)\n", "\t\tcall json%get(p,'TdsStemIn',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%TdsStemIn)\n" ] } ], "source": [ "pattern=\"\"\"\t\tcall json%get(p,'@@@',pval)\n", "\t\tcall json%get(pval,data%Equipments%UnityInputs%@@@)\"\"\"\n", "\n", "input = open(\"Text1.txt\")\n", "lines = input.readlines()\n", "for line in lines:\n", "\tparts = line.split(\"::\")\n", "\tif len(parts)!=2:\n", "\t\tcontinue\n", "\tname = parts[1].split(' ')[1].strip()\n", "\tnewline = pattern.replace(\"@@@\",name)\n", "\tprint(newline)\n" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# ToJson" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{\"AnnDrillMud\":0,\n", "\"AnnCirculateMud\":0,\n", "}\n" ] } ], "source": [ "#Artifical JSon\n", "input = open(\"Text1.txt\")\n", "output = \"{\"\n", "lines = input.readlines()\n", "for line in lines:\n", " name = line.split(\"::\")[-1].strip()\n", " type = line.split(\"::\")[0].strip()\n", " output += f\"\\\"{name}\\\":0,\\n\" \n", " # name = line.split(\"%\")[-1][:-1]\n", " # print(name)\n", "print(output+\"}\")" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "call json%add(p,\"KellyHoseVibrationRate\",data%Equipments%UnityOutputs%KellyHoseVibrationRate)\n", "call json%add(p,\"BlowoutFromStringPercent\",data%Equipments%UnityOutputs%BlowoutFromStringPercent)\n", "call json%add(p,\"Pedal\",data%Equipments%UnityOutputs%Pedal)\n", "call json%add(p,\"FlowRate\",data%Equipments%UnityOutputs%FlowRate)\n", "call json%add(p,\"RotaryRpm\",data%Equipments%UnityOutputs%RotaryRpm)\n", "call json%add(p,\"BlowoutFromString\",data%Equipments%UnityOutputs%BlowoutFromString)\n", "call json%add(p,\"BlowoutFromAnnular\",data%Equipments%UnityOutputs%BlowoutFromAnnular)\n", "call json%add(p,\"FlowFromReturnLine\",data%Equipments%UnityOutputs%FlowFromReturnLine)\n", "call json%add(p,\"FlowFromKelly\",data%Equipments%UnityOutputs%FlowFromKelly)\n", "call json%add(p,\"FlowFromFillupHead\",data%Equipments%UnityOutputs%FlowFromFillupHead)\n", "call json%add(p,\"FlowKellyDisconnect\",data%Equipments%UnityOutputs%FlowKellyDisconnect)\n", "call json%add(p,\"FlowPipeDisconnect\",data%Equipments%UnityOutputs%FlowPipeDisconnect)\n" ] } ], "source": [ "precode = \"\"\"call json%add(p,\"\",data%Equipments%UnityOutputs%\"\"\"\n", "input = open(\"Text1.txt\")\n", "lines = input.readlines()\n", "for line in lines:\n", " name = line.split(\"::\")[-1].strip()\n", " name = name.split(' ')[0]\n", " icoute = precode.index(\"\\\"\")+1\n", " # name = line.split(\"%\")[-1][:-1]\n", " # print(name)\n", " newline = precode[:icoute]+name+precode[icoute:]+name+\")\"\n", " print(newline)\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "call BopControlPanelToJson(p)\n", "call ChokeControlPanelToJson(p)\n", "call ChokeManifoldToJson(p)\n", "call DataDisplayConsoleToJson(p)\n", "call DrillingConsoleToJson(p)\n", "call HookToJson(p)\n", "call StandPipeManifoldToJson(p)\n", "call TopDrivePanelToJson(p)\n", "call ! Drill WatchToJson(p)\n", "call DrillingWatchToJson(p)\n", "call TankToJson(p)\n" ] } ], "source": [ "precode = \"\"\"call \"\"\"\n", "postcode = \"\"\"ToJson(p)\"\"\"\n", "input = open(\"Text1.txt\")\n", "lines = input.readlines()\n", "for line in lines:\n", " name = line.split(\"::\")[-1].strip()\n", " # icoute = precode.index(\"\\\"\")+1\n", " # name = line.split(\"::\")[-1][:-1].strip()\n", " # print(name)\n", " newline = precode+name+postcode\n", " print(newline)\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\tGeo/GeoMain.f90 \\\n", "\n" ] } ], "source": [ "##Replace space with _ in filenames and list them for put them in makefile\n", "import os\n", "dir = 'Geo'\n", "files = os.listdir(dir)\n", "fstring = ''\n", "for f in files:\n", " if f.endswith('90'):\n", " newf = f.replace(' ','_')\n", " os.rename(os.path.join(dir,f),os.path.join(dir,newf))\n", " if newf.lower().endswith('variables.f90'):\n", " fstring = '\\t'+os.path.join(dir,newf).replace('\\\\','/') +' \\\\\\n' + fstring\n", " else:\n", " fstring = fstring + '\\t'+os.path.join(dir,newf).replace('\\\\','/') +' \\\\\\n'\n", "\n", "print(fstring)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Extract variable names from definition lines" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# %pwd\n", "lines = input(\"Enter lines:\").split(\" \")\n", "lines = [l.strip() for l in lines if len(l.strip())>0]\n", "vars = []\n", "for l in lines:\n", " if '::' in l:\n", " vars.append(l.split('::')[1].strip())" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import string\n", "string.ascii_letters" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "var: AnnularRegulatorSetControl\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: AirMasterValve\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: ByePassValve\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: AnnularValve\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: UpperRamsValve\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: MiddleRamsValve\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: KillLineValve\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: ChokeLineValve\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: LowerRamsValve\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: ManifoldPressureGauge\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: AirSupplyPressureGauge\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: AccumulatorPressureGauge\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: AnnularPressureGauge\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: AnnularOpenLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: AnnularCloseLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: UpperRamsOpenLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: UpperRamsCloseLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: MiddleRamsOpenLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: MiddleRamsCloseLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: KillLineOpenLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: KillLineCloseLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: ChokeLineOpenLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: ChokeLineCloseLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: LowerRamsOpenLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: LowerRamsCloseLED\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: AnnularStatus\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: UpperRamsStatus\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: MiddleRamsStatus\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n", "var: LowerRamsStatus\n", "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n", "Char before: \n", "Char after: \n", "\n" ] } ], "source": [ "import os\n", "import sys\n", "import re\n", "dir = '.'\n", "varNameChars = string.ascii_letters + '_'\n", "log = open(os.path.join(dir,'ReplaceVars.log',),'a')\n", "end=False\n", "for dir,subdirs,files in os.walk(dir):\n", " for filename in files:\n", " if filename.lower().endswith('.f90'):\n", " # print(filename)\n", " file = open(os.path.join(dir,filename))\n", " code = file.read()\n", " for var in vars:\n", " if var not in code:\n", " continue\n", " occurs = [m.start() for m in re.finditer(var, code)]\n", " for occurance in occurs:\n", " if code[occurs[0]-1] in varNameChars or code[occurs[0]+len(var)] in varNameChars:\n", " continue\n", " print(f\"var: {var}\")\n", " print(f\"file = {os.path.join(dir,filename)}\")\n", " print(f\"Char before: {code[occurs[0]-1]}\")\n", " print(f\"Char after: {code[occurs[0]+len(var)]}\")\n", " end = True\n", " if end:\n", " break" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "State\n", "Hoisting\n", "OperationScenario\n", "notifications\n", "permissions\n", "unitySignals\n", "StudentStation\n", "BopStackInput\n", "BopStackAcc\n", "RamLine\n", "AnnularComputational\n", "Annular\n", "PipeRam1\n", "ShearRam\n", "PipeRam2\n", "ChokeLine\n", "KillLine\n", "Pumps\n", "RAM\n", "RAMS\n", "Choke\n", "AirDrivenPump\n", "AirPumpLine\n", "CHOOKE\n", "Drawworks\n", "MudSystem\n", "MUD\n", "PUMP\n", "RTable\n", "TDS\n", "GasType(3)\n", "PressureDisplay\n", "ObservationPoint(:)\n", "FricPressDrop\n", "ROP_Spec\n", "ROP_Bit\n", "TDGeo\n", "F_String(:)\n", "F_Counts\n", "F_Interval(:)\n", "OD_Annulus(4)\n", "TD_DrillStem\n", "TD_DrillStems\n", "TD_String\n", "TD_Count\n", "G_StringElement\n", "TD_Vol\n", "TD_General\n", "TD_BOP\n", "TD_BOPElement(4)\n", "TD_StConn\n", "TD_Load\n", "TD_WellEl\n", "TD_Casing\n", "data%State%TD_Liner\n", "TD_OpenHole\n", "TD_ROPHole\n", "TD_WellGeneral\n", "TD_WellGeo(:)\n", "EquipmentControl\n", "BopControlPanel\n", "ChokeControlPanel\n", "ChokeManifold\n", "DataDisplayConsole\n", "DrillingConsole\n", "Hook\n", "StandPipeManifold\n", "TopDrivePanel\n", "DrillingWatch\n", "Tank\n", "Configuration\n", "StringConfiguration\n", "Formation\n", "Reservoir\n", "Shoe\n", "Accumulator\n", "BopStackSpecification\n", "Hoisting\n", "Power\n", "PumpsSpecification\n", "RigSize\n", "CasingLinerChoke\n", "PathGeneration\n", "WellSurveyData\n", "MudProperties\n", "problems\n", "BitProblems\n", "BopProblems\n", "ChokeProblems\n", "DrillStemProblems\n", "GaugesProblems\n", "HoistingProblems\n", "KickProblems\n", "LostProblems\n", "MudTreatmentProblems\n", "OtherProblems\n", "PumpProblems\n", "RotaryProblems\n" ] }, { "ename": "IndexError", "evalue": "list index out of range", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mIndexError\u001b[0m Traceback (most recent call last)", "\u001b[1;32mc:\\Projects\\VSIM\\SimulationCore2\\helper.ipynb Cell 6\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 6\u001b[0m nsp\u001b[39m+\u001b[39m\u001b[39m=\u001b[39m\u001b[39m1\u001b[39m\n\u001b[0;32m 7\u001b[0m splits \u001b[39m=\u001b[39m line\u001b[39m.\u001b[39msplit(\u001b[39m\"\u001b[39m\u001b[39m::\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[1;32m----> 8\u001b[0m \u001b[39mprint\u001b[39m(splits[\u001b[39m1\u001b[39;49m]\u001b[39m.\u001b[39mstrip())\n", "\u001b[1;31mIndexError\u001b[0m: list index out of range" ] } ], "source": [ "f = open(\"hier.txt\")\n", "lines = f.readlines()\n", "for line in lines[1:]:\n", " nsp=0\n", " while line[nsp]==' ':\n", " nsp+=1\n", " splits = line.split(\"::\")\n", " print(splits[1].strip())" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'type SimulationDataType type(SimulationStateType)::State Type(HoistingType)::Hoisting type(OperationScenarioType)::OperationScenario type(NotificationType)::notifications type(PermissionsType):: permissions type(UnitySignalsType):: unitySignals type(StudentStationType)::StudentStation type(BopStackInputType)::BopStackInput type(BopStackAccType)::BopStackAcc type(RamLineType)::RamLine type(AnnularComputationalType)::AnnularComputational type(AnnularType)::Annular type(PipeRams1Type)::PipeRam1 type(ShearRamType)::ShearRam type(PipeRam2Type)::PipeRam2 type(ChokeLineType)::ChokeLine type(KillLineType)::KillLine type(PumpsType)::Pumps TYPE(BOP_TypeVars), DIMENSION(1:6) :: RAM TYPE(BOP_TypeVars2D) :: RAMS type(ChokeType)::Choke type(AirDrivenPumpType)::AirDrivenPump type(AirPumpLineType)::AirPumpLine TYPE(CHOKE_TypeVars), DIMENSION(1:2) :: CHOOKE TYPE(Drawworks_Var) :: Drawworks type(MudSystemType)::MudSystem TYPE(MUD_TypeVars), DIMENSION(1:10) :: MUD TYPE(Pump_Var), DIMENSION(1:3) :: PUMP TYPE(RTable_Var) :: RTable TYPE(TDS_Var) :: TDS TYPE(GasData) :: GasType(3) ! 1 = methane , 2 = Hydrogen sulfide , 3 = Carbon dioxid TYPE(PressureDisplayVARIABLESTYPE) :: PressureDisplay TYPE(ObservationAndGaugePointsInformations) , ALLOCATABLE :: ObservationPoint(:) TYPE(FricPressDropVarsTYPE) :: FricPressDrop TYPE(ROPSpecificationInfo) :: ROP_Spec TYPE(ROPInfo) :: ROP_Bit TYPE(Geo_Data) :: TDGeo TYPE(F_StringData) , Allocatable :: F_String(:) TYPE(F_IntervalsCountsData):: F_Counts TYPE(F_IntervalData) , Allocatable :: F_Interval(:) TYPE(OD_AnnulusData) :: OD_Annulus(4) TYPE(TD_DrillStemInfo), ALLOCATABLE, DIMENSION(:) :: TD_DrillStem TYPE(TD_SeparatedDrillStemInfo), ALLOCATABLE, DIMENSION(:) :: TD_DrillStems TYPE(TD_StringInfo) :: TD_String TYPE(TD_AddRemoveInfo) :: TD_Count TYPE(CStringComponents), ALLOCATABLE, DIMENSION(:) :: G_StringElement TYPE(TD_RemovedVolumeInfo) :: TD_Vol TYPE(TD_GeneralInfo) :: TD_General TYPE(TD_BOPInfo) :: TD_BOP TYPE(CBopElement) :: TD_BOPElement(4) TYPE(TD_StringconnectionInfo) :: TD_StConn TYPE(TD_LoadInfo) :: TD_Load TYPE(TD_WellElementsInfo) :: TD_WellEl TYPE(TD_CasingInfo), ALLOCATABLE, DIMENSION(:) :: TD_Casing TYPE(TD_LinerInfo), ALLOCATABLE, DIMENSION(:) :: data%State%TD_Liner TYPE(TD_OpenHoleInfo), ALLOCATABLE, DIMENSION(:) :: TD_OpenHole TYPE(TD_ROPHoleInfo), ALLOCATABLE, DIMENSION(:) :: TD_ROPHole TYPE(TD_WellGeneralInfo) :: TD_WellGeneral TYPE(TD_WellGeometryData), Allocatable :: TD_WellGeo(:) type(EquipmentControlType)::EquipmentControl type(BopControlPanelType) :: BopControlPanel Type(ChokeControlPanelType)::ChokeControlPanel Type(ChokeManifoldType)::ChokeManifold Type(DataDisplayConsoleType) :: DataDisplayConsole TYPE(DrillingConsoleType) :: DrillingConsole Type(HookType)::Hook type(StandPipeManifoldType)::StandPipeManifold Type(TopDrivePanelType)::TopDrivePanel Type(DrillingWatchType)::DrillingWatch Type(TankType)::Tank type(ConfigurationType)::Configuration Type(StringConfigurationType)::StringConfiguration Type(FormationType) :: Formation Type(ReservoirType)::Reservoir Type(ShoeType)::Shoe Type(AccumulatorType)::Accumulator Type(BopStackSpecificationType)::BopStackSpecification Type(HoistingType)::Hoisting Type(PowerType)::Power Type(PumpSpecificationType)::PumpsSpecification Type(RigSizeType)::RigSize Type(CasingLinerChokeType)::CasingLinerChoke Type(PathGenerationType)::PathGeneration Type(WellSurveyDataType)::WellSurveyData Type(MudPropertiesType)::MudProperties type(ProblemsType)::problems type(BitProblemsType)::BitProblems type(BopProblemsType)::BopProblems type(ChokeProblemsType)::ChokeProblems type(DrillStemProblemsType)::DrillStemProblems type(GaugesProblemsType)::GaugesProblems type(HoistingProblemsType):: HoistingProblems type(KickProblemsType)::KickProblems type(LostProblemsType)::LostProblems type(MudTreatmentProblemsType)::MudTreatmentProblems type(OtherProblemsType)::OtherProblems type(PumpProblemsType)::PumpProblems type(RotaryProblemsType)::RotaryProblems end type SimulationDataType'" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "line" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "for fn in modules:\n", " f = open(fn)\n", " lines = f.readlines()\n", " module_filenames = {}\n", " used_modules = []\n", " mod_count = 0\n", " for l in lines:\n", " l = l.strip().lower()\n", " if l.startswith('module ') and not l.startswith('module procedure '):\n", " mod_name = l.split(' ')[1]\n", " module_filenames[mod_name] = fn\n", " mod_count +=1\n", " if l.startswith('use'):\n", " used_modules.append(l.split(' ')[1])\n", " if mod_count !=1:\n", " print(f\"{fn} has {mod_count} modules\")\n", " module_filenames,used_modules" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.12" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "1ef4a26de7183d96d6da1045a38581e0a15b2215d0c1b98c7b273c6e514c6c7e" } } }, "nbformat": 4, "nbformat_minor": 2 }