<jupyter_start><jupyter_text>Forces    v1 -- Coriolis<jupyter_code># imports
import numpy as np
import unyt

from oceanpy.forces import coriolis

# plotting

from bokeh import plotting
from bokeh import models<jupyter_output><empty_output><jupyter_text>defs<jupyter_code>def set_fontsize(p, fsz):
    '''
    Parameters
    ----------
    ax : Bokeh plot class
    fsz : float
      Font size
    '''
    p.xaxis.axis_label_text_font_size = '{:d}pt'.format(fsz)
    p.xaxis.major_label_text_font_size = "{:d}pt".format(fsz)
    #
    p.yaxis.axis_label_text_font_size = '{:d}pt'.format(fsz)
    p.yaxis.major_label_text_font_size = "{:d}pt".format(fsz)<jupyter_output><empty_output><jupyter_text>Coriolis  Parameter ($f$)<jupyter_code>phis = np.linspace(-90., 90., 180)*unyt.deg
f = coriolis.coriolis_parameter(phis)
# Plot
plotting.output_notebook()

p = plotting.figure(title='Coriolis Parameter', x_axis_label='Latitude [deg]',
                   y_axis_label='f [1/s]')

p.line(phis, f, legend='f(phi)', line_width=2)
p.legend.location = "top_left"

set_fontsize(p, 16)

plotting.show(p)<jupyter_output><empty_output><jupyter_text>Meridional derivative<jupyter_code>beta = coriolis.meridional_derivative(phis)
print(beta[1])
# Plot
plotting.output_notebook()

p = plotting.figure(title='Meridional derivative', x_axis_label='Latitude [deg]',
                                       y_axis_label='beta [1/km s]')


p.line(phis, beta, legend='beta(phi)', line_width=2)
p.legend.location = "top_left"

set_fontsize(p, 16)

plotting.show(p)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14467813894200127, 'fraction_numerical': 0.010834926704907584, 'mean_word_length': 4.607142857142857, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '126335', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 643, 'n_tokens_neox': 607, 'n_words': 89, 'path': 'docs/nb/Forces.ipynb', 'repo_name': 'profxj/oceanpy', 'size': '1569'}