Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments for coded tendency terms to aid interpretation #16

Open
BrodiePearson opened this issue Jun 1, 2021 · 3 comments
Open
Assignees

Comments

@BrodiePearson
Copy link
Collaborator

BrodiePearson commented Jun 1, 2021

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
@BrodiePearson BrodiePearson self-assigned this Jun 1, 2021
@vanroekel
Copy link
Owner

@BrodiePearson are you able to address this? I think it would be good to have. Note that the terms are somewhat explained in the adc registry file.

@BrodiePearson
Copy link
Collaborator Author

BrodiePearson commented Jun 7, 2021

@vanroekel Yes, and I had not noticed their registry appearance so thanks for that! I'll try and do this in the next few days. I do have a question:

@katsmith133 & I discussed re-arranging/naming the tendency terms based on their physics (i.e. w2tend_entrain, w2tend_transport, w2tend_buoyancy, w2tend_pressure_isotropy/w2tend_pressure_slow, w2tend_pressure_shear/w2tend_pressure_rapid, w2tend_splat). Would you support this approach? This would reduce the amount of commenting required and also make it easier to directly compare budgets between the LES and ADC scheme (e.g. Issue #13)

@BrodiePearson
Copy link
Collaborator Author

I'm going to hold off on this issue until we figure out #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants