MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
238 stars 317 forks source link

Fix PV registry descriptions (v8.0.1) #1089

Closed mgduda closed 1 year ago

mgduda commented 1 year ago

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.

This PR mirrors PR #986 but targets the hotfix-v8.0.1 branch.

mgduda commented 1 year ago

@gdicker1 The changes in this PR were already approved for inclusion in the MPAS v7.4 release, which we decided to skip since the v8.0.0 release was near. I think it should be sufficient to just verify that this PR introduces the same changes as in PR #986.