Create a gist now

Instantly share code, notes, and snippets.

@ckunte /tlp-ris.csv
Last active Jan 14, 2018

What would you like to do?
List of tension leg platforms
Platform Operator Water depth (m) Year installed Riser dia. (in) Riser type
Jolliet MC Offshore Petroleum 536 1989 10 ID Flex
Auger Shell 873 1994 16
Mars Shell 894 1996 24
Ram-Powell Shell 980 1997 12
Morpeth Eni 518 1998 12
Ursa Shell 1159 1999 18 SCR
Allegheny Eni 1009 1999 14 SCR
Marlin BP 987 1999 10
Typhoon Chevron 639 2001 12 SCR
Brutus Shell 910 2001 20
Prince Palm Energy Offshore 454 2001 12 SCR
West Seno A Chevron 1021 2003 12
Matterhorn Total 859 2003 12.75 SCR
Marco Polo Anadarko 1311 2004 14
Magnolia ConocoPhillips 1425 2005 14 SCR
Oveng Amerada Hess 271 2007 8 ID Flex
Okume-Ebano Amerada Hess 503 2007 8 ID Flex
Neptune BHP 1280 2008 20
Shenzi BHP 1333 2009 20
Platform Operator Displacement (t) Topside weight (t) Water depth (m) Year installed
Hutton ConocoPhillips 61500 20792 147 1984
Jolliet MC Offshore Petroleum 16602 1950 536 1989
Snorre A StatOil 106000 43700 335 1992
Auger Shell 66224 21772 873 1994
Heidrun StatOil 290610 89000 345 1995
Mars Shell 49099 6532 894 1996
Ram-Powell Shell 49100 8100 980 1997
Morpeth Eni 10605 2817 518 1998
Ursa Shell 88451 20321 1159 1999
Allegheny Eni 10605 2781 1009 1999
Marlin BP 23800 5000 987 1999
Typhoon Chevron 12157 3810 639 2001
Brutus Shell 49623 19958 910 2001
Prince Palm Energy Offshore 13097 3630 454 2001
West Seno A Chevron 23059 4800 1021 2003
Matterhorn Total 14881 5570 859 2003
Marco Polo Anadarko 24947 12500 1311 2004
Kizomba A ExxonMobil 53052 11600 1178 2004
Magnolia ConocoPhillips 34286 13816 1425 2005
Kizomba B ExxonMobil 53052 20775 1178 2005
Oveng Amerada Hess 11800 2250 271 2007
Okume-Ebano Amerada Hess 11800 2250 503 2007
Neptune BHP 24494 5779 1280 2008
Shenzi BHP 39400 7878 1333 2009
Mars B Shell 114305 20800 945 2014
Malikai Shell 52800 13600 500 2015
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# encoding: utf-8
"""
tlpscatter.py
Created by ckunte on 01/07/2018.
"""
import numpy as np
import matplotlib.pyplot as plt
tlpdata = np.loadtxt('tlp.csv', dtype='int,int,int',\
delimiter=',', usecols=(2,3,4), unpack=True, skiprows=1)
tlprisdata = np.loadtxt('tlp-ris.csv', dtype='int,float',\
delimiter=',', usecols=(2,4), unpack=True, skiprows=1)
disp = tlpdata[0]
topside = tlpdata[1]
depth = tlpdata[2]
dp_ris = tlprisdata[0]
riser = tlprisdata[1]
def topside_disp():
plt.scatter(topside, disp, c='blue', alpha=0.45)
plt.xlabel('Topside weght (t)')
plt.ylabel('Displacement (t)')
def topside_depth():
plt.scatter(topside, depth, c='red', alpha=0.45)
plt.xlabel('Topside weght (t)')
plt.ylabel('Water depth (m)')
def riser_depth():
plt.scatter(riser, dp_ris, c='green', alpha=0.45)
plt.ylabel('Water depth (m)')
plt.xlabel('Riser diameter (in)')
def plotoptions():
plt.xlim(xmin=0)
plt.ylim(ymin=0)
plt.grid()
if __name__ == '__main__':
print
print "Options:"
print " 0: Exit"
print " 1: Plot topside v. displacement"
print " 2: Plot topside v. water depth"
print " 3: Plot riser dia. v. water depth"
ptype = input("Select option: ")
if ptype == 1:
topside_disp()
plotoptions()
plt.savefig('tlp_disp_vs_topsidewt.svg', format='svg')
elif ptype == 2:
topside_depth()
plotoptions()
plt.savefig('tlp_depth_vs_topsidewt.svg', format='svg')
elif ptype == 3:
riser_depth()
plotoptions()
plt.savefig('tlp_depth_vs_riser-dia.svg', format='svg')
else:
print "No plot options were chosen."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment