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

Fix PV registry descriptions #986

Conversation

theweathermanda
Copy link
Contributor

@theweathermanda theweathermanda commented Aug 10, 2022

In the Registry, the pv_vertex, pv_edge, and pv_cell variables are described as "absolute vorticity/rho_zz", but the density component was previously removed from the model code. This request updates the descriptions and units of these variables to be consistent with the absolute vertical vorticity.

In Line 4816 of mpas_atm_time_integration.F (v7.3): "the original definition of pv_edge had a factor of 1/density. We have removed that factor given that it was not integral to any conservation property of the system"

Relative vertical vorticity is calculated beginning at Line 5606 (in v7.3) as:

      do iVertex=vertexStart,vertexEnd
         vorticity(1:nVertLevels,iVertex) = 0.0
         do i=1,vertexDegree
            iEdge = edgesOnVertex(i,iVertex)
            s = edgesOnVertex_sign(i,iVertex) * dcEdge(iEdge)
!DIR$ IVDEP
            do k=1,nVertLevels
               vorticity(k,iVertex) = vorticity(k,iVertex) + s * u(k,iEdge)
            end do
         end do
!DIR$ IVDEP
         do k=1,nVertLevels
            vorticity(k,iVertex) = vorticity(k,iVertex) * invAreaTriangle(iVertex)
         end do
      end do

(with 'u' as the uncoupled normal component of horizontal velocity), and planetary vorticity is added to get absolute vorticity at Line 5754:

pv_vertex(k,iVertex) = (fVertex(iVertex) + vorticity(k,iVertex))

Thus, pv_vertex is the absolute vertical vorticity at a vertex.

Copy link
Contributor

@mgduda mgduda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

In the Registry, the pv_vertex, pv_edge, and pv_cell variables are described as
"absolute vorticity/rho_zz", but the density component was previously removed
from the model code. This request updates the descriptions and units of these
variables to be consistent with the absolute vertical vorticity.

In Line 4816 of mpas_atm_time_integration.F (v7.3): "the original definition of
pv_edge had a factor of 1/density. We have removed that factor given that it was
not integral to any conservation property of the system"

Relative vertical vorticity is calculated beginning at Line 5606 (in v7.3) as:

      do iVertex=vertexStart,vertexEnd
         vorticity(1:nVertLevels,iVertex) = 0.0
         do i=1,vertexDegree
            iEdge = edgesOnVertex(i,iVertex)
            s = edgesOnVertex_sign(i,iVertex) * dcEdge(iEdge)
!DIR$ IVDEP
            do k=1,nVertLevels
               vorticity(k,iVertex) = vorticity(k,iVertex) + s * u(k,iEdge)
            end do
         end do
!DIR$ IVDEP
         do k=1,nVertLevels
            vorticity(k,iVertex) = vorticity(k,iVertex) * invAreaTriangle(iVertex)
         end do
      end do

(with 'u' as the uncoupled normal component of horizontal velocity), and
planetary vorticity is added to get absolute vorticity at Line 5754:

            pv_vertex(k,iVertex) = (fVertex(iVertex) + vorticity(k,iVertex))

Thus, pv_vertex is the absolute vertical vorticity at a vertex.
@mgduda mgduda force-pushed the atmosphere/fix_pv_registry_descriptions branch from adb9562 to adff544 Compare August 12, 2022 00:51
@mgduda mgduda merged commit a884026 into MPAS-Dev:hotfix-v7.4 Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants