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

Opposite sign of UpwardsMassflux diagnostic #455

Open
yuanjianz opened this issue Oct 30, 2024 · 1 comment · Fixed by #456
Open

Opposite sign of UpwardsMassflux diagnostic #455

yuanjianz opened this issue Oct 30, 2024 · 1 comment · Fixed by #456
Assignees
Labels
category: Bug Something isn't working topic: Diagnostics Related to output diagnostic data topic: Mass Fluxes Pertaining to cubed-sphere mass flux inputs

Comments

@yuanjianz
Copy link

yuanjianz commented Oct 30, 2024

Your name

Yuanjian Zhang

Your affiliation

WashU

What happened? What did you expect to happen?

UpwardsMassflux currently is positive = "down" instead of intuitively positive = "up".

Evidence from diagnostics

image

UpwardsMassflux diagnostic from a Jan 2019 transport tracer run shows negative values around the equator, which, according to Hadley Circulation, should be upwards.

Evidence from codes

We can derive the mass balance below:

$$Tendency\_of\_Mass\_Above\_Level\_K = BK(k)\times PIT = CONV(k) + UPWARDS\_MFZ(k)$$

where UPWARDS_MFZ is the UPWARDS mass flux, CONV is accumulative horizontal mass flux convergence from top to level k, BK is the hybrid parameter b, PIT is the surface pressure tendency.

FVdycoreCubed_GridComp/FV_StateMod.F90

! Compute the vertical mass flux
!
!   Compute Convergence of the horizontal Mass flux
    do k=1,npz
       do j=jsc,jec
          do i=isc,iec
             conv(i,j,k) = ( xfx(i,j,k) - xfx(i+1,j,k) +  &
                             yfx(i,j,k) - yfx(i,j+1,k) )
          enddo
       enddo
    enddo
!   Surface pressure tendency
    pit(:,:) = 0.0
    do k=1,npz
       do j=jsc,jec
          do i=isc,iec
             pit(i,j) = pit(i,j) + conv(i,j,k)
          enddo
       enddo
    enddo
!   Sum over levels
    do k=2,npz
       do j=jsc,jec
          do i=isc,iec
             conv(i,j,k) = conv(i,j,k) + conv(i,j,k-1)
          enddo
       enddo
    enddo
    mfz(:,:,:) = 0.0
    do k=2,npz
       do j=jsc,jec
          do i=isc,iec
             mfz(i,j,k) = ( conv(i,j,k-1)  - FV_Atm(1)%bk(k)*pit(i,j) )/(MAPL_GRAV*fv_atm(1)%gridstruct%area(i,j))  ! Kg/m^2/s
          enddo
       enddo
    enddo

In the codes above, however, mfz(k) = (conv(k) - bk(k)*pit)*unit_conv, proving mfz here is -upwards_mfz, in other words, downwards_mfz.

! Flip vertical so that GCHP diagnostic is positive="up"
UpwardsMassFlux(:,:,:) = UpwardsMassFlux(:,:,LM:0:-1)/dt

Here the flipping only converts the GMAO vertical conventions to GEOS-Chem vertical conventions, namely from level 1 being top to level 1 being surface.

@yuanjianz yuanjianz added the category: Bug Something isn't working label Oct 30, 2024
@lizziel lizziel self-assigned this Nov 12, 2024
@lizziel
Copy link
Contributor

lizziel commented Nov 15, 2024

This makes sense. The fix will go into 14.5.1.

@yantosca yantosca added topic: Diagnostics Related to output diagnostic data topic: Mass Fluxes Pertaining to cubed-sphere mass flux inputs labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working topic: Diagnostics Related to output diagnostic data topic: Mass Fluxes Pertaining to cubed-sphere mass flux inputs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants