🏴
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!Python3 | |
def joides(water_depth, base_water_temp, geothermal_gradient): | |
"""Returns the base of the gas hydrate stability zone for a given water depth | |
Joides formula for calculating the base gas hydrate stability meters below sea floor. As per the publication: | |
Ocean Drilling Program Guidelines for Pollution Prevention and Safety; JOIDES Journal, Volume 18, Special Issue | |
No. 7, October 1992. | |
A range of 1-2501 is used, as per studies, generally the maximum is 2000 meters below surface. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rotation matrix function | |
def rotate_matrix (x, y, angle, x_shift=0, y_shift=0, units="DEGREES"): | |
""" | |
Rotates a point in the xy-plane counterclockwise through an angle about the origin | |
https://en.wikipedia.org/wiki/Rotation_matrix | |
:param x: x coordinate | |
:param y: y coordinate | |
:param x_shift: x-axis shift from origin (0, 0) | |
:param y_shift: y-axis shift from origin (0, 0) | |
:param angle: The rotation angle in degrees |