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 T, U, V tendency due to dynamics diagnostics #168

Open
jimmielin opened this issue Nov 25, 2024 · 0 comments
Open

Add T, U, V tendency due to dynamics diagnostics #168

jimmielin opened this issue Nov 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jimmielin
Copy link
Member

DTCORE, DQCORE, UTEND_CORE, VTEND_CORE diagnostics should be implemented after the energy fixer (check_energy_fix_run)

Defined half in check_energy.F90

    call addfld('DTCORE', (/ 'lev' /), 'A', 'K/s' , 'T tendency due to dynamical core')
    call addfld('DQCORE', (/ 'lev' /), 'A', 'kg/kg/s' , 'Water vapor tendency due to dynamical core')

... the other half in physpkg.F90

    call addfld('UTEND_CORE', (/ 'lev' /), 'A', 'm/s2' , 'Zonal wind tendency due to dynamical core')
    call addfld('VTEND_CORE', (/ 'lev' /), 'A', 'm/s2' , 'Meridional wind tendency due to dynamical core')
    call register_vector_field('UTEND_CORE','VTEND_CORE')

It is computed in physpkg.F90

    ! T, U, V tendency due to dynamics
    if( nstep > dyn_time_lvls-1 ) then
       dtcore(:ncol,:pver) = (state%t(:ncol,:pver) - dtcore(:ncol,:pver))/ztodt
       dqcore(:ncol,:pver) = (state%q(:ncol,:pver,ixq) - dqcore(:ncol,:pver))/ztodt
       ducore(:ncol,:pver) = (state%u(:ncol,:pver) - ducore(:ncol,:pver))/ztodt
       dvcore(:ncol,:pver) = (state%v(:ncol,:pver) - dvcore(:ncol,:pver))/ztodt
       call outfld( 'DTCORE', dtcore, pcols, lchnk )
       call outfld( 'DQCORE', dqcore, pcols, lchnk )
       call outfld( 'UTEND_CORE', ducore, pcols, lchnk )
       call outfld( 'VTEND_CORE', dvcore, pcols, lchnk )
    end if

"adjusted" (after dycore_energy_consistency_adjust_run) state%T is stored in the pbuf for use in the next step:

    ! store T, U, and V in buffer for use in computing dynamics T-tendency in next timestep
    do k = 1,pver
       dtcore(:ncol,k) = state%t(:ncol,k)
       dqcore(:ncol,k) = state%q(:ncol,k,ixq)
       ducore(:ncol,k) = state%u(:ncol,k)
       dvcore(:ncol,k) = state%v(:ncol,k)
    end do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Do
Development

No branches or pull requests

1 participant