Skip to content

Add comments for coded tendency terms to aid interpretation #16

@BrodiePearson

Description

@BrodiePearson

The current tendency terms are decomposed into various terms that arise from a range of physical processes, e.g.

w2tend1(k,iCell) = -wumd(k,iCell)**2.0_RKIND*( &
Entrainment(k,iCell) + Detrainment(k,iCell))
w2tend2(k,iCell) = (McMid(k-1,iCell)*(1.0_RKIND - 2.0_RKIND* &
areaFractionMid(k-1,iCell))*wumdMid(k-1,iCell)**2.0 - McMid(k,iCell)* &
(1.0_RKIND - 2.0_RKIND*areaFractionMid(k,iCell))*wumdMid(k,iCell)**2.0) / dzmid

Because these budgets involve several closure assumptions, the physical meaning of each of these tendency terms is not always obvious. We should comment the code to make it clear which physical processes are encompassed in different tendency terms. This will be based on @qingli411's commented code.

For future reference: changing the tendency terms, and adding them as save-able output variables requires the following steps:

  1. Add the new tendency term in main ADC code:
    w2tend1(k,iCell) = -wumd(k,iCell)**2.0_RKIND*( &
  2. Add the new term in the ADC registry in 2 places:
    <var name="w2tend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
    description="entrainment production term -- similar to dissipation"
  3. Add the new term to mpas_ocn_turbulence.F in various places.
  4. Add the new term to mpas_ocn_vmix_adc.F for deallocation:
    w2tend1, w2tend2, w2tend3, w2tend4, &
  5. If the new term is an output variable, add it to the streams.ocean file of the forward run directory

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions