Skip to content

Commit

Permalink
Merge branch 'mark-petersen/ocn/add-surface-vorticity' into next (PR #…
Browse files Browse the repository at this point in the history
…6566)

Add ocean relativeVorticityAtSurface to highFrequencyStats

It is useful to visualize relative vorticity at the surface, which was
not saved in high frequency stats in the past. I have added this commit
to several recent simulations, including for the high-resolution Gulf of
Mexico work. It works as expected. The variable is added to the default
output for highFrequencyStats, but is only a 2D field and is optional.

[BFB] for all compared testing files
  • Loading branch information
jonbob committed Oct 23, 2024
2 parents b04c94d + 24d9107 commit 3b15a06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/mpas-ocean/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ def buildnml(case, caseroot, compname):
lines.append(' <var_array name="activeTracersAtBottom"/>')
lines.append(' <var name="kineticEnergyAtSurface"/>')
lines.append(' <var name="kineticEnergyAt250m"/>')
lines.append(' <var name="relativeVorticityAtSurface"/>')
lines.append(' <var name="relativeVorticityAt250m"/>')
lines.append(' <var name="ssh"/>')
lines.append(' <var name="pressureAdjustedSSH"/>')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<var name="kineticEnergyAtSurface" type="real" dimensions="nCells Time" units="m^2 s^-2"
description="kinetic energy at surface"
/>
<var name="relativeVorticityAtSurface" type="real" dimensions="nCells Time" units="s^-1"
description="relative vorticity at cell centers at surface"
/>
<var name="vertGMvelocitySFC" type="real" dimensions="nCells Time" units="m s^-1"
description="vertical velocity due to GM parameterization"
/>
Expand Down Expand Up @@ -304,12 +307,12 @@
<stream name="mesh"/>
<var name="xtime"/>
<var name="kineticEnergyAtSurface"/>
<var name="relativeVorticityAtSurface"/>
<var_array name="activeTracersAtSurface"/>
<var name="ssh"/>
<var name="kineticEnergyAt250m"/>
<var name="relativeVorticityAt250m"/>
<var name="divergenceAt250m"/>
<var name="relativeVorticityAt250m"/>
<var name="barotropicSpeed"/>
<var name="columnIntegratedSpeed"/>
<var name="relativeVorticityVertexAt250m"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ subroutine ocn_compute_high_frequency_output(domain, timeLevel, err)!{{{
integer, dimension(:,:), pointer :: edgesOnCell, cellsOnEdge, edgesOnEdge

real (kind=RKIND) :: invAreaCell1, layerThicknessEdge1, coeff, weightedNormalVel, cellArea
real (kind=RKIND), dimension(:), pointer :: refBottomDepth, kineticEnergyAt250m, kineticEnergyAtSurface, relativeVorticityAt250m
real (kind=RKIND), dimension(:), pointer :: refBottomDepth, kineticEnergyAt250m, kineticEnergyAtSurface, relativeVorticityAt250m, relativeVorticityAtSurface
real (kind=RKIND), dimension(:), pointer :: divergenceAt250m, relativeVorticityVertexAt250m
real (kind=RKIND), dimension(:), pointer :: divergenceAtBottom,relativeVorticityAtBottom,kineticEnergyAtBottom
real (kind=RKIND), dimension(:), pointer :: vertVelAt250m
Expand Down Expand Up @@ -263,6 +263,7 @@ subroutine ocn_compute_high_frequency_output(domain, timeLevel, err)!{{{
call mpas_pool_get_array(highFrequencyOutputAMPool, 'kineticEnergyAt250m', kineticEnergyAt250m)
call mpas_pool_get_array(highFrequencyOutputAMPool, 'kineticEnergyAtSurface', kineticEnergyAtSurface)
call mpas_pool_get_array(highFrequencyOutputAMPool, 'relativeVorticityAt250m', relativeVorticityAt250m)
call mpas_pool_get_array(highFrequencyOutputAMPool, 'relativeVorticityAtSurface', relativeVorticityAtSurface)
call mpas_pool_get_array(highFrequencyOutputAMPool, 'divergenceAt250m', divergenceAt250m)
call mpas_pool_get_array(highFrequencyOutputAMPool, 'relativeVorticityAtBottom', relativeVorticityAtBottom)
call mpas_pool_get_array(highFrequencyOutputAMPool, 'divergenceAtBottom', divergenceAtBottom)
Expand Down Expand Up @@ -422,6 +423,7 @@ subroutine ocn_compute_high_frequency_output(domain, timeLevel, err)!{{{
divergenceAt250m(:) = divergence(iLevel0250,:)
relativeVorticityVertexAt250m(:) = relativeVorticity(iLevel0250,:)
kineticEnergyAtSurface(:) = kineticEnergyCell(1,:)
relativeVorticityAtSurface(:) = relativeVorticityCell(1,:)
activeTracersAtSurface(1,:) = activeTracers(1,1,:)
activeTracersAtSurface(2,:) = activeTracers(2,1,:)
activeTracersAt250m(1,:) = activeTracers(1,iLevel0250,:)
Expand Down

0 comments on commit 3b15a06

Please sign in to comment.