<jupyter_start><jupyter_text>Example on how to configure a case using mom6-toolsThis is a very simple example showing how to read `diag_config.yaml`, create a case instance, compute a climatology and visualize the results.<jupyter_code>from mom6_tools.DiagsCase import DiagsCase
import yaml
import xarray as xr
import matplotlib
from mom6_tools import m6toolbox
%matplotlib inline
# Read in the yaml file
diag_config_yml_path = "diag_config.yml"
diag_config_yml = yaml.load(open(diag_config_yml_path,'r'), Loader=yaml.Loader)
# Create the case instance
dcase = DiagsCase(diag_config_yml['Case'])
dcase.casename
# Load the grid
grd = dcase.grid
parallel, cluster, client = m6toolbox.request_workers(6)
RUNDIR = dcase.get_value('RUNDIR')

%time ds = xr.open_mfdataset(RUNDIR+'/'+dcase.casename+'.mom6.sfc_*.nc', \
         parallel=True, data_vars='minimal', chunks={'time': 12},\
         coords='minimal', compat='override')
ds
# Plot 5-yearly average sst
sst = ds['tos'].mean('time').load()
sst.plot(vmin=-2, vmax=32)
dd<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1170313986679353, 'fraction_numerical': 0.012369172216936251, 'mean_word_length': 6.013333333333334, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '149592', 'license': 'Apache-2.0', 'n_tokens_mistral': 375, 'n_tokens_neox': 360, 'n_words': 94, 'path': 'docs/source/examples/diags_case.ipynb', 'repo_name': 'NCAR/mom6-tools', 'size': '1051'}