# Welcome to the ECCO Version 4 Tutorial¶

This website contains a set of tutorials about how to use the ECCO Central Production Version 4 (ECCO v4) global ocean and sea-ice state estimate. The tutorials were written in Python and make use of the ecco_v4_py Python library, a library written specifically for loading, plotting, and analyzing ECCO v4 state estimate fields.

## Additional Resources¶

The ECCO v4 state estimate is the output of a free-running simulation of a global ca. 1-degree configuration of the MITgcm. Prior to public release, the model output files model are assembled into NetCDF files. If you would like to work directly with the flat binary “MDS” files provided by the model then take a look at the xmitgcm Python package. The xgcm Python package provides tools for operating on model output fields loaded with xmitgcm. If you wish to analyze the MITgcm model output using Matlab then we recommend the gcmfaces toolbox.

The ecco_v4_py package used in this tutorial was inspired by the xmitgcm package and gcmfaces toolboxes.

- Loading the ECCOv4 native model grid parameters
- Loading the ECCOv4 state estimate fields on the native model grid
- Objectives
- Introduction
- NetCDF File Format
- Two methods to load one ECCOv4 NetCDF file
- Loading a subset of single ECCOv4 variable NetCDF file using
`load_ecco_var_from_years_nc`

- Loading multiple years of single ECCOv4 variable using
`load_ecco_var_from_years_nc`

- Loading one or more years of more than variable using
`recursive_load_ecco_var_from_years_nc`

- Loading the entire (or large fractions) of the entire ECCOv4 solution using Dask
- Summary

- ECCOv4 Loading llc binary files in the ‘compact’ format
- Objective
- Introduciton
- Objectives
- The
*read_llc_to_tiles*subroutine - Related routines
- Example 1: Load a 2D llc ‘compact’ binary file
- Load ecco-grid information to make a fancier lat-lon plot
- Convert the ndarray into a DataArray
- Example 2: Load a 3D ‘compact’ llc binary file with 3rd dimension = Time
- Convert the ndarray into a DataArray
- Example 3: Load a 3D ‘compact’ llc binary file with 3rd dimension = Depth
- Convert the ndarray into a DataArray
- Parting thoughts

- Combining multiple
`Datasets`

- Saving
`Datasets`

and`DataArrays`

to NetCDF - Interpolating fields from the model llc grid to lat-lon
- Objectives
- Introduction
- How to interpolate scalar ECCO fields to a lat-lon grid
- Objectives
- The
*read_llc_to_tiles*subroutine - Related routines
- Example 1: Load a 2D llc ‘compact’ binary file
- Load ecco-grid information to make a fancier lat-lon plot
- Convert the ndarray into a DataArray
- Example 2: Load a 3D ‘compact’ llc binary file with 3rd dimension = Time
- Convert the ndarray into a DataArray
- Example 3: Load a 3D ‘compact’ llc binary file with 3rd dimension = Depth
- Convert the ndarray into a DataArray
- Parting thoughts

- Compute meridional heat transport
- Load Model Variables
- Grab latitude band: 26N array as an example
- Select the Atlantic ocean basin for RAPID-MOCHA MHT
- MHT at the approximate RAPID array latitude
- Now compare global and Atlantic MHT at many latitudes
- MHT as a function of depth
- Exercise: reproduce figure from (Ganachaud and Wunsch, 2000)
- References

- Compute MOC along the approximate OSNAP array from ECCO
- ECCOv4 Global Volume Budget Closure
- Objectives
- Introduction
`ETAN`

in a Boussinesq Model- Evaluating the model sea level anomaly
`ETAN`

volume budget - Calculate LHS: time tendency:
- Plot the time-mean , total , and one example field
- Calculate RHS: tendency due to surface fluxes,
- Plot the time-mean, total, and one month average of
- Calculate RHS: tendency due to volumetric flux divergence,
- Comparison of LHS and RHS
- ETAN budget closure through time
- Predicted vs. actual
- Time-mean due to net freshwater fluxes

- Global Heat Budget Closure
- Objectives
- Introduction
- Evaluating the heat budget
- Prepare environment and load ECCOv4 diagnostic output
- Calculate total tendency of ()
- Calculate tendency due to advective convergence ()
- Calculate tendency due to diffusive convergence ()
- Calculate tendency due to forcing ()
- Save to dataset
- Load budget variables from file
- Comparison between LHS and RHS of the budget equation
- Heat budget closure through time
- Time-mean vertical profiles

- Salt, Salinity and Freshwater Budgets