OOPE output data can be extracted over a given geographical polygon by using the :py:func:`apecosm.extract_oope_data` function as follows:
.. literalinclude:: _static/example/extract_data_ape_spatial.py
.. program-output:: python _static/example/extract_data_ape_spatial.py
This function returns:
X = \int\limits_{(i, j)\in S} M(i, j) \times OOPE(i, j) \times dS(i, j)
with S the domain where data are extracted, M the value of the land-sea mask and dS the surface of the (i, j) cell.
The output is provided as a xarray Dataset object.
To extraction of biogeochemical forcing data is achieved by using the :py:func:`apecosm.extract_ltl_data` function as follows:
.. literalinclude:: _static/example/extract_data_pisces_spatial.py
.. program-output:: python _static/example/extract_data_pisces_spatial.py
There is also the possibility to extract time averages. This is done by using the :py:func:`apecosm.extract_time_means` function. It allows the possibily to compute either full time average, yearly, seasonal or monthly averages.
.. literalinclude:: _static/example/extract_data_ape_temporal.py
.. program-output:: python _static/example/extract_data_ape_temporal.py
Warning
This function takes as argument xarray.Dataset objects. They are either obtained by using the :py:func:`apecosm.extract_oope_data`, :py:func:`apecosm.extract_ltl_data` or by using the :py:func:`xarray.open_dataset` functions.