ESCOMP / ESCOMP/atmospheric_physics

Add T, U, V tendency due to dynamics diagnostics

Open
#168 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Fortran
Stars
12
Forks
38
Avg merge
11h 16m
Merged PRs (30d)
5

Description

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

Defined half in `check_energy.F90`
```fortran
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`
```fortran
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`
```fortran
! 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:
```fortran
! 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
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.