<jupyter_start><jupyter_text>Plotting a pressure versus latitude contourWhen in our models we have a vertical structure, a plot of filled contours with pressure and latitude as axes can be useful to see features of the dynamics going on. Let's see this with obrero:<jupyter_code># small hack to be able to import module without install
import os
import sys
sys.path.append(os.getcwd() + '/../')

import obrero
import obrero.plot as oplot<jupyter_output><empty_output><jupyter_text>And now we read some data that has a vertical pressure coordinate:<jupyter_code># file name
f1 = 'data/ctl_winds.nc'

# read as data array
da = obrero.read_nc(f1, 'ua')<jupyter_output><empty_output><jupyter_text>We need the zonal mean:<jupyter_code>zm = obrero.get_zonal_means(da, time_mean=True)<jupyter_output><empty_output><jupyter_text>To plot this contours we use the function `plot_pressure_latitude()` part of the `obrero.plot` module. Keywords are very similar as those for any other contour plot in obrero:<jupyter_code>%matplotlib inline
ax = oplot.plot_pressure_latitude(zm, minv=-30, maxv=30, nlevels=11, extend='both', cm='coolwarm',
                                 cbstring=r'Zonal wind (m s$^{-1}$)', xlim=[-85,85])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09903381642512077, 'fraction_numerical': 0.010466988727858293, 'mean_word_length': 5.542105263157895, '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': '358368', 'license': 'MIT', 'n_tokens_mistral': 433, 'n_tokens_neox': 411, 'n_words': 129, 'path': 'examples/nb/example_30.ipynb', 'repo_name': 'Maduvi/obrero', 'size': '1242'}