Skip to content

Implement stratification control index calculation #67

@jkrasting

Description

@jkrasting

Alpha and beta ocean regimes described in Caneill et al. 2022 can be easily implemented by reworking the existing momlevel.derived.calc_n2 function.

The rough plan would be to breakout this section into a new stand-alone function called calc_ts_derivs():

    if interfaces is not None:
        _ds = xr.Dataset({"thetao": thetao, "so": so})
        grid = xgcm.Grid(_ds, coords={"Z": {"center": zcoord}})
        thetao = grid.transform(thetao, "Z", interfaces, method="linear")
        so = grid.transform(so, "Z", interfaces, method="linear")
        zcoord = interfaces.name

    pres = (thetao[zcoord] * 1.0e4) + patm
    alpha = calc_alpha(thetao, so, pres, eos=eos)
    beta = calc_beta(thetao, so, pres, eos=eos)
    dtdz = thetao.differentiate(zcoord, edge_order=2)
    dsdz = so.differentiate(zcoord, edge_order=2)

Then,

  • Modify the existing calc_n2 function to call calc_ts_derivs
  • Write a new function int the momlevel.derived module to calculate SCI, which will also call calc_ts_derivs

SCI will also need mixed layer depth as an input. This would require a completely new function called calc_mld() that can also go in the momlevel.derived module.

Things to check:

  • Proper docstrings
  • Interfaces in/out of functions

With: @oceanclimateconnections-temple

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions