Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/narnold1/#878-turb-qctot
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrabenh authored Jan 25, 2024
2 parents b2466b4 + 095590e commit 3ee0bf4
Show file tree
Hide file tree
Showing 15 changed files with 667 additions and 519 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2.1

# Anchors in case we need to override the defaults from the orb
#baselibs_version: &baselibs_version v7.14.0
#bcs_version: &bcs_version v11.1.0
#baselibs_version: &baselibs_version v7.17.0
#bcs_version: &bcs_version v11.4.0

orbs:
ci: geos-esm/circleci-tools@1
ci: geos-esm/circleci-tools@2

workflows:
build-test:
Expand Down
23 changes: 12 additions & 11 deletions GEOSagcm_GridComp/GEOSphysics_GridComp/GEOS_PhysicsGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1046,12 +1046,13 @@ subroutine SetServices ( GC, RC )
RC=STATUS )
VERIFY_(STATUS)

call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'QV ','QLTOT ','QITOT ','FCLD ', &
'WTHV2 ','WQT_DC' /), &
DST_ID = TURBL, &
SRC_ID = MOIST, &
RC=STATUS )
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = [character(len=6) :: &
'QV','QLTOT','QITOT','FCLD', &
'WTHV2','WQT_DC'], &
DST_ID = TURBL, &
SRC_ID = MOIST, &
RC=STATUS )
VERIFY_(STATUS)

call MAPL_AddConnectivity ( GC, &
Expand Down Expand Up @@ -1179,11 +1180,11 @@ subroutine SetServices ( GC, RC )

! Imports for GWD
!----------------
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = [character(len=7):: 'Q', 'DTDT_DC', 'DTDT_SC'], &
DST_ID = GWD, &
SRC_ID = MOIST, &
RC=STATUS )
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = [character(len=7) :: 'Q', 'DTDT_DC', 'CNV_FRC' ], &
DST_ID = GWD, &
SRC_ID = MOIST, &
RC=STATUS )
VERIFY_(STATUS)
call MAPL_AddConnectivity ( GC, &
SRC_NAME = 'DQIDT_micro', &
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ end subroutine energy_fixer

subroutine energy_momentum_adjust(ncol, pver, band, pint, delp, u, v, dt, c, tau, &
effgw, t, ubm, ubi, xv, yv, utgw, vtgw, ttgw, &
tend_level, tndmax_in)
tend_level, tndmax_in, pint_adj)

integer, intent(in) :: ncol, pver
! Wavelengths.
Expand Down Expand Up @@ -913,6 +913,8 @@ subroutine energy_momentum_adjust(ncol, pver, band, pint, delp, u, v, dt, c, tau
real, intent(inout) :: utgw(ncol,pver)
real, intent(inout) :: vtgw(ncol,pver)
real, intent(inout) :: ttgw(ncol,pver)
! Pressure level efficiency adjustment
real, intent(in), optional :: pint_adj(ncol,pver+1)

real :: taucd(ncol,pver+1,4)
real :: um_flux(ncol), vm_flux(ncol)
Expand All @@ -938,16 +940,25 @@ subroutine energy_momentum_adjust(ncol, pver, band, pint, delp, u, v, dt, c, tau
!---------------------------------------------------------------------------------------
! Apply efficiency factor and tendency limiter to prevent unrealistically strong forcing
!---------------------------------------------------------------------------------------
! efficiency factor and optional pressure adjustment
do k = ktop, pver
utfac = 1.0
if (present(pint_adj)) utfac = pint_adj(i,k)
utgw(i,k) = utgw(i,k)*effgw(i)*utfac
vtgw(i,k) = vtgw(i,k)*effgw(i)*utfac
ttgw(i,k) = ttgw(i,k)*effgw(i)*utfac
end do
! tendency limiter
uhtmax = 0.0
utfac = 1.0
do k = ktop, pver
uhtmax = max(sqrt(utgw(i,k)**2 + vtgw(i,k)**2), uhtmax)
end do
utfac = 1.0
if (uhtmax > tndmax) utfac = tndmax/uhtmax
do k = ktop, pver
utgw(i,k) = utgw(i,k)*effgw(i)*utfac
vtgw(i,k) = vtgw(i,k)*effgw(i)*utfac
ttgw(i,k) = ttgw(i,k)*effgw(i)*utfac
utgw(i,k) = utgw(i,k)*utfac
vtgw(i,k) = vtgw(i,k)*utfac
ttgw(i,k) = ttgw(i,k)*utfac
end do
end do ! i=1,ncol

Expand Down
Loading

0 comments on commit 3ee0bf4

Please sign in to comment.