<jupyter_start><jupyter_text>z* visualizationVisualize the work of _<NAME> (2004)_. They incorporated a z* depth in the MITgcm which is defined as$$z=\eta + s^* z^*$$ where $s^* = 1 + \eta/H$ and $z=-H$ at the bottom of the ocean and $\eta$ is at the top of the ocean.<jupyter_code>from numpy import linspace
H=3000.0 # meters (m)
eta=30.0  # meters (m)
numPts=50
waterColumn=linspace(0,0,num=numPts)
z=linspace(eta, -H, num=numPts)
sStar=1+eta/H
zStar= (z-eta) / sStar<jupyter_output><empty_output><jupyter_text>Plotting z* next to z to show the difference<jupyter_code>import matplotlib.pyplot as plt
%matplotlib inline
plt.figure(figsize=(2,20))
plt.plot(waterColumn, z,
         'k_', ms=40, label='z')
plt.plot(waterColumn, zStar,
         'co', ms=10, alpha=0.6, label='z*')
plt.legend()
plt.show()

plt.figure(figsize=(10,2.5))
plt.plot(abs(z-zStar))
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16369710467706014, 'fraction_numerical': 0.034521158129175944, 'mean_word_length': 5.375886524822695, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '280810', 'license': 'MIT', 'n_tokens_mistral': 387, 'n_tokens_neox': 366, 'n_words': 90, 'path': 'sandbox/gcm-methods/zStarTutorial.ipynb', 'repo_name': 'IvanaEscobar/sandbox', 'size': '910'}